These variables can replace those set by the defaults files, but usually not all. Third, Pandoc will parse the YAML frontmatter(s) of the file(s) you are currently trying to import or export. Every variable defined in there will replace the default inside Pandoc's configuration. Second, Pandoc will load in the defaults file Zettlr provides it with. In below's graphic, you can see how each import or export is being done.įirst, Pandoc will load its own internal defaults which are hard-coded into the binary (and which are the reason why you do not have to define all variables every time). It is paramount to understand how Pandoc determines the final and effective set of parameters which it will then use to facilitate your import or export. The last question you might be interested to know about is the way all the different variables you can define to control Pandoc interfere with each other. This will still use the same reader, but configure it (in this example) to additionally use definition lists, multi-markdown title blocks, bracketed spans, and fenced divs. Example: reader: markdown+definition_lists+mmd_title_block+bracketed_spans+fenced_divs. So if you require extensions to the standard Markdown reader, you can of course add these to the reader or writer properties. These are specified by adding them after the reader or writer properties using +-signs. Pandoc supports Markdown extensions (i.e. We mentioned that you should not change the writer or reader properties.
HOW TO IMPORT TO ZETTLR FREE
Other than that, however, you are free to do whatever you need to the defaults files in order to adapt the imports and exports to your liking. The input and output files, however, will be replaced internally, so defining a few files in there will have no effect. For example, Zettlr will check if you have already defined a bibliography in there, and add your main library to that array so that those citation libraries you have already defined will not be lost. In general, Zettlr will try to only amend the properties you define in a defaults file instead of replacing them. Next, whenever Zettlr imports or exports a file, it will read in the corresponding defaults file and modify it in specific ways. If you, for example, exchange a writer and a reader property, Pandoc might complain. However, since Zettlr allows you to export and import a certain set of files, it is smarter to offer you a range of defaults files where these properties are fixed. These properties can be set because you could, in theory, use a default file for several conversion strategies. First, you should never change the writer and reader properties except for adding markdown extensions (see info box below). The defaults files as used by Zettlr have a certain set of requirements which you must keep in mind when editing them.
HOW TO IMPORT TO ZETTLR MANUAL
Make sure to refer to that manual when you edit defaults files.
HOW TO IMPORT TO ZETTLR FULL
The full documentation for what you can do with defaults files can be found in the Pandoc manual. As such, when Zettlr is started, it will check for the existence of these required files and create them if necessary. Zettlr requires a certain set of defaults files, since for each export or import it will pass one of these files to Pandoc. yaml, where import/export refers to where the file will be used and writer/reader refers to the format used. They reside in your user data folder and have the format. What are Defaults Files? ¶ĭefaults files are YAML files which contain properties that can be used to control the Pandoc behaviour for a given export or import format. However, Zettlr ships with reasonable default settings, so if you do not have special requirements, you can leave these files as they are. Previously, Zettlr would use defaults files internally, but Zettlr 2.0 finally gives you the ability to edit these files yourself.Įditing these files can be a little bit tricky, so expect to export a test file multiple times before you have got it right. Defaults files resemble YAML frontmatters, but are more powerful and apply to all your files instead of just a single one. Defaults files are a way to define default values for many of the variables that Pandoc uses internally to facilitate both your imports and exports.