> For the complete documentation index, see [llms.txt](https://jmdash.gitbook.io/jmdash-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jmdash.gitbook.io/jmdash-docs/jmbasics/syntax101/calling-functions/custom-libraries.md).

# Custom libraries

In **JM-**, custom libraries are written in `.jh` files with a unique syntax, they are described as "*literally just groups of `#def` initions*".\
The `.jh` file extension stands for `JmdHeader`.

To create your own library for **JM-**, you can use the syntax example below (extracted from the, [PIDD](/jmdash-docs/design-documents/the-post-idd.md))

{% code lineNumbers="true" fullWidth="false" %}

```c
// File directory: ~/ExampleDir/myJmdLib.jh

&(n*<yourLibraryName>); // In this case the n* should be myJmdLib
&(l*<programmingLanguage>);
&(c*(*)) {
    #def: exampleFunctionName{
        // Function code
    }
    // Other functions
};
&(a*(*)) {
    #def_append: _exampleAppendName{
        // Append code
    }
    // Other appendables
};
&(eohf); // (eof) stands for `end of header file`
```

{% endcode %}

### Notes and details;

* -> `n*` for `(file)name`&#x20;
* -> `l*` for `language`&#x20;
* -> `c*` for `contents`&#x20;
* -> `a*` for `appendables` <br>
* In the `n*` option the inserted name **must** be the same one as the `.jh` file's name
* In the `l*` option the language name **must** be in **lower caps** and **without** special characters (e.g. `&(l*<jmd|c|cpp|python|csharp|etc..);`)
* `l*` currently only supports **JM-** as *"scripting*" language
* You cannot [`#def_macro`](/jmdash-docs/jmbasics/appendables.md) in a `.jh` file
