@fredlackey/devutils 0.0.1 → 0.0.3

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 (259) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
  3. package/src/commands/install.js +374 -36
  4. package/src/installs/adobe-creative-cloud.js +527 -25
  5. package/src/installs/adobe-creative-cloud.md +605 -0
  6. package/src/installs/appcleaner.js +303 -26
  7. package/src/installs/appcleaner.md +699 -0
  8. package/src/installs/apt-transport-https.js +390 -0
  9. package/src/installs/apt-transport-https.md +678 -0
  10. package/src/installs/atomicparsley.js +624 -26
  11. package/src/installs/atomicparsley.md +795 -0
  12. package/src/installs/aws-cli.js +779 -26
  13. package/src/installs/aws-cli.md +727 -0
  14. package/src/installs/balena-etcher.js +688 -26
  15. package/src/installs/balena-etcher.md +761 -0
  16. package/src/installs/bambu-studio.js +912 -26
  17. package/src/installs/bambu-studio.md +780 -0
  18. package/src/installs/bash-completion.js +554 -23
  19. package/src/installs/bash-completion.md +833 -0
  20. package/src/installs/bash.js +399 -26
  21. package/src/installs/bash.md +993 -0
  22. package/src/installs/beyond-compare.js +585 -26
  23. package/src/installs/beyond-compare.md +813 -0
  24. package/src/installs/build-essential.js +511 -26
  25. package/src/installs/build-essential.md +977 -0
  26. package/src/installs/ca-certificates.js +618 -0
  27. package/src/installs/ca-certificates.md +937 -0
  28. package/src/installs/caffeine.js +490 -26
  29. package/src/installs/caffeine.md +839 -0
  30. package/src/installs/camtasia.js +577 -25
  31. package/src/installs/camtasia.md +762 -0
  32. package/src/installs/chatgpt.js +458 -26
  33. package/src/installs/chatgpt.md +814 -0
  34. package/src/installs/chocolatey.js +447 -0
  35. package/src/installs/chocolatey.md +661 -0
  36. package/src/installs/chrome-canary.js +472 -26
  37. package/src/installs/chrome-canary.md +641 -0
  38. package/src/installs/chromium.js +645 -26
  39. package/src/installs/chromium.md +838 -0
  40. package/src/installs/claude-code.js +558 -26
  41. package/src/installs/claude-code.md +1173 -0
  42. package/src/installs/curl.js +361 -26
  43. package/src/installs/curl.md +714 -0
  44. package/src/installs/cursor.js +561 -26
  45. package/src/installs/cursor.md +970 -0
  46. package/src/installs/dbschema.js +674 -26
  47. package/src/installs/dbschema.md +925 -0
  48. package/src/installs/dependencies.md +435 -0
  49. package/src/installs/development-tools.js +600 -0
  50. package/src/installs/development-tools.md +977 -0
  51. package/src/installs/docker.js +1010 -25
  52. package/src/installs/docker.md +1109 -0
  53. package/src/installs/drawio.js +1001 -26
  54. package/src/installs/drawio.md +795 -0
  55. package/src/installs/elmedia-player.js +328 -25
  56. package/src/installs/elmedia-player.md +556 -0
  57. package/src/installs/ffmpeg.js +870 -25
  58. package/src/installs/ffmpeg.md +852 -0
  59. package/src/installs/file.js +464 -0
  60. package/src/installs/file.md +987 -0
  61. package/src/installs/gemini-cli.js +793 -26
  62. package/src/installs/gemini-cli.md +1153 -0
  63. package/src/installs/git.js +382 -26
  64. package/src/installs/git.md +907 -0
  65. package/src/installs/gitego.js +931 -26
  66. package/src/installs/gitego.md +1172 -0
  67. package/src/installs/go.js +913 -26
  68. package/src/installs/go.md +958 -0
  69. package/src/installs/google-chrome.js +801 -25
  70. package/src/installs/google-chrome.md +862 -0
  71. package/src/installs/gpg.js +412 -73
  72. package/src/installs/gpg.md +1056 -0
  73. package/src/installs/homebrew.js +1015 -26
  74. package/src/installs/homebrew.md +988 -0
  75. package/src/installs/imageoptim.js +950 -26
  76. package/src/installs/imageoptim.md +1119 -0
  77. package/src/installs/installers.json +2297 -0
  78. package/src/installs/jq.js +382 -26
  79. package/src/installs/jq.md +809 -0
  80. package/src/installs/keyboard-maestro.js +701 -26
  81. package/src/installs/keyboard-maestro.md +825 -0
  82. package/src/installs/latex.js +771 -26
  83. package/src/installs/latex.md +1095 -0
  84. package/src/installs/lftp.js +338 -26
  85. package/src/installs/lftp.md +907 -0
  86. package/src/installs/lsb-release.js +346 -0
  87. package/src/installs/lsb-release.md +814 -0
  88. package/src/installs/messenger.js +829 -26
  89. package/src/installs/messenger.md +900 -0
  90. package/src/installs/microsoft-office.js +550 -26
  91. package/src/installs/microsoft-office.md +760 -0
  92. package/src/installs/microsoft-teams.js +782 -25
  93. package/src/installs/microsoft-teams.md +886 -0
  94. package/src/installs/node.js +886 -26
  95. package/src/installs/node.md +1153 -0
  96. package/src/installs/nordpass.js +698 -26
  97. package/src/installs/nordpass.md +921 -0
  98. package/src/installs/nvm.js +977 -26
  99. package/src/installs/nvm.md +1057 -0
  100. package/src/installs/openssh.js +734 -64
  101. package/src/installs/openssh.md +1056 -0
  102. package/src/installs/pandoc.js +644 -26
  103. package/src/installs/pandoc.md +1036 -0
  104. package/src/installs/pinentry.js +492 -26
  105. package/src/installs/pinentry.md +1142 -0
  106. package/src/installs/pngyu.js +851 -26
  107. package/src/installs/pngyu.md +896 -0
  108. package/src/installs/postman.js +781 -26
  109. package/src/installs/postman.md +940 -0
  110. package/src/installs/procps.js +425 -0
  111. package/src/installs/procps.md +851 -0
  112. package/src/installs/safari-tech-preview.js +355 -25
  113. package/src/installs/safari-tech-preview.md +533 -0
  114. package/src/installs/sfnt2woff.js +640 -26
  115. package/src/installs/sfnt2woff.md +795 -0
  116. package/src/installs/shellcheck.js +463 -26
  117. package/src/installs/shellcheck.md +1005 -0
  118. package/src/installs/slack.js +722 -25
  119. package/src/installs/slack.md +865 -0
  120. package/src/installs/snagit.js +566 -25
  121. package/src/installs/snagit.md +844 -0
  122. package/src/installs/software-properties-common.js +372 -0
  123. package/src/installs/software-properties-common.md +805 -0
  124. package/src/installs/spotify.js +858 -25
  125. package/src/installs/spotify.md +901 -0
  126. package/src/installs/studio-3t.js +803 -26
  127. package/src/installs/studio-3t.md +918 -0
  128. package/src/installs/sublime-text.js +780 -25
  129. package/src/installs/sublime-text.md +914 -0
  130. package/src/installs/superwhisper.js +687 -25
  131. package/src/installs/superwhisper.md +630 -0
  132. package/src/installs/tailscale.js +727 -26
  133. package/src/installs/tailscale.md +1100 -0
  134. package/src/installs/tar.js +389 -0
  135. package/src/installs/tar.md +946 -0
  136. package/src/installs/termius.js +780 -26
  137. package/src/installs/termius.md +844 -0
  138. package/src/installs/terraform.js +761 -26
  139. package/src/installs/terraform.md +899 -0
  140. package/src/installs/tidal.js +752 -25
  141. package/src/installs/tidal.md +864 -0
  142. package/src/installs/tmux.js +328 -26
  143. package/src/installs/tmux.md +1030 -0
  144. package/src/installs/tree.js +393 -26
  145. package/src/installs/tree.md +833 -0
  146. package/src/installs/unzip.js +460 -0
  147. package/src/installs/unzip.md +879 -0
  148. package/src/installs/vim.js +403 -26
  149. package/src/installs/vim.md +1040 -0
  150. package/src/installs/vlc.js +803 -26
  151. package/src/installs/vlc.md +927 -0
  152. package/src/installs/vscode.js +825 -26
  153. package/src/installs/vscode.md +1002 -0
  154. package/src/installs/wget.js +415 -0
  155. package/src/installs/wget.md +791 -0
  156. package/src/installs/whatsapp.js +710 -25
  157. package/src/installs/whatsapp.md +854 -0
  158. package/src/installs/winpty.js +352 -0
  159. package/src/installs/winpty.md +620 -0
  160. package/src/installs/woff2.js +535 -26
  161. package/src/installs/woff2.md +977 -0
  162. package/src/installs/wsl.js +572 -0
  163. package/src/installs/wsl.md +699 -0
  164. package/src/installs/xcode-clt.js +520 -0
  165. package/src/installs/xcode-clt.md +351 -0
  166. package/src/installs/xcode.js +542 -26
  167. package/src/installs/xcode.md +573 -0
  168. package/src/installs/yarn.js +806 -26
  169. package/src/installs/yarn.md +1074 -0
  170. package/src/installs/yq.js +636 -26
  171. package/src/installs/yq.md +944 -0
  172. package/src/installs/yt-dlp.js +683 -26
  173. package/src/installs/yt-dlp.md +946 -0
  174. package/src/installs/yum-utils.js +297 -0
  175. package/src/installs/yum-utils.md +648 -0
  176. package/src/installs/zoom.js +740 -25
  177. package/src/installs/zoom.md +884 -0
  178. package/src/scripts/README.md +567 -45
  179. package/src/scripts/STATUS.md +208 -0
  180. package/src/scripts/afk.js +395 -7
  181. package/src/scripts/backup-all.js +731 -9
  182. package/src/scripts/backup-source.js +711 -8
  183. package/src/scripts/brewd.js +373 -7
  184. package/src/scripts/brewi.js +505 -9
  185. package/src/scripts/brewr.js +512 -9
  186. package/src/scripts/brews.js +462 -9
  187. package/src/scripts/brewu.js +488 -7
  188. package/src/scripts/c.js +185 -7
  189. package/src/scripts/ccurl.js +325 -8
  190. package/src/scripts/certbot-crontab-init.js +488 -8
  191. package/src/scripts/certbot-init.js +641 -9
  192. package/src/scripts/ch.js +339 -7
  193. package/src/scripts/claude-danger.js +253 -8
  194. package/src/scripts/clean-dev.js +419 -8
  195. package/src/scripts/clear-dns-cache.js +525 -7
  196. package/src/scripts/clone.js +417 -7
  197. package/src/scripts/code-all.js +420 -7
  198. package/src/scripts/count-files.js +195 -8
  199. package/src/scripts/count-folders.js +195 -8
  200. package/src/scripts/count.js +248 -8
  201. package/src/scripts/d.js +203 -7
  202. package/src/scripts/datauri.js +373 -8
  203. package/src/scripts/delete-files.js +363 -7
  204. package/src/scripts/docker-clean.js +410 -8
  205. package/src/scripts/dp.js +426 -7
  206. package/src/scripts/e.js +375 -9
  207. package/src/scripts/empty-trash.js +497 -7
  208. package/src/scripts/evm.js +428 -9
  209. package/src/scripts/fetch-github-repos.js +441 -10
  210. package/src/scripts/get-channel.js +329 -8
  211. package/src/scripts/get-course.js +384 -11
  212. package/src/scripts/get-dependencies.js +290 -9
  213. package/src/scripts/get-folder.js +783 -10
  214. package/src/scripts/get-tunes.js +411 -10
  215. package/src/scripts/get-video.js +352 -9
  216. package/src/scripts/git-backup.js +561 -9
  217. package/src/scripts/git-clone.js +477 -9
  218. package/src/scripts/git-pup.js +303 -7
  219. package/src/scripts/git-push.js +380 -8
  220. package/src/scripts/h.js +607 -9
  221. package/src/scripts/hide-desktop-icons.js +483 -7
  222. package/src/scripts/hide-hidden-files.js +522 -7
  223. package/src/scripts/install-dependencies-from.js +440 -9
  224. package/src/scripts/ips.js +647 -10
  225. package/src/scripts/iso.js +354 -8
  226. package/src/scripts/killni.js +561 -7
  227. package/src/scripts/ll.js +451 -8
  228. package/src/scripts/local-ip.js +310 -8
  229. package/src/scripts/m.js +508 -8
  230. package/src/scripts/map.js +293 -8
  231. package/src/scripts/mkd.js +287 -7
  232. package/src/scripts/ncu-update-all.js +441 -8
  233. package/src/scripts/nginx-init.js +702 -12
  234. package/src/scripts/npmi.js +366 -7
  235. package/src/scripts/o.js +495 -8
  236. package/src/scripts/org-by-date.js +321 -7
  237. package/src/scripts/p.js +208 -7
  238. package/src/scripts/packages.js +313 -8
  239. package/src/scripts/path.js +209 -7
  240. package/src/scripts/ports.js +582 -8
  241. package/src/scripts/q.js +290 -8
  242. package/src/scripts/refresh-files.js +378 -10
  243. package/src/scripts/remove-smaller-files.js +500 -8
  244. package/src/scripts/rename-files-with-date.js +517 -9
  245. package/src/scripts/resize-image.js +523 -9
  246. package/src/scripts/rm-safe.js +653 -8
  247. package/src/scripts/s.js +525 -9
  248. package/src/scripts/set-git-public.js +349 -7
  249. package/src/scripts/show-desktop-icons.js +459 -7
  250. package/src/scripts/show-hidden-files.js +456 -7
  251. package/src/scripts/tpa.js +265 -8
  252. package/src/scripts/tpo.js +264 -7
  253. package/src/scripts/u.js +489 -7
  254. package/src/scripts/vpush.js +422 -8
  255. package/src/scripts/y.js +267 -7
  256. package/src/utils/common/os.js +94 -2
  257. package/src/utils/ubuntu/apt.js +13 -7
  258. package/src/utils/windows/choco.js +82 -26
  259. package/src/utils/windows/winget.js +89 -27
@@ -0,0 +1,1036 @@
1
+ # Installing Pandoc
2
+
3
+ ## Dependencies
4
+
5
+ ### macOS (Homebrew)
6
+ - **Required:**
7
+ - Homebrew package manager - Install via `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
8
+ - **Optional:**
9
+ - BasicTeX (for PDF output) - Install via `brew install --cask basictex`
10
+ - **Auto-installed:**
11
+ - `gmp` (GNU multiple precision arithmetic library) - Automatically installed by Homebrew as a Pandoc dependency
12
+
13
+ ### Ubuntu (APT/Snap)
14
+ - **Required:**
15
+ - None (APT is pre-installed on Ubuntu)
16
+ - **Optional:**
17
+ - `texlive` and `texlive-latex-extra` (for PDF output) - Install via `sudo apt-get install -y texlive texlive-latex-extra`
18
+ - `texlive-latex-base` (minimal LaTeX for PDF output) - Install via `sudo apt-get install -y texlive-latex-base`
19
+ - **Auto-installed:**
20
+ - None
21
+
22
+ ### Raspberry Pi OS (APT/Snap)
23
+ - **Required:**
24
+ - None (APT is pre-installed on Raspberry Pi OS)
25
+ - **Optional:**
26
+ - `texlive` and `texlive-latex-extra` (for PDF output, large package) - Install via `sudo apt-get install -y texlive texlive-latex-extra`
27
+ - `texlive-latex-base` (minimal LaTeX for PDF output, recommended for limited storage) - Install via `sudo apt-get install -y texlive-latex-base`
28
+ - **Auto-installed:**
29
+ - None
30
+
31
+ ### Amazon Linux (DNF/YUM)
32
+ - **Required:**
33
+ - `curl` - For downloading tarball from GitHub - Install via `sudo dnf install -y curl` (AL2023) or `sudo yum install -y curl` (AL2)
34
+ - `tar` - For extracting tarball (usually pre-installed)
35
+ - `sudo` privileges - For extracting to /usr/local
36
+ - **Optional:**
37
+ - `texlive`, `texlive-latex`, `texlive-xetex` (for PDF output) - Install via `sudo dnf install -y texlive texlive-latex texlive-xetex` (AL2023) or `sudo yum install -y texlive texlive-latex texlive-xetex` (AL2)
38
+ - **Auto-installed:**
39
+ - None (Pandoc is installed as a static binary from GitHub releases, not via package manager)
40
+
41
+ ### Windows (Chocolatey/winget)
42
+ - **Required:**
43
+ - Chocolatey package manager - Install via Administrator PowerShell: `Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))`
44
+ - Administrator privileges (PowerShell or Command Prompt running as Administrator)
45
+ - **Optional:**
46
+ - MiKTeX (for PDF output) - Install via `choco install miktex -y`
47
+ - **Auto-installed:**
48
+ - None
49
+
50
+ ### Git Bash (Manual/Portable)
51
+ - **Required:**
52
+ - Windows operating system (Windows 10 or Windows 11)
53
+ - Git for Windows (includes Git Bash) - Download from https://git-scm.com/download/win
54
+ - One of the following for Pandoc installation:
55
+ - Chocolatey on Windows host - Install via Administrator PowerShell (see Windows section above)
56
+ - OR Manual download capability to install MSI from https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-windows-x86_64.msi
57
+ - **Optional:**
58
+ - MiKTeX on Windows host (for PDF output) - Install via `choco install miktex -y` from Administrator PowerShell
59
+ - **Auto-installed:**
60
+ - None (Pandoc must be installed on Windows host first, then becomes available in Git Bash via Windows PATH inheritance)
61
+
62
+ ## Overview
63
+
64
+ Pandoc is a universal document converter that can convert files between a wide variety of markup formats. Often called the "Swiss Army knife" of document conversion, Pandoc supports input formats including Markdown, reStructuredText, HTML, LaTeX, DOCX, EPUB, and many others, with equally diverse output options including PDF, HTML, DOCX, ODT, and presentation formats.
65
+
66
+ Pandoc is essential for developers, technical writers, and anyone who works with documentation. Common use cases include:
67
+
68
+ - Converting Markdown documentation to PDF or HTML
69
+ - Generating DOCX files from Markdown for non-technical collaborators
70
+ - Creating presentations from plain text (reveal.js, Beamer, PowerPoint)
71
+ - Publishing EPUB books from Markdown sources
72
+ - Converting between wiki formats
73
+ - Automating documentation pipelines in CI/CD systems
74
+
75
+ Pandoc is written in Haskell and distributed as a statically linked binary, meaning it has no runtime dependencies on external libraries.
76
+
77
+ ## Prerequisites
78
+
79
+ Before installing Pandoc on any platform, ensure:
80
+
81
+ 1. **Internet connectivity** - Required to download packages
82
+ 2. **Administrative privileges** - Required on most platforms for system-wide installation
83
+ 3. **Package manager installed** - Each platform requires its respective package manager (Homebrew, APT, DNF/YUM, Chocolatey, etc.)
84
+
85
+ **Optional but Recommended for PDF Output**: Pandoc requires a LaTeX engine to generate PDF files. If you need PDF output, install a TeX distribution (BasicTeX, TeX Live, or MiKTeX) after installing Pandoc. Without LaTeX, Pandoc can still convert to HTML, DOCX, and most other formats.
86
+
87
+ ## Platform-Specific Installation
88
+
89
+ ### macOS (Homebrew)
90
+
91
+ #### Prerequisites
92
+
93
+ - macOS 10.15 (Catalina) or later (macOS 14 Sonoma or later recommended)
94
+ - Homebrew package manager installed
95
+ - Terminal access
96
+
97
+ If Homebrew is not installed, install it first:
98
+
99
+ ```bash
100
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
101
+ ```
102
+
103
+ #### Installation Steps
104
+
105
+ Run the following command to install Pandoc via Homebrew:
106
+
107
+ ```bash
108
+ brew install --quiet pandoc
109
+ ```
110
+
111
+ The `--quiet` flag suppresses non-essential output, making the command suitable for automation scripts and CI/CD pipelines.
112
+
113
+ **Note**: Homebrew will automatically install the dependency `gmp` (GNU multiple precision arithmetic library) if it is not already present.
114
+
115
+ **Optional - Install LaTeX for PDF generation**:
116
+
117
+ If you need PDF output, install BasicTeX (a minimal LaTeX distribution):
118
+
119
+ ```bash
120
+ brew install --quiet --cask basictex
121
+ ```
122
+
123
+ After installation, add the TeX binaries to your PATH by restarting your terminal or running:
124
+
125
+ ```bash
126
+ eval "$(/usr/libexec/path_helper)"
127
+ ```
128
+
129
+ #### Verification
130
+
131
+ Confirm the installation succeeded:
132
+
133
+ ```bash
134
+ pandoc --version
135
+ ```
136
+
137
+ Expected output (version numbers may vary):
138
+
139
+ ```
140
+ pandoc 3.8.3
141
+ Features: +server +lua
142
+ Scripting engine: Lua 5.4
143
+ User data directory: /Users/<username>/.local/share/pandoc
144
+ ```
145
+
146
+ Verify the installation path:
147
+
148
+ ```bash
149
+ which pandoc
150
+ ```
151
+
152
+ Expected output: `/opt/homebrew/bin/pandoc` (Apple Silicon) or `/usr/local/bin/pandoc` (Intel).
153
+
154
+ #### Troubleshooting
155
+
156
+ **Problem**: `pandoc: command not found` after installation
157
+
158
+ **Solution**: Homebrew may not be in your PATH. For Apple Silicon Macs, add Homebrew to your PATH:
159
+
160
+ ```bash
161
+ eval "$(/opt/homebrew/bin/brew shellenv)"
162
+ ```
163
+
164
+ For a permanent fix, add this to your shell configuration:
165
+
166
+ ```bash
167
+ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc && source ~/.zshrc
168
+ ```
169
+
170
+ **Problem**: `brew install pandoc` fails with permission errors
171
+
172
+ **Solution**: Fix Homebrew directory ownership:
173
+
174
+ ```bash
175
+ sudo chown -R $(whoami) $(brew --prefix)/*
176
+ ```
177
+
178
+ **Problem**: PDF generation fails with "pdflatex not found"
179
+
180
+ **Solution**: Install BasicTeX and ensure it is in your PATH:
181
+
182
+ ```bash
183
+ brew install --quiet --cask basictex
184
+ eval "$(/usr/libexec/path_helper)"
185
+ ```
186
+
187
+ On Apple Silicon, the TeX binaries are located at `/Library/TeX/texbin`. Verify they are in your PATH:
188
+
189
+ ```bash
190
+ echo $PATH | grep -q texbin && echo "TeX in PATH" || echo "TeX NOT in PATH"
191
+ ```
192
+
193
+ ---
194
+
195
+ ### Ubuntu/Debian (APT)
196
+
197
+ #### Prerequisites
198
+
199
+ - Ubuntu 20.04 LTS or later, or Debian 11 (Bullseye) or later
200
+ - sudo privileges
201
+ - Internet connectivity
202
+
203
+ Pandoc is available in the default Ubuntu and Debian repositories. However, repository versions may be older than the latest release. This guide uses the repository version for simplicity and stability.
204
+
205
+ #### Installation Steps
206
+
207
+ Run the following command to update package lists and install Pandoc:
208
+
209
+ ```bash
210
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y pandoc
211
+ ```
212
+
213
+ The `DEBIAN_FRONTEND=noninteractive` environment variable and `-y` flag ensure fully automated installation without prompts.
214
+
215
+ **Optional - Install LaTeX for PDF generation**:
216
+
217
+ ```bash
218
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended
219
+ ```
220
+
221
+ For a minimal LaTeX installation (smaller download):
222
+
223
+ ```bash
224
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-latex-base
225
+ ```
226
+
227
+ #### Verification
228
+
229
+ Confirm the installation succeeded:
230
+
231
+ ```bash
232
+ pandoc --version
233
+ ```
234
+
235
+ Expected output (version numbers vary by distribution):
236
+
237
+ - Ubuntu 24.04 (Noble): `pandoc 3.1.3`
238
+ - Ubuntu 22.04 (Jammy): `pandoc 2.9.2.1`
239
+ - Debian 12 (Bookworm): `pandoc 2.17.1.1`
240
+
241
+ **Note**: Ubuntu and Debian repositories prioritize stability over bleeding-edge releases. For the latest version, see the "Installing Latest Version from GitHub" section below.
242
+
243
+ Verify the installation path:
244
+
245
+ ```bash
246
+ which pandoc
247
+ ```
248
+
249
+ Expected output: `/usr/bin/pandoc`
250
+
251
+ #### Installing Latest Version from GitHub
252
+
253
+ To install the latest Pandoc version directly from GitHub releases:
254
+
255
+ ```bash
256
+ # Download the latest .deb package for amd64
257
+ curl -L -o /tmp/pandoc-latest.deb https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb
258
+
259
+ # Install the package
260
+ sudo DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/pandoc-latest.deb
261
+
262
+ # Clean up
263
+ rm /tmp/pandoc-latest.deb
264
+ ```
265
+
266
+ #### Troubleshooting
267
+
268
+ **Problem**: `E: Unable to locate package pandoc`
269
+
270
+ **Solution**: Update the package list first:
271
+
272
+ ```bash
273
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
274
+ ```
275
+
276
+ **Problem**: `Permission denied` errors
277
+
278
+ **Solution**: Ensure you are using `sudo` with the installation command.
279
+
280
+ **Problem**: Older Pandoc version than expected
281
+
282
+ **Solution**: Ubuntu/Debian repositories prioritize stability. Install the latest version directly from GitHub using the commands in the "Installing Latest Version from GitHub" section above.
283
+
284
+ **Problem**: PDF generation fails with LaTeX errors
285
+
286
+ **Solution**: Install additional LaTeX packages:
287
+
288
+ ```bash
289
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-xetex texlive-luatex texlive-fonts-extra
290
+ ```
291
+
292
+ ---
293
+
294
+ ### Raspberry Pi OS (APT)
295
+
296
+ #### Prerequisites
297
+
298
+ - Raspberry Pi OS (64-bit recommended, 32-bit supported)
299
+ - Raspberry Pi 3B+ or later (64-bit capable hardware recommended)
300
+ - sudo privileges
301
+ - Internet connectivity
302
+
303
+ Raspberry Pi OS is based on Debian, so Pandoc installation follows the APT-based process. The official Pandoc GitHub releases include ARM64 binaries for 64-bit Raspberry Pi OS.
304
+
305
+ #### Installation Steps
306
+
307
+ First, verify your architecture:
308
+
309
+ ```bash
310
+ uname -m
311
+ ```
312
+
313
+ - `aarch64` = 64-bit (recommended)
314
+ - `armv7l` = 32-bit
315
+
316
+ **For Raspberry Pi OS (repository version)**:
317
+
318
+ ```bash
319
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y pandoc
320
+ ```
321
+
322
+ **For the latest version on 64-bit Raspberry Pi OS (aarch64)**:
323
+
324
+ ```bash
325
+ # Download the latest ARM64 .deb package
326
+ curl -L -o /tmp/pandoc-latest.deb https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-arm64.deb
327
+
328
+ # Install the package
329
+ sudo DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/pandoc-latest.deb
330
+
331
+ # Clean up
332
+ rm /tmp/pandoc-latest.deb
333
+ ```
334
+
335
+ **For 32-bit Raspberry Pi OS (armv7l)**:
336
+
337
+ Official Pandoc releases do not include 32-bit ARM binaries. Use the repository version:
338
+
339
+ ```bash
340
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y pandoc
341
+ ```
342
+
343
+ **Optional - Install LaTeX for PDF generation**:
344
+
345
+ ```bash
346
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-extra
347
+ ```
348
+
349
+ **Note**: TeX Live is large (several GB). On Raspberry Pi with limited storage, consider using `texlive-latex-base` for a minimal installation.
350
+
351
+ #### Verification
352
+
353
+ Confirm the installation succeeded:
354
+
355
+ ```bash
356
+ pandoc --version
357
+ ```
358
+
359
+ Expected output (version numbers may vary):
360
+
361
+ ```
362
+ pandoc 3.8.3
363
+ ```
364
+
365
+ Or for repository version:
366
+
367
+ ```
368
+ pandoc 2.17.1.1
369
+ ```
370
+
371
+ Verify your architecture:
372
+
373
+ ```bash
374
+ uname -m
375
+ ```
376
+
377
+ Expected output: `aarch64` (64-bit) or `armv7l` (32-bit).
378
+
379
+ #### Troubleshooting
380
+
381
+ **Problem**: `E: Unable to locate package pandoc`
382
+
383
+ **Solution**: Update the package list first:
384
+
385
+ ```bash
386
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
387
+ ```
388
+
389
+ **Problem**: Installation very slow
390
+
391
+ **Solution**: Raspberry Pi SD cards can be slow. Use a high-quality SD card (Class 10 or faster) or boot from USB/SSD for better performance.
392
+
393
+ **Problem**: Out of disk space
394
+
395
+ **Solution**: Pandoc itself is small, but LaTeX is large. Check available space and clean up:
396
+
397
+ ```bash
398
+ df -h
399
+ sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
400
+ sudo DEBIAN_FRONTEND=noninteractive apt-get clean
401
+ ```
402
+
403
+ **Problem**: 32-bit Raspberry Pi needs latest Pandoc
404
+
405
+ **Solution**: For 32-bit ARM, you must either use the repository version or build from source. Building from source requires significant time and memory (swap space recommended):
406
+
407
+ ```bash
408
+ # Not recommended due to build time - use repository version instead
409
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y pandoc
410
+ ```
411
+
412
+ ---
413
+
414
+ ### Amazon Linux (DNF/YUM)
415
+
416
+ #### Prerequisites
417
+
418
+ - Amazon Linux 2023 (AL2023) or Amazon Linux 2 (AL2)
419
+ - sudo privileges
420
+ - Internet connectivity
421
+
422
+ **Important**: Pandoc is NOT available in the default Amazon Linux repositories. This section documents installing Pandoc from the official GitHub releases using the Linux tarball.
423
+
424
+ Amazon Linux 2023 uses `dnf` as the package manager, while Amazon Linux 2 uses `yum`. The installation process below works for both versions.
425
+
426
+ #### Installation Steps
427
+
428
+ Run the following commands to download and install Pandoc from the official GitHub releases:
429
+
430
+ ```bash
431
+ # Download the latest Linux amd64 tarball
432
+ curl -L -o /tmp/pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-linux-amd64.tar.gz
433
+
434
+ # Extract to /usr/local
435
+ sudo tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local
436
+
437
+ # Clean up
438
+ rm /tmp/pandoc.tar.gz
439
+ ```
440
+
441
+ **For ARM-based instances (Graviton)**:
442
+
443
+ ```bash
444
+ # Download the latest Linux ARM64 tarball
445
+ curl -L -o /tmp/pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-linux-arm64.tar.gz
446
+
447
+ # Extract to /usr/local
448
+ sudo tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local
449
+
450
+ # Clean up
451
+ rm /tmp/pandoc.tar.gz
452
+ ```
453
+
454
+ **Optional - Install LaTeX for PDF generation**:
455
+
456
+ **For Amazon Linux 2023**:
457
+
458
+ ```bash
459
+ sudo dnf install -y texlive texlive-latex texlive-xetex
460
+ ```
461
+
462
+ **For Amazon Linux 2**:
463
+
464
+ ```bash
465
+ sudo yum install -y texlive texlive-latex texlive-xetex
466
+ ```
467
+
468
+ #### Verification
469
+
470
+ Confirm the installation succeeded:
471
+
472
+ ```bash
473
+ pandoc --version
474
+ ```
475
+
476
+ Expected output:
477
+
478
+ ```
479
+ pandoc 3.8.3
480
+ Features: +server +lua
481
+ Scripting engine: Lua 5.4
482
+ User data directory: /home/ec2-user/.local/share/pandoc
483
+ ```
484
+
485
+ Verify the installation path:
486
+
487
+ ```bash
488
+ which pandoc
489
+ ```
490
+
491
+ Expected output: `/usr/local/bin/pandoc`
492
+
493
+ #### Troubleshooting
494
+
495
+ **Problem**: `pandoc: command not found` after installation
496
+
497
+ **Solution**: Ensure `/usr/local/bin` is in your PATH:
498
+
499
+ ```bash
500
+ echo $PATH | grep -q '/usr/local/bin' && echo "In PATH" || echo "NOT in PATH"
501
+ ```
502
+
503
+ If not in PATH, add it:
504
+
505
+ ```bash
506
+ echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
507
+ ```
508
+
509
+ **Problem**: Permission denied when extracting
510
+
511
+ **Solution**: Ensure you are using `sudo` with the `tar` command.
512
+
513
+ **Problem**: SSL certificate errors during download
514
+
515
+ **Solution**: Update CA certificates:
516
+
517
+ **For Amazon Linux 2023**:
518
+
519
+ ```bash
520
+ sudo dnf install -y ca-certificates
521
+ ```
522
+
523
+ **For Amazon Linux 2**:
524
+
525
+ ```bash
526
+ sudo yum install -y ca-certificates
527
+ ```
528
+
529
+ **Problem**: Need to automate Pandoc updates
530
+
531
+ **Solution**: Create a script that checks for new versions and updates automatically. The installation is idempotent - running the same commands will simply overwrite the existing installation.
532
+
533
+ ---
534
+
535
+ ### Windows (Chocolatey)
536
+
537
+ #### Prerequisites
538
+
539
+ - Windows 10 (version 1803+) or Windows 11
540
+ - Chocolatey package manager installed
541
+ - Administrator PowerShell or Command Prompt
542
+
543
+ If Chocolatey is not installed, install it first by running this command in an Administrator PowerShell:
544
+
545
+ ```powershell
546
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
547
+ ```
548
+
549
+ #### Installation Steps
550
+
551
+ Run the following command in an Administrator PowerShell or Command Prompt:
552
+
553
+ ```powershell
554
+ choco install pandoc -y
555
+ ```
556
+
557
+ The `-y` flag automatically confirms all prompts, enabling fully non-interactive installation.
558
+
559
+ **Note**: By default, Chocolatey installs Pandoc for the current user. To install for all users, use:
560
+
561
+ ```powershell
562
+ choco install pandoc -y --install-arguments="ALLUSERS=1"
563
+ ```
564
+
565
+ **Optional - Install MiKTeX for PDF generation**:
566
+
567
+ ```powershell
568
+ choco install miktex -y
569
+ ```
570
+
571
+ MiKTeX is a Windows-native LaTeX distribution that integrates well with Pandoc.
572
+
573
+ #### Verification
574
+
575
+ Open a **new** Command Prompt or PowerShell window (required for PATH to update), then run:
576
+
577
+ ```powershell
578
+ pandoc --version
579
+ ```
580
+
581
+ Expected output (version numbers may vary):
582
+
583
+ ```
584
+ pandoc 3.8.3
585
+ Features: +server +lua
586
+ Scripting engine: Lua 5.4
587
+ User data directory: C:\Users\<username>\AppData\Roaming\pandoc
588
+ ```
589
+
590
+ Verify the installation path:
591
+
592
+ ```powershell
593
+ where pandoc
594
+ ```
595
+
596
+ Expected output: `C:\Users\<username>\AppData\Local\Pandoc\pandoc.exe` or `C:\Program Files\Pandoc\pandoc.exe` (if installed for all users).
597
+
598
+ #### Troubleshooting
599
+
600
+ **Problem**: `pandoc` command not found after installation
601
+
602
+ **Solution**: Close all terminal windows and open a new Command Prompt or PowerShell. The PATH update requires a fresh terminal session. If the issue persists, verify Pandoc's directory is in your PATH:
603
+
604
+ ```powershell
605
+ $env:PATH -split ';' | Select-String -Pattern "pandoc"
606
+ ```
607
+
608
+ **Problem**: `choco` command not found
609
+
610
+ **Solution**: Chocolatey may not be in PATH. Close all terminal windows, open a new Administrator PowerShell, and try again. If the issue persists, reinstall Chocolatey.
611
+
612
+ **Problem**: Installation fails with access denied
613
+
614
+ **Solution**: Ensure you are running PowerShell or Command Prompt as Administrator. Right-click and select "Run as administrator".
615
+
616
+ **Problem**: PDF generation fails
617
+
618
+ **Solution**: Install MiKTeX and ensure it completed the first-time setup:
619
+
620
+ ```powershell
621
+ choco install miktex -y
622
+ ```
623
+
624
+ After installation, run any MiKTeX tool (like `pdflatex --version`) to trigger the initial configuration.
625
+
626
+ ---
627
+
628
+ ### WSL (Ubuntu)
629
+
630
+ #### Prerequisites
631
+
632
+ - Windows 10 version 2004+ or Windows 11
633
+ - Windows Subsystem for Linux (WSL) with Ubuntu installed
634
+ - WSL 2 recommended for best performance
635
+ - sudo privileges within WSL
636
+
637
+ WSL Ubuntu installations follow the same process as native Ubuntu, using APT.
638
+
639
+ #### Installation Steps
640
+
641
+ Open your WSL Ubuntu terminal and run:
642
+
643
+ ```bash
644
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y pandoc
645
+ ```
646
+
647
+ The `DEBIAN_FRONTEND=noninteractive` environment variable and `-y` flag ensure fully automated installation without prompts.
648
+
649
+ **For the latest Pandoc version**:
650
+
651
+ ```bash
652
+ # Download the latest .deb package for amd64
653
+ curl -L -o /tmp/pandoc-latest.deb https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb
654
+
655
+ # Install the package
656
+ sudo DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/pandoc-latest.deb
657
+
658
+ # Clean up
659
+ rm /tmp/pandoc-latest.deb
660
+ ```
661
+
662
+ **Optional - Install LaTeX for PDF generation**:
663
+
664
+ ```bash
665
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended
666
+ ```
667
+
668
+ #### Verification
669
+
670
+ Confirm the installation succeeded:
671
+
672
+ ```bash
673
+ pandoc --version
674
+ ```
675
+
676
+ Expected output (version numbers may vary):
677
+
678
+ ```
679
+ pandoc 3.8.3
680
+ ```
681
+
682
+ Or for repository version:
683
+
684
+ ```
685
+ pandoc 2.9.2.1
686
+ ```
687
+
688
+ Verify the installation path:
689
+
690
+ ```bash
691
+ which pandoc
692
+ ```
693
+
694
+ Expected output: `/usr/bin/pandoc`
695
+
696
+ #### Troubleshooting
697
+
698
+ **Problem**: `E: Unable to locate package pandoc`
699
+
700
+ **Solution**: Update the package list first:
701
+
702
+ ```bash
703
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
704
+ ```
705
+
706
+ **Problem**: WSL itself is not installed
707
+
708
+ **Solution**: Install WSL from an Administrator PowerShell on Windows:
709
+
710
+ ```powershell
711
+ wsl --install
712
+ ```
713
+
714
+ Restart your computer after installation.
715
+
716
+ **Problem**: Network connectivity issues in WSL
717
+
718
+ **Solution**: WSL may have DNS resolution issues. Try restarting WSL:
719
+
720
+ ```powershell
721
+ # From Windows PowerShell
722
+ wsl --shutdown
723
+ wsl
724
+ ```
725
+
726
+ **Problem**: Accessing Windows files from Pandoc in WSL
727
+
728
+ **Solution**: Windows drives are mounted under `/mnt/`. Access your Windows files at:
729
+
730
+ ```bash
731
+ # Access C: drive
732
+ ls /mnt/c/Users/<username>/Documents
733
+
734
+ # Convert a file from Windows path
735
+ pandoc /mnt/c/Users/<username>/Documents/readme.md -o /mnt/c/Users/<username>/Documents/readme.pdf
736
+ ```
737
+
738
+ ---
739
+
740
+ ### Git Bash (Manual/Portable)
741
+
742
+ #### Prerequisites
743
+
744
+ - Windows 10 or Windows 11
745
+ - Git for Windows installed (includes Git Bash)
746
+ - Internet connectivity
747
+
748
+ Git Bash does not include a package manager. Pandoc must be installed on Windows first (via Chocolatey, winget, or the MSI installer), and it will then be available in Git Bash through the Windows PATH.
749
+
750
+ #### Installation Steps
751
+
752
+ **Step 1: Install Pandoc on Windows**
753
+
754
+ The recommended approach is to install Pandoc using Chocolatey from an Administrator PowerShell:
755
+
756
+ ```powershell
757
+ choco install pandoc -y
758
+ ```
759
+
760
+ Alternatively, download and run the MSI installer silently from PowerShell:
761
+
762
+ ```powershell
763
+ # Download the MSI installer
764
+ Invoke-WebRequest -Uri "https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-windows-x86_64.msi" -OutFile "$env:TEMP\pandoc-installer.msi"
765
+
766
+ # Install silently
767
+ Start-Process msiexec.exe -ArgumentList "/i", "$env:TEMP\pandoc-installer.msi", "/quiet", "/norestart" -Wait
768
+
769
+ # Clean up
770
+ Remove-Item "$env:TEMP\pandoc-installer.msi"
771
+ ```
772
+
773
+ **Step 2: Verify in Git Bash**
774
+
775
+ Open Git Bash (close and reopen if already open) and verify Pandoc is accessible:
776
+
777
+ ```bash
778
+ pandoc --version
779
+ ```
780
+
781
+ Git Bash inherits the Windows PATH, so Pandoc installed on Windows is automatically available.
782
+
783
+ #### Verification
784
+
785
+ In Git Bash, confirm the installation succeeded:
786
+
787
+ ```bash
788
+ pandoc --version
789
+ ```
790
+
791
+ Expected output:
792
+
793
+ ```
794
+ pandoc 3.8.3
795
+ Features: +server +lua
796
+ Scripting engine: Lua 5.4
797
+ User data directory: C:\Users\<username>\AppData\Roaming\pandoc
798
+ ```
799
+
800
+ Verify Pandoc is accessible:
801
+
802
+ ```bash
803
+ which pandoc
804
+ ```
805
+
806
+ Expected output: `/c/Users/<username>/AppData/Local/Pandoc/pandoc` or similar Windows path in Unix format.
807
+
808
+ #### Troubleshooting
809
+
810
+ **Problem**: `pandoc: command not found` in Git Bash
811
+
812
+ **Solution**: Pandoc may not be in the inherited PATH. First, verify Pandoc is installed on Windows by opening Command Prompt and running `pandoc --version`. If installed, close and reopen Git Bash. If still not found, add Pandoc to Git Bash's PATH manually:
813
+
814
+ ```bash
815
+ echo 'export PATH="$PATH:/c/Users/$(whoami)/AppData/Local/Pandoc"' >> ~/.bashrc && source ~/.bashrc
816
+ ```
817
+
818
+ **Problem**: Path issues when converting files
819
+
820
+ **Solution**: Git Bash automatically converts Unix-style paths to Windows paths. For most Pandoc operations, this works correctly. If you encounter path issues, use Windows-style paths or double slashes:
821
+
822
+ ```bash
823
+ # These should all work
824
+ pandoc readme.md -o readme.pdf
825
+ pandoc ./readme.md -o ./readme.pdf
826
+ pandoc /c/Users/username/readme.md -o /c/Users/username/readme.pdf
827
+ ```
828
+
829
+ **Problem**: PDF generation fails
830
+
831
+ **Solution**: Install MiKTeX on Windows using Chocolatey:
832
+
833
+ ```powershell
834
+ # From Administrator PowerShell
835
+ choco install miktex -y
836
+ ```
837
+
838
+ Then restart Git Bash for PATH changes to take effect.
839
+
840
+ **Problem**: Unicode/encoding issues
841
+
842
+ **Solution**: Git Bash uses UTF-8 by default, which is compatible with Pandoc. If you encounter encoding issues with input files, specify the encoding explicitly:
843
+
844
+ ```bash
845
+ pandoc --from=markdown --to=pdf -V mainfont="DejaVu Sans" input.md -o output.pdf
846
+ ```
847
+
848
+ ---
849
+
850
+ ## Post-Installation Configuration
851
+
852
+ Pandoc works out of the box for most use cases. No additional configuration is typically required. The following optional configurations may be useful:
853
+
854
+ ### Setting Default Output Format
855
+
856
+ Create a defaults file at `~/.pandoc/defaults.yaml` (Linux/macOS) or `%APPDATA%\pandoc\defaults.yaml` (Windows):
857
+
858
+ ```yaml
859
+ # ~/.pandoc/defaults.yaml
860
+ from: markdown
861
+ to: html5
862
+ standalone: true
863
+ toc: true
864
+ ```
865
+
866
+ Then use it with:
867
+
868
+ ```bash
869
+ pandoc --defaults=defaults input.md -o output.html
870
+ ```
871
+
872
+ ### Configuring PDF Engine
873
+
874
+ Pandoc supports multiple PDF engines. Set your preferred engine:
875
+
876
+ ```bash
877
+ # Using pdflatex (default)
878
+ pandoc input.md -o output.pdf --pdf-engine=pdflatex
879
+
880
+ # Using xelatex (better Unicode support)
881
+ pandoc input.md -o output.pdf --pdf-engine=xelatex
882
+
883
+ # Using lualatex
884
+ pandoc input.md -o output.pdf --pdf-engine=lualatex
885
+ ```
886
+
887
+ ### Installing Pandoc Filters
888
+
889
+ Pandoc supports filters for extending its capabilities. Popular filters include:
890
+
891
+ - `pandoc-citeproc` - Citation processing (now built into Pandoc as `--citeproc`)
892
+ - `pandoc-crossref` - Cross-referencing figures, tables, and sections
893
+ - `mermaid-filter` - Mermaid diagram support
894
+
895
+ Install filters via your system's package manager or using the Haskell package manager (cabal).
896
+
897
+ ### Shell Aliases
898
+
899
+ Create convenient aliases for common Pandoc operations. Add to your shell configuration file (`~/.bashrc`, `~/.zshrc`, or `~/.bash_profile`):
900
+
901
+ ```bash
902
+ # Convert Markdown to PDF
903
+ alias md2pdf='pandoc -f markdown -t pdf'
904
+
905
+ # Convert Markdown to HTML (standalone with CSS)
906
+ alias md2html='pandoc -f markdown -t html5 -s'
907
+
908
+ # Convert Markdown to DOCX
909
+ alias md2docx='pandoc -f markdown -t docx'
910
+ ```
911
+
912
+ ### Test Your Installation
913
+
914
+ Verify Pandoc can convert a simple document:
915
+
916
+ ```bash
917
+ echo "# Hello World" | pandoc -f markdown -t html
918
+ ```
919
+
920
+ Expected output:
921
+
922
+ ```html
923
+ <h1 id="hello-world">Hello World</h1>
924
+ ```
925
+
926
+ ---
927
+
928
+ ## Common Issues
929
+
930
+ ### Issue: "pdflatex not found" or "xelatex not found"
931
+
932
+ **Symptoms**: Pandoc fails to generate PDF with engine not found errors.
933
+
934
+ **Solution**: Install a LaTeX distribution:
935
+
936
+ - **macOS**: `brew install --quiet --cask basictex`
937
+ - **Ubuntu/Debian**: `sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-latex-base`
938
+ - **Windows**: `choco install miktex -y`
939
+
940
+ After installation, restart your terminal for PATH changes to take effect.
941
+
942
+ ### Issue: "Missing LaTeX packages" During PDF Generation
943
+
944
+ **Symptoms**: PDF generation fails with errors about missing `.sty` files.
945
+
946
+ **Solution**: Install the required LaTeX packages. On Debian/Ubuntu:
947
+
948
+ ```bash
949
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-latex-extra texlive-fonts-recommended
950
+ ```
951
+
952
+ On macOS with BasicTeX, use `tlmgr`:
953
+
954
+ ```bash
955
+ sudo tlmgr update --self
956
+ sudo tlmgr install collection-fontsrecommended
957
+ ```
958
+
959
+ On Windows with MiKTeX, the package manager usually installs missing packages automatically on first use.
960
+
961
+ ### Issue: Unicode Characters Not Rendering in PDF
962
+
963
+ **Symptoms**: Non-ASCII characters appear as boxes or question marks in PDF output.
964
+
965
+ **Solution**: Use XeLaTeX or LuaLaTeX instead of pdflatex:
966
+
967
+ ```bash
968
+ pandoc input.md -o output.pdf --pdf-engine=xelatex
969
+ ```
970
+
971
+ Or specify a Unicode-compatible font:
972
+
973
+ ```bash
974
+ pandoc input.md -o output.pdf -V mainfont="DejaVu Sans"
975
+ ```
976
+
977
+ ### Issue: Large Documents Cause Memory Errors
978
+
979
+ **Symptoms**: Pandoc crashes or hangs on large documents.
980
+
981
+ **Solution**: Split the document into smaller parts and combine, or increase available memory. For very large documents, consider using `--incremental` flag or processing in chunks.
982
+
983
+ ### Issue: DOCX Output Missing Styles
984
+
985
+ **Symptoms**: Converted DOCX files have incorrect or missing formatting.
986
+
987
+ **Solution**: Create a reference document with your desired styles:
988
+
989
+ ```bash
990
+ pandoc --print-default-data-file reference.docx > custom-reference.docx
991
+ ```
992
+
993
+ Edit `custom-reference.docx` in Word to set your preferred styles, then use it:
994
+
995
+ ```bash
996
+ pandoc input.md --reference-doc=custom-reference.docx -o output.docx
997
+ ```
998
+
999
+ ### Issue: HTML Output Missing Images
1000
+
1001
+ **Symptoms**: Images referenced in Markdown do not appear in HTML output.
1002
+
1003
+ **Solution**: Ensure image paths are correct relative to the output location. Use `--extract-media` to copy images:
1004
+
1005
+ ```bash
1006
+ pandoc input.md --extract-media=./media -o output.html
1007
+ ```
1008
+
1009
+ Or use `--self-contained` to embed images as base64:
1010
+
1011
+ ```bash
1012
+ pandoc input.md --self-contained -o output.html
1013
+ ```
1014
+
1015
+ ### Issue: Pandoc Version Too Old
1016
+
1017
+ **Symptoms**: Features documented in Pandoc manual are not available.
1018
+
1019
+ **Solution**: Install the latest version from GitHub releases instead of the system package manager. See the platform-specific sections above for commands to download directly from GitHub.
1020
+
1021
+ ---
1022
+
1023
+ ## References
1024
+
1025
+ - [Pandoc Official Website](https://pandoc.org/)
1026
+ - [Pandoc User's Guide](https://pandoc.org/MANUAL.html)
1027
+ - [Pandoc Installation Guide](https://pandoc.org/installing.html)
1028
+ - [Pandoc GitHub Repository](https://github.com/jgm/pandoc)
1029
+ - [Pandoc GitHub Releases](https://github.com/jgm/pandoc/releases)
1030
+ - [Pandoc Homebrew Formula](https://formulae.brew.sh/formula/pandoc)
1031
+ - [Pandoc Chocolatey Package](https://community.chocolatey.org/packages/pandoc)
1032
+ - [Pandoc Demos](https://pandoc.org/demos.html)
1033
+ - [Pandoc FAQ](https://pandoc.org/faqs.html)
1034
+ - [TeX Live Documentation](https://www.tug.org/texlive/)
1035
+ - [BasicTeX for macOS](https://www.tug.org/mactex/morepackages.html)
1036
+ - [MiKTeX for Windows](https://miktex.org/)