Skip to content

Commit

Permalink
Improved the LaTeX and PDF arguments (#135)
Browse files Browse the repository at this point in the history
* Change LaTeX export extension from .latex to .tex

* fix: latex and pdf arguments

Fixed the following arguments:

1. Removed the redundant `--embed-resources` and `--standalone` arguments for PDF export
2. Added `--extract-media="${outputDir}"` for the LaTeX export for proper extraction of images.
  • Loading branch information
global-anomaly authored Nov 17, 2023
1 parent 6d360d3 commit 037df8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/export_templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
name: 'PDF',
type: 'pandoc',
arguments:
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } --embed-resources --standalone -s -o "${outputPath}" -t pdf',
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } -s -o "${outputPath}" -t pdf',
customArguments: '--pdf-engine=pdflatex',
optionsMeta: {
'textemplate': 'preset:textemplate', // reference from `PresetOptionsMeta` in `src/settings.ts`
Expand Down Expand Up @@ -93,7 +93,7 @@ export default {
name: 'Latex',
type: 'pandoc',
arguments:
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } -s -o "${outputPath}" -t latex',
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } --extract-media="${outputDir}" -s -o "${outputPath}" -t latex',
optionsMeta: {
'textemplate': 'preset:textemplate', // reference from `PresetOptionsMeta` in `src/settings.ts`
},
Expand Down

0 comments on commit 037df8d

Please sign in to comment.