apex-ruby 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +119 -0
  3. data/apex-ruby.gemspec +31 -0
  4. data/ext/apex_ext/apex_ext.c +215 -0
  5. data/ext/apex_ext/apex_src/BENCHMARK.md +32 -0
  6. data/ext/apex_ext/apex_src/BENCHMARK_COMPARISON.md +67 -0
  7. data/ext/apex_ext/apex_src/CHANGELOG.md +2454 -0
  8. data/ext/apex_ext/apex_src/CMakeLists.txt +454 -0
  9. data/ext/apex_ext/apex_src/Dockerfile.linux-build +15 -0
  10. data/ext/apex_ext/apex_src/Formula/apex.rb +38 -0
  11. data/ext/apex_ext/apex_src/Info.plist.in +27 -0
  12. data/ext/apex_ext/apex_src/LICENSE +21 -0
  13. data/ext/apex_ext/apex_src/Package.swift +160 -0
  14. data/ext/apex_ext/apex_src/PackageSupport/README.md +17 -0
  15. data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark-gfm_export.h +20 -0
  16. data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark-gfm_version.h +14 -0
  17. data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark_gfm_spm_stub.c +4 -0
  18. data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/config.h +41 -0
  19. data/ext/apex_ext/apex_src/README.md +452 -0
  20. data/ext/apex_ext/apex_src/VERSION +1 -0
  21. data/ext/apex_ext/apex_src/apex-header-2-rb@2x.webp +0 -0
  22. data/ext/apex_ext/apex_src/apex-plugins.json.example +20 -0
  23. data/ext/apex_ext/apex_src/apex.pc.in +11 -0
  24. data/ext/apex_ext/apex_src/cli/main.c +2720 -0
  25. data/ext/apex_ext/apex_src/debug_test.sh +22 -0
  26. data/ext/apex_ext/apex_src/docs/API_REFERENCE.md +451 -0
  27. data/ext/apex_ext/apex_src/docs/ARCHITECTURE.md +166 -0
  28. data/ext/apex_ext/apex_src/docs/CMARK_INTEGRATION.md +220 -0
  29. data/ext/apex_ext/apex_src/docs/CRITICMARKUP.md +501 -0
  30. data/ext/apex_ext/apex_src/docs/DEBUGGING.md +73 -0
  31. data/ext/apex_ext/apex_src/docs/FINAL_STATUS.md +391 -0
  32. data/ext/apex_ext/apex_src/docs/FINAL_STATUS_UPDATE.md +237 -0
  33. data/ext/apex_ext/apex_src/docs/FUTURE_FEATURES.md +456 -0
  34. data/ext/apex_ext/apex_src/docs/IAL_FEATURES.md +210 -0
  35. data/ext/apex_ext/apex_src/docs/IAL_STATUS.md +344 -0
  36. data/ext/apex_ext/apex_src/docs/INTEGRATION_EXAMPLE.m +144 -0
  37. data/ext/apex_ext/apex_src/docs/LIMITATIONS_RESOLVED.md +278 -0
  38. data/ext/apex_ext/apex_src/docs/OUTPUT_MODES.md +321 -0
  39. data/ext/apex_ext/apex_src/docs/PROGRESS.md +167 -0
  40. data/ext/apex_ext/apex_src/docs/STANDALONE_FEATURE.md +174 -0
  41. data/ext/apex_ext/apex_src/docs/TABLE_SPANS_STATUS.md +243 -0
  42. data/ext/apex_ext/apex_src/docs/TEST_COVERAGE.md +316 -0
  43. data/ext/apex_ext/apex_src/docs/USER_GUIDE.md +803 -0
  44. data/ext/apex_ext/apex_src/docs/WIKI_LINKS_ISSUE.md +91 -0
  45. data/ext/apex_ext/apex_src/documentation/README.md +160 -0
  46. data/ext/apex_ext/apex_src/documentation/docsets/Apex Command Line Options.cheatsheet.txt +365 -0
  47. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Info.plist +24 -0
  48. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/C-API.html +1737 -0
  49. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Citations.html +1420 -0
  50. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Command-Line-Options.html +3574 -0
  51. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Configuration.html +1603 -0
  52. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Credits.html +910 -0
  53. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Examples.html +1168 -0
  54. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Getting-Started.html +1003 -0
  55. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Header-IDs.html +1308 -0
  56. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Home.html +1078 -0
  57. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Inline-Attribute-Lists.html +1622 -0
  58. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Installation.html +1168 -0
  59. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Limitations-and-Roadmap.html +1698 -0
  60. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Metadata-Transforms.html +1531 -0
  61. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Modes.html +1980 -0
  62. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-File-Documents.html +1368 -0
  63. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Pandoc-Integration.html +1151 -0
  64. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Plugins.html +2861 -0
  65. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Syntax.html +3981 -0
  66. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Troubleshooting.html +1454 -0
  67. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Usage.html +1200 -0
  68. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Xcode-Integration.html +2066 -0
  69. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/docSet.dsidx +0 -0
  70. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
  71. data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/tempOptimizedIndex.dsidx +0 -0
  72. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Info.plist +22 -0
  73. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff +0 -0
  74. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff +0 -0
  75. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff +0 -0
  76. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff +0 -0
  77. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff +0 -0
  78. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff +0 -0
  79. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff +0 -0
  80. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff +0 -0
  81. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/index.html +914 -0
  82. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/style.css +399 -0
  83. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/docSet.dsidx +0 -0
  84. data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
  85. data/ext/apex_ext/apex_src/documentation/generate_app_docs.rb +772 -0
  86. data/ext/apex_ext/apex_src/documentation/generate_app_docs_ai.rb +678 -0
  87. data/ext/apex_ext/apex_src/documentation/generate_docset.rb +873 -0
  88. data/ext/apex_ext/apex_src/documentation/generate_single_html.rb +733 -0
  89. data/ext/apex_ext/apex_src/documentation/html/apex-docs.html +17073 -0
  90. data/ext/apex_ext/apex_src/documentation/shared_scripts.js +64 -0
  91. data/ext/apex_ext/apex_src/documentation/shared_styles.css +646 -0
  92. data/ext/apex_ext/apex_src/documentation/transform_for_app.example.md +260 -0
  93. data/ext/apex_ext/apex_src/examples/bracketed_spans_demo.md +119 -0
  94. data/ext/apex_ext/apex_src/examples/emoji_span_plugin.yml +11 -0
  95. data/ext/apex_ext/apex_src/examples/example.html +53 -0
  96. data/ext/apex_ext/apex_src/examples/example.md +85 -0
  97. data/ext/apex_ext/apex_src/examples/fenced_divs_demo.md +158 -0
  98. data/ext/apex_ext/apex_src/examples/kbd.md +8 -0
  99. data/ext/apex_ext/apex_src/examples/kbd_plugin.rb +250 -0
  100. data/ext/apex_ext/apex_src/examples/kbd_plugin.yml +9 -0
  101. data/ext/apex_ext/apex_src/icon/apexicon-outline-black.png +0 -0
  102. data/ext/apex_ext/apex_src/icon/apexicon-outline-black@2x.png +0 -0
  103. data/ext/apex_ext/apex_src/icon/apexicon-outline-mark.png +0 -0
  104. data/ext/apex_ext/apex_src/icon/apexicon-outline-mark@2x.png +0 -0
  105. data/ext/apex_ext/apex_src/icon/apexicon-outline-white.png +0 -0
  106. data/ext/apex_ext/apex_src/icon/apexicon-outline-white@2x.png +0 -0
  107. data/ext/apex_ext/apex_src/icon/apexicon.png +0 -0
  108. data/ext/apex_ext/apex_src/icon/apexicon@2x.png +0 -0
  109. data/ext/apex_ext/apex_src/include/apex/apex.h +247 -0
  110. data/ext/apex_ext/apex_src/include/apex/buffer.h +93 -0
  111. data/ext/apex_ext/apex_src/include/apex/module.modulemap +16 -0
  112. data/ext/apex_ext/apex_src/include/apex/parser.h +150 -0
  113. data/ext/apex_ext/apex_src/include/apex/renderer.h +39 -0
  114. data/ext/apex_ext/apex_src/man/apex-config.5 +374 -0
  115. data/ext/apex_ext/apex_src/man/apex-config.5.md +260 -0
  116. data/ext/apex_ext/apex_src/man/apex-plugins.7 +456 -0
  117. data/ext/apex_ext/apex_src/man/apex-plugins.7.md +365 -0
  118. data/ext/apex_ext/apex_src/man/apex.1 +828 -0
  119. data/ext/apex_ext/apex_src/man/apex.1.md +643 -0
  120. data/ext/apex_ext/apex_src/man/apex.1.new +338 -0
  121. data/ext/apex_ext/apex_src/objc/Apex.swift +237 -0
  122. data/ext/apex_ext/apex_src/objc/NSString+Apex.h +117 -0
  123. data/ext/apex_ext/apex_src/objc/NSString+Apex.m +332 -0
  124. data/ext/apex_ext/apex_src/src/_README.md +358 -0
  125. data/ext/apex_ext/apex_src/src/apex.c +6326 -0
  126. data/ext/apex_ext/apex_src/src/buffer.c +93 -0
  127. data/ext/apex_ext/apex_src/src/extensions/abbreviations.c +362 -0
  128. data/ext/apex_ext/apex_src/src/extensions/abbreviations.h +45 -0
  129. data/ext/apex_ext/apex_src/src/extensions/advanced_footnotes.c +184 -0
  130. data/ext/apex_ext/apex_src/src/extensions/advanced_footnotes.h +50 -0
  131. data/ext/apex_ext/apex_src/src/extensions/advanced_tables.c +1897 -0
  132. data/ext/apex_ext/apex_src/src/extensions/advanced_tables.h +42 -0
  133. data/ext/apex_ext/apex_src/src/extensions/callouts.c +215 -0
  134. data/ext/apex_ext/apex_src/src/extensions/callouts.h +53 -0
  135. data/ext/apex_ext/apex_src/src/extensions/citations.c +2042 -0
  136. data/ext/apex_ext/apex_src/src/extensions/citations.h +163 -0
  137. data/ext/apex_ext/apex_src/src/extensions/critic.c +329 -0
  138. data/ext/apex_ext/apex_src/src/extensions/critic.h +48 -0
  139. data/ext/apex_ext/apex_src/src/extensions/definition_list.c +1670 -0
  140. data/ext/apex_ext/apex_src/src/extensions/definition_list.h +42 -0
  141. data/ext/apex_ext/apex_src/src/extensions/emoji.c +710 -0
  142. data/ext/apex_ext/apex_src/src/extensions/emoji.h +38 -0
  143. data/ext/apex_ext/apex_src/src/extensions/emoji_data.h +942 -0
  144. data/ext/apex_ext/apex_src/src/extensions/fenced_divs.c +925 -0
  145. data/ext/apex_ext/apex_src/src/extensions/fenced_divs.h +43 -0
  146. data/ext/apex_ext/apex_src/src/extensions/github-emoji.txt +869 -0
  147. data/ext/apex_ext/apex_src/src/extensions/grid_tables.c +1121 -0
  148. data/ext/apex_ext/apex_src/src/extensions/grid_tables.h +33 -0
  149. data/ext/apex_ext/apex_src/src/extensions/header_ids.c +626 -0
  150. data/ext/apex_ext/apex_src/src/extensions/header_ids.h +60 -0
  151. data/ext/apex_ext/apex_src/src/extensions/highlight.c +135 -0
  152. data/ext/apex_ext/apex_src/src/extensions/highlight.h +16 -0
  153. data/ext/apex_ext/apex_src/src/extensions/html_markdown.c +408 -0
  154. data/ext/apex_ext/apex_src/src/extensions/html_markdown.h +42 -0
  155. data/ext/apex_ext/apex_src/src/extensions/ial.c +4084 -0
  156. data/ext/apex_ext/apex_src/src/extensions/ial.h +145 -0
  157. data/ext/apex_ext/apex_src/src/extensions/includes.c +1536 -0
  158. data/ext/apex_ext/apex_src/src/extensions/includes.h +54 -0
  159. data/ext/apex_ext/apex_src/src/extensions/index.c +967 -0
  160. data/ext/apex_ext/apex_src/src/extensions/index.h +90 -0
  161. data/ext/apex_ext/apex_src/src/extensions/inline_footnotes.c +205 -0
  162. data/ext/apex_ext/apex_src/src/extensions/inline_footnotes.h +34 -0
  163. data/ext/apex_ext/apex_src/src/extensions/inline_tables.c +332 -0
  164. data/ext/apex_ext/apex_src/src/extensions/inline_tables.h +13 -0
  165. data/ext/apex_ext/apex_src/src/extensions/insert.c +248 -0
  166. data/ext/apex_ext/apex_src/src/extensions/insert.h +18 -0
  167. data/ext/apex_ext/apex_src/src/extensions/math.c +279 -0
  168. data/ext/apex_ext/apex_src/src/extensions/math.h +32 -0
  169. data/ext/apex_ext/apex_src/src/extensions/metadata.c +3046 -0
  170. data/ext/apex_ext/apex_src/src/extensions/metadata.h +125 -0
  171. data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.c +1297 -0
  172. data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.h +39 -0
  173. data/ext/apex_ext/apex_src/src/extensions/special_markers.c +194 -0
  174. data/ext/apex_ext/apex_src/src/extensions/special_markers.h +29 -0
  175. data/ext/apex_ext/apex_src/src/extensions/sup_sub.c +405 -0
  176. data/ext/apex_ext/apex_src/src/extensions/sup_sub.h +16 -0
  177. data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.c +468 -0
  178. data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.h +44 -0
  179. data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.c +2679 -0
  180. data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.h +23 -0
  181. data/ext/apex_ext/apex_src/src/extensions/toc.c +255 -0
  182. data/ext/apex_ext/apex_src/src/extensions/toc.h +34 -0
  183. data/ext/apex_ext/apex_src/src/extensions/wiki_links.c +624 -0
  184. data/ext/apex_ext/apex_src/src/extensions/wiki_links.h +58 -0
  185. data/ext/apex_ext/apex_src/src/html_renderer.c +2762 -0
  186. data/ext/apex_ext/apex_src/src/html_renderer.h +126 -0
  187. data/ext/apex_ext/apex_src/src/parser.c +227 -0
  188. data/ext/apex_ext/apex_src/src/plugins.c +895 -0
  189. data/ext/apex_ext/apex_src/src/plugins.h +39 -0
  190. data/ext/apex_ext/apex_src/src/plugins_env.c +187 -0
  191. data/ext/apex_ext/apex_src/src/plugins_remote.c +263 -0
  192. data/ext/apex_ext/apex_src/src/pretty_html.c +358 -0
  193. data/ext/apex_ext/apex_src/src/renderer.c +241 -0
  194. data/ext/apex_ext/apex_src/src/utf8.c +56 -0
  195. data/ext/apex_ext/apex_src/test-linux-build.sh +20 -0
  196. data/ext/apex_ext/apex_src/test.html +103 -0
  197. data/ext/apex_ext/apex_src/test_coverage.sh +121 -0
  198. data/ext/apex_ext/apex_src/test_ial_fenced.md +6 -0
  199. data/ext/apex_ext/apex_src/test_math_norm.py +79 -0
  200. data/ext/apex_ext/apex_src/test_pandoc_output.html +48 -0
  201. data/ext/apex_ext/apex_src/test_spm.sh +107 -0
  202. data/ext/apex_ext/apex_src/tests/ApexSPMTest/main.swift +50 -0
  203. data/ext/apex_ext/apex_src/tests/BENCHMARK_RESULTS.md +229 -0
  204. data/ext/apex_ext/apex_src/tests/CMakeLists.txt +24 -0
  205. data/ext/apex_ext/apex_src/tests/README.md +146 -0
  206. data/ext/apex_ext/apex_src/tests/benchmark.sh +113 -0
  207. data/ext/apex_ext/apex_src/tests/benchmark_comparison.sh +166 -0
  208. data/ext/apex_ext/apex_src/tests/compare_header_ids.sh +31 -0
  209. data/ext/apex_ext/apex_src/tests/fixtures/basic/headers.md +25 -0
  210. data/ext/apex_ext/apex_src/tests/fixtures/basic/list-interruption.md +24 -0
  211. data/ext/apex_ext/apex_src/tests/fixtures/basic/misc_markup.md +33 -0
  212. data/ext/apex_ext/apex_src/tests/fixtures/basic/test_basic.md +26 -0
  213. data/ext/apex_ext/apex_src/tests/fixtures/code/code-blocks.md +260 -0
  214. data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/SUMMARY.md +6 -0
  215. data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/chapter1.md +7 -0
  216. data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/index.txt +9 -0
  217. data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/intro.md +5 -0
  218. data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/section1_1.md +5 -0
  219. data/ext/apex_ext/apex_src/tests/fixtures/comprehensive_test.md +620 -0
  220. data/ext/apex_ext/apex_src/tests/fixtures/debug_ref_image_ial.md +3 -0
  221. data/ext/apex_ext/apex_src/tests/fixtures/demos/ial.md +11 -0
  222. data/ext/apex_ext/apex_src/tests/fixtures/demos/ial_demo.md +177 -0
  223. data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji-autocorrect.md +94 -0
  224. data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji_test.md +3 -0
  225. data/ext/apex_ext/apex_src/tests/fixtures/extensions/kbd_test.md +3 -0
  226. data/ext/apex_ext/apex_src/tests/fixtures/ial/bracketed_spans_test.md +74 -0
  227. data/ext/apex_ext/apex_src/tests/fixtures/images/image_and_encoding_test.md +27 -0
  228. data/ext/apex_ext/apex_src/tests/fixtures/images/multimarkdown_image_attributes_test.md +60 -0
  229. data/ext/apex_ext/apex_src/tests/fixtures/images/pandoc_ial_image_test.md +27 -0
  230. data/ext/apex_ext/apex_src/tests/fixtures/images/width_height_conversion_test.md +94 -0
  231. data/ext/apex_ext/apex_src/tests/fixtures/img-in-div.md +16 -0
  232. data/ext/apex_ext/apex_src/tests/fixtures/includes/code.py +4 -0
  233. data/ext/apex_ext/apex_src/tests/fixtures/includes/data.csv +5 -0
  234. data/ext/apex_ext/apex_src/tests/fixtures/includes/data.tsv +5 -0
  235. data/ext/apex_ext/apex_src/tests/fixtures/includes/image.png +2 -0
  236. data/ext/apex_ext/apex_src/tests/fixtures/includes/metadata_options.yml +11 -0
  237. data/ext/apex_ext/apex_src/tests/fixtures/includes/nested.md +8 -0
  238. data/ext/apex_ext/apex_src/tests/fixtures/includes/raw.html +4 -0
  239. data/ext/apex_ext/apex_src/tests/fixtures/includes/simple.md +7 -0
  240. data/ext/apex_ext/apex_src/tests/fixtures/includes/test_image.png +0 -0
  241. data/ext/apex_ext/apex_src/tests/fixtures/large_doc.md +1094 -0
  242. data/ext/apex_ext/apex_src/tests/fixtures/metadata_options.yml +11 -0
  243. data/ext/apex_ext/apex_src/tests/fixtures/output/gfm_header_id_test.md +96 -0
  244. data/ext/apex_ext/apex_src/tests/fixtures/output/test_citations.md +43 -0
  245. data/ext/apex_ext/apex_src/tests/fixtures/output/test_def_list_links.md +12 -0
  246. data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_mmark.md +53 -0
  247. data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_textindex.md +37 -0
  248. data/ext/apex_ext/apex_src/tests/fixtures/tables/advanced_tables_test.md +93 -0
  249. data/ext/apex_ext/apex_src/tests/fixtures/tables/inline_tables_test.md +38 -0
  250. data/ext/apex_ext/apex_src/tests/fixtures/tables/relaxed-table.md +12 -0
  251. data/ext/apex_ext/apex_src/tests/fixtures/tables/table_cr_line_endings.md +15 -0
  252. data/ext/apex_ext/apex_src/tests/fixtures/tables/table_no_trailing_newline.md +15 -0
  253. data/ext/apex_ext/apex_src/tests/generate_gfm_ids.sh +105 -0
  254. data/ext/apex_ext/apex_src/tests/generate_ial_demo.sh +143 -0
  255. data/ext/apex_ext/apex_src/tests/gfm_id_comparison_summary.md +96 -0
  256. data/ext/apex_ext/apex_src/tests/gh_api_test.md +6 -0
  257. data/ext/apex_ext/apex_src/tests/ial_demo.html +186 -0
  258. data/ext/apex_ext/apex_src/tests/include_code.py +19 -0
  259. data/ext/apex_ext/apex_src/tests/include_snippet.md +15 -0
  260. data/ext/apex_ext/apex_src/tests/multi_file_cli_test.sh +64 -0
  261. data/ext/apex_ext/apex_src/tests/sample_data.csv +7 -0
  262. data/ext/apex_ext/apex_src/tests/table_escaped_ltlt.md +4 -0
  263. data/ext/apex_ext/apex_src/tests/test_basic.c +74 -0
  264. data/ext/apex_ext/apex_src/tests/test_extensions.c +2116 -0
  265. data/ext/apex_ext/apex_src/tests/test_helpers.c +183 -0
  266. data/ext/apex_ext/apex_src/tests/test_helpers.h +91 -0
  267. data/ext/apex_ext/apex_src/tests/test_ial.c +282 -0
  268. data/ext/apex_ext/apex_src/tests/test_links.c +418 -0
  269. data/ext/apex_ext/apex_src/tests/test_marked_integration.c +265 -0
  270. data/ext/apex_ext/apex_src/tests/test_metadata.c +908 -0
  271. data/ext/apex_ext/apex_src/tests/test_output.c +1118 -0
  272. data/ext/apex_ext/apex_src/tests/test_plugins.c +219 -0
  273. data/ext/apex_ext/apex_src/tests/test_refs.bib +31 -0
  274. data/ext/apex_ext/apex_src/tests/test_runner.c +244 -0
  275. data/ext/apex_ext/apex_src/tests/test_syntax_highlight.c +198 -0
  276. data/ext/apex_ext/apex_src/tests/test_tables.c +862 -0
  277. data/ext/apex_ext/apex_src/tests/update_benchmarks.sh +9 -0
  278. data/ext/apex_ext/apex_src/tests/yaml_test.md +13 -0
  279. data/ext/apex_ext/apex_src/tests.rb +39 -0
  280. data/ext/apex_ext/apex_src/vendor/cmark-gfm/CMakeLists.txt +48 -0
  281. data/ext/apex_ext/apex_src/vendor/cmark-gfm/COPYING +170 -0
  282. data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.c +14 -0
  283. data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.cmake +43 -0
  284. data/ext/apex_ext/apex_src/vendor/cmark-gfm/FindAsan.cmake +74 -0
  285. data/ext/apex_ext/apex_src/vendor/cmark-gfm/Makefile.nmake +38 -0
  286. data/ext/apex_ext/apex_src/vendor/cmark-gfm/README.md +206 -0
  287. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/CMakeLists.txt +30 -0
  288. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.cpp +15 -0
  289. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.h +16 -0
  290. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.c +111 -0
  291. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.h +35 -0
  292. data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/main.c +1169 -0
  293. data/ext/apex_ext/apex_src/vendor/cmark-gfm/appveyor.yml +21 -0
  294. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-flat.md +16 -0
  295. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-nested.md +13 -0
  296. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-code.md +11 -0
  297. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-fences.md +14 -0
  298. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-heading.md +9 -0
  299. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-hr.md +10 -0
  300. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-html.md +32 -0
  301. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-lheading.md +8 -0
  302. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-flat.md +67 -0
  303. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-nested.md +36 -0
  304. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-flat.md +15 -0
  305. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-nested.md +17 -0
  306. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-autolink.md +14 -0
  307. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-backticks.md +3 -0
  308. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-flat.md +5 -0
  309. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-nested.md +5 -0
  310. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-worst.md +5 -0
  311. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-entity.md +11 -0
  312. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-escape.md +15 -0
  313. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-html.md +44 -0
  314. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-flat.md +23 -0
  315. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-nested.md +13 -0
  316. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-newlines.md +24 -0
  317. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/lorem1.md +13 -0
  318. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/rawtabs.md +18 -0
  319. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/statistics.py +595 -0
  320. data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/stats.py +19 -0
  321. data/ext/apex_ext/apex_src/vendor/cmark-gfm/benchmarks.md +33 -0
  322. data/ext/apex_ext/apex_src/vendor/cmark-gfm/changelog.txt +1245 -0
  323. data/ext/apex_ext/apex_src/vendor/cmark-gfm/data/CaseFolding.txt +1495 -0
  324. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/CMakeLists.txt +119 -0
  325. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/autolink.c +508 -0
  326. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/autolink.h +8 -0
  327. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/cmark-gfm-core-extensions.h +54 -0
  328. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/core-extensions.c +27 -0
  329. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.c +879 -0
  330. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.h +24 -0
  331. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.re +92 -0
  332. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/strikethrough.c +167 -0
  333. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/strikethrough.h +9 -0
  334. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/table.c +917 -0
  335. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/table.h +12 -0
  336. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tagfilter.c +60 -0
  337. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tagfilter.h +8 -0
  338. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tasklist.c +156 -0
  339. data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/tasklist.h +8 -0
  340. data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/CMakeLists.txt +22 -0
  341. data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/README.md +12 -0
  342. data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic.c +91 -0
  343. data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic_brackets.c +110 -0
  344. data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzzloop.sh +28 -0
  345. data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/CMakeLists.txt +10 -0
  346. data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/make_man_page.py +133 -0
  347. data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man1/cmark-gfm.1 +78 -0
  348. data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man3/cmark-gfm.3 +1041 -0
  349. data/ext/apex_ext/apex_src/vendor/cmark-gfm/nmake.bat +1 -0
  350. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/CMakeLists.txt +230 -0
  351. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/arena.c +104 -0
  352. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/blocks.c +1622 -0
  353. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/buffer.c +278 -0
  354. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/buffer.h +116 -0
  355. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/case_fold_switch.inc +4327 -0
  356. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/chunk.h +135 -0
  357. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm-extension_api.h +737 -0
  358. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm.h +833 -0
  359. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm_version.h.in +7 -0
  360. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark.c +55 -0
  361. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark_ctype.c +44 -0
  362. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark_ctype.h +33 -0
  363. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/commonmark.c +514 -0
  364. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h.in +76 -0
  365. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/entities.inc +2138 -0
  366. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/footnotes.c +63 -0
  367. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/footnotes.h +27 -0
  368. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini.h +57 -0
  369. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_href_e.c +100 -0
  370. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_html_e.c +66 -0
  371. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/houdini_html_u.c +149 -0
  372. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/html.c +502 -0
  373. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/html.h +27 -0
  374. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/inlines.c +1788 -0
  375. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/inlines.h +29 -0
  376. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/iterator.c +159 -0
  377. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/iterator.h +26 -0
  378. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/latex.c +468 -0
  379. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/libcmark-gfm.pc.in +10 -0
  380. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/linked_list.c +37 -0
  381. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/main.c +328 -0
  382. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/man.c +274 -0
  383. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/map.c +129 -0
  384. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/map.h +44 -0
  385. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/node.c +1045 -0
  386. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/node.h +167 -0
  387. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/parser.h +59 -0
  388. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plaintext.c +218 -0
  389. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plugin.c +36 -0
  390. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/plugin.h +34 -0
  391. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/references.c +43 -0
  392. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/references.h +26 -0
  393. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/registry.c +63 -0
  394. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/registry.h +24 -0
  395. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/render.c +213 -0
  396. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/render.h +62 -0
  397. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.c +14056 -0
  398. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.h +70 -0
  399. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.re +365 -0
  400. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/syntax_extension.c +149 -0
  401. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/syntax_extension.h +34 -0
  402. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/utf8.c +317 -0
  403. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/utf8.h +35 -0
  404. data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/xml.c +182 -0
  405. data/ext/apex_ext/apex_src/vendor/cmark-gfm/suppressions +10 -0
  406. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/CMakeLists.txt +114 -0
  407. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/afl_test_cases/test.md +49 -0
  408. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark-fuzz.c +58 -0
  409. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark.py +105 -0
  410. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/entity_tests.py +67 -0
  411. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-full-info-string.txt +0 -0
  412. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-table-prefer-style-attributes.txt +38 -0
  413. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions.txt +920 -0
  414. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/fuzzing_dictionary +67 -0
  415. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/normalize.py +194 -0
  416. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/pathological_tests.py +160 -0
  417. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/regression.txt +375 -0
  418. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/roundtrip_tests.py +50 -0
  419. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/run-cmark-fuzz +4 -0
  420. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/smart_punct.txt +177 -0
  421. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec.txt +10212 -0
  422. data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec_tests.py +152 -0
  423. data/ext/apex_ext/apex_src/vendor/cmark-gfm/toolchain-mingw32.cmake +17 -0
  424. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/Dockerfile +41 -0
  425. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/appveyor-build.bat +13 -0
  426. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/make_entities_inc.py +32 -0
  427. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/mkcasefold.pl +22 -0
  428. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md.xsl +319 -0
  429. data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md_gfm.xsl +80 -0
  430. data/ext/apex_ext/apex_src/vendor/cmark-gfm/why-cmark-and-not-x.md +104 -0
  431. data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.js +6 -0
  432. data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.py +37 -0
  433. data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rb +15 -0
  434. data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rkt +208 -0
  435. data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper_ext.py +109 -0
  436. data/ext/apex_ext/apex_src/vendor/libyaml/CMakeLists.txt +160 -0
  437. data/ext/apex_ext/apex_src/vendor/libyaml/Changes +372 -0
  438. data/ext/apex_ext/apex_src/vendor/libyaml/License +20 -0
  439. data/ext/apex_ext/apex_src/vendor/libyaml/Makefile.am +51 -0
  440. data/ext/apex_ext/apex_src/vendor/libyaml/ReadMe.md +46 -0
  441. data/ext/apex_ext/apex_src/vendor/libyaml/announcement.msg +89 -0
  442. data/ext/apex_ext/apex_src/vendor/libyaml/bootstrap +3 -0
  443. data/ext/apex_ext/apex_src/vendor/libyaml/cmake/config.h.in +4 -0
  444. data/ext/apex_ext/apex_src/vendor/libyaml/configure.ac +73 -0
  445. data/ext/apex_ext/apex_src/vendor/libyaml/doc/doxygen.cfg +222 -0
  446. data/ext/apex_ext/apex_src/vendor/libyaml/docker/README.mkd +17 -0
  447. data/ext/apex_ext/apex_src/vendor/libyaml/docker/alpine-3.7 +26 -0
  448. data/ext/apex_ext/apex_src/vendor/libyaml/docker/fedora-25 +26 -0
  449. data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-14.04 +29 -0
  450. data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-16.04 +24 -0
  451. data/ext/apex_ext/apex_src/vendor/libyaml/examples/anchors.yaml +10 -0
  452. data/ext/apex_ext/apex_src/vendor/libyaml/examples/array.yaml +2 -0
  453. data/ext/apex_ext/apex_src/vendor/libyaml/examples/global-tag.yaml +14 -0
  454. data/ext/apex_ext/apex_src/vendor/libyaml/examples/json.yaml +1 -0
  455. data/ext/apex_ext/apex_src/vendor/libyaml/examples/mapping.yaml +2 -0
  456. data/ext/apex_ext/apex_src/vendor/libyaml/examples/numbers.yaml +1 -0
  457. data/ext/apex_ext/apex_src/vendor/libyaml/examples/strings.yaml +7 -0
  458. data/ext/apex_ext/apex_src/vendor/libyaml/examples/tags.yaml +7 -0
  459. data/ext/apex_ext/apex_src/vendor/libyaml/examples/yaml-version.yaml +3 -0
  460. data/ext/apex_ext/apex_src/vendor/libyaml/include/Makefile.am +17 -0
  461. data/ext/apex_ext/apex_src/vendor/libyaml/include/yaml.h +1999 -0
  462. data/ext/apex_ext/apex_src/vendor/libyaml/pkg/ReadMe.md +77 -0
  463. data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/Dockerfile +32 -0
  464. data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/output/ReadMe +1 -0
  465. data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/scripts/libyaml-dist.sh +23 -0
  466. data/ext/apex_ext/apex_src/vendor/libyaml/regression-inputs/clusterfuzz-testcase-minimized-5607885063061504.yml +1 -0
  467. data/ext/apex_ext/apex_src/vendor/libyaml/src/Makefile.am +4 -0
  468. data/ext/apex_ext/apex_src/vendor/libyaml/src/api.c +1393 -0
  469. data/ext/apex_ext/apex_src/vendor/libyaml/src/dumper.c +394 -0
  470. data/ext/apex_ext/apex_src/vendor/libyaml/src/emitter.c +2358 -0
  471. data/ext/apex_ext/apex_src/vendor/libyaml/src/loader.c +544 -0
  472. data/ext/apex_ext/apex_src/vendor/libyaml/src/parser.c +1416 -0
  473. data/ext/apex_ext/apex_src/vendor/libyaml/src/reader.c +469 -0
  474. data/ext/apex_ext/apex_src/vendor/libyaml/src/scanner.c +3598 -0
  475. data/ext/apex_ext/apex_src/vendor/libyaml/src/writer.c +141 -0
  476. data/ext/apex_ext/apex_src/vendor/libyaml/src/yaml_private.h +684 -0
  477. data/ext/apex_ext/apex_src/vendor/libyaml/tests/CMakeLists.txt +27 -0
  478. data/ext/apex_ext/apex_src/vendor/libyaml/tests/Makefile.am +9 -0
  479. data/ext/apex_ext/apex_src/vendor/libyaml/tests/ReadMe.md +63 -0
  480. data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor-alt.c +800 -0
  481. data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor.c +1127 -0
  482. data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter-alt.c +217 -0
  483. data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter.c +202 -0
  484. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-all-tests.sh +29 -0
  485. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-dumper.c +314 -0
  486. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter-test-suite.c +290 -0
  487. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter.c +327 -0
  488. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-loader.c +63 -0
  489. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser-test-suite.c +196 -0
  490. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser.c +88 -0
  491. data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-scanner.c +63 -0
  492. data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-reader.c +354 -0
  493. data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-version.c +29 -0
  494. data/ext/apex_ext/apex_src/vendor/libyaml/yaml-0.1.pc.in +10 -0
  495. data/ext/apex_ext/apex_src/vendor/libyaml/yamlConfig.cmake.in +16 -0
  496. data/ext/apex_ext/extconf.rb +103 -0
  497. data/lib/apex/configurable.rb +46 -0
  498. data/lib/apex/document.rb +66 -0
  499. data/lib/apex/version.rb +15 -0
  500. data/lib/apex.rb +28 -0
  501. metadata +544 -0
@@ -0,0 +1,3574 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+
6
+ <meta charset="UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <meta name="generator" content="Apex 0.1.49">
9
+ <title>Document</title>
10
+ <style>
11
+ body {
12
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
13
+ line-height: 1.6;
14
+ max-width: 800px;
15
+ margin: 2rem auto;
16
+ padding: 0 1rem;
17
+ color: #333;
18
+ }
19
+ pre { background: #f5f5f5; padding: 1rem; overflow-x: auto; }
20
+ code { background: #f0f0f0; padding: 0.2em 0.4em; border-radius: 3px; }
21
+ blockquote { border-left: 4px solid #ddd; margin: 0; padding-left: 1rem; color: #666; }
22
+ table { border-collapse: collapse; width: 100%%; }
23
+ th, td { border: 1px solid #ddd; padding: 0.5rem; }
24
+ th { background: #f5f5f5; }
25
+ tfoot td { background: #e8e8e8; }
26
+ figure.table-figure { width: fit-content; margin: 1em 0; }
27
+ figure.table-figure table { width: auto; }
28
+ figcaption { text-align: center; font-weight: bold; font-size: 0.8em; }
29
+ .page-break { page-break-after: always; }
30
+ .callout { padding: 1rem; margin: 1rem 0; border-left: 4px solid; }
31
+ .callout-note { border-color: #3b82f6; background: #eff6ff; }
32
+ .callout-warning { border-color: #f59e0b; background: #fffbeb; }
33
+ .callout-tip { border-color: #10b981; background: #f0fdf4; }
34
+ .callout-danger { border-color: #ef4444; background: #fef2f2; }
35
+ ins { background: #d4fcbc; text-decoration: none; }
36
+ del { background: #fbb6c2; text-decoration: line-through; }
37
+ mark { background: #fff3cd; }
38
+ .critic.comment { background: #e7e7e7; color: #666; font-style: italic; }
39
+ </style>
40
+ <style>
41
+ /* Base styles */
42
+ body {
43
+ -webkit-font-smoothing: antialiased;
44
+ -moz-osx-font-smoothing: grayscale;
45
+ font-size: 17px;
46
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
47
+ "Helvetica Neue", Arial, sans-serif;
48
+ line-height: 1.65;
49
+ color: #1e293b;
50
+ background-color: #fff;
51
+ }
52
+
53
+ /* Sidebar / Main TOC - wider on larger screens */
54
+ .main-toc,
55
+ .sidebar {
56
+ position: fixed;
57
+ left: 0;
58
+ top: 0;
59
+ width: auto;
60
+ min-width: 180px;
61
+ max-width: 250px;
62
+ height: 100vh;
63
+ overflow-y: auto;
64
+ background: #1e293b;
65
+ color: rgba(255, 255, 255, 0.9);
66
+ border-right: 2px solid rgba(255, 255, 255, 0.1);
67
+ padding: 24px 20px 130px;
68
+ font-size: 14px;
69
+ z-index: 100;
70
+ margin-right: 1rem;
71
+ box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
72
+ transition: transform 0.3s ease;
73
+ }
74
+
75
+ .main-toc ul,
76
+ .sidebar ul {
77
+ list-style: none;
78
+ padding-left: 0;
79
+ margin: 0;
80
+ padding-bottom: 80px;
81
+ }
82
+
83
+ .main-toc ul::after,
84
+ .sidebar ul::after {
85
+ content: "";
86
+ display: block;
87
+ height: 80px;
88
+ }
89
+
90
+ .main-toc li,
91
+ .sidebar li {
92
+ margin: 0.25em 0;
93
+ }
94
+
95
+ .main-toc a,
96
+ .sidebar a {
97
+ color: rgba(255, 255, 255, 0.85);
98
+ text-decoration: none;
99
+ display: block;
100
+ padding: 6px 12px;
101
+ border-radius: 4px;
102
+ transition: all 0.15s ease;
103
+ white-space: nowrap;
104
+ overflow: hidden;
105
+ text-overflow: ellipsis;
106
+ }
107
+
108
+ .main-toc a:hover,
109
+ .sidebar a:hover {
110
+ background: #334155;
111
+ color: #fff;
112
+ }
113
+
114
+ .sidebar a.active {
115
+ color: #0ea5e9;
116
+ font-weight: 500;
117
+ }
118
+
119
+ /* Body margin for sidebar */
120
+ body {
121
+ margin-left: 270px;
122
+ }
123
+
124
+ /* Hamburger menu button */
125
+ .hamburger-menu {
126
+ display: none;
127
+ position: fixed;
128
+ top: 12px;
129
+ left: 12px;
130
+ z-index: 200;
131
+ background: #1e293b;
132
+ border: 2px solid rgba(255, 255, 255, 0.1);
133
+ border-radius: 6px;
134
+ padding: 10px;
135
+ cursor: pointer;
136
+ color: rgba(255, 255, 255, 0.9);
137
+ font-size: 20px;
138
+ line-height: 1;
139
+ width: 44px;
140
+ height: 44px;
141
+ align-items: center;
142
+ justify-content: center;
143
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
144
+ transition: all 0.2s ease;
145
+ opacity: 0.2;
146
+ }
147
+
148
+ .hamburger-menu:hover {
149
+ background: #334155;
150
+ color: #fff;
151
+ opacity: 1;
152
+ }
153
+
154
+ /* Move hamburger to the right of the sidebar when menu is open */
155
+ .hamburger-menu.active {
156
+ left: calc(
157
+ 250px + 12px
158
+ ); /* Position just to the right of sidebar (max-width 250px + 12px padding) */
159
+ }
160
+
161
+ .hamburger-menu.active {
162
+ background: #0ea5e9;
163
+ }
164
+
165
+ .hamburger-menu::before {
166
+ content: "☰";
167
+ }
168
+
169
+ .hamburger-menu.active::before {
170
+ content: "✕";
171
+ }
172
+
173
+ /* Mobile menu overlay */
174
+ .mobile-menu-overlay {
175
+ display: none;
176
+ position: fixed;
177
+ top: 0;
178
+ left: 0;
179
+ right: 0;
180
+ bottom: 0;
181
+ background: rgba(0, 0, 0, 0.5);
182
+ z-index: 150;
183
+ opacity: 0;
184
+ visibility: hidden;
185
+ transition: opacity 0.3s ease, visibility 0.3s ease;
186
+ }
187
+
188
+ .mobile-menu-overlay.active {
189
+ opacity: 1;
190
+ visibility: visible;
191
+ }
192
+
193
+ /* Page TOC */
194
+ .page-toc {
195
+ background: #f9f9f9;
196
+ border: 1px solid #ddd;
197
+ border-radius: 4px;
198
+ padding: 1rem;
199
+ margin: 1.5rem 0;
200
+ }
201
+
202
+ .page-toc ul {
203
+ list-style: none;
204
+ padding-left: 0;
205
+ margin: 0;
206
+ }
207
+
208
+ .page-toc > ul {
209
+ padding-left: 0;
210
+ }
211
+
212
+ .page-toc li {
213
+ margin: 0.25em 0;
214
+ }
215
+
216
+ .page-toc a {
217
+ color: #0066cc;
218
+ text-decoration: none;
219
+ display: block;
220
+ padding: 0.25em 0.5em;
221
+ border-radius: 3px;
222
+ }
223
+
224
+ .page-toc a:hover {
225
+ background: #e0e0e0;
226
+ color: #004499;
227
+ }
228
+
229
+ .page-toc ul ul {
230
+ list-style: none;
231
+ padding-left: 1.5em;
232
+ margin-top: 0.25em;
233
+ margin-left: 0;
234
+ }
235
+
236
+ .page-toc ul ul ul {
237
+ padding-left: 1.5em;
238
+ }
239
+
240
+ .page-toc ul ul a {
241
+ font-size: 0.9em;
242
+ color: #555;
243
+ }
244
+
245
+ .page-toc ul ul ul a {
246
+ font-size: 0.85em;
247
+ color: #666;
248
+ }
249
+
250
+ /* Floating TOC */
251
+ .floating-toc {
252
+ position: fixed;
253
+ top: 0;
254
+ left: 270px;
255
+ right: 0;
256
+ z-index: 50;
257
+ opacity: 0;
258
+ visibility: hidden;
259
+ transition: opacity 0.2s ease, visibility 0.2s ease;
260
+ pointer-events: none;
261
+ display: flex;
262
+ justify-content: flex-end;
263
+ padding-right: 2rem;
264
+ }
265
+
266
+ .floating-toc.visible {
267
+ opacity: 1;
268
+ visibility: visible;
269
+ pointer-events: auto;
270
+ }
271
+
272
+ .floating-toc-container {
273
+ background: rgba(255, 255, 255, 0.95);
274
+ backdrop-filter: blur(10px);
275
+ border-bottom: 1px solid #ddd;
276
+ border-radius: 0 0 12px 12px;
277
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
278
+ width: fit-content;
279
+ max-width: 400px;
280
+ min-width: 200px;
281
+ overflow: hidden;
282
+ transition: max-height 0.3s ease;
283
+ }
284
+
285
+ .floating-toc-header {
286
+ padding: 8px 16px;
287
+ cursor: pointer;
288
+ user-select: none;
289
+ font-size: 14px;
290
+ font-weight: 500;
291
+ color: #1e293b;
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: space-between;
295
+ }
296
+
297
+ .floating-toc-header:hover {
298
+ background: rgba(0, 0, 0, 0.02);
299
+ }
300
+
301
+ .floating-toc-content {
302
+ max-height: 0;
303
+ overflow: hidden;
304
+ transition: max-height 0.3s ease;
305
+ }
306
+
307
+ .floating-toc-container:hover .floating-toc-content {
308
+ max-height: 70vh;
309
+ overflow-y: auto;
310
+ }
311
+
312
+ .floating-toc-content ul {
313
+ list-style: none;
314
+ padding: 8px 16px 16px;
315
+ margin: 0;
316
+ }
317
+
318
+ .floating-toc-content li {
319
+ margin: 0.1em 0;
320
+ }
321
+
322
+ .floating-toc-content a {
323
+ color: #0066cc;
324
+ text-decoration: none;
325
+ display: block;
326
+ padding: 0.2em 0.5em;
327
+ border-radius: 4px;
328
+ font-size: 13px;
329
+ transition: background 0.15s ease;
330
+ }
331
+
332
+ .floating-toc-content a:hover {
333
+ background: #e0e0e0;
334
+ color: #004499;
335
+ }
336
+
337
+ .floating-toc-content ul ul {
338
+ padding-left: 1.2em;
339
+ margin-top: 0;
340
+ margin-bottom: 0;
341
+ }
342
+
343
+ .floating-toc-content ul ul ul {
344
+ margin-top: 0;
345
+ margin-bottom: 0;
346
+ }
347
+
348
+ .floating-toc-content ul ul a {
349
+ font-size: 12px;
350
+ color: #555;
351
+ }
352
+
353
+ .floating-toc-content ul ul ul a {
354
+ font-size: 11px;
355
+ color: #666;
356
+ }
357
+
358
+ /* Smooth scrolling */
359
+ html {
360
+ scroll-behavior: smooth;
361
+ }
362
+
363
+ /* Code blocks */
364
+ code {
365
+ background: #f0f0f0;
366
+ padding: 0.2em 0.4em;
367
+ border-radius: 3px;
368
+ font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
369
+ font-size: 0.9em;
370
+ margin: 0 0.1em;
371
+ }
372
+
373
+ pre {
374
+ background: #f5f5f5;
375
+ padding: 1rem;
376
+ overflow-x: auto;
377
+ border-radius: 4px;
378
+ margin: 1em 0;
379
+ }
380
+
381
+ pre code {
382
+ background: none;
383
+ padding: 0;
384
+ margin: 0;
385
+ }
386
+
387
+ /* Rouge syntax highlighting - GitHub theme, scoped to .highlight containers */
388
+ .highlight {
389
+ color: #24292e;
390
+ }
391
+
392
+ .highlight .c {
393
+ color: #6a737d;
394
+ font-style: italic;
395
+ } /* Comment */
396
+ .highlight .err {
397
+ color: #a61717;
398
+ background-color: #e3d2d2;
399
+ } /* Error */
400
+ .highlight .k {
401
+ color: #d73a49;
402
+ font-weight: bold;
403
+ } /* Keyword */
404
+ .highlight .l {
405
+ color: #032f62;
406
+ } /* Literal */
407
+ .highlight .n {
408
+ color: #24292e;
409
+ } /* Name */
410
+ .highlight .o {
411
+ color: #d73a49;
412
+ } /* Operator */
413
+ .highlight .p {
414
+ color: #24292e;
415
+ } /* Punctuation */
416
+ .highlight .cm {
417
+ color: #6a737d;
418
+ font-style: italic;
419
+ } /* Comment.Multiline */
420
+ .highlight .cp {
421
+ color: #6a737d;
422
+ font-weight: bold;
423
+ } /* Comment.Preproc */
424
+ .highlight .c1 {
425
+ color: #6a737d;
426
+ font-style: italic;
427
+ } /* Comment.Single */
428
+ .highlight .cs {
429
+ color: #6a737d;
430
+ font-weight: bold;
431
+ font-style: italic;
432
+ } /* Comment.Special */
433
+ .highlight .gd {
434
+ color: #24292e;
435
+ background-color: #ffeef0;
436
+ } /* Generic.Deleted */
437
+ .highlight .ge {
438
+ color: #24292e;
439
+ font-style: italic;
440
+ } /* Generic.Emph */
441
+ .highlight .gr {
442
+ color: #aa0000;
443
+ } /* Generic.Error */
444
+ .highlight .gh {
445
+ color: #999999;
446
+ font-weight: bold;
447
+ } /* Generic.Heading */
448
+ .highlight .gi {
449
+ color: #24292e;
450
+ background-color: #f0fff4;
451
+ } /* Generic.Inserted */
452
+ .highlight .go {
453
+ color: #888888;
454
+ } /* Generic.Output */
455
+ .highlight .gp {
456
+ color: #555555;
457
+ } /* Generic.Prompt */
458
+ .highlight .gs {
459
+ font-weight: bold;
460
+ } /* Generic.Strong */
461
+ .highlight .gu {
462
+ color: #aaaaaa;
463
+ } /* Generic.Subheading */
464
+ .highlight .gt {
465
+ color: #aa0000;
466
+ } /* Generic.Traceback */
467
+ .highlight .kc {
468
+ color: #d73a49;
469
+ font-weight: bold;
470
+ } /* Keyword.Constant */
471
+ .highlight .kd {
472
+ color: #d73a49;
473
+ font-weight: bold;
474
+ } /* Keyword.Declaration */
475
+ .highlight .kn {
476
+ color: #d73a49;
477
+ font-weight: bold;
478
+ } /* Keyword.Namespace */
479
+ .highlight .kp {
480
+ color: #d73a49;
481
+ font-weight: bold;
482
+ } /* Keyword.Pseudo */
483
+ .highlight .kr {
484
+ color: #d73a49;
485
+ font-weight: bold;
486
+ } /* Keyword.Reserved */
487
+ .highlight .kt {
488
+ color: #d73a49;
489
+ font-weight: bold;
490
+ } /* Keyword.Type */
491
+ .highlight .ld {
492
+ color: #032f62;
493
+ } /* Literal.Date */
494
+ .highlight .m {
495
+ color: #005cc5;
496
+ } /* Literal.Number */
497
+ .highlight .s {
498
+ color: #032f62;
499
+ } /* Literal.String */
500
+ .highlight .na {
501
+ color: #6f42c1;
502
+ } /* Name.Attribute */
503
+ .highlight .nb {
504
+ color: #005cc5;
505
+ } /* Name.Builtin */
506
+ .highlight .nc {
507
+ color: #6f42c1;
508
+ font-weight: bold;
509
+ } /* Name.Class */
510
+ .highlight .no {
511
+ color: #005cc5;
512
+ } /* Name.Constant */
513
+ .highlight .nd {
514
+ color: #6f42c1;
515
+ font-weight: bold;
516
+ } /* Name.Decorator */
517
+ .highlight .ni {
518
+ color: #800080;
519
+ } /* Name.Entity */
520
+ .highlight .ne {
521
+ color: #990000;
522
+ font-weight: bold;
523
+ } /* Name.Exception */
524
+ .highlight .nf {
525
+ color: #6f42c1;
526
+ } /* Name.Function */
527
+ .highlight .nl {
528
+ color: #990000;
529
+ } /* Name.Label */
530
+ .highlight .nn {
531
+ color: #555555;
532
+ } /* Name.Namespace */
533
+ .highlight .nx {
534
+ color: #6f42c1;
535
+ } /* Name.Other */
536
+ .highlight .py {
537
+ color: #990000;
538
+ } /* Name.Property */
539
+ .highlight .nt {
540
+ color: #22863a;
541
+ } /* Name.Tag */
542
+ .highlight .nv {
543
+ color: #e36209;
544
+ } /* Name.Variable */
545
+ .highlight .ow {
546
+ color: #d73a49;
547
+ font-weight: bold;
548
+ } /* Operator.Word */
549
+ .highlight .w {
550
+ color: #bbbbbb;
551
+ } /* Text.Whitespace */
552
+ .highlight .mf {
553
+ color: #005cc5;
554
+ } /* Literal.Number.Float */
555
+ .highlight .mh {
556
+ color: #005cc5;
557
+ } /* Literal.Number.Hex */
558
+ .highlight .mi {
559
+ color: #005cc5;
560
+ } /* Literal.Number.Integer */
561
+ .highlight .mo {
562
+ color: #005cc5;
563
+ } /* Literal.Number.Oct */
564
+ .highlight .sb {
565
+ color: #032f62;
566
+ } /* Literal.String.Backtick */
567
+ .highlight .sc {
568
+ color: #032f62;
569
+ } /* Literal.String.Char */
570
+ .highlight .sd {
571
+ color: #032f62;
572
+ } /* Literal.String.Doc */
573
+ .highlight .s2 {
574
+ color: #032f62;
575
+ } /* Literal.String.Double */
576
+ .highlight .se {
577
+ color: #032f62;
578
+ } /* Literal.String.Escape */
579
+ .highlight .sh {
580
+ color: #032f62;
581
+ } /* Literal.String.Heredoc */
582
+ .highlight .si {
583
+ color: #032f62;
584
+ } /* Literal.String.Interpol */
585
+ .highlight .sx {
586
+ color: #032f62;
587
+ } /* Literal.String.Other */
588
+ .highlight .sr {
589
+ color: #22863a;
590
+ } /* Literal.String.Regex */
591
+ .highlight .s1 {
592
+ color: #032f62;
593
+ } /* Literal.String.Single */
594
+ .highlight .ss {
595
+ color: #032f62;
596
+ } /* Literal.String.Symbol */
597
+ .highlight .bp {
598
+ color: #005cc5;
599
+ } /* Name.Builtin.Pseudo */
600
+ .highlight .vc {
601
+ color: #e36209;
602
+ } /* Name.Variable.Class */
603
+ .highlight .vg {
604
+ color: #e36209;
605
+ } /* Name.Variable.Global */
606
+ .highlight .vi {
607
+ color: #e36209;
608
+ } /* Name.Variable.Instance */
609
+ .highlight .il {
610
+ color: #005cc5;
611
+ } /* Literal.Number.Integer.Long */
612
+
613
+ /* Additional Rouge token classes that may be used */
614
+ .highlight .token {
615
+ color: #5670a0;
616
+ }
617
+ .highlight .token.list {
618
+ color: #546e9f;
619
+ }
620
+ .highlight .token.punctuation {
621
+ color: #3e8dad;
622
+ }
623
+ .highlight .token.list.punctuation {
624
+ color: #e05b78;
625
+ }
626
+ .highlight .token.content {
627
+ padding: 0;
628
+ }
629
+
630
+ /* Nested lists in page content */
631
+ ul ul,
632
+ ol ol,
633
+ ul ol,
634
+ ol ul {
635
+ padding-left: 1.5em;
636
+ margin-top: 0.25em;
637
+ }
638
+
639
+ /* Page footer */
640
+ .page-footer {
641
+ background: #f5f5f5;
642
+ border-top: 1px solid #ddd;
643
+ padding: 1.5rem;
644
+ margin-top: 3rem;
645
+ color: #666;
646
+ font-size: 0.9em;
647
+ }
648
+
649
+ .page-footer p {
650
+ margin: 0.5em 0;
651
+ }
652
+
653
+ .page-footer a {
654
+ color: #0066cc;
655
+ text-decoration: none;
656
+ }
657
+
658
+ .page-footer a:hover {
659
+ text-decoration: underline;
660
+ }
661
+
662
+ /* Mobile responsive */
663
+ @media (max-width: 768px) {
664
+ .hamburger-menu {
665
+ display: flex;
666
+ }
667
+
668
+ .main-toc,
669
+ .sidebar {
670
+ transform: translateX(-100%);
671
+ z-index: 175;
672
+ }
673
+
674
+ .main-toc.mobile-open,
675
+ .sidebar.mobile-open {
676
+ transform: translateX(0);
677
+ }
678
+
679
+ body {
680
+ margin-left: 0;
681
+ }
682
+
683
+ .floating-toc {
684
+ left: 0;
685
+ }
686
+ }
687
+
688
+ </style></head>
689
+
690
+ <body>
691
+ <div class="floating-toc" id="floating-toc">
692
+ <div class="floating-toc-container">
693
+ <div class="floating-toc-header">
694
+ <span>Table of Contents 🔻</span>
695
+ </div>
696
+ <div class="floating-toc-content" id="floating-toc-content">
697
+ <!-- Content will be populated by JavaScript -->
698
+ </div>
699
+ </div>
700
+ </div>
701
+
702
+ <button class="hamburger-menu" id="hamburger-menu" aria-label="Toggle navigation"></button>
703
+ <div class="mobile-menu-overlay" id="mobile-menu-overlay"></div>
704
+
705
+ <nav class="main-toc"><ul><li><a href="Home.html">Home</a></li><li><a href="Getting-Started.html">Getting Started</a></li><li><a href="Installation.html">Installation</a></li><li><a href="Usage.html">Usage</a></li><li><a href="Syntax.html">Syntax</a></li><li><a href="Inline-Attribute-Lists.html">Inline Attribute Lists</a></li><li><a href="Modes.html">Modes</a></li><li><a href="Command-Line-Options.html">Command Line Options</a></li><li><a href="Multi-File-Documents.html">Multi-file Documents</a></li><li><a href="Citations.html">Citations</a></li><li><a href="Metadata-Transforms.html">Metadata Transforms</a></li><li><a href="Pandoc-Integration.html">Integrating with Pandoc</a></li><li><a href="Header-IDs.html">Header IDs</a></li><li><a href="C-API.html">C API</a></li><li><a href="Xcode-Integration.html">Xcode Integration</a></li><li><a href="Examples.html">Examples</a></li><li><a href="Plugins.html">Plugins</a></li><li><a href="Troubleshooting.html">Troubleshooting</a></li><li><a href="Credits.html">Credits</a></li></ul></nav>
706
+
707
+ <h1 id="command-line-options">
708
+ Command Line Options
709
+ </h1>
710
+ <nav class="page-toc" id="page-toc-top"><ul><li><a href="#command-line-options">Command Line Options</a><ul><li><a href="#basic-options">Basic Options</a><ul><li><a href="#h-help">-h, --help</a></li><li><a href="#v-version">-v, --version</a></li><li><a href="#no-progress">--[no-]progress</a></li><li><a href="#combine">--combine</a></li><li><a href="#mmd-merge">--mmd-merge</a></li><li><a href="#m-mode-mode">-m, --mode MODE</a></li><li><a href="#o-output-file">-o, --output FILE</a></li></ul></li><li><a href="#output-options">Output Options</a><ul><li><a href="#s-standalone">-s, --standalone</a></li><li><a href="#style-file-css-file">--style FILE, --css FILE</a></li><li><a href="#embed-css">--embed-css</a></li><li><a href="#script-value">--script VALUE</a></li><li><a href="#title-title">--title TITLE</a></li><li><a href="#pretty">--pretty</a></li><li><a href="#aria">--aria</a></li></ul></li><li><a href="#plugin-management">Plugin Management</a><ul><li><a href="#plugins-no-plugins">--plugins, --no-plugins</a></li><li><a href="#list-plugins">--list-plugins</a></li><li><a href="#install-plugin-id-or-url">--install-plugin ID-or-URL</a></li><li><a href="#uninstall-plugin-id">--uninstall-plugin ID</a></li></ul></li><li><a href="#header-id-options">Header ID Options</a><ul><li><a href="#id-format-format">--id-format FORMAT</a></li><li><a href="#no-ids">--no-ids</a></li><li><a href="#header-anchors">--header-anchors</a></li></ul></li><li><a href="#table-options">Table Options</a><ul><li><a href="#relaxed-tables">--relaxed-tables</a></li><li><a href="#no-relaxed-tables">--no-relaxed-tables</a></li><li><a href="#captions-position">--captions POSITION</a></li><li><a href="#no-tables">--no-tables</a></li></ul></li><li><a href="#list-options">List Options</a><ul><li><a href="#no-alpha-lists">--[no-]alpha-lists</a></li><li><a href="#no-mixed-lists">--[no-]mixed-lists</a></li></ul></li><li><a href="#feature-flags">Feature Flags</a><ul><li><a href="#no-footnotes">--no-footnotes</a></li><li><a href="#no-smart">--no-smart</a></li><li><a href="#no-math">--no-math</a></li><li><a href="#no-autolink">--[no-]autolink</a></li><li><a href="#obfuscate-emails">--obfuscate-emails</a></li><li><a href="#includes-no-includes">--includes, --no-includes</a></li></ul></li><li><a href="#image-embedding">Image Embedding</a><ul><li><a href="#embed-images">--embed-images</a></li></ul></li><li><a href="#path-resolution">Path Resolution</a><ul><li><a href="#base-dir-dir">--base-dir DIR</a></li><li><a href="#no-transforms">--[no-]transforms</a></li></ul></li><li><a href="#metadata-options">Metadata Options</a><ul><li><a href="#meta-file-file">--meta-file FILE</a></li><li><a href="#meta-keyvalue">--meta KEY=VALUE</a></li><li><a href="#controlling-options-via-metadata">Controlling Options via Metadata</a></li></ul></li><li><a href="#citations-and-bibliography">Citations and Bibliography</a><ul><li><a href="#bibliography-file">--bibliography FILE</a></li><li><a href="#csl-file">--csl FILE</a></li><li><a href="#no-bibliography">--no-bibliography</a></li><li><a href="#link-citations">--link-citations</a></li><li><a href="#show-tooltips">--show-tooltips</a></li></ul></li><li><a href="#indices">Indices</a><ul><li><a href="#indices">--indices</a></li><li><a href="#no-indices">--no-indices</a></li><li><a href="#no-index">--no-index</a></li><li><a href="#hardbreaks">--hardbreaks</a></li><li><a href="#no-sup-sub">--[no-]sup-sub</a></li><li><a href="#no-divs">--[no-]divs</a></li><li><a href="#no-spans">--[no-]spans</a></li><li><a href="#no-emoji-autocorrect">--[no-]emoji-autocorrect</a></li><li><a href="#no-unsafe">--[no-]unsafe</a></li><li><a href="#no-wikilinks">--[no-]wikilinks</a></li><li><a href="#wikilink-space-mode">--wikilink-space MODE</a></li><li><a href="#wikilink-extension-ext">--wikilink-extension EXT</a></li></ul></li><li><a href="#critic-markup-options">Critic Markup Options</a><ul><li><a href="#accept">--accept</a></li><li><a href="#reject">--reject</a></li></ul></li><li><a href="#inputoutput">Input/Output</a><ul><li><a href="#reading-from-stdin">Reading from stdin</a></li><li><a href="#writing-to-stdout">Writing to stdout</a></li></ul></li><li><a href="#combining-options">Combining Options</a></li><li><a href="#option-precedence">Option Precedence</a></li><li><a href="#examples">Examples</a><ul><li><a href="#blog-post">Blog Post</a></li><li><a href="#github-compatible-output">GitHub-Compatible Output</a></li><li><a href="#documentation-with-custom-ids">Documentation with Custom IDs</a></li><li><a href="#review-document-with-critic-markup">Review Document with Critic Markup</a></li><li><a href="#academic-document-with-citations">Academic Document with Citations</a></li></ul></li><li><a href="#related">Related</a></li><li><a href="#plugin-options">Plugin Options</a><ul><li><a href="#no-plugins">--[no-]plugins</a></li><li><a href="#list-plugins">--list-plugins</a></li><li><a href="#install-plugin-id">--install-plugin ID</a></li><li><a href="#uninstall-plugin-id">--uninstall-plugin ID</a></li></ul></li></ul></li></ul></nav>
711
+
712
+ <p>
713
+ Complete reference for all Apex command-line flags.
714
+ </p>
715
+
716
+ <h2 id="basic-options">
717
+ Basic Options
718
+ </h2>
719
+
720
+ <h3 id="h-help">
721
+ <code>-h, --help</code>
722
+ </h3>
723
+
724
+ <p>
725
+ Display help message and exit.
726
+ </p>
727
+
728
+ <pre><code class="highlight language-bash">apex <span class="nt">--help</span>
729
+ </code></pre>
730
+
731
+ <h3 id="v-version">
732
+ <code>-v, --version</code>
733
+ </h3>
734
+
735
+ <p>
736
+ Display version information and exit.
737
+ </p>
738
+
739
+ <pre><code class="highlight language-bash">apex <span class="nt">--version</span>
740
+ </code></pre>
741
+
742
+ <h3 id="no-progress">
743
+ <code>--[no-]progress</code>
744
+ </h3>
745
+
746
+ <p>
747
+ Show progress indicator during processing. Progress is displayed on stderr for operations that take longer than 1 second.
748
+ </p>
749
+
750
+ <p>
751
+ <strong> Default behavior:</strong>
752
+ </p>
753
+
754
+ <ul>
755
+
756
+ <li>
757
+ <strong> Enabled</strong> when stderr is a TTY (interactive terminal)
758
+ </li>
759
+
760
+ <li>
761
+ <strong> Disabled</strong> when stderr is not a TTY (pipes, redirects, etc.)
762
+ </li>
763
+
764
+ </ul>
765
+
766
+ <p>
767
+ <strong> Examples:</strong>
768
+ </p>
769
+
770
+ <pre><code class="highlight language-bash"><span class="c"># Explicitly enable progress (useful when piping)</span>
771
+
772
+ apex document.md <span class="nt">--progress</span> | less
773
+ <span class="c"># Explicitly disable progress</span>
774
+ apex document.md <span class="nt">--no-progress</span>
775
+
776
+ <span class="c"># Progress is automatically enabled in interactive terminals</span>
777
+ apex document.md
778
+ </code></pre>
779
+
780
+ <p>
781
+ <strong> Behavior:</strong>
782
+ </p>
783
+
784
+ <ul>
785
+
786
+ <li>
787
+ Progress messages appear on stderr (not stdout)
788
+ </li>
789
+
790
+ <li>
791
+ Only shown for operations taking longer than 1 second
792
+ </li>
793
+
794
+ <li>
795
+ Automatically cleared when processing completes
796
+ </li>
797
+
798
+ <li>
799
+ Useful for monitoring long-running operations or when processing large files
800
+ </li>
801
+
802
+ </ul>
803
+
804
+ <p>
805
+ <strong> Note:</strong> Progress can also be controlled via the <code>APEX_PROGRESS</code> environment variable:
806
+ </p>
807
+
808
+ <pre><code class="highlight language-bash"><span class="nb">export </span><span class="nv">APEX_PROGRESS</span><span class="o">=</span>1 <span class="c"># Enable</span>
809
+ <span class="nb">export </span><span class="nv">APEX_PROGRESS</span><span class="o">=</span>0 <span class="c"># Disable</span>
810
+ </code></pre>
811
+
812
+ <h3 id="combine">
813
+ <code>--combine</code>
814
+ </h3>
815
+
816
+ <p>
817
+ Concatenate one or more Markdown files into a single Markdown stream, expanding all supported include syntaxes (Marked ``, MultiMarkdown <code>{{file}}</code>, iA Writer `/file`, CSV/TSV includes, etc.).
818
+ </p>
819
+
820
+ <ul>
821
+
822
+ <li>
823
+ File arguments are processed <strong>in the order given</strong>.
824
+ </li>
825
+
826
+ <li>
827
+ Includes inside those files are expanded exactly as in normal processing.
828
+ </li>
829
+
830
+ <li>
831
+ Output is <strong>raw Markdown</strong>, suitable for piping back into Apex for full rendering (indices, TOCs, citations, etc.).
832
+ </li>
833
+
834
+ </ul>
835
+
836
+ <p>
837
+ When a <code>SUMMARY.md</code> file is provided, Apex treats it as a <strong>GitBook-style index</strong>:
838
+ </p>
839
+
840
+ <ul>
841
+
842
+ <li>
843
+ Parses Markdown links in <code>SUMMARY.md</code> (e.g. <code>[Intro](intro.md)</code>).
844
+ </li>
845
+
846
+ <li>
847
+ Resolves linked files relative to the <code>SUMMARY.md</code> location.
848
+ </li>
849
+
850
+ <li>
851
+ Combines the linked files in link order.
852
+ </li>
853
+
854
+ <li>
855
+ Ignores external links containing <code>://</code> for combination purposes.
856
+ </li>
857
+
858
+ </ul>
859
+
860
+ <h3 id="mmd-merge">
861
+ <code>--mmd-merge</code>
862
+ </h3>
863
+
864
+ <p>
865
+ Merge files from one or more MultiMarkdown <code>mmd_merge</code>-style index files into a single Markdown stream.
866
+ </p>
867
+
868
+ <p>
869
+ <strong> Behavior:</strong>
870
+ </p>
871
+
872
+ <ul>
873
+
874
+ <li>
875
+ Each non-empty, non-comment line in an index file specifies a document to include
876
+ </li>
877
+
878
+ <li>
879
+ Lines whose first non-whitespace character is <code>#</code> are treated as comments and ignored
880
+ </li>
881
+
882
+ <li>
883
+ Indentation (tabs or groups of four spaces) before the filename controls header level shifting
884
+ </li>
885
+
886
+ <li>
887
+ Each indent level shifts all Markdown headings in that file down one level (adds one <code>#</code>)
888
+ </li>
889
+
890
+ <li>
891
+ Output is raw Markdown suitable for piping into Apex
892
+ </li>
893
+
894
+ </ul>
895
+
896
+ <p>
897
+ <strong> Example index file (<code>index.txt</code>):</strong>
898
+ </p>
899
+
900
+ <pre><code class="highlight ">chapter1.md
901
+ section1.md
902
+ section2.md
903
+ chapter2.md
904
+ section1.md
905
+ </code></pre>
906
+
907
+ <p>
908
+ <strong> Usage:</strong>
909
+ </p>
910
+
911
+ <pre><code class="highlight language-bash"><span class="c"># Merge and process in one step</span>
912
+
913
+ apex <span class="nt">--mmd-merge</span> index.txt | apex <span class="nt">--mode</span> mmd <span class="nt">--standalone</span> <span class="nt">-o</span> book.html
914
+ <span class="c"># Merge multiple index files</span>
915
+ apex <span class="nt">--mmd-merge</span> index1.txt index2.txt | apex <span class="nt">--standalone</span> <span class="nt">-o</span> combined.html
916
+ </code></pre>
917
+
918
+ <h3 id="m-mode-mode">
919
+ <code>-m, --mode MODE</code>
920
+ </h3>
921
+
922
+ <p>
923
+ Set processor mode. See <a href="Modes.html">Modes</a> for details.
924
+ </p>
925
+
926
+ <p>
927
+ <strong> Values:</strong>
928
+ </p>
929
+
930
+ <ul>
931
+
932
+ <li>
933
+ <code>commonmark</code> - Pure CommonMark specification
934
+ </li>
935
+
936
+ <li>
937
+ <code>gfm</code> - GitHub Flavored Markdown
938
+ </li>
939
+
940
+ <li>
941
+ <code>mmd</code> or <code>multimarkdown</code> - MultiMarkdown compatibility
942
+ </li>
943
+
944
+ <li>
945
+ <code>kramdown</code> - Kramdown compatibility
946
+ </li>
947
+
948
+ <li>
949
+ <code>unified</code> - All features enabled (default)
950
+ </li>
951
+
952
+ </ul>
953
+
954
+ <p>
955
+ <strong> Example:</strong>
956
+ </p>
957
+
958
+ <pre><code class="highlight language-bash">apex <span class="nt">--mode</span> gfm document.md
959
+ </code></pre>
960
+
961
+ <h3 id="o-output-file">
962
+ <code>-o, --output FILE</code>
963
+ </h3>
964
+
965
+ <p>
966
+ Write output to a file instead of stdout.
967
+ </p>
968
+
969
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">-o</span> output.html
970
+ </code></pre>
971
+
972
+ <h2 id="output-options">
973
+ Output Options
974
+ </h2>
975
+
976
+ <h3 id="s-standalone">
977
+ <code>-s, --standalone</code>
978
+ </h3>
979
+
980
+ <p>
981
+ Generate a complete HTML document with <code>&lt;html&gt;</code>, <code>&lt;head&gt;</code>, and <code>&lt;body&gt;</code> tags.
982
+ </p>
983
+
984
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--standalone</span>
985
+ </code></pre>
986
+
987
+ <h3 id="style-file-css-file">
988
+ <code>--style FILE</code>, <code>--css FILE</code>
989
+ </h3>
990
+
991
+ <p>
992
+ Link to a CSS file in the document head. Requires <code>--standalone</code>. <code>--css</code> is an alias for <code>--style</code>. Overrides CSS metadata if present.
993
+ </p>
994
+
995
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--standalone</span> <span class="nt">--style</span> styles.css
996
+ apex document.md <span class="nt">--standalone</span> <span class="nt">--css</span> styles.css
997
+ </code></pre>
998
+
999
+ <h3 id="embed-css">
1000
+ <code>--embed-css</code>
1001
+ </h3>
1002
+
1003
+ <p>
1004
+ Embed the CSS file contents into a <code>&lt;style&gt;</code> tag in the document head instead of using a <code>&lt;link rel=&quot;stylesheet&quot;&gt;</code> tag. Intended to be used together with <code>--css</code>.
1005
+ </p>
1006
+
1007
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--standalone</span> <span class="nt">--css</span> styles.css <span class="nt">--embed-css</span>
1008
+ </code></pre>
1009
+
1010
+ <h3 id="script-value">
1011
+ <code>--script VALUE</code>
1012
+ </h3>
1013
+
1014
+ <p>
1015
+ Inject <code>&lt;script&gt;</code> tags either before <code>&lt;/body&gt;</code> in standalone mode or at the end of the HTML fragment in snippet mode.
1016
+ </p>
1017
+
1018
+ <ul>
1019
+
1020
+ <li>
1021
+ <strong> VALUE</strong>: A path, URL, or one of the following shorthands: <code>mermaid</code>, <code>mathjax</code>, <code>katex</code>, <code>highlightjs</code>, <code>highlight.js</code>, <code>prism</code>, <code>prismjs</code>, <code>htmx</code>, <code>alpine</code>, <code>alpinejs</code>.
1022
+ </li>
1023
+
1024
+ <li>
1025
+ <strong> Multiple values</strong>: Use the flag multiple times or provide a comma-separated list.
1026
+ </li>
1027
+
1028
+ </ul>
1029
+
1030
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--standalone</span> <span class="nt">--script</span> mermaid,mathjax
1031
+ apex document.md <span class="nt">--script</span> /assets/app.js <span class="nt">--script</span> https://cdn.example.com/widget.js
1032
+ </code></pre>
1033
+
1034
+ <h3 id="title-title">
1035
+ <code>--title TITLE</code>
1036
+ </h3>
1037
+
1038
+ <p>
1039
+ Set the document title. Requires <code>--standalone</code>. Default is “Document”.
1040
+ </p>
1041
+
1042
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--standalone</span> <span class="nt">--title</span> <span class="s2">"My Document"</span>
1043
+ </code></pre>
1044
+
1045
+ <h3 id="pretty">
1046
+ <code>--pretty</code>
1047
+ </h3>
1048
+
1049
+ <p>
1050
+ Pretty-print HTML with indentation and whitespace.
1051
+ </p>
1052
+
1053
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--pretty</span>
1054
+ </code></pre>
1055
+
1056
+ <h3 id="aria">
1057
+ <code>--aria</code>
1058
+ </h3>
1059
+
1060
+ <p>
1061
+ Add ARIA labels and accessibility attributes to HTML output for better screen reader support.
1062
+ </p>
1063
+
1064
+ <p>
1065
+ <strong> When enabled, adds:</strong>
1066
+ </p>
1067
+
1068
+ <ul>
1069
+
1070
+ <li>
1071
+ <code>aria-label=&quot;Table of contents&quot;</code> to TOC navigation elements (<code>&lt;nav class=&quot;toc&quot;&gt;</code>)
1072
+ </li>
1073
+
1074
+ <li>
1075
+ <code>role=&quot;figure&quot;</code> to <code>&lt;figure&gt;</code> elements
1076
+ </li>
1077
+
1078
+ <li>
1079
+ <code>role=&quot;table&quot;</code> to <code>&lt;table&gt;</code> elements
1080
+ </li>
1081
+
1082
+ <li>
1083
+ <code>id</code> attributes to <code>&lt;figcaption&gt;</code> elements within table figures (generated if missing, e.g., <code>table-caption-1</code>, <code>table-caption-2</code>)
1084
+ </li>
1085
+
1086
+ <li>
1087
+ <code>aria-describedby</code> attributes to tables linking them to their captions
1088
+ </li>
1089
+
1090
+ </ul>
1091
+
1092
+ <p>
1093
+ <strong> Default:</strong> Disabled (backward compatibility)
1094
+ </p>
1095
+
1096
+ <p>
1097
+ <strong> Examples:</strong>
1098
+ </p>
1099
+
1100
+ <pre><code class="highlight language-bash"><span class="c"># Generate accessible HTML output</span>
1101
+ apex document.md <span class="nt">--aria</span>
1102
+
1103
+ <span class="c"># Combine with other options</span>
1104
+ apex document.md <span class="nt">--aria</span> <span class="nt">--standalone</span> <span class="nt">--pretty</span>
1105
+ </code></pre>
1106
+
1107
+ <p>
1108
+ <strong> Output examples:</strong>
1109
+ </p>
1110
+
1111
+ <p>
1112
+ With <code>--aria</code> enabled, a table of contents generates:
1113
+ </p>
1114
+
1115
+ <pre><code class="highlight language-html"><span class="nt">&lt;nav</span> <span class="na">class=</span><span class="s">"toc"</span> <span class="na">aria-label=</span><span class="s">"Table of contents"</span><span class="nt">&gt;</span>
1116
+ <span class="nt">&lt;ul&gt;</span>
1117
+ <span class="nt">&lt;li&gt;&lt;a</span> <span class="na">href=</span><span class="s">"#section"</span><span class="nt">&gt;</span>Section<span class="nt">&lt;/a&gt;&lt;/li&gt;</span>
1118
+ <span class="nt">&lt;/ul&gt;</span>
1119
+ <span class="nt">&lt;/nav&gt;</span>
1120
+ </code></pre>
1121
+
1122
+ <p>
1123
+ Tables with captions get proper ARIA attributes:
1124
+ </p>
1125
+
1126
+ <pre><code class="highlight language-html"><span class="nt">&lt;figure</span> <span class="na">class=</span><span class="s">"table-figure"</span> <span class="na">role=</span><span class="s">"figure"</span><span class="nt">&gt;</span>
1127
+ <span class="nt">&lt;figcaption</span> <span class="na">id=</span><span class="s">"table-caption-1"</span><span class="nt">&gt;</span>Table Title<span class="nt">&lt;/figcaption&gt;</span>
1128
+ <span class="nt">&lt;table</span> <span class="na">role=</span><span class="s">"table"</span> <span class="na">aria-describedby=</span><span class="s">"table-caption-1"</span><span class="nt">&gt;</span>
1129
+ ...
1130
+ <span class="nt">&lt;/table&gt;</span>
1131
+ <span class="nt">&lt;/figure&gt;</span>
1132
+ </code></pre>
1133
+
1134
+ <p>
1135
+ <strong> Note:</strong> This option enhances accessibility without changing the visual appearance of the HTML. It’s particularly useful for documents that will be read by screen readers or other assistive technologies.
1136
+ </p>
1137
+
1138
+ <h2 id="plugin-management">
1139
+ Plugin Management
1140
+ </h2>
1141
+
1142
+ <h3 id="plugins-no-plugins">
1143
+ <code>--plugins</code>, <code>--no-plugins</code>
1144
+ </h3>
1145
+
1146
+ <p>
1147
+ Enable or disable external/plugin processing. Plugins are <strong>disabled by default</strong>; enable them per run or via metadata (<code>plugins: true</code> / <code>enable-plugins: true</code>).
1148
+ </p>
1149
+
1150
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--plugins</span>
1151
+ apex document.md <span class="nt">--no-plugins</span>
1152
+ </code></pre>
1153
+
1154
+ <h3 id="list-plugins">
1155
+ <code>--list-plugins</code>
1156
+ </h3>
1157
+
1158
+ <p>
1159
+ List installed plugins and available plugins from the remote directory. Shows IDs, titles, authors, and descriptions when available.
1160
+ </p>
1161
+
1162
+ <pre><code class="highlight language-bash">apex <span class="nt">--list-plugins</span>
1163
+ </code></pre>
1164
+
1165
+ <h3 id="install-plugin-id-or-url">
1166
+ <code>--install-plugin ID-or-URL</code>
1167
+ </h3>
1168
+
1169
+ <p>
1170
+ Install a plugin either:
1171
+ </p>
1172
+
1173
+ <ul>
1174
+
1175
+ <li>
1176
+ By <strong>ID</strong> from the central plugin directory (e.g. <code>kbd</code>), or
1177
+ </li>
1178
+
1179
+ <li>
1180
+ Directly from a <strong>Git URL</strong> or <strong>GitHub shorthand</strong> (<code>user/repo</code>).
1181
+ </li>
1182
+
1183
+ </ul>
1184
+
1185
+ <p>
1186
+ When installing from a URL, Apex prints a security warning before cloning, since plugins execute unverified code.
1187
+ </p>
1188
+
1189
+ <pre><code class="highlight language-bash">apex <span class="nt">--install-plugin</span> kbd
1190
+ apex <span class="nt">--install-plugin</span> https://github.com/user/apex-plugin-example.git
1191
+ apex <span class="nt">--install-plugin</span> user/apex-plugin-example
1192
+ </code></pre>
1193
+
1194
+ <h3 id="uninstall-plugin-id">
1195
+ <code>--uninstall-plugin ID</code>
1196
+ </h3>
1197
+
1198
+ <p>
1199
+ Uninstall a locally installed plugin by ID. This removes the plugin’s directory from the user plugin location, but does not delete any external support data the plugin may have created.
1200
+ </p>
1201
+
1202
+ <pre><code class="highlight language-bash">apex <span class="nt">--uninstall-plugin</span> kbd
1203
+ </code></pre>
1204
+
1205
+ <h2 id="header-id-options">
1206
+ Header ID Options
1207
+ </h2>
1208
+
1209
+ <h3 id="id-format-format">
1210
+ <code>--id-format FORMAT</code>
1211
+ </h3>
1212
+
1213
+ <p>
1214
+ Set header ID generation format. See <a href="Header-IDs.html">Header IDs</a> for details.
1215
+ </p>
1216
+
1217
+ <p>
1218
+ <strong> Values:</strong>
1219
+ </p>
1220
+
1221
+ <ul>
1222
+
1223
+ <li>
1224
+ <code>gfm</code> - GitHub Flavored Markdown format (default)
1225
+ </li>
1226
+
1227
+ <li>
1228
+ <code>mmd</code> - MultiMarkdown format
1229
+ </li>
1230
+
1231
+ <li>
1232
+ <code>kramdown</code> - Kramdown format
1233
+ </li>
1234
+
1235
+ </ul>
1236
+
1237
+ <p>
1238
+ <strong> Note:</strong> Modes automatically set the format. This option is useful to override in unified mode.
1239
+ </p>
1240
+
1241
+ <p>
1242
+ <strong> GFM Format Features:</strong>
1243
+ </p>
1244
+
1245
+ <ul>
1246
+
1247
+ <li>
1248
+ In GFM format, emojis in headers are automatically converted to their textual names in IDs (e.g., <code># 😄 Support</code> → <code>id=&quot;smile-support&quot;</code>), matching Pandoc’s GFM behavior.
1249
+ </li>
1250
+
1251
+ </ul>
1252
+
1253
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--id-format</span> mmd
1254
+ </code></pre>
1255
+
1256
+ <h3 id="no-ids">
1257
+ <code>--no-ids</code>
1258
+ </h3>
1259
+
1260
+ <p>
1261
+ Disable automatic header ID generation.
1262
+ </p>
1263
+
1264
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-ids</span>
1265
+ </code></pre>
1266
+
1267
+ <h3 id="header-anchors">
1268
+ <code>--header-anchors</code>
1269
+ </h3>
1270
+
1271
+ <p>
1272
+ Generate <code>&lt;a&gt;</code> anchor tags instead of <code>id</code> attributes on headers.
1273
+ </p>
1274
+
1275
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--header-anchors</span>
1276
+ </code></pre>
1277
+
1278
+ <p>
1279
+ <strong> Output:</strong>
1280
+ </p>
1281
+
1282
+ <pre><code class="highlight language-html"><span class="c">&lt;!-- Default --&gt;</span>
1283
+ <span class="nt">&lt;h1</span> <span class="na">id=</span><span class="s">"my-header"</span><span class="nt">&gt;</span>My Header<span class="nt">&lt;/h1&gt;</span>
1284
+
1285
+ <span class="c">&lt;!-- With --header-anchors --&gt;</span>
1286
+ <span class="nt">&lt;h1&gt;&lt;a</span> <span class="na">id=</span><span class="s">"my-header"</span> <span class="na">href=</span><span class="s">"#my-header"</span><span class="nt">&gt;</span>My Header<span class="nt">&lt;/a&gt;&lt;/h1&gt;</span>
1287
+ </code></pre>
1288
+
1289
+ <h2 id="table-options">
1290
+ Table Options
1291
+ </h2>
1292
+
1293
+ <h3 id="relaxed-tables">
1294
+ <code>--relaxed-tables</code>
1295
+ </h3>
1296
+
1297
+ <p>
1298
+ Enable relaxed table parsing (tables without separator rows). Default in unified and kramdown modes.
1299
+ </p>
1300
+
1301
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--relaxed-tables</span>
1302
+ </code></pre>
1303
+
1304
+ <h3 id="no-relaxed-tables">
1305
+ <code>--no-relaxed-tables</code>
1306
+ </h3>
1307
+
1308
+ <p>
1309
+ Disable relaxed table parsing.
1310
+ </p>
1311
+
1312
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-relaxed-tables</span>
1313
+ </code></pre>
1314
+
1315
+ <h3 id="captions-position">
1316
+ <code>--captions POSITION</code>
1317
+ </h3>
1318
+
1319
+ <p>
1320
+ Control the position of table captions. Captions are rendered as <code>&lt;figcaption&gt;</code> elements within <code>&lt;figure class=&quot;table-figure&quot;&gt;</code> wrappers.
1321
+ </p>
1322
+
1323
+ <p>
1324
+ <strong> Values:</strong>
1325
+ </p>
1326
+
1327
+ <ul>
1328
+
1329
+ <li>
1330
+ <code>above</code> - Place captions above the table
1331
+ </li>
1332
+
1333
+ <li>
1334
+ <code>below</code> - Place captions below the table (default)
1335
+ </li>
1336
+
1337
+ </ul>
1338
+
1339
+ <p>
1340
+ <strong> Default:</strong> <code>below</code>
1341
+ </p>
1342
+
1343
+ <pre><code class="highlight language-bash"><span class="c"># Place captions above tables</span>
1344
+ apex document.md <span class="nt">--captions</span> above
1345
+
1346
+ <span class="c"># Place captions below tables (default)</span>
1347
+ apex document.md <span class="nt">--captions</span> below
1348
+ </code></pre>
1349
+
1350
+ <p>
1351
+ <strong> Note:</strong> In standalone HTML output, table figures are styled with default CSS that centers and formats captions appropriately. The figure element shrinks to fit the table width, ensuring captions are properly aligned with the table.
1352
+ </p>
1353
+
1354
+ <h3 id="no-tables">
1355
+ <code>--no-tables</code>
1356
+ </h3>
1357
+
1358
+ <p>
1359
+ Disable table support entirely.
1360
+ </p>
1361
+
1362
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-tables</span>
1363
+ </code></pre>
1364
+
1365
+ <h2 id="list-options">
1366
+ List Options
1367
+ </h2>
1368
+
1369
+ <h3 id="no-alpha-lists">
1370
+ <code>--[no-]alpha-lists</code>
1371
+ </h3>
1372
+
1373
+ <p>
1374
+ Control support for alphabetic list markers (a., b., c. and A., B., C.).
1375
+ </p>
1376
+
1377
+ <p>
1378
+ <strong> Default behavior by mode:</strong>
1379
+ </p>
1380
+
1381
+ <ul>
1382
+
1383
+ <li>
1384
+ <strong> Enabled</strong> in: unified
1385
+ </li>
1386
+
1387
+ <li>
1388
+ <strong> Disabled</strong> in: commonmark, gfm, mmd, kramdown
1389
+ </li>
1390
+
1391
+ </ul>
1392
+
1393
+ <p>
1394
+ Alpha lists are automatically converted to HTML with <code>style=&quot;list-style-type: lower-alpha&quot;</code> or <code>style=&quot;list-style-type: upper-alpha&quot;</code>.
1395
+ </p>
1396
+
1397
+ <p>
1398
+ <strong> Examples:</strong>
1399
+ </p>
1400
+
1401
+ <pre><code class="highlight language-bash"><span class="c"># Enable alpha lists in GFM mode</span>
1402
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--alpha-lists</span>
1403
+
1404
+ <span class="c"># Disable alpha lists in unified mode</span>
1405
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-alpha-lists</span>
1406
+ </code></pre>
1407
+
1408
+ <p>
1409
+ <strong> Input:</strong>
1410
+ </p>
1411
+
1412
+ <pre><code class="highlight language-markdown">[apex-alpha-list:lower]
1413
+ <span class="p">
1414
+ 1.</span> First item
1415
+ <span class="p">2.</span> Second item
1416
+ <span class="p">3.</span> Third item
1417
+
1418
+ [apex-alpha-list:upper]
1419
+ <span class="p">
1420
+ 1.</span> Uppercase item
1421
+ <span class="p">2.</span> Another uppercase
1422
+ </code></pre>
1423
+
1424
+ <p>
1425
+ <strong> Output:</strong>
1426
+ </p>
1427
+
1428
+ <pre><code class="highlight language-html"><span class="nt">&lt;ol</span> <span class="na">style=</span><span class="s">"list-style-type: lower-alpha"</span><span class="nt">&gt;</span>
1429
+ <span class="nt">&lt;li&gt;</span>First item<span class="nt">&lt;/li&gt;</span>
1430
+ <span class="nt">&lt;li&gt;</span>Second item<span class="nt">&lt;/li&gt;</span>
1431
+ <span class="nt">&lt;li&gt;</span>Third item<span class="nt">&lt;/li&gt;</span>
1432
+ <span class="nt">&lt;/ol&gt;</span>
1433
+
1434
+ <span class="nt">&lt;ol</span> <span class="na">style=</span><span class="s">"list-style-type: upper-alpha"</span><span class="nt">&gt;</span>
1435
+ <span class="nt">&lt;li&gt;</span>Uppercase item<span class="nt">&lt;/li&gt;</span>
1436
+ <span class="nt">&lt;li&gt;</span>Another uppercase<span class="nt">&lt;/li&gt;</span>
1437
+ <span class="nt">&lt;/ol&gt;</span>
1438
+ </code></pre>
1439
+
1440
+ <h3 id="no-mixed-lists">
1441
+ <code>--[no-]mixed-lists</code>
1442
+ </h3>
1443
+
1444
+ <p>
1445
+ Control whether different list marker types can be mixed at the same indentation level.
1446
+ </p>
1447
+
1448
+ <p>
1449
+ <strong> Default behavior by mode:</strong>
1450
+ </p>
1451
+
1452
+ <ul>
1453
+
1454
+ <li>
1455
+ <strong> Enabled</strong> in: unified, multimarkdown
1456
+ </li>
1457
+
1458
+ <li>
1459
+ <strong> Disabled</strong> in: commonmark, gfm, kramdown
1460
+ </li>
1461
+
1462
+ </ul>
1463
+
1464
+ <p>
1465
+ When enabled, mixed markers inherit the type from the first item in the list.
1466
+ </p>
1467
+
1468
+ <p>
1469
+ <strong> Examples:</strong>
1470
+ </p>
1471
+
1472
+ <pre><code class="highlight language-bash"><span class="c"># Enable mixed lists in GFM mode</span>
1473
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--mixed-lists</span>
1474
+
1475
+ <span class="c"># Disable mixed lists in unified mode</span>
1476
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-mixed-lists</span>
1477
+ </code></pre>
1478
+
1479
+ <p>
1480
+ <strong> Input with mixed-lists enabled:</strong>
1481
+ </p>
1482
+
1483
+ <pre><code class="highlight language-markdown"><span class="p">1.</span> First numbered item
1484
+ <span class="p">*</span> Second item (becomes numbered)
1485
+ <span class="p">*</span> Third item (becomes numbered)
1486
+ </code></pre>
1487
+
1488
+ <p>
1489
+ <strong> Output:</strong>
1490
+ </p>
1491
+
1492
+ <pre><code class="highlight language-html"><span class="nt">&lt;ol&gt;</span>
1493
+ <span class="nt">&lt;li&gt;</span>First numbered item<span class="nt">&lt;/li&gt;</span>
1494
+ <span class="nt">&lt;li&gt;</span>Second item (becomes numbered)<span class="nt">&lt;/li&gt;</span>
1495
+ <span class="nt">&lt;li&gt;</span>Third item (becomes numbered)<span class="nt">&lt;/li&gt;</span>
1496
+ <span class="nt">&lt;/ol&gt;</span>
1497
+ </code></pre>
1498
+
1499
+ <h2 id="feature-flags">
1500
+ Feature Flags
1501
+ </h2>
1502
+
1503
+ <h3 id="no-footnotes">
1504
+ <code>--no-footnotes</code>
1505
+ </h3>
1506
+
1507
+ <p>
1508
+ Disable footnote support.
1509
+ </p>
1510
+
1511
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-footnotes</span>
1512
+ </code></pre>
1513
+
1514
+ <h3 id="no-smart">
1515
+ <code>--no-smart</code>
1516
+ </h3>
1517
+
1518
+ <p>
1519
+ Disable smart typography (smart quotes, dashes, ellipsis).
1520
+ </p>
1521
+
1522
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-smart</span>
1523
+ </code></pre>
1524
+
1525
+ <h3 id="no-math">
1526
+ <code>--no-math</code>
1527
+ </h3>
1528
+
1529
+ <p>
1530
+ Disable math support.
1531
+ </p>
1532
+
1533
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-math</span>
1534
+ </code></pre>
1535
+
1536
+ <h3 id="no-autolink">
1537
+ <code>--[no-]autolink</code>
1538
+ </h3>
1539
+
1540
+ <p>
1541
+ Control automatic linking of URLs and email addresses.
1542
+ </p>
1543
+
1544
+ <p>
1545
+ <strong> Default behavior by mode:</strong>
1546
+ </p>
1547
+
1548
+ <ul>
1549
+
1550
+ <li>
1551
+ <strong> Enabled</strong> in: GFM, MultiMarkdown, Kramdown, unified
1552
+ </li>
1553
+
1554
+ <li>
1555
+ <strong> Disabled</strong> in: CommonMark
1556
+ </li>
1557
+
1558
+ </ul>
1559
+
1560
+ <p>
1561
+ <strong> What gets autolinked:</strong>
1562
+ </p>
1563
+
1564
+ <ul>
1565
+
1566
+ <li>
1567
+ Angle-bracket URLs: <code>&lt;https://example.com&gt;</code>, <code>&lt;http://example.com&gt;</code>, <code>&lt;mailto:user@example.com&gt;</code>
1568
+ </li>
1569
+
1570
+ <li>
1571
+ Bare URLs: <code>https://example.com</code>, <code>http://example.com</code>
1572
+ </li>
1573
+
1574
+ <li>
1575
+ Email addresses: <code>user@example.com</code>
1576
+ </li>
1577
+
1578
+ </ul>
1579
+
1580
+ <p>
1581
+ <strong> Important:</strong> Autolinks are <strong>not</strong> processed inside code spans (<code>`code`</code>) or code blocks (<code> </code> ```).
1582
+ </p>
1583
+
1584
+ <p>
1585
+ <strong> Examples:</strong>
1586
+ </p>
1587
+
1588
+ <pre><code class="highlight language-bash"><span class="c"># Enable autolinking in CommonMark mode</span>
1589
+ apex document.md <span class="nt">--mode</span> commonmark <span class="nt">--autolink</span>
1590
+
1591
+ <span class="c"># Disable autolinking in unified mode</span>
1592
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-autolink</span>
1593
+ </code></pre>
1594
+
1595
+ <p>
1596
+ <strong> Input:</strong>
1597
+ </p>
1598
+
1599
+ <pre><code class="highlight language-markdown">Visit <span class="p">[</span><span class="nv">https://example.com</span><span class="p">](</span><span class="sx">https://example.com</span><span class="p">)</span> or contact <span class="p">[</span><span class="nv">me@example.com</span><span class="p">](</span><span class="sx">mailto:me@example.com</span><span class="p">)</span>.
1600
+ See <span class="sb">`&lt;https://example.com&gt;`</span> in code.
1601
+ </code></pre>
1602
+
1603
+ <p>
1604
+ <strong> Output with autolink enabled:</strong>
1605
+ </p>
1606
+
1607
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Visit <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"https://example.com"</span><span class="nt">&gt;</span>[https://example.com](https://example.com)<span class="nt">&lt;/a&gt;</span> or contact <span class="nt">&lt;a</span> <span class="na">[href=</span><span class="s">"me@example.com"</span><span class="na">](mailto:href=</span><span class="s">%22me@example.com%22)</span><span class="nt">&gt;</span>me@example.com<span class="nt">&lt;/a&gt;</span>.<span class="nt">&lt;/p&gt;</span>
1608
+ <span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;code&gt;</span><span class="ni">&amp;lt;</span>[https://example.com<span class="ni">&amp;gt](https://example.com&amp;gt);</span><span class="nt">&lt;/code&gt;</span> in code.<span class="nt">&lt;/p&gt;</span>
1609
+ </code></pre>
1610
+
1611
+ <p>
1612
+ <strong> Output with autolink disabled:</strong>
1613
+ </p>
1614
+
1615
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Visit [https://example.com](https://example.com) or contact [me@example.com](mailto:me@example.com).<span class="nt">&lt;/p&gt;</span>
1616
+ <span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;code&gt;</span><span class="ni">&amp;lt;</span>[https://example.com<span class="ni">&amp;gt](https://example.com&amp;gt);</span><span class="nt">&lt;/code&gt;</span> in code.<span class="nt">&lt;/p&gt;</span>
1617
+ </code></pre>
1618
+
1619
+ <h3 id="obfuscate-emails">
1620
+ <code>--obfuscate-emails</code>
1621
+ </h3>
1622
+
1623
+ <p>
1624
+ Obfuscate email links (including autolinked emails) by hex-encoding both the <code>mailto:</code> href and the visible address. Useful to deter scraping.
1625
+ </p>
1626
+
1627
+ <p>
1628
+ <strong> Default:</strong> Off (emails are plain <code>mailto:</code> links)
1629
+ </p>
1630
+
1631
+ <pre><code class="highlight language-bash"><span class="c"># Encode all mailto links in the output</span>
1632
+ apex document.md <span class="nt">--obfuscate-emails</span>
1633
+ </code></pre>
1634
+
1635
+ <p>
1636
+ <strong> Output:</strong>
1637
+ </p>
1638
+
1639
+ <pre><code class="highlight language-html"><span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"&amp;#x6D;&amp;#x61;&amp;#x69;&amp;#x6C;&amp;#x74;&amp;#x6F;&amp;#x3A;&amp;#x6D;&amp;#x65;&amp;#x40;&amp;#x65;&amp;#x78;&amp;#x61;&amp;#x6D;&amp;#x70;&amp;#x6C;&amp;#x65;&amp;#x2E;&amp;#x63;&amp;#x6F;&amp;#x6D;"</span><span class="nt">&gt;</span>
1640
+ <span class="ni">&amp;#x6D;&amp;#x65;&amp;#x40;&amp;#x65;&amp;#x78;&amp;#x61;&amp;#x6D;&amp;#x70;&amp;#x6C;&amp;#x65;&amp;#x2E;&amp;#x63;&amp;#x6F;&amp;#x6D;</span>
1641
+ <span class="nt">&lt;/a&gt;</span>
1642
+ </code></pre>
1643
+
1644
+ <h3 id="includes-no-includes">
1645
+ <code>--includes</code>, <code>--no-includes</code>
1646
+ </h3>
1647
+
1648
+ <p>
1649
+ Enable or disable file inclusion features. Enabled by default in unified mode.
1650
+ </p>
1651
+
1652
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--includes</span>
1653
+ apex document.md <span class="nt">--no-includes</span>
1654
+ </code></pre>
1655
+
1656
+ <h2 id="image-embedding">
1657
+ Image Embedding
1658
+ </h2>
1659
+
1660
+ <h3 id="embed-images">
1661
+ <code>--embed-images</code>
1662
+ </h3>
1663
+
1664
+ <p>
1665
+ Embed local images as base64 data URLs in HTML output.
1666
+ </p>
1667
+
1668
+ <p>
1669
+ <strong> Behavior:</strong>
1670
+ </p>
1671
+
1672
+ <ul>
1673
+
1674
+ <li>
1675
+ Only <strong>local images</strong> (file paths) are embedded
1676
+ </li>
1677
+
1678
+ <li>
1679
+ <strong> Remote images</strong> (http://, https://, //) are <strong>not</strong> processed and remain as URLs
1680
+ </li>
1681
+
1682
+ <li>
1683
+ Images are read from the filesystem and encoded as base64
1684
+ </li>
1685
+
1686
+ <li>
1687
+ Relative paths are resolved using the base directory (see <code>--base-dir</code>)
1688
+ </li>
1689
+
1690
+ <li>
1691
+ Images that are already data URLs are not processed again
1692
+ </li>
1693
+
1694
+ <li>
1695
+ If an image file doesn’t exist, the original path is preserved
1696
+ </li>
1697
+
1698
+ </ul>
1699
+
1700
+ <p>
1701
+ <strong> Supported image formats:</strong>
1702
+ </p>
1703
+
1704
+ <ul>
1705
+
1706
+ <li>
1707
+ JPEG (<code>.jpg</code>, <code>.jpeg</code>)
1708
+ </li>
1709
+
1710
+ <li>
1711
+ PNG (<code>.png</code>)
1712
+ </li>
1713
+
1714
+ <li>
1715
+ GIF (<code>.gif</code>)
1716
+ </li>
1717
+
1718
+ <li>
1719
+ WebP (<code>.webp</code>)
1720
+ </li>
1721
+
1722
+ <li>
1723
+ SVG (<code>.svg</code>)
1724
+ </li>
1725
+
1726
+ <li>
1727
+ BMP (<code>.bmp</code>)
1728
+ </li>
1729
+
1730
+ <li>
1731
+ ICO (<code>.ico</code>)
1732
+ </li>
1733
+
1734
+ </ul>
1735
+
1736
+ <p>
1737
+ <strong> Examples:</strong>
1738
+ </p>
1739
+
1740
+ <pre><code class="highlight language-bash"><span class="c"># Embed local images</span>
1741
+ apex document.md <span class="nt">--embed-images</span>
1742
+
1743
+ <span class="c"># Embed images with custom base directory</span>
1744
+ apex document.md <span class="nt">--embed-images</span> <span class="nt">--base-dir</span> /path/to/images
1745
+ </code></pre>
1746
+
1747
+ <p>
1748
+ <strong> Input:</strong>
1749
+ </p>
1750
+
1751
+ <pre><code class="highlight language-markdown"><span class="p">![</span><span class="nv">Local Image</span><span class="p">](</span><span class="sx">images/photo.png</span><span class="p">)</span>
1752
+ <span class="p">![</span><span class="nv">Remote Image</span><span class="p">](</span><span class="sx">https://example.com/image.jpg</span><span class="p">)</span>
1753
+ <span class="p">![</span><span class="nv">Already Embedded</span><span class="p">](</span><span class="sx">data:image/png;base64,iVBORw0KGgo...</span><span class="p">)</span>
1754
+ </code></pre>
1755
+
1756
+ <p>
1757
+ <strong> Output with <code>--embed-images</code>:</strong>
1758
+ </p>
1759
+
1760
+ <pre><code class="highlight language-html"><span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"data:image/png;base64,iVBORw0KGgo..."</span> <span class="na">alt=</span><span class="s">"Local Image"</span><span class="nt">&gt;</span>
1761
+ <span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"https://example.com/image.jpg"</span> <span class="na">alt=</span><span class="s">"Remote Image"</span><span class="nt">&gt;</span>
1762
+ <span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"data:image/png;base64,iVBORw0KGgo..."</span> <span class="na">alt=</span><span class="s">"Already Embedded"</span><span class="nt">&gt;</span>
1763
+ </code></pre>
1764
+
1765
+ <h2 id="path-resolution">
1766
+ Path Resolution
1767
+ </h2>
1768
+
1769
+ <h3 id="base-dir-dir">
1770
+ <code>--base-dir DIR</code>
1771
+ </h3>
1772
+
1773
+ <p>
1774
+ Set the base directory for resolving relative paths.
1775
+ </p>
1776
+
1777
+ <p>
1778
+ <strong> Used for:</strong>
1779
+ </p>
1780
+
1781
+ <ul>
1782
+
1783
+ <li>
1784
+ Image embedding (with <code>--embed-images</code>)
1785
+ </li>
1786
+
1787
+ <li>
1788
+ File includes/transclusions
1789
+ </li>
1790
+
1791
+ <li>
1792
+ Resolving relative paths when reading from stdin
1793
+ </li>
1794
+
1795
+ <li>
1796
+ Resolving relative paths when the working directory differs from the document location
1797
+ </li>
1798
+
1799
+ </ul>
1800
+
1801
+ <p>
1802
+ <strong> Behavior:</strong>
1803
+ </p>
1804
+
1805
+ <ul>
1806
+
1807
+ <li>
1808
+ If not specified and reading from a <strong>file</strong>, the base directory is automatically set to the input file’s directory
1809
+ </li>
1810
+
1811
+ <li>
1812
+ When reading from <strong>stdin</strong>, this flag must be used to resolve relative paths
1813
+ </li>
1814
+
1815
+ <li>
1816
+ Absolute paths are not affected by this setting
1817
+ </li>
1818
+
1819
+ <li>
1820
+ Relative paths are resolved by combining the base directory with the relative path
1821
+ </li>
1822
+
1823
+ </ul>
1824
+
1825
+ <p>
1826
+ <strong> Examples:</strong>
1827
+ </p>
1828
+
1829
+ <pre><code class="highlight language-bash"><span class="c"># Read from file (base directory auto-set to file's directory)</span>
1830
+ apex document.md <span class="nt">--embed-images</span>
1831
+
1832
+ <span class="c"># Read from stdin with base directory</span>
1833
+
1834
+ <span class="nb">cat </span>document.md | apex <span class="nt">--base-dir</span> /path/to/document <span class="nt">--embed-images</span>
1835
+ <span class="c"># Override auto-detected base directory</span>
1836
+ apex document.md <span class="nt">--base-dir</span> /custom/path <span class="nt">--embed-images</span>
1837
+
1838
+ <span class="c"># Use for includes</span>
1839
+ apex document.md <span class="nt">--base-dir</span> /path/to/project <span class="nt">--includes</span>
1840
+ </code></pre>
1841
+
1842
+ <p>
1843
+ <strong> Input (reading from stdin):</strong>
1844
+ </p>
1845
+
1846
+ <pre><code class="highlight language-markdown"><span class="p">![</span><span class="nv">Image</span><span class="p">](</span><span class="sx">images/photo.png</span><span class="p">)</span>
1847
+ </code></pre>
1848
+
1849
+ <p>
1850
+ <strong> Without <code>--base-dir</code>:</strong>
1851
+ </p>
1852
+
1853
+ <pre><code class="highlight language-html"><span class="c">&lt;!-- Image not found, path preserved --&gt;</span>
1854
+ <span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"images/photo.png"</span> <span class="na">alt=</span><span class="s">"Image"</span><span class="nt">&gt;</span>
1855
+ </code></pre>
1856
+
1857
+ <p>
1858
+ <strong> With <code>--base-dir /path/to/document</code>:</strong>
1859
+ </p>
1860
+
1861
+ <pre><code class="highlight language-html"><span class="c">&lt;!-- Image found at /path/to/document/images/photo.png and embedded --&gt;</span>
1862
+ <span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"data:image/png;base64,..."</span> <span class="na">alt=</span><span class="s">"Image"</span><span class="nt">&gt;</span>
1863
+ </code></pre>
1864
+
1865
+ <h3 id="no-transforms">
1866
+ <code>--[no-]transforms</code>
1867
+ </h3>
1868
+
1869
+ <p>
1870
+ Control metadata variable transforms. Enables <code>[%key:transform]</code> syntax for transforming metadata values.
1871
+ </p>
1872
+
1873
+ <p>
1874
+ <strong> Default behavior by mode:</strong>
1875
+ </p>
1876
+
1877
+ <ul>
1878
+
1879
+ <li>
1880
+ <strong> Enabled</strong> in: unified (default)
1881
+ </li>
1882
+
1883
+ <li>
1884
+ <strong> Disabled</strong> in: commonmark, gfm, mmd, kramdown
1885
+ </li>
1886
+
1887
+ </ul>
1888
+
1889
+ <p>
1890
+ <strong> Examples:</strong>
1891
+ </p>
1892
+
1893
+ <pre><code class="highlight language-bash"><span class="c"># Enable transforms in GFM mode</span>
1894
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--transforms</span>
1895
+
1896
+ <span class="c"># Disable transforms in unified mode</span>
1897
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-transforms</span>
1898
+ </code></pre>
1899
+
1900
+ <p>
1901
+ <strong> Input:</strong>
1902
+ </p>
1903
+
1904
+ <pre><code class="highlight language-markdown"><span class="nn">---</span>
1905
+ <span class="na">title</span><span class="pi">:</span> <span class="s">hello world</span>
1906
+ <span class="nn">---</span>
1907
+
1908
+ <span class="gh"># [%title:upper]</span>
1909
+ </code></pre>
1910
+
1911
+ <p>
1912
+ <strong> Output with transforms enabled:</strong>
1913
+ </p>
1914
+
1915
+ <pre><code class="highlight language-html"><span class="nt">&lt;h1&gt;</span>HELLO WORLD<span class="nt">&lt;/h1&gt;</span>
1916
+ </code></pre>
1917
+
1918
+ <p>
1919
+ <strong> Output with transforms disabled:</strong>
1920
+ </p>
1921
+
1922
+ <pre><code class="highlight language-html"><span class="nt">&lt;h1&gt;</span>[%title:upper]<span class="nt">&lt;/h1&gt;</span>
1923
+ </code></pre>
1924
+
1925
+ <p>
1926
+ For complete documentation of available transforms, see <a href="Metadata-Transforms.html">Metadata Transforms</a>.
1927
+ </p>
1928
+
1929
+ <h2 id="metadata-options">
1930
+ Metadata Options
1931
+ </h2>
1932
+
1933
+ <h3 id="meta-file-file">
1934
+ <code>--meta-file FILE</code>
1935
+ </h3>
1936
+
1937
+ <p>
1938
+ Load metadata from an external file. The file format is auto-detected (YAML, MultiMarkdown, or Pandoc format).
1939
+ </p>
1940
+
1941
+ <p>
1942
+ <strong> Supported formats:</strong>
1943
+ </p>
1944
+
1945
+ <ul>
1946
+
1947
+ <li>
1948
+ <strong> YAML</strong> (<code>.yml</code>, <code>.yaml</code>, or <code>---</code> delimited blocks)
1949
+ </li>
1950
+
1951
+ <li>
1952
+ <strong> MultiMarkdown</strong> (key: value pairs)
1953
+ </li>
1954
+
1955
+ <li>
1956
+ <strong> Pandoc</strong> (<code>%</code> lines)
1957
+ </li>
1958
+
1959
+ </ul>
1960
+
1961
+ <p>
1962
+ <strong> Metadata precedence (highest to lowest):</strong>
1963
+ </p>
1964
+
1965
+ <ol>
1966
+
1967
+ <li>
1968
+ Command-line metadata (<code>--meta</code>)
1969
+ </li>
1970
+
1971
+ <li>
1972
+ Document metadata (in the document itself)
1973
+ </li>
1974
+
1975
+ <li>
1976
+ File metadata (<code>--meta-file</code>)
1977
+ </li>
1978
+
1979
+ </ol>
1980
+
1981
+ <p>
1982
+ <strong> Example:</strong>
1983
+ </p>
1984
+
1985
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--meta-file</span> defaults.yml
1986
+ </code></pre>
1987
+
1988
+ <p>
1989
+ <strong> Reusable Metadata Files:</strong>
1990
+ </p>
1991
+
1992
+ <p>
1993
+ You can create reusable metadata files for common settings like language and quotes language. This is especially useful for maintaining consistent settings across multiple documents.
1994
+ </p>
1995
+
1996
+ <p>
1997
+ <strong> Example metadata file (<code>lang-fr.yml</code>):</strong>
1998
+ </p>
1999
+
2000
+ <pre><code class="highlight language-yaml"><span class="nn">---</span>
2001
+ <span class="na">language</span><span class="pi">:</span> <span class="s">fr</span>
2002
+ <span class="na">quoteslanguage</span><span class="pi">:</span> <span class="s">french</span>
2003
+ <span class="nn">---</span>
2004
+ </code></pre>
2005
+
2006
+ <p>
2007
+ <strong> Note:</strong> In YAML, keys with spaces must be quoted (e.g., <code>&quot;Quotes Language&quot;: french</code>). Since Apex normalizes metadata keys (removes spaces, case-insensitive), you can use keys without spaces for cleaner YAML syntax. Both <code>quoteslanguage</code> and <code>&quot;Quotes Language&quot;</code> will work.
2008
+ </p>
2009
+
2010
+ <p>
2011
+ <strong> Example metadata file (<code>lang-de.mmd</code>):</strong>
2012
+ </p>
2013
+
2014
+ <pre><code class="highlight ">Language: de
2015
+ Quotes Language: german
2016
+ </code></pre>
2017
+
2018
+ <p>
2019
+ <strong> Note:</strong> MultiMarkdown format allows spaces in keys, so <code>Quotes Language</code> works without quotes.
2020
+ </p>
2021
+
2022
+ <p>
2023
+ <strong> Usage:</strong>
2024
+ </p>
2025
+
2026
+ <pre><code class="highlight language-bash"><span class="c"># Use French language settings for all documents</span>
2027
+ apex document1.md <span class="nt">--meta-file</span> lang-fr.yml
2028
+ apex document2.md <span class="nt">--meta-file</span> lang-fr.yml
2029
+
2030
+ <span class="c"># Use German language settings</span>
2031
+ apex document.md <span class="nt">--meta-file</span> lang-de.mmd
2032
+ </code></pre>
2033
+
2034
+ <p>
2035
+ <strong> Global configuration file:</strong>
2036
+ </p>
2037
+
2038
+ <p>
2039
+ If you do not provide <code>--meta-file</code>, Apex will automatically look for a global configuration file named <code>config.yml</code> and load it as if it had been passed via <code>--meta-file</code> when it exists:
2040
+ </p>
2041
+
2042
+ <ul>
2043
+
2044
+ <li>
2045
+ If <code>$XDG_CONFIG_HOME</code> is set: <code>$XDG_CONFIG_HOME/apex/config.yml</code>
2046
+ </li>
2047
+
2048
+ <li>
2049
+ Otherwise: <code>~/.config/apex/config.yml</code>
2050
+ </li>
2051
+
2052
+ </ul>
2053
+
2054
+ <p>
2055
+ This makes it easy to define defaults (mode, language, feature flags, etc.) that apply to all documents unless overridden by document metadata or command-line options. See <a href="Configuration.html">Configuration</a> for example <code>config.yml</code> files and a complete list of available keys.
2056
+ </p>
2057
+
2058
+ <p>
2059
+ <strong> Benefits:</strong>
2060
+ </p>
2061
+
2062
+ <ul>
2063
+
2064
+ <li>
2065
+ <strong> Consistency</strong>: Ensure all documents use the same language and feature defaults
2066
+ </li>
2067
+
2068
+ <li>
2069
+ <strong> Reusability</strong>: Define configuration once and reuse across many documents
2070
+ </li>
2071
+
2072
+ <li>
2073
+ <strong> Maintainability</strong>: Update defaults in one place
2074
+ </li>
2075
+
2076
+ <li>
2077
+ <strong> Flexibility</strong>: Override with document-specific metadata or command-line flags when needed
2078
+ </li>
2079
+
2080
+ </ul>
2081
+
2082
+ <p>
2083
+ <strong> Note:</strong> The <code>language</code> metadata sets the HTML <code>lang</code> attribute in standalone documents, and if <code>Quotes Language</code> is not specified, it will automatically use the <code>language</code> value for quote styling.
2084
+ </p>
2085
+
2086
+ <h3 id="meta-keyvalue">
2087
+ <code>--meta KEY=VALUE</code>
2088
+ </h3>
2089
+
2090
+ <p>
2091
+ Set metadata from the command line. Can be used multiple times or with comma-separated pairs.
2092
+ </p>
2093
+
2094
+ <p>
2095
+ <strong> Examples:</strong>
2096
+ </p>
2097
+
2098
+ <pre><code class="highlight language-bash"><span class="c"># Single metadata value</span>
2099
+ apex document.md <span class="nt">--meta</span> <span class="nv">title</span><span class="o">=</span><span class="s2">"My Document"</span>
2100
+
2101
+ <span class="c"># Multiple metadata values</span>
2102
+ apex document.md <span class="nt">--meta</span> <span class="nv">title</span><span class="o">=</span><span class="s2">"My Document"</span> <span class="nt">--meta</span> <span class="nv">author</span><span class="o">=</span><span class="s2">"John Doe"</span>
2103
+
2104
+ <span class="c"># Comma-separated pairs</span>
2105
+ apex document.md <span class="nt">--meta</span> <span class="nv">title</span><span class="o">=</span><span class="s2">"My Document"</span>,author<span class="o">=</span><span class="s2">"John Doe"</span>
2106
+
2107
+ <span class="c"># Quoted values with spaces</span>
2108
+ apex document.md <span class="nt">--meta</span> <span class="nv">title</span><span class="o">=</span><span class="s2">"My Document Title"</span>
2109
+ </code></pre>
2110
+
2111
+ <p>
2112
+ <strong> Precedence:</strong> Command-line metadata overrides both document metadata and file metadata.
2113
+ </p>
2114
+
2115
+ <h3 id="controlling-options-via-metadata">
2116
+ Controlling Options via Metadata
2117
+ </h3>
2118
+
2119
+ <p>
2120
+ Most command-line options can be controlled via document metadata, allowing different files to be processed with different settings when processing batches. This enables per-document configuration without needing separate command-line invocations.
2121
+ </p>
2122
+
2123
+ <p>
2124
+ <strong> Boolean options</strong> accept <code>true</code>/<code>false</code>, <code>yes</code>/<code>no</code>, or <code>1</code>/<code>0</code> (case-insensitive, downcased). <strong>String options</strong> use the value directly.
2125
+ </p>
2126
+
2127
+ <p>
2128
+ <strong> Supported boolean options:</strong>
2129
+ </p>
2130
+
2131
+ <ul>
2132
+
2133
+ <li>
2134
+ <code>indices</code>, <code>wikilinks</code>, <code>includes</code>, <code>relaxed-tables</code>, <code>alpha-lists</code>, <code>mixed-lists</code>
2135
+ </li>
2136
+
2137
+ <li>
2138
+ <code>sup-sub</code>, <code>autolink</code>, <code>transforms</code>, <code>unsafe</code>, <code>tables</code>, <code>footnotes</code>
2139
+ </li>
2140
+
2141
+ <li>
2142
+ <code>smart</code>, <code>math</code>, <code>ids</code>, <code>header-anchors</code>, <code>embed-images</code>
2143
+ </li>
2144
+
2145
+ <li>
2146
+ <code>link-citations</code>, <code>show-tooltips</code>, <code>suppress-bibliography</code>, <code>suppress-index</code>
2147
+ </li>
2148
+
2149
+ <li>
2150
+ <code>group-index-by-letter</code>, <code>obfuscate-emails</code>, <code>pretty</code>, <code>standalone</code>, <code>hardbreaks</code>
2151
+ </li>
2152
+
2153
+ <li>
2154
+ <code>plugins</code> (see <a href="Plugins.html">Plugins</a> for details on per-document plugin control)
2155
+ </li>
2156
+
2157
+ </ul>
2158
+
2159
+ <p>
2160
+ <strong> Supported string options:</strong>
2161
+ </p>
2162
+
2163
+ <ul>
2164
+
2165
+ <li>
2166
+ <code>bibliography</code>, <code>csl</code>, <code>title</code>, <code>style</code> (or <code>css</code>), <code>id-format</code>, <code>base-dir</code>, <code>mode</code>
2167
+ </li>
2168
+
2169
+ <li>
2170
+ <code>language</code>, <code>quoteslanguage</code> (or <code>Quotes Language</code>), for locale and quote-style control
2171
+ </li>
2172
+
2173
+ </ul>
2174
+
2175
+ <p>
2176
+ <strong> Example YAML front matter:</strong>
2177
+ </p>
2178
+
2179
+ <pre><code class="highlight language-yaml"><span class="nn">---</span>
2180
+ <span class="na">indices</span><span class="pi">:</span> <span class="kc">false</span>
2181
+ <span class="na">wikilinks</span><span class="pi">:</span> <span class="kc">true</span>
2182
+ <span class="na">bibliography</span><span class="pi">:</span> <span class="s">references.bib</span>
2183
+ <span class="na">title</span><span class="pi">:</span> <span class="s">My Research Paper</span>
2184
+ <span class="na">pretty</span><span class="pi">:</span> <span class="kc">true</span>
2185
+ <span class="na">standalone</span><span class="pi">:</span> <span class="kc">true</span>
2186
+ <span class="na">language</span><span class="pi">:</span> <span class="s">en</span>
2187
+ <span class="na">quoteslanguage</span><span class="pi">:</span> <span class="s">english</span>
2188
+ <span class="nn">---</span>
2189
+ </code></pre>
2190
+
2191
+ <p>
2192
+ <strong> Example MultiMarkdown metadata:</strong>
2193
+ </p>
2194
+
2195
+ <pre><code class="highlight ">indices: false
2196
+ wikilinks: true
2197
+ bibliography: references.bib
2198
+ title: My Research Paper
2199
+ </code></pre>
2200
+
2201
+ <p>
2202
+ <strong> Batch Processing:</strong>
2203
+ When processing multiple files with <code>apex *.md</code>, each file can use its own configuration via metadata. You can also use <code>--meta-file</code> or a global <code>config.yml</code> to specify shared configuration that applies to all processed files.
2204
+ </p>
2205
+
2206
+ <pre><code class="highlight language-bash"><span class="c"># Process all markdown files, each with its own configuration</span>
2207
+ apex <span class="k">*</span>.md
2208
+
2209
+ <span class="c"># Process all files with a shared configuration file</span>
2210
+ apex <span class="k">*</span>.md <span class="nt">--meta-file</span> defaults.yml
2211
+ </code></pre>
2212
+
2213
+ <p>
2214
+ <strong> Note:</strong> If <code>mode</code> is specified in metadata, it resets all options to that mode’s defaults before applying other metadata options. This ensures mode-specific defaults are applied first.
2215
+ </p>
2216
+
2217
+ <h2 id="citations-and-bibliography">
2218
+ Citations and Bibliography
2219
+ </h2>
2220
+
2221
+ <h3 id="bibliography-file">
2222
+ <code>--bibliography FILE</code>
2223
+ </h3>
2224
+
2225
+ <p>
2226
+ Specify a bibliography file in BibTeX, CSL JSON, or CSL YAML format. Can be used multiple times to load multiple bibliography files.
2227
+ </p>
2228
+
2229
+ <p>
2230
+ <strong> Supported formats:</strong>
2231
+ </p>
2232
+
2233
+ <ul>
2234
+
2235
+ <li>
2236
+ <strong> BibTeX</strong> (<code>.bib</code>) - Standard bibliography format
2237
+ </li>
2238
+
2239
+ <li>
2240
+ <strong> CSL JSON</strong> (<code>.json</code>) - Citation Style Language JSON format
2241
+ </li>
2242
+
2243
+ <li>
2244
+ <strong> CSL YAML</strong> (<code>.yml</code>, <code>.yaml</code>) - Citation Style Language YAML format
2245
+ </li>
2246
+
2247
+ </ul>
2248
+
2249
+ <p>
2250
+ <strong> Behavior:</strong>
2251
+ </p>
2252
+
2253
+ <ul>
2254
+
2255
+ <li>
2256
+ Citations are automatically enabled when this option is used
2257
+ </li>
2258
+
2259
+ <li>
2260
+ Bibliography can also be specified in document metadata (see <a href="Citations.html">Citations</a>)
2261
+ </li>
2262
+
2263
+ <li>
2264
+ Multiple bibliography files are merged together
2265
+ </li>
2266
+
2267
+ <li>
2268
+ Relative paths are resolved using the base directory (see <code>--base-dir</code>)
2269
+ </li>
2270
+
2271
+ </ul>
2272
+
2273
+ <p>
2274
+ <strong> Examples:</strong>
2275
+ </p>
2276
+
2277
+ <pre><code class="highlight language-bash"><span class="c"># Single bibliography file</span>
2278
+ apex document.md <span class="nt">--bibliography</span> refs.bib
2279
+
2280
+ <span class="c"># Multiple bibliography files</span>
2281
+ apex document.md <span class="nt">--bibliography</span> refs1.bib <span class="nt">--bibliography</span> refs2.bib
2282
+
2283
+ <span class="c"># With base directory for relative paths</span>
2284
+ apex document.md <span class="nt">--bibliography</span> references.bib <span class="nt">--base-dir</span> /path/to/docs
2285
+ </code></pre>
2286
+
2287
+ <p>
2288
+ <strong> Input:</strong>
2289
+ </p>
2290
+
2291
+ <pre><code class="highlight language-markdown">See [@doe99] for details.
2292
+
2293
+ <span class="c">&lt;!-- REFERENCES --&gt;</span>
2294
+ </code></pre>
2295
+
2296
+ <p>
2297
+ <strong> Output:</strong>
2298
+ </p>
2299
+
2300
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"citation"</span> <span class="na">data-cites=</span><span class="s">"doe99"</span><span class="nt">&gt;</span>(Doe, John 1999)<span class="nt">&lt;/span&gt;</span> for details.<span class="nt">&lt;/p&gt;</span>
2301
+ <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"refs"</span> <span class="na">class=</span><span class="s">"references csl-bib-body"</span><span class="nt">&gt;</span>
2302
+ <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"ref-doe99"</span> <span class="na">class=</span><span class="s">"csl-entry"</span><span class="nt">&gt;</span>Doe, John 1999. <span class="nt">&lt;em&gt;</span>Article Title<span class="nt">&lt;/em&gt;</span>. <span class="nt">&lt;em&gt;</span>Journal Name<span class="nt">&lt;/em&gt;</span> 1: 1--10<span class="nt">&lt;/div&gt;</span>
2303
+ <span class="nt">&lt;/div&gt;</span>
2304
+ </code></pre>
2305
+
2306
+ <h3 id="csl-file">
2307
+ <code>--csl FILE</code>
2308
+ </h3>
2309
+
2310
+ <p>
2311
+ Specify a Citation Style Language (CSL) file for formatting citations and bibliography.
2312
+ </p>
2313
+
2314
+ <p>
2315
+ <strong> Behavior:</strong>
2316
+ </p>
2317
+
2318
+ <ul>
2319
+
2320
+ <li>
2321
+ Citations are automatically enabled when this option is used
2322
+ </li>
2323
+
2324
+ <li>
2325
+ CSL file can also be specified in document metadata
2326
+ </li>
2327
+
2328
+ <li>
2329
+ If no CSL file is specified, a default author-date style is used
2330
+ </li>
2331
+
2332
+ </ul>
2333
+
2334
+ <p>
2335
+ <strong> Example:</strong>
2336
+ </p>
2337
+
2338
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--bibliography</span> refs.bib <span class="nt">--csl</span> apa.csl
2339
+ </code></pre>
2340
+
2341
+ <h3 id="no-bibliography">
2342
+ <code>--no-bibliography</code>
2343
+ </h3>
2344
+
2345
+ <p>
2346
+ Suppress bibliography output even when citations are present in the document.
2347
+ </p>
2348
+
2349
+ <p>
2350
+ <strong> Example:</strong>
2351
+ </p>
2352
+
2353
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--bibliography</span> refs.bib <span class="nt">--no-bibliography</span>
2354
+ </code></pre>
2355
+
2356
+ <p>
2357
+ <strong> Note:</strong> Citations will still be processed and formatted, but the bibliography section will not be generated.
2358
+ </p>
2359
+
2360
+ <h3 id="link-citations">
2361
+ <code>--link-citations</code>
2362
+ </h3>
2363
+
2364
+ <p>
2365
+ Link citations to their corresponding bibliography entries. Citations will include <code>href</code> attributes pointing to the bibliography entry.
2366
+ </p>
2367
+
2368
+ <p>
2369
+ <strong> Example:</strong>
2370
+ </p>
2371
+
2372
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--bibliography</span> refs.bib <span class="nt">--link-citations</span>
2373
+ </code></pre>
2374
+
2375
+ <p>
2376
+ <strong> Output with <code>--link-citations</code>:</strong>
2377
+ </p>
2378
+
2379
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"#ref-doe99"</span> <span class="na">class=</span><span class="s">"citation"</span> <span class="na">data-cites=</span><span class="s">"doe99"</span><span class="nt">&gt;</span>(Doe, John 1999)<span class="nt">&lt;/a&gt;</span> for details.<span class="nt">&lt;/p&gt;</span>
2380
+ </code></pre>
2381
+
2382
+ <p>
2383
+ <strong> Output without <code>--link-citations</code>:</strong>
2384
+ </p>
2385
+
2386
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"citation"</span> <span class="na">data-cites=</span><span class="s">"doe99"</span><span class="nt">&gt;</span>(Doe, John 1999)<span class="nt">&lt;/span&gt;</span> for details.<span class="nt">&lt;/p&gt;</span>
2387
+ </code></pre>
2388
+
2389
+ <h3 id="show-tooltips">
2390
+ <code>--show-tooltips</code>
2391
+ </h3>
2392
+
2393
+ <p>
2394
+ Enable tooltips on citations when hovering (requires CSS support).
2395
+ </p>
2396
+
2397
+ <p>
2398
+ <strong> Example:</strong>
2399
+ </p>
2400
+
2401
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--bibliography</span> refs.bib <span class="nt">--show-tooltips</span>
2402
+ </code></pre>
2403
+
2404
+ <p>
2405
+ <strong> Note:</strong> This adds <code>title</code> attributes to citation links. CSS is required to style the tooltips.
2406
+ </p>
2407
+
2408
+ <p>
2409
+ For complete documentation of citation syntax and bibliography features, see <a href="Citations.html">Citations</a>.
2410
+ </p>
2411
+
2412
+ <h2 id="indices">
2413
+ Indices
2414
+ </h2>
2415
+
2416
+ <p>
2417
+ <strong> Note:</strong> Indices are supported in <strong>MultiMarkdown</strong> and <strong>unified</strong> modes. Enabled by default in these modes.
2418
+ </p>
2419
+
2420
+ <h3 id="indices">
2421
+ <code>--indices</code>
2422
+ </h3>
2423
+
2424
+ <p>
2425
+ Enable index processing with both mmark and TextIndex syntax support.
2426
+ </p>
2427
+
2428
+ <p>
2429
+ <strong> Default:</strong> Enabled in MultiMarkdown and unified modes
2430
+ </p>
2431
+
2432
+ <p>
2433
+ <strong> Behavior:</strong>
2434
+ </p>
2435
+
2436
+ <ul>
2437
+
2438
+ <li>
2439
+ Enables both mmark syntax (<code>(!item)</code>, <code>(!item, subitem)</code>, <code>(!!item, subitem)</code>) and TextIndex syntax (<code>{^}</code>, <code>[term]{^}</code>)
2440
+ </li>
2441
+
2442
+ <li>
2443
+ Index entries are collected during parsing
2444
+ </li>
2445
+
2446
+ <li>
2447
+ Index is automatically generated at the end of the document or at <code>&lt;!--INDEX--&gt;</code> marker
2448
+ </li>
2449
+
2450
+ <li>
2451
+ Entries are sorted alphabetically and can be grouped by first letter
2452
+ </li>
2453
+
2454
+ </ul>
2455
+
2456
+ <p>
2457
+ <strong> Example:</strong>
2458
+ </p>
2459
+
2460
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--indices</span>
2461
+ </code></pre>
2462
+
2463
+ <p>
2464
+ <strong> Input:</strong>
2465
+ </p>
2466
+
2467
+ <pre><code class="highlight language-markdown">This is about protocols (!Protocol).
2468
+
2469
+ And implementations (!Implementation).
2470
+ </code></pre>
2471
+
2472
+ <p>
2473
+ <strong> Output:</strong>
2474
+ </p>
2475
+
2476
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>This is about protocols <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"index"</span> <span class="na">id=</span><span class="s">"idxref:0"</span><span class="nt">&gt;&lt;/span&gt;</span>.<span class="nt">&lt;/p&gt;</span>
2477
+ <span class="nt">&lt;p&gt;</span>And implementations <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"index"</span> <span class="na">id=</span><span class="s">"idxref:1"</span><span class="nt">&gt;&lt;/span&gt;</span>.<span class="nt">&lt;/p&gt;</span>
2478
+ <span class="nt">&lt;h1</span> <span class="na">id=</span><span class="s">"index-section"</span><span class="nt">&gt;</span>Index<span class="nt">&lt;/h1&gt;</span>
2479
+ <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"index"</span><span class="nt">&gt;</span>
2480
+ ...
2481
+ <span class="nt">&lt;/div&gt;</span>
2482
+ </code></pre>
2483
+
2484
+ <h3 id="no-indices">
2485
+ <code>--no-indices</code>
2486
+ </h3>
2487
+
2488
+ <p>
2489
+ Disable index processing entirely.
2490
+ </p>
2491
+
2492
+ <p>
2493
+ <strong> Example:</strong>
2494
+ </p>
2495
+
2496
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-indices</span>
2497
+ </code></pre>
2498
+
2499
+ <p>
2500
+ <strong> Note:</strong> When disabled, index syntax is treated as plain text and no index markers or index section are generated.
2501
+ </p>
2502
+
2503
+ <h3 id="no-index">
2504
+ <code>--no-index</code>
2505
+ </h3>
2506
+
2507
+ <p>
2508
+ Suppress index generation while still creating index markers in the document.
2509
+ </p>
2510
+
2511
+ <p>
2512
+ <strong> Example:</strong>
2513
+ </p>
2514
+
2515
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--no-index</span>
2516
+ </code></pre>
2517
+
2518
+ <p>
2519
+ <strong> Behavior:</strong>
2520
+ </p>
2521
+
2522
+ <ul>
2523
+
2524
+ <li>
2525
+ Index markers (<code>&lt;span class=&quot;index&quot;&gt;</code>) are still created in the document
2526
+ </li>
2527
+
2528
+ <li>
2529
+ Index section is not generated at the end
2530
+ </li>
2531
+
2532
+ <li>
2533
+ Useful when you want to mark terms but generate the index separately
2534
+ </li>
2535
+
2536
+ </ul>
2537
+
2538
+ <p>
2539
+ For complete documentation of index syntax, see <a href="Syntax#indices">Syntax</a>.
2540
+ </p>
2541
+
2542
+ <h3 id="hardbreaks">
2543
+ <code>--hardbreaks</code>
2544
+ </h3>
2545
+
2546
+ <p>
2547
+ Treat newlines as hard breaks (GFM style). Newlines become <code>&lt;br&gt;</code> tags.
2548
+ </p>
2549
+
2550
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--hardbreaks</span>
2551
+ </code></pre>
2552
+
2553
+ <h3 id="no-sup-sub">
2554
+ <code>--[no-]sup-sub</code>
2555
+ </h3>
2556
+
2557
+ <p>
2558
+ Control MultiMarkdown-style superscript and subscript syntax.
2559
+ </p>
2560
+
2561
+ <p>
2562
+ <strong> Syntax:</strong>
2563
+ </p>
2564
+
2565
+ <ul>
2566
+
2567
+ <li>
2568
+ The <code>^</code> character creates superscript for the text immediately following it. The superscript stops at the first space, punctuation, or newline.
2569
+ </li>
2570
+
2571
+ <li>
2572
+ The <code>~</code> character creates subscript when used <strong>within a word/identifier</strong> with paired tildes (e.g., <code>H~2~O</code> creates H₂O). When tildes are at word boundaries (e.g., <code>~text~</code>), they create underline instead.
2573
+ </li>
2574
+
2575
+ </ul>
2576
+
2577
+ <p>
2578
+ <strong> Important:</strong> Subscript uses <strong>paired tildes within word boundaries</strong>. The tildes must be part of a word/identifier (alphanumeric characters) to create subscript. Tildes at word boundaries create underline.
2579
+ </p>
2580
+
2581
+ <p>
2582
+ <strong> Default behavior by mode:</strong>
2583
+ </p>
2584
+
2585
+ <ul>
2586
+
2587
+ <li>
2588
+ <strong> Enabled</strong> in: unified, multimarkdown
2589
+ </li>
2590
+
2591
+ <li>
2592
+ <strong> Disabled</strong> in: commonmark, gfm, kramdown
2593
+ </li>
2594
+
2595
+ </ul>
2596
+
2597
+ <p>
2598
+ <strong> Examples:</strong>
2599
+ </p>
2600
+
2601
+ <pre><code class="highlight language-bash"><span class="c"># Enable sup/sub in GFM mode</span>
2602
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--sup-sub</span>
2603
+
2604
+ <span class="c"># Disable sup/sub in unified mode</span>
2605
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-sup-sub</span>
2606
+ </code></pre>
2607
+
2608
+ <p>
2609
+ <strong> Input:</strong>
2610
+ </p>
2611
+
2612
+ <pre><code class="highlight language-markdown">Water: H<span class="nt">&lt;sub&gt;</span>2<span class="nt">&lt;/sub&gt;</span>O # Subscript (tildes within word)
2613
+ Area: m<span class="nt">&lt;sup&gt;</span>2<span class="nt">&lt;/sup&gt;</span> # Superscript
2614
+ Formula: E = mc<span class="nt">&lt;sup&gt;</span>2<span class="nt">&lt;/sup&gt;</span> # Superscript
2615
+ Chemical: H<span class="nt">&lt;sub&gt;</span>2<span class="nt">&lt;/sub&gt;</span>SO<span class="nt">&lt;sub&gt;</span>4<span class="nt">&lt;/sub&gt;</span> # Multiple subscripts within word
2616
+ <span class="nt">&lt;u&gt;</span>h2o<span class="nt">&lt;/u&gt;</span> # Underline (tildes at word boundaries)
2617
+ </code></pre>
2618
+
2619
+ <h3 id="no-divs">
2620
+ <code>--[no-]divs</code>
2621
+ </h3>
2622
+
2623
+ <p>
2624
+ Control Pandoc fenced divs syntax processing. Fenced divs allow you to create HTML <code>&lt;div&gt;</code> elements with attributes using a special fence syntax (<code>::::: {#id .class} ... :::::</code>).
2625
+ </p>
2626
+
2627
+ <p>
2628
+ <strong> Default behavior:</strong>
2629
+ </p>
2630
+
2631
+ <ul>
2632
+
2633
+ <li>
2634
+ <strong> Enabled</strong> in: unified mode
2635
+ </li>
2636
+
2637
+ <li>
2638
+ <strong> Disabled</strong> in: all other modes
2639
+ </li>
2640
+
2641
+ </ul>
2642
+
2643
+ <p>
2644
+ <strong> Examples:</strong>
2645
+ </p>
2646
+
2647
+ <pre><code class="highlight language-bash"><span class="c"># Enable fenced divs in unified mode (default)</span>
2648
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--divs</span>
2649
+
2650
+ <span class="c"># Disable fenced divs in unified mode</span>
2651
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-divs</span>
2652
+ </code></pre>
2653
+
2654
+ <p>
2655
+ <strong> Input:</strong>
2656
+ </p>
2657
+
2658
+ <pre><code class="highlight language-markdown"><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"special"</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">&gt;&lt;p&gt;</span>Here is a paragraph.<span class="nt">&lt;/p&gt;</span>
2659
+ <span class="nt">&lt;p&gt;</span>And another.<span class="nt">&lt;/p&gt;</span>
2660
+ <span class="nt">&lt;/div&gt;</span>
2661
+ </code></pre>
2662
+
2663
+ <p>
2664
+ <strong> Output:</strong>
2665
+ </p>
2666
+
2667
+ <pre><code class="highlight language-html"><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"special"</span> <span class="na">class=</span><span class="s">"sidebar"</span><span class="nt">&gt;</span>
2668
+ <span class="nt">&lt;p&gt;</span>Here is a paragraph.<span class="nt">&lt;/p&gt;</span>
2669
+ <span class="nt">&lt;p&gt;</span>And another.<span class="nt">&lt;/p&gt;</span>
2670
+ <span class="nt">&lt;/div&gt;</span>
2671
+ </code></pre>
2672
+
2673
+ <p>
2674
+ <strong> Features:</strong>
2675
+ </p>
2676
+
2677
+ <ul>
2678
+
2679
+ <li>
2680
+ Opening fences require at least 3 colons and must have attributes
2681
+ </li>
2682
+
2683
+ <li>
2684
+ Closing fences need at least 3 colons (no attributes)
2685
+ </li>
2686
+
2687
+ <li>
2688
+ Supports nested divs
2689
+ </li>
2690
+
2691
+ <li>
2692
+ Attributes can include ID (<code>{#id}</code>), classes (<code>{.class}</code>), and custom attributes (<code>key=&quot;value&quot;</code>)
2693
+ </li>
2694
+
2695
+ <li>
2696
+ Single unbraced word is treated as a class name
2697
+ </li>
2698
+
2699
+ <li>
2700
+ Attributes can optionally be followed by trailing colons
2701
+ </li>
2702
+
2703
+ <li>
2704
+ Supports different HTML block elements using <code>&gt;blocktype</code> syntax (e.g., <code>::: &gt;aside {.sidebar} ... :::</code> creates <code>&lt;aside&gt;</code> instead of <code>&lt;div&gt;</code>)
2705
+ </li>
2706
+
2707
+ </ul>
2708
+
2709
+ <p>
2710
+ See <a href="Syntax#pandoc-fenced-divs">Syntax</a> for complete documentation, including block types like <code>&gt;aside</code>, <code>&gt;article</code>, <code>&gt;section</code>, <code>&gt;details</code>, and <code>&gt;summary</code>.
2711
+ </p>
2712
+
2713
+ <h3 id="no-spans">
2714
+ <code>--[no-]spans</code>
2715
+ </h3>
2716
+
2717
+ <p>
2718
+ Control Pandoc-style bracketed spans syntax (<code>[text]{IAL}</code>). Bracketed spans convert to HTML <code>&lt;span&gt;</code> elements with attributes.
2719
+ </p>
2720
+
2721
+ <p>
2722
+ <strong> Default behavior:</strong>
2723
+ </p>
2724
+
2725
+ <ul>
2726
+
2727
+ <li>
2728
+ <strong> Enabled</strong> in: unified mode
2729
+ </li>
2730
+
2731
+ <li>
2732
+ <strong> Disabled</strong> in: all other modes
2733
+ </li>
2734
+
2735
+ </ul>
2736
+
2737
+ <p>
2738
+ <strong> Examples:</strong>
2739
+ </p>
2740
+
2741
+ <pre><code class="highlight language-bash"><span class="c"># Enable bracketed spans in unified mode (default)</span>
2742
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--spans</span>
2743
+
2744
+ <span class="c"># Disable bracketed spans in unified mode</span>
2745
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-spans</span>
2746
+ </code></pre>
2747
+
2748
+ <p>
2749
+ <strong> Input:</strong>
2750
+ </p>
2751
+
2752
+ <pre><code class="highlight language-markdown">This is <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"highlight"</span><span class="nt">&gt;</span>highlighted text<span class="nt">&lt;/span&gt;</span>
2753
+ in a sentence.
2754
+ <span class="nt">&lt;span</span> <span class="na">id=</span><span class="s">"id"</span> <span class="na">class=</span><span class="s">"class"</span> <span class="na">key=</span><span class="s">"value"</span><span class="nt">&gt;</span>Custom span<span class="nt">&lt;/span&gt;</span>
2755
+
2756
+ </code></pre>
2757
+
2758
+ <p>
2759
+ <strong> Output:</strong>
2760
+ </p>
2761
+
2762
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>This is <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"highlight"</span><span class="nt">&gt;</span>highlighted text<span class="nt">&lt;/span&gt;</span> in a sentence.<span class="nt">&lt;/p&gt;</span>
2763
+ <span class="nt">&lt;p&gt;&lt;span</span> <span class="na">id=</span><span class="s">"id"</span> <span class="na">class=</span><span class="s">"class"</span> <span class="na">key=</span><span class="s">"value"</span><span class="nt">&gt;</span>Custom span<span class="nt">&lt;/span&gt;&lt;/p&gt;</span>
2764
+ </code></pre>
2765
+
2766
+ <p>
2767
+ <strong> Features:</strong>
2768
+ </p>
2769
+
2770
+ <ul>
2771
+
2772
+ <li>
2773
+ Supports IAL syntax for attributes (ID, classes, custom attributes)
2774
+ </li>
2775
+
2776
+ <li>
2777
+ Works with both Kramdown-style <code>{: #id .class}</code> and Pandoc-style <code>{#id .class}</code> attribute formats
2778
+ </li>
2779
+
2780
+ <li>
2781
+ Can be nested within other inline elements
2782
+ </li>
2783
+
2784
+ </ul>
2785
+
2786
+ <p>
2787
+ See <a href="Syntax#bracketed-spans">Syntax</a> for complete documentation.
2788
+ </p>
2789
+
2790
+ <h3 id="no-emoji-autocorrect">
2791
+ <code>--[no-]emoji-autocorrect</code>
2792
+ </h3>
2793
+
2794
+ <p>
2795
+ Control emoji name autocorrect. When enabled, emoji names like <code>🚀</code> are automatically converted to Unicode emoji characters.
2796
+ </p>
2797
+
2798
+ <p>
2799
+ <strong> Default behavior:</strong>
2800
+ </p>
2801
+
2802
+ <ul>
2803
+
2804
+ <li>
2805
+ <strong> Enabled</strong> in: unified mode
2806
+ </li>
2807
+
2808
+ <li>
2809
+ <strong> Disabled</strong> in: all other modes
2810
+ </li>
2811
+
2812
+ </ul>
2813
+
2814
+ <p>
2815
+ <strong> Examples:</strong>
2816
+ </p>
2817
+
2818
+ <pre><code class="highlight language-bash"><span class="c"># Enable emoji autocorrect in unified mode (default)</span>
2819
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--emoji-autocorrect</span>
2820
+
2821
+ <span class="c"># Disable emoji autocorrect in unified mode</span>
2822
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-emoji-autocorrect</span>
2823
+
2824
+ <span class="c"># Enable emoji autocorrect in GFM mode</span>
2825
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--emoji-autocorrect</span>
2826
+ </code></pre>
2827
+
2828
+ <p>
2829
+ <strong> Input:</strong>
2830
+ </p>
2831
+
2832
+ <pre><code class="highlight language-markdown">Success! 🚀 🎉 ✨
2833
+ I ❤️ Markdown!
2834
+ </code></pre>
2835
+
2836
+ <p>
2837
+ <strong> Output with emoji-autocorrect enabled:</strong>
2838
+ </p>
2839
+
2840
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Success! 🚀 🎉 ✨<span class="nt">&lt;/p&gt;</span>
2841
+ <span class="nt">&lt;p&gt;</span>I ❤️ Markdown!<span class="nt">&lt;/p&gt;</span>
2842
+ </code></pre>
2843
+
2844
+ <p>
2845
+ <strong> Output with emoji-autocorrect disabled:</strong>
2846
+ </p>
2847
+
2848
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Success! 🚀 🎉 ✨<span class="nt">&lt;/p&gt;</span>
2849
+ <span class="nt">&lt;p&gt;</span>I ❤️ Markdown!<span class="nt">&lt;/p&gt;</span>
2850
+ </code></pre>
2851
+
2852
+ <p>
2853
+ <strong> Note:</strong> Apex supports 350+ GitHub emoji names. See <a href="Syntax#github-emoji">Syntax</a> for more information.
2854
+ </p>
2855
+
2856
+ <p>
2857
+ <strong> Output:</strong>
2858
+ </p>
2859
+
2860
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Water: H<span class="nt">&lt;sub&gt;</span>2<span class="nt">&lt;/sub&gt;</span>O<span class="nt">&lt;/p&gt;</span>
2861
+ <span class="nt">&lt;p&gt;</span>Area: m<span class="nt">&lt;sup&gt;</span>2<span class="nt">&lt;/sup&gt;&lt;/p&gt;</span>
2862
+ <span class="nt">&lt;p&gt;</span>Formula: E = mc<span class="nt">&lt;sup&gt;</span>2<span class="nt">&lt;/sup&gt;&lt;/p&gt;</span>
2863
+ <span class="nt">&lt;p&gt;</span>Chemical: H<span class="nt">&lt;sub&gt;</span>2<span class="nt">&lt;/sub&gt;</span>SO<span class="nt">&lt;sub&gt;</span>4<span class="nt">&lt;/sub&gt;&lt;/p&gt;</span>
2864
+ <span class="nt">&lt;p&gt;&lt;u&gt;</span>h2o<span class="nt">&lt;/u&gt;&lt;/p&gt;</span>
2865
+ </code></pre>
2866
+
2867
+ <h3 id="no-unsafe">
2868
+ <code>--[no-]unsafe</code>
2869
+ </h3>
2870
+
2871
+ <p>
2872
+ Control whether raw HTML is allowed in output.
2873
+ </p>
2874
+
2875
+ <p>
2876
+ <strong> Default behavior by mode:</strong>
2877
+ </p>
2878
+
2879
+ <ul>
2880
+
2881
+ <li>
2882
+ <strong> Enabled</strong> in: unified, multimarkdown, kramdown
2883
+ </li>
2884
+
2885
+ <li>
2886
+ <strong> Disabled</strong> in: commonmark, gfm
2887
+ </li>
2888
+
2889
+ </ul>
2890
+
2891
+ <p>
2892
+ When disabled, HTML tags are escaped or removed for security (GFM tag filter).
2893
+ </p>
2894
+
2895
+ <p>
2896
+ <strong> Examples:</strong>
2897
+ </p>
2898
+
2899
+ <pre><code class="highlight language-bash"><span class="c"># Enable raw HTML in GFM mode</span>
2900
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--unsafe</span>
2901
+
2902
+ <span class="c"># Disable raw HTML in unified mode</span>
2903
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--no-unsafe</span>
2904
+ </code></pre>
2905
+
2906
+ <p>
2907
+ <strong> Input:</strong>
2908
+ </p>
2909
+
2910
+ <pre><code class="highlight language-markdown"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"custom"</span><span class="nt">&gt;</span>Custom HTML<span class="nt">&lt;/div&gt;</span>
2911
+ </code></pre>
2912
+
2913
+ <p>
2914
+ <strong> Output with unsafe enabled:</strong>
2915
+ </p>
2916
+
2917
+ <pre><code class="highlight language-html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"custom"</span><span class="nt">&gt;</span>Custom HTML<span class="nt">&lt;/div&gt;</span>
2918
+ </code></pre>
2919
+
2920
+ <p>
2921
+ <strong> Output with unsafe disabled (GFM mode):</strong>
2922
+ </p>
2923
+
2924
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span><span class="ni">&amp;lt;</span>div class="custom"<span class="ni">&amp;gt;</span>Custom HTML<span class="ni">&amp;lt;</span>/div<span class="ni">&amp;gt;</span><span class="nt">&lt;/p&gt;</span>
2925
+ </code></pre>
2926
+
2927
+ <h3 id="no-wikilinks">
2928
+ <code>--[no-]wikilinks</code>
2929
+ </h3>
2930
+
2931
+ <p>
2932
+ Control wiki link syntax (<code>[[PageName]]</code>).
2933
+ </p>
2934
+
2935
+ <p>
2936
+ <strong> Default:</strong> Disabled in all modes
2937
+ </p>
2938
+
2939
+ <p>
2940
+ Wiki links must be explicitly enabled with <code>--wikilinks</code> to process <code>[[PageName]]</code>, <code>[[Page|Display]]</code>, and <code>[[Page#Section]]</code> syntax.
2941
+ <strong> Examples:</strong>
2942
+ </p>
2943
+
2944
+ <pre><code class="highlight language-bash"><span class="c"># Enable wiki links in unified mode</span>
2945
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--wikilinks</span>
2946
+
2947
+ <span class="c"># Enable wiki links in any mode</span>
2948
+ apex document.md <span class="nt">--mode</span> gfm <span class="nt">--wikilinks</span>
2949
+
2950
+ <span class="c"># Disable wiki links (explicit)</span>
2951
+ apex document.md <span class="nt">--no-wikilinks</span>
2952
+ </code></pre>
2953
+
2954
+ <p>
2955
+ <strong> Input:</strong>
2956
+ </p>
2957
+
2958
+ <pre><code class="highlight language-markdown">Check out [[Main Page]] for details.
2959
+ Or see [[Main Page|the main page]] with custom text.
2960
+ Link to [[Main Page#Section]] for a specific section.
2961
+ </code></pre>
2962
+
2963
+ <p>
2964
+ <strong> Output with wikilinks enabled (default - spaces converted to dashes):</strong>
2965
+ </p>
2966
+
2967
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Check out <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"Main-Page"</span><span class="nt">&gt;</span>Main Page<span class="nt">&lt;/a&gt;</span> for details.<span class="nt">&lt;/p&gt;</span>
2968
+ <span class="nt">&lt;p&gt;</span>Or see <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"Main-Page"</span><span class="nt">&gt;</span>the main page<span class="nt">&lt;/a&gt;</span> with custom text.<span class="nt">&lt;/p&gt;</span>
2969
+ <span class="nt">&lt;p&gt;</span>Link to <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"Main-Page#Section"</span><span class="nt">&gt;</span>Main Page<span class="nt">&lt;/a&gt;</span> for a specific section.<span class="nt">&lt;/p&gt;</span>
2970
+ </code></pre>
2971
+
2972
+ <p>
2973
+ <strong> Output with wikilinks disabled:</strong>
2974
+ </p>
2975
+
2976
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>Check out [[Main Page]] for details.<span class="nt">&lt;/p&gt;</span>
2977
+ <span class="nt">&lt;p&gt;</span>Or see [[Main Page|the main page]] for custom text.<span class="nt">&lt;/p&gt;</span>
2978
+ <span class="nt">&lt;p&gt;</span>Link to [[Main Page#Section]] for a specific section.<span class="nt">&lt;/p&gt;</span>
2979
+ </code></pre>
2980
+
2981
+ <h3 id="wikilink-space-mode">
2982
+ <code>--wikilink-space MODE</code>
2983
+ </h3>
2984
+
2985
+ <p>
2986
+ Control how spaces in wiki link page names are handled in the generated URL.
2987
+ </p>
2988
+
2989
+ <p>
2990
+ <strong> Default:</strong> <code>dash</code> (spaces converted to dashes)
2991
+ </p>
2992
+
2993
+ <p>
2994
+ <strong> Options:</strong>
2995
+ </p>
2996
+
2997
+ <ul>
2998
+
2999
+ <li>
3000
+ <code>dash</code> - Convert spaces to dashes: <code>[[Home Page]]</code> → <code>href=&quot;Home-Page&quot;</code>
3001
+ </li>
3002
+
3003
+ <li>
3004
+ <code>none</code> - Remove spaces: <code>[[Home Page]]</code> → <code>href=&quot;HomePage&quot;</code>
3005
+ </li>
3006
+
3007
+ <li>
3008
+ <code>underscore</code> - Convert spaces to underscores: <code>[[Home Page]]</code> → <code>href=&quot;Home_Page&quot;</code>
3009
+ </li>
3010
+
3011
+ <li>
3012
+ <code>space</code> - Keep spaces (rendered as <code>%20</code> in HTML): <code>[[Home Page]]</code> → <code>href=&quot;Home%20Page&quot;</code>
3013
+ </li>
3014
+
3015
+ </ul>
3016
+
3017
+ <p>
3018
+ <strong> Examples:</strong>
3019
+ </p>
3020
+
3021
+ <pre><code class="highlight language-bash"><span class="c"># Use dashes (default)</span>
3022
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-space</span> dash
3023
+
3024
+ <span class="c"># Remove spaces</span>
3025
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-space</span> none
3026
+
3027
+ <span class="c"># Use underscores</span>
3028
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-space</span> underscore
3029
+
3030
+ <span class="c"># Keep spaces (not recommended for URLs)</span>
3031
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-space</span> space
3032
+ </code></pre>
3033
+
3034
+ <h3 id="wikilink-extension-ext">
3035
+ <code>--wikilink-extension EXT</code>
3036
+ </h3>
3037
+
3038
+ <p>
3039
+ Add a file extension to wiki link URLs.
3040
+ </p>
3041
+
3042
+ <p>
3043
+ <strong> Default:</strong> No extension
3044
+ </p>
3045
+
3046
+ <p>
3047
+ The extension is automatically prefixed with a dot if not provided. For example, <code>--wikilink-extension html</code> creates <code>href=&quot;Page.html&quot;</code> and <code>--wikilink-extension .html</code> also creates <code>href=&quot;Page.html&quot;</code>.
3048
+ </p>
3049
+
3050
+ <p>
3051
+ <strong> Examples:</strong>
3052
+ </p>
3053
+
3054
+ <pre><code class="highlight language-bash"><span class="c"># Add .html extension</span>
3055
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-extension</span> html
3056
+
3057
+ <span class="c"># Add .md extension</span>
3058
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-extension</span> md
3059
+
3060
+ <span class="c"># Combine with space mode</span>
3061
+ apex document.md <span class="nt">--wikilinks</span> <span class="nt">--wikilink-space</span> dash <span class="nt">--wikilink-extension</span> html
3062
+ </code></pre>
3063
+
3064
+ <p>
3065
+ <strong> Input:</strong>
3066
+ </p>
3067
+
3068
+ <pre><code class="highlight language-markdown">See [[Home Page]] for details.
3069
+ </code></pre>
3070
+
3071
+ <p>
3072
+ <strong> Output with <code>--wikilink-space dash --wikilink-extension html</code>:</strong>
3073
+ </p>
3074
+
3075
+ <pre><code class="highlight language-html"><span class="nt">&lt;p&gt;</span>See <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"Home-Page.html"</span><span class="nt">&gt;</span>Home Page<span class="nt">&lt;/a&gt;</span> for details.<span class="nt">&lt;/p&gt;</span>
3076
+ </code></pre>
3077
+
3078
+ <h2 id="critic-markup-options">
3079
+ Critic Markup Options
3080
+ </h2>
3081
+
3082
+ <h3 id="accept">
3083
+ <code>--accept</code>
3084
+ </h3>
3085
+
3086
+ <p>
3087
+ Accept all Critic Markup changes. Applies all additions, removes all deletions, keeps substitutions.
3088
+ </p>
3089
+
3090
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--accept</span>
3091
+ </code></pre>
3092
+
3093
+ <p>
3094
+ <strong> Behavior:</strong>
3095
+ </p>
3096
+
3097
+ <ul>
3098
+
3099
+ <li>
3100
+ <code>&lt;ins class=&quot;critic&quot;&gt;add&lt;/ins&gt;</code> → <code>add</code> (kept)
3101
+ </li>
3102
+
3103
+ <li>
3104
+ <code>&lt;del class=&quot;critic&quot;&gt;del&lt;/del&gt;</code> → (removed)
3105
+ </li>
3106
+
3107
+ <li>
3108
+ <code>&lt;del class=&quot;critic break&quot;&gt;old&lt;/del&gt;&lt;ins class=&quot;critic break&quot;&gt;new&lt;/ins&gt;</code> → <code>new</code> (kept)
3109
+ </li>
3110
+
3111
+ <li>
3112
+ <code>&lt;mark class=&quot;critic&quot;&gt;mark&lt;/mark&gt;</code> → <code>mark</code> (markup removed)
3113
+ </li>
3114
+
3115
+ <li>
3116
+ <code>&lt;span class=&quot;critic comment&quot;&gt;comment&lt;/span&gt;</code> → (removed)
3117
+ </li>
3118
+
3119
+ </ul>
3120
+
3121
+ <h3 id="reject">
3122
+ <code>--reject</code>
3123
+ </h3>
3124
+
3125
+ <p>
3126
+ Reject all Critic Markup changes. Reverts all changes, keeps original text.
3127
+ </p>
3128
+
3129
+ <pre><code class="highlight language-bash">apex document.md <span class="nt">--reject</span>
3130
+ </code></pre>
3131
+
3132
+ <p>
3133
+ <strong> Behavior:</strong>
3134
+ </p>
3135
+
3136
+ <ul>
3137
+
3138
+ <li>
3139
+ <code>&lt;ins class=&quot;critic&quot;&gt;add&lt;/ins&gt;</code> → (removed)
3140
+ </li>
3141
+
3142
+ <li>
3143
+ <code>&lt;del class=&quot;critic&quot;&gt;del&lt;/del&gt;</code> → <code>del</code> (kept)
3144
+ </li>
3145
+
3146
+ <li>
3147
+ <code>&lt;del class=&quot;critic break&quot;&gt;old&lt;/del&gt;&lt;ins class=&quot;critic break&quot;&gt;new&lt;/ins&gt;</code> → <code>old</code> (kept)
3148
+ </li>
3149
+
3150
+ <li>
3151
+ <code>&lt;mark class=&quot;critic&quot;&gt;mark&lt;/mark&gt;</code> → <code>mark</code> (markup removed)
3152
+ </li>
3153
+
3154
+ <li>
3155
+ <code>&lt;span class=&quot;critic comment&quot;&gt;comment&lt;/span&gt;</code> → (removed)
3156
+ </li>
3157
+
3158
+ </ul>
3159
+
3160
+ <h2 id="inputoutput">
3161
+ Input/Output
3162
+ </h2>
3163
+
3164
+ <h3 id="reading-from-stdin">
3165
+ Reading from stdin
3166
+ </h3>
3167
+
3168
+ <p>
3169
+ If no file is specified, Apex reads from stdin:
3170
+ </p>
3171
+
3172
+ <pre><code class="highlight language-bash"><span class="nb">echo</span> <span class="s2">"# Hello"</span> | apex
3173
+ <span class="nt">---</span>|---|
3174
+ <span class="nb">cat </span>document.md | apex <span class="o">&gt;</span> output.html
3175
+ </code></pre>
3176
+
3177
+ <h3 id="writing-to-stdout">
3178
+ Writing to stdout
3179
+ </h3>
3180
+
3181
+ <p>
3182
+ By default, Apex writes to stdout. Use <code>-o</code> or <code>&gt;</code> to redirect:
3183
+ </p>
3184
+
3185
+ <pre><code class="highlight language-bash">apex document.md <span class="o">&gt;</span> output.html
3186
+ apex document.md <span class="nt">-o</span> output.html
3187
+ </code></pre>
3188
+
3189
+ <h2 id="combining-options">
3190
+ Combining Options
3191
+ </h2>
3192
+
3193
+ <p>
3194
+ You can combine multiple options:
3195
+ </p>
3196
+
3197
+ <pre><code class="highlight language-bash"><span class="c"># Standalone document with custom title and stylesheet, pretty-printed</span>
3198
+ apex document.md <span class="nt">--standalone</span> <span class="nt">--title</span> <span class="s2">"Report"</span> <span class="nt">--style</span> report.css <span class="nt">--pretty</span>
3199
+
3200
+ <span class="c"># GFM mode with no header IDs</span>
3201
+ apex <span class="nt">--mode</span> gfm <span class="nt">--no-ids</span> document.md
3202
+
3203
+ <span class="c"># Unified mode with MMD-style header IDs</span>
3204
+ apex <span class="nt">--mode</span> unified <span class="nt">--id-format</span> mmd document.md
3205
+ </code></pre>
3206
+
3207
+ <h2 id="option-precedence">
3208
+ Option Precedence
3209
+ </h2>
3210
+
3211
+ <p>
3212
+ Options are processed in order. Later options override earlier ones:
3213
+ </p>
3214
+
3215
+ <pre><code class="highlight language-bash"><span class="c"># This will use GFM mode (unified is default, but --mode gfm overrides)</span>
3216
+ apex document.md <span class="nt">--mode</span> unified <span class="nt">--mode</span> gfm
3217
+ </code></pre>
3218
+
3219
+ <h2 id="examples">
3220
+ Examples
3221
+ </h2>
3222
+
3223
+ <h3 id="blog-post">
3224
+ Blog Post
3225
+ </h3>
3226
+
3227
+ <pre><code class="highlight language-bash">apex post.md <span class="nt">--standalone</span> <span class="nt">--title</span> <span class="s2">"My Blog Post"</span> <span class="nt">--style</span> blog.css <span class="nt">--pretty</span> <span class="nt">-o</span> post.html
3228
+ </code></pre>
3229
+
3230
+ <h3 id="github-compatible-output">
3231
+ GitHub-Compatible Output
3232
+ </h3>
3233
+
3234
+ <pre><code class="highlight language-bash">apex README.md <span class="nt">--mode</span> gfm <span class="nt">--pretty</span> <span class="o">&gt;</span> README.html
3235
+ </code></pre>
3236
+
3237
+ <h3 id="documentation-with-custom-ids">
3238
+ Documentation with Custom IDs
3239
+ </h3>
3240
+
3241
+ <pre><code class="highlight language-bash">apex docs.md <span class="nt">--standalone</span> <span class="nt">--title</span> <span class="s2">"Documentation"</span> <span class="nt">--id-format</span> mmd <span class="nt">--pretty</span>
3242
+ </code></pre>
3243
+
3244
+ <h3 id="review-document-with-critic-markup">
3245
+ Review Document with Critic Markup
3246
+ </h3>
3247
+
3248
+ <pre><code class="highlight language-bash"><span class="c"># Show all changes</span>
3249
+ apex draft.md
3250
+
3251
+ <span class="c"># Apply all changes (final version)</span>
3252
+ apex draft.md <span class="nt">--accept</span>
3253
+
3254
+ <span class="c"># Revert all changes (original version)</span>
3255
+ apex draft.md <span class="nt">--reject</span>
3256
+ </code></pre>
3257
+
3258
+ <h3 id="academic-document-with-citations">
3259
+ Academic Document with Citations
3260
+ </h3>
3261
+
3262
+ <pre><code class="highlight language-bash"><span class="c"># Process document with bibliography</span>
3263
+ apex paper.md <span class="nt">--bibliography</span> refs.bib
3264
+
3265
+ <span class="c"># With citation style and linked citations</span>
3266
+ apex paper.md <span class="nt">--bibliography</span> refs.bib <span class="nt">--csl</span> apa.csl <span class="nt">--link-citations</span>
3267
+
3268
+ <span class="c"># Multiple bibliography files</span>
3269
+ apex paper.md <span class="nt">--bibliography</span> refs1.bib <span class="nt">--bibliography</span> refs2.bib
3270
+ </code></pre>
3271
+
3272
+ <h2 id="related">
3273
+ Related
3274
+ </h2>
3275
+
3276
+ <ul>
3277
+
3278
+ <li>
3279
+ <a href="Modes.html"> Modes</a> - How modes affect available options
3280
+ </li>
3281
+
3282
+ <li>
3283
+ <a href="Header-IDs.html"> Header IDs</a> - Header ID generation options
3284
+ </li>
3285
+
3286
+ <li>
3287
+ <a href="Usage.html"> Usage</a> - Basic usage examples
3288
+ </li>
3289
+
3290
+ </ul>
3291
+
3292
+ <h2 id="plugin-options">
3293
+ Plugin Options
3294
+ </h2>
3295
+
3296
+ <h3 id="no-plugins">
3297
+ <code>--[no-]plugins</code>
3298
+ </h3>
3299
+
3300
+ <p>
3301
+ Enable or disable plugin processing.
3302
+ </p>
3303
+
3304
+ <ul>
3305
+
3306
+ <li>
3307
+ <strong> Default</strong>: Plugins are disabled unless you explicitly enable them.
3308
+ </li>
3309
+
3310
+ <li>
3311
+ <strong> Enable</strong>: <code>--plugins</code>
3312
+ </li>
3313
+
3314
+ <li>
3315
+ <strong> Disable</strong>: <code>--no-plugins</code>
3316
+ </li>
3317
+
3318
+ </ul>
3319
+
3320
+ <p>
3321
+ Plugins can also be enabled per document using metadata (e.g. <code>plugins: true</code>). See <a href="Plugins.html">Plugins</a> for details.
3322
+ </p>
3323
+
3324
+ <pre><code class="highlight language-bash">apex <span class="nt">--plugins</span> document.md
3325
+ </code></pre>
3326
+
3327
+ <h3 id="list-plugins">
3328
+ <code>--list-plugins</code>
3329
+ </h3>
3330
+
3331
+ <p>
3332
+ List installed plugins and available plugins from the central directory.
3333
+ </p>
3334
+
3335
+ <ul>
3336
+
3337
+ <li>
3338
+ Prints a <code>## Installed Plugins</code> section for plugins found in your user plugin directory.
3339
+ </li>
3340
+
3341
+ <li>
3342
+ Prints a <code>---</code> separator and a <code>## Available Plugins</code> section with plugins from the remote JSON directory that are <strong>not</strong> already installed.
3343
+ </li>
3344
+
3345
+ </ul>
3346
+
3347
+ <pre><code class="highlight language-bash">apex <span class="nt">--list-plugins</span>
3348
+ </code></pre>
3349
+
3350
+ <h3 id="install-plugin-id">
3351
+ <code>--install-plugin ID</code>
3352
+ </h3>
3353
+
3354
+ <p>
3355
+ Install a plugin from the central directory by its <code>id</code>.
3356
+ </p>
3357
+
3358
+ <ul>
3359
+
3360
+ <li>
3361
+ Fetches <code>apex-plugins.json</code> from the <code>ApexMarkdown/apex-plugins</code> repository.
3362
+ </li>
3363
+
3364
+ <li>
3365
+ Locates the plugin entry with matching <code>id</code>.
3366
+ </li>
3367
+
3368
+ <li>
3369
+ Clones the plugin repository into your user plugin directory (e.g. <code>~/.config/apex/plugins/ID</code>).
3370
+ </li>
3371
+
3372
+ <li>
3373
+ If the plugin’s <code>plugin.yml</code> defines a <code>post_install</code> command, Apex runs it from the plugin directory after cloning.
3374
+ </li>
3375
+
3376
+ </ul>
3377
+
3378
+ <pre><code class="highlight language-bash">apex <span class="nt">--install-plugin</span> kbd
3379
+ </code></pre>
3380
+
3381
+ <h3 id="uninstall-plugin-id">
3382
+ <code>--uninstall-plugin ID</code>
3383
+ </h3>
3384
+
3385
+ <p>
3386
+ Uninstall a locally installed plugin by its <code>id</code>.
3387
+ </p>
3388
+
3389
+ <ul>
3390
+
3391
+ <li>
3392
+ Verifies that the plugin directory exists under the user plugin path.
3393
+ </li>
3394
+
3395
+ <li>
3396
+ Prompts for confirmation before deleting the plugin directory.
3397
+ </li>
3398
+
3399
+ <li>
3400
+ Removes only the plugin’s directory; support data under <code>.../apex/support</code> is left intact.
3401
+ </li>
3402
+
3403
+ </ul>
3404
+
3405
+ <pre><code class="highlight language-bash">apex <span class="nt">--uninstall-plugin</span> kbd
3406
+ </code></pre>
3407
+
3408
+ <script>
3409
+ // Hamburger menu functionality
3410
+ (function() {
3411
+ function initHamburgerMenu() {
3412
+ var hamburger = document.getElementById('hamburger-menu');
3413
+ var sidebar = document.querySelector('.main-toc, .sidebar');
3414
+ var overlay = document.getElementById('mobile-menu-overlay');
3415
+
3416
+ if (!hamburger || !sidebar) return;
3417
+
3418
+ function toggleMenu() {
3419
+ var isOpen = sidebar.classList.contains('mobile-open');
3420
+ if (isOpen) {
3421
+ sidebar.classList.remove('mobile-open');
3422
+ hamburger.classList.remove('active');
3423
+ if (overlay) overlay.classList.remove('active');
3424
+ } else {
3425
+ sidebar.classList.add('mobile-open');
3426
+ hamburger.classList.add('active');
3427
+ if (overlay) overlay.classList.add('active');
3428
+ }
3429
+ }
3430
+
3431
+ hamburger.addEventListener('click', function(e) {
3432
+ e.stopPropagation();
3433
+ toggleMenu();
3434
+ });
3435
+
3436
+ if (overlay) {
3437
+ overlay.addEventListener('click', function() {
3438
+ toggleMenu();
3439
+ });
3440
+ }
3441
+
3442
+ // Close menu when clicking on a sidebar link (mobile only)
3443
+ if (window.innerWidth <= 768) {
3444
+ var sidebarLinks = sidebar.querySelectorAll('a');
3445
+ sidebarLinks.forEach(function(link) {
3446
+ link.addEventListener('click', function() {
3447
+ setTimeout(function() {
3448
+ sidebar.classList.remove('mobile-open');
3449
+ hamburger.classList.remove('active');
3450
+ if (overlay) overlay.classList.remove('active');
3451
+ }, 100);
3452
+ });
3453
+ });
3454
+ }
3455
+
3456
+ // Close menu on window resize if going to desktop
3457
+ window.addEventListener('resize', function() {
3458
+ if (window.innerWidth > 768) {
3459
+ sidebar.classList.remove('mobile-open');
3460
+ hamburger.classList.remove('active');
3461
+ if (overlay) overlay.classList.remove('active');
3462
+ }
3463
+ });
3464
+ }
3465
+
3466
+ // Initialize when DOM is ready
3467
+ if (document.readyState === 'loading') {
3468
+ document.addEventListener('DOMContentLoaded', initHamburgerMenu);
3469
+ } else {
3470
+ initHamburgerMenu();
3471
+ }
3472
+ })();
3473
+
3474
+ </script>
3475
+ <script>
3476
+ (function() {
3477
+ // Clone the page TOC for floating TOC
3478
+ function initFloatingTOC() {
3479
+ var pageTOC = document.getElementById('page-toc-top');
3480
+ var floatingTOCContent = document.getElementById('floating-toc-content');
3481
+ var floatingTOC = document.getElementById('floating-toc');
3482
+
3483
+ if (!pageTOC || !floatingTOCContent || !floatingTOC) return;
3484
+
3485
+ // Clone the TOC structure
3486
+ var tocClone = pageTOC.cloneNode(true);
3487
+ tocClone.id = 'floating-toc-clone';
3488
+ floatingTOCContent.appendChild(tocClone);
3489
+
3490
+ // Update all links to use smooth scrolling
3491
+ var allTOCLinks = document.querySelectorAll('.page-toc a, .floating-toc-content a');
3492
+ allTOCLinks.forEach(function(link) {
3493
+ link.addEventListener('click', function(e) {
3494
+ var href = this.getAttribute('href');
3495
+ if (href && href.startsWith('#')) {
3496
+ e.preventDefault();
3497
+ var targetId = href.substring(1);
3498
+ var targetElement = document.getElementById(targetId);
3499
+ if (targetElement) {
3500
+ var offset = 20; // Offset from top
3501
+
3502
+ // Function to calculate absolute position from document top
3503
+ function getAbsoluteTop(element) {
3504
+ var top = 0;
3505
+ while (element) {
3506
+ top += element.offsetTop;
3507
+ element = element.offsetParent;
3508
+ }
3509
+ return top;
3510
+ }
3511
+
3512
+ var absoluteTop = getAbsoluteTop(targetElement);
3513
+ var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
3514
+ var offsetPosition = absoluteTop - offset;
3515
+
3516
+ // Only scroll if we're not already at the target position
3517
+ if (Math.abs(scrollTop - offsetPosition) > 10) {
3518
+ window.scrollTo({
3519
+ top: Math.max(0, offsetPosition),
3520
+ behavior: 'smooth'
3521
+ });
3522
+ }
3523
+
3524
+ // Update URL hash without triggering scroll
3525
+ if (history.pushState) {
3526
+ history.pushState(null, null, href);
3527
+ }
3528
+ }
3529
+ }
3530
+ });
3531
+ });
3532
+
3533
+ // Handle scroll to show/hide floating TOC
3534
+ var tocTop = pageTOC.getBoundingClientRect().top + window.pageYOffset;
3535
+ var tocBottom = tocTop + pageTOC.offsetHeight;
3536
+
3537
+ function updateFloatingTOC() {
3538
+ var scrollY = window.pageYOffset || document.documentElement.scrollTop;
3539
+
3540
+ if (scrollY > tocBottom) {
3541
+ floatingTOC.classList.add('visible');
3542
+ } else {
3543
+ floatingTOC.classList.remove('visible');
3544
+ }
3545
+ }
3546
+
3547
+ // Throttle scroll events
3548
+ var ticking = false;
3549
+ window.addEventListener('scroll', function() {
3550
+ if (!ticking) {
3551
+ window.requestAnimationFrame(function() {
3552
+ updateFloatingTOC();
3553
+ ticking = false;
3554
+ });
3555
+ ticking = true;
3556
+ }
3557
+ });
3558
+
3559
+ // Initial check
3560
+ updateFloatingTOC();
3561
+ }
3562
+
3563
+ // Initialize when DOM is ready
3564
+ if (document.readyState === 'loading') {
3565
+ document.addEventListener('DOMContentLoaded', initFloatingTOC);
3566
+ } else {
3567
+ initFloatingTOC();
3568
+ }
3569
+ })();
3570
+ </script>
3571
+ <footer class="page-footer"><p>Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License</p></footer></body>
3572
+
3573
+ </html>
3574
+