### Standard Ordered List Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html A basic ordered list example in Markdown. ```markdown 1. one 2. two 3. three ``` -------------------------------- ### Pandoc Wikilink Syntax Examples Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Illustrates the two primary syntaxes for wikilinks supported by Pandoc, depending on the enabled extension. ```bash pandoc --from=markdown+wikilinks_title_after_pipe ``` ```bash pandoc --from=markdown+wikilinks_title_before_pipe ``` -------------------------------- ### Command Line Help Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/README.md Displays instructions for using the OneNoteMdExporter.exe via the command line. Run this command to see available options. ```bash OneNoteMdExporter.exe --help ``` -------------------------------- ### Example of Ignoring Arguments Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Demonstrates ignoring specific arguments using the --ignore-args option. ```bash pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1 ``` -------------------------------- ### Markdown Export Folder Structure Example Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Illustrates the output folder structure for Markdown export (format 1) with HierarchyAsFolderTree enabled. ```text # Markdown Export (format 1) with HierarchyAsFolderTree Export/md/My Notebook-20240115 10-30/ ├── resources/ # All attachments (RootFolder mode) │ ├── abc123.png │ └── def456.pdf ├── Section 1/ │ ├── Page 1.md │ └── Parent Page/ # Folder for parent page │ └── Child Page.md └── Section Group/ └── Nested Section/ └── Page 2.md ``` -------------------------------- ### Run Pandoc as a Web Server Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Rename the pandoc executable to `pandoc-server` or use `server` as the first argument to start a web server with a JSON API. This exposes most conversion functionalities. ```bash pandoc-server ``` -------------------------------- ### For Loop Examples Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Illustrates how to use for loops to iterate over arrays or maps, with options for specifying separators and using the 'it' anaphoric keyword for accessing loop variables. ```text $for(foo)$$foo$$sep$, $endfor$ $for(foo)$ - $foo.last$, $foo.first$ $endfor$ ${ for(foo.bar) } - ${ foo.bar.last }, ${ foo.bar.first } ${ endfor } $for(mymap)$ $it.name$: $it.office$ $endfor$ ``` ```text ${ for(foo) }${ foo }${ sep }, ${ endfor } ``` ```text ${ for(foo.bar) } - ${ it.last }, ${ it.first } ${ endfor } ``` -------------------------------- ### Example Markdown Folder Hierarchy Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/README.md Illustrates the folder structure created when exporting OneNote sections and groups to Markdown format. ```yaml Notebook1 - Section1 - Section1.1 - Page1.md - Page2.md - Section2 ``` -------------------------------- ### Conditional Logic Examples Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Shows how to use conditional statements with 'if', 'else', and 'elseif' to control content rendering based on variable values. Note the difference in boolean interpretation between YAML metadata and command-line variables. ```text $if(foo)$bar$endif$ $if(foo)$ $foo$ $endif$ $if(foo)$ part one $else$ part two $endif$ ${if(foo)}bar${endif} ${if(foo)} ${foo} ${endif} ${if(foo)} ${ foo.bar } ${else} no foo! ${endif} ``` ```text $if(foo)$ XXX $elseif(bar)$ YYY $else$ ZZZ $endif$ ``` -------------------------------- ### Default Configuration Settings Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt The appSettings.json file configures all export parameters. This example shows default values for resource folder naming, page title length, and markdown formatting. ```json { "ResourceFolderName": "resources", "PageTitleMaxLength": 50, "AddFrontMatterHeader": true, "FrontMatterDateFormat": "yyyy-MM-ddTHH:mm:ss", "MdMaxFileLength": 50, "ProcessingOfPageHierarchy": "HierarchyAsFolderTree", "PageHierarchyFileNamePrefixSeparator": "_", "ResourceFolderLocation": "RootFolder", "OneNoteLinksHandling": "ConvertToWikilink", "PanDocMarkdownFormat": "gfm", "PostProcessingMdImgRef": true, "UseHtmlStyling": true, "DisablePageXmlPreProcessing": false, "DeduplicateLinebreaks": true, "MaxTwoLineBreaksInARow": true, "PostProcessingRemoveQuotationBlocks": true, "KeepOneNoteTempFiles": false, "IndentingStyle": "LeaveAsIs", "PostProcessingRemoveOneNoteHeader": true } ``` -------------------------------- ### Fancy Lists: Mixed Marker Types and Start Number Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Shows how Pandoc preserves list marker types and start numbers, and starts new lists with different marker types. ```markdown 9) Ninth 10) Tenth 11) Eleventh i. subone ii. subtwo iii. subthree (2) Two (5) Three 1. Four * Five #. one #. two #. three ``` -------------------------------- ### Vimdoc Header Generation Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Example of metadata variables used for generating Vim help files. Requires abstract, author, title, and filename. ```vimdoc *definition-lists.txt* A short description Title by Author Type |gO| to see the table of contents. [...] vim:tw=72:sw=4:ts=4:ft=help:norl:et: ``` -------------------------------- ### Configure Bibliography Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Specify options for BibLaTeX and Natbib, including bibliography style, title, and the bibliography file itself. This example sets the bibliography file and title. ```yaml --- bibliography: references.bib biblio-title: References ... ``` -------------------------------- ### Numbered List Examples with '@' Marker Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use the '@' marker for sequentially numbered list items. Numbering continues across lists. ```markdown (@) My first example will be numbered (1). (@) My second example will be numbered (2). Explanation of examples. (@) My third example will be numbered (3). ``` -------------------------------- ### Structured Author Metadata Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Example of structured author data within a YAML metadata block, including name and affiliation for each author. ```yaml --- title: The document title author: - name: Author One affiliation: University of Somewhere - name: Author Two affiliation: University of Nowhere ... ``` -------------------------------- ### Interpolated Variable Examples Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Demonstrates various ways to interpolate variables, including simple variables, nested properties, and variables with spaces. Assumes the calling program will handle escaping. ```text $foo$ $foo.bar.baz$ $foo_bar.baz-bim$ $ foo $ ${foo} ${foo.bar.baz} ${foo_bar.baz-bim} ${ foo } ``` -------------------------------- ### Multiline Table Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Demonstrates a multiline table with a header and caption, where rows and the caption can span multiple lines. Ensure rows are separated by blank lines and the table is delimited by rows of dashes. ```markdown ------------------------------------------------------------- Center Aligned Default Right Left Header Aligned Aligned Aligned ----------- ------- --------------- ------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ------------------------------------------------------------- Table: Here's the caption. It, too, may span multiple lines. ``` -------------------------------- ### Joplin Export Folder Structure Example Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Illustrates the output folder structure for Joplin export (format 2), including metadata files for sections and pages. ```text # Joplin Export (format 2) Export/joplin-raw-dir/My Notebook-20240115 10-30/ ├── resources/ │ ├── abc123.png │ └── abc123.md # Joplin resource metadata ├── section-guid-1.md # Section metadata file ├── section-guid-2.md ├── page-guid-1.md # Page content + Joplin metadata └── page-guid-2.md ``` -------------------------------- ### Raw LaTeX Environment Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Material within LaTeX environments like `tabular` is interpreted as raw LaTeX, not Markdown. ```markdown \begin{tabular}{|l|l|} \hline Age & Frequency \\ \hline 18--25 & 15 \\ 26--35 & 33 \\ 36--45 & 22 \\ \hline \end{tabular} ``` -------------------------------- ### YAML Metadata Block Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html A sample YAML metadata block demonstrating various fields including title, author list, keywords, and a multi-paragraph abstract using literal block scalar. ```yaml --- title: 'This is the title: it contains a colon' author: - Author One - Author Two keywords: [nothing, nothingness] abstract: | This is the abstract. It consists of two paragraphs. ... ``` -------------------------------- ### Integrate with OneNote Application Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Manages the COM interop connection to Microsoft OneNote using the OneNoteApp static class. Includes methods for initializing, retrieving notebooks, filling tree structures, getting page content, publishing, and cleaning up COM objects. ```csharp // Initialize OneNote connection OneNoteApp.RenewInstance(); // Get list of available notebooks IList notebooks = OneNoteApp.Instance.GetNotebooks(); foreach (var notebook in notebooks) { Console.WriteLine($"Notebook: {notebook.Title}"); } // Fill notebook structure with sections and section groups OneNoteApp.Instance.FillNodebookTree(notebook); // Get pages from a section IList pages = OneNoteApp.Instance.FillSectionPages(section); // Get page content as XML OneNoteApp.Instance.GetPageContent(page.OneNoteId, out var xmlContent, PageInfo.piBinaryDataFileType); // Publish page to DocX format OneNoteApp.Instance.Publish(page.OneNoteId, outputPath, PublishFormat.pfWord); // Clean up COM objects when done (prevents ghost OneNote.exe processes) OneNoteApp.CleanUp(); ``` -------------------------------- ### LaTeX Macro Application Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Define and use LaTeX macros within Markdown. The macros are applied to LaTeX math and raw LaTeX when the `latex_macros` extension is enabled. ```markdown \newcommand{\tuple}[1]{\langle #1 \rangle} $\tuple{a, b, c}$ ``` -------------------------------- ### Configure Link Colors Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Set custom colors for different types of links (internal, file, citation, URL, ToC) using xcolor package options. This example sets colors for internal links and URLs. ```yaml --- linkcolor: darkblue urlcolor: darkcyan ... ``` -------------------------------- ### List Supported Highlight Styles Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use this command to see a list of available syntax highlighting styles. ```bash pandoc --list-highlight-styles ``` -------------------------------- ### Definition List with Code Block Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Example of a definition list containing a code block within a definition. ```markdown Term 2 with *inline markup* : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. ``` -------------------------------- ### Enable PDF/UA with WeasyPrint Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Utilize WeasyPrint as the PDF engine with the `--pdf-engine-opt=--pdf-variant=pdf/ua-1` option for experimental PDF/UA support. Standard compliance should not be assumed. ```bash pandoc --pdf-engine=weasyprint \ --pdf-engine-opt=--pdf-variant=pdf/ua-1 ... ``` -------------------------------- ### Markdown Cell with Code Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Example of a markdown cell containing a Python code block. Output from the code block is also shown. ```markdown :::::: {.cell .markdown} # Lorem **Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus bibendum felis dictum sodales. :::::: ``` ```python print("hello") ``` ```markdown :::.output .stream .stdout} ``` hello ``` ::: :::::: ``` -------------------------------- ### Inline References in YAML Metadata Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Example of defining bibliographic references directly within the document's YAML metadata section. ```yaml --- references: - type: article-journal id: WatsonCrick1953 author: - family: Watson given: J. D. - family: Crick given: F. H. C. issued: date-parts: - - 1953 - 4 - 25 title: 'Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid' title-short: Molecular structure of nucleic acids container-title: Nature volume: 171 issue: 4356 page: 737-738 DOI: 10.1038/171737a0 URL: https://www.nature.com/articles/171737a0 language: en-GB ... ``` -------------------------------- ### Mapping Reader Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Illustrates how the '--from' command-line option maps to the 'from' or 'reader' field in a defaults file. ```yaml from: markdown+emoji ``` -------------------------------- ### Include Partials in Templates Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Demonstrates how to include partials by their name, optionally with file extensions. Partials are searched in the main template's directory. ```template ${ styles() } ``` ```template ${ styles.html() } ``` -------------------------------- ### Task Lists: Checked and Unchecked Items Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Illustrates the syntax for creating task lists with checked and unchecked items using the `task_lists` extension. ```markdown - [ ] an unchecked task list item - [x] checked item ``` -------------------------------- ### Inline TeX Citation Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use inline TeX commands for citations within Markdown documents. This is preserved and passed to LaTeX/ConTeXt writers. ```markdown This result was proved in \cite{jones.1967}. ``` -------------------------------- ### List Pandoc Extensions for a Format Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Command to list all supported extensions for a given Pandoc format, indicating which are enabled by default. ```bash pandoc --list-extensions=FORMAT ``` -------------------------------- ### Mapping Command Line Input Files to Defaults Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Shows how single and multiple input files on the command line map to the 'input-files' field in a defaults file. ```yaml input-files: - foo.md - bar.md ``` -------------------------------- ### Line Blocks Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Preserve line breaks and leading spaces by starting lines with a vertical bar and a space. Continuation lines must begin with a space. ```markdown | The limerick packs laughs anatomical | In space that is quite economical. | But the good ones I've seen | So seldom are clean | And the clean ones so seldom are comical ``` ```markdown | 200 Main St. | Berkeley, CA 94718 ``` ```markdown | The Right Honorable Most Venerable and Righteous Samuel L. Constable, Jr. | 200 Main St. | Berkeley, CA 94718 ``` -------------------------------- ### Pipes with Parameters for Table Formatting Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Shows how to use pipes with parameters like 'left' and 'right' for precise text alignment and border application within a table structure. ```plaintext $for(employee)$ $it.name.first/uppercase/left 20 "| "$$it.name.salary/right 10 " | " " |"$ $endfor$ ``` -------------------------------- ### Configure Babel Fonts Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Map Babel language names to specific fonts for multilingual documents. Example shows configurations for Chinese (Traditional) and Russian. ```yaml --- babelfonts: chinese-hant: "Noto Serif CJK TC" russian: "Noto Serif" ... ``` -------------------------------- ### Configure Geometry Package Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Applies options to the `geometry` LaTeX package for precise margin control. Repeat for multiple settings. ```yaml geometry: - top=30mm - left=20mm - heightrounded ... ``` -------------------------------- ### Implement Export Service Interface Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Defines the IExportService interface for export formats and provides a factory to get the appropriate service implementation (MdExportService or JoplinExportService). ```csharp // IExportService interface public interface IExportService { NotebookExportResult ExportNotebook( Notebook notebook, string sectionNameFilter = "", string pageNameFilter = "" ); } // Factory to get appropriate export service public static class ExportServiceFactory { public static IExportService GetExportService(ExportFormat exportFormat) => exportFormat switch { ExportFormat.Markdown => new MdExportService(), ExportFormat.JoplinMdFolder => new JoplinExportService(), _ => throw new NotImplementedException(), }; } // Usage example var exportService = ExportServiceFactory.GetExportService(ExportFormat.Markdown); var result = exportService.ExportNotebook(notebook); if (result.PagesOnError > 0) { Console.WriteLine($"Export completed with {result.PagesOnError} pages that had errors"); } ``` -------------------------------- ### Print Default Pygments Highlight Style Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Generates a JSON theme file for the 'pygments' style, which can then be edited and used with the --syntax-highlighting option. ```bash pandoc -o my.theme --print-highlight-style pygments ``` -------------------------------- ### Set Reveal.js Theme Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Configure reveal.js themes using the '-V' option with the 'theme' variable. ```bash -V theme=moon ``` -------------------------------- ### Configure Font Fallbacks Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Define fallback fonts for main, sans, and mono fonts when a glyph is not found. Fallbacks are lists and currently only supported with lualatex. Example includes FreeSans and NotoColorEmoji. ```yaml --- mainfontfallback: - "FreeSans:" - "NotoColorEmoji:mode=harf" ... ``` -------------------------------- ### Specify Input and Output Formats Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use the -f/--from and -t/--to options to explicitly define the input and output formats for conversion. This provides precise control over the conversion process. ```bash pandoc -f markdown -t latex hello.txt ``` ```bash pandoc -f html -t markdown hello.html ``` -------------------------------- ### Markdown Front Matter Header Example Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/README.md Shows the YAML front matter header that can be added to Markdown files, containing page metadata like title, creation, and update times. ```yaml --- title: Page title updated: 2021-11-11 14:55:00Z created: 2021-11-11 14:54:43Z --- Page content ``` -------------------------------- ### Basic Pipe Usage Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Demonstrates the basic application of pipes like 'uppercase' to transform variable values within a loop. ```plaintext $for(name)$ $name/uppercase$ $endfor$ ``` -------------------------------- ### Run Pandoc as a Lua Interpreter Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Execute pandoc as `pandoc-lua` or with `lua` as the first argument to use it as a standalone Lua 5.4 interpreter. It provides access to pandoc-specific packages and globals. ```bash pandoc-lua ``` ```bash lua ``` -------------------------------- ### Fenced Code Blocks with Attributes Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Attach attributes like IDs, classes, and custom attributes to fenced code blocks. The `numberLines` class enables line numbering, optionally starting from a specific value. ```markdown ~~~~ {#mycode .haskell .numberLines startFrom="100"} qsort [] = [] qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ \ qsort (filter (>= x) xs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ```markdown
  
  ...
  
``` -------------------------------- ### Run Pandoc as a CGI Program Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Rename the pandoc executable to `pandoc-server.cgi` to run it as a CGI program, exposing the same API as `pandoc-server`. This mode is designed for security with strong I/O guarantees. ```bash pandoc-server.cgi ``` -------------------------------- ### Iterate and Apply Partials Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Illustrates iterating over an array and applying a partial to each element using the anaphoric keyword 'it'. ```template ${ for(articles) } ${ it:bibentry() } ${ endfor } ``` -------------------------------- ### Configure Font Families with xelatex/lualatex Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Set font families for xelatex or lualatex using system font names via the fontspec package. Example shows TeX Gyre Pagella with specific number and proportionality options. ```yaml --- mainfont: TeX Gyre Pagella mainfontoptions: - Numbers=Lowercase - Numbers=Proportional ... ``` -------------------------------- ### Compact Definition List Syntax Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Shows a more compact syntax for definition lists using '~' for definitions. ```markdown Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b ``` -------------------------------- ### Set Babel Package Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Passes options to the `babel` package. Options can be repeated. Defaults to `provide=*` for non-European languages. ```yaml babeloptions: - main=english - otheroption ``` -------------------------------- ### Create PDF Output Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html To generate a PDF document, simply specify an output filename with a .pdf extension. Pandoc will handle the necessary conversions to produce PDF output. ```bash pandoc test.txt -o test.pdf ``` -------------------------------- ### Joplin Import Process using Bash Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Steps to export a notebook using OneNoteMdExporter and import it into Joplin using the 'RAW - Joplin Export Directory' format. ```bash # 1. Export notebook using OneNoteMdExporter OneNoteMdExporter.exe --notebook "My Notebook" --format 2 --no-input # 2. The export creates a folder structure: # Export/joplin-raw-dir/My Notebook-20240115 10-30/ # ├── .md # Section metadata # ├── .md # Page content + metadata # └── resources/ # ├── .ext # └── .md # Attachment metadata # 3. In Joplin: File > Import > "RAW - Joplin Export Directory" # 4. Select the export folder location ``` -------------------------------- ### Reproducible Builds with SOURCE_DATE_EPOCH Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Set the SOURCE_DATE_EPOCH environment variable to an integer Unix timestamp to ensure consistent build timestamps for formats like EPUB and DOCX. ```bash export SOURCE_DATE_EPOCH=1234567890 ``` -------------------------------- ### Dump Command-Line Arguments Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Print information about command-line arguments to stdout and exit. Useful for wrapper scripts. ```bash --dump-args[=true|false] ``` -------------------------------- ### List Supported Highlight Languages Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use this command to see a list of language names that Pandoc recognizes for syntax highlighting. ```bash pandoc --list-highlight-languages ``` -------------------------------- ### Set Hyperref Package Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Configures options for the `hyperref` LaTeX package. Multiple options can be specified by repeating the key. ```yaml hyperrefoptions: - linktoc=all - pdfwindowui - pdfpagemode=FullScreen ... ``` -------------------------------- ### Using a Custom Lua Writer Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Specify a Lua script as the output format to use a custom writer. For standalone output, a template may be required. ```bash pandoc -t data/sample.lua ``` -------------------------------- ### Enable Tagging with ConTeXt Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Use the `tagging` format extension with ConTeXt to force markup optimized for PDF tagging. Ensure a recent ConTeXt version is used to avoid bugs in older versions. ```bash pandoc -t context+tagging doc.md -o doc.pdf ``` -------------------------------- ### Produce Standalone Document Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Generates output with an appropriate header and footer, creating a standalone document rather than a fragment. This option is automatically set for certain output formats like pdf, epub, and docx. For 'native' output, it includes metadata. ```bash -s --standalone ``` -------------------------------- ### Set CSquotes Package Options Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Specifies options for the `csquotes` package. Repeat the key for multiple options. ```yaml csquotesoptions: - option1 - option2 ``` -------------------------------- ### Apply Custom Highlight Style Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Applies a custom highlight style defined in a JSON theme file. ```bash pandoc --syntax-highlighting my.theme ``` -------------------------------- ### Using a Custom Lua Reader Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Specify a Lua script as the input format to use a custom reader. The script should define a `Reader` function. ```bash pandoc -f my_custom_markup_language.lua -t latex -s ``` -------------------------------- ### Configure Front Matter Headers Source: https://context7.com/alxnbl/onenote-md-exporter/llms.txt Enable YAML metadata headers in markdown files and specify the date format. The generated headers include title, creation, and modification dates. ```json // Enable front matter headers { "AddFrontMatterHeader": true, "FrontMatterDateFormat": "yyyy-MM-ddTHH:mm:ss" } // Generated markdown output: // --- // title: My Page Title // created: 2024-01-15T10:30:00 // updated: 2024-02-20T14:45:30 // --- // // Page content here... ``` -------------------------------- ### Simple Defaults File Entry Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html A minimal defaults file specifying the verbosity level. ```yaml verbosity: INFO ``` -------------------------------- ### Resource Path Configuration Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Configure resource paths, including the working directory and a subdirectory relative to the defaults file. ```yaml resource-path: - . # the working directory from which pandoc is run - ${.}/images # the images subdirectory of the directory # containing this defaults file ``` -------------------------------- ### Load CSquotes Package Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Loads the `csquotes` package to enable `\enquote` or `\enquote*` for quoted text. ```yaml csquotes: true ``` -------------------------------- ### Reveal.js Presentation Configuration Source: https://github.com/alxnbl/onenote-md-exporter/blob/main/src/OneNoteMdExporter/pandoc/MANUAL.html Configure reveal.js presentation settings including title, parallax background, and slide-specific attributes. ```yaml --- title: My Slide Show parallaxBackgroundImage: /path/to/my/background_image.png title-slide-attributes: data-background-image: /path/to/title_image.png data-background-size: contain --- ## Slide One Slide 1 has background_image.png as its background. ## {background-image="/path/to/special_image.jpg"} Slide 2 has a special image for its background, even though the heading has no content. ```