Skip to content

Commit

Permalink
🎨 fix PDF: $$ symbols surrounding
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyish committed Oct 15, 2022
1 parent 39bf85c commit 9feec47
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
12 changes: 12 additions & 0 deletions lua/pdf.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

return {
{
Math = function (elem)
if elem.text:find("^%s*\\begin{") ~= nil then
return pandoc.RawInline('tex', elem.text)
else
return elem
end
end,
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-enhancing-export",
"name": "Obsidian Enhancing Export",
"version": "1.1.5",
"version": "1.1.6",
"minAppVersion": "0.12.0",
"description": "This is a enhancing export plugin for Obsidian. It allows to export to formats like Html, DOCX, ePub and PDF or Markdown(Hugo) etc.",
"author": "YISH",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-enhancing-export",
"version": "1.1.5",
"version": "1.1.6",
"description": "This is a enhancing export plugin for Obsidian. It allows to export to formats like Html, DOCX, ePub and PDF or Markdown(Hugo) etc.",
"main": "dist/main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/export_command_templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
name: 'PDF',
type: 'pandoc',
arguments:
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --embed-resources --standalone --metadata title="${currentFileName}" -s -o "${outputPath}" -t pdf',
'-f markdown --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" --embed-resources --standalone --metadata title="${currentFileName}" -s -o "${outputPath}" -t pdf',
extension: '.pdf',
},
'Word (.docx)': {
Expand Down
2 changes: 2 additions & 0 deletions src/lua.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import polyfill from 'lua/polyfill.lua';
import math_block from 'lua/math_block.lua';
import markdown from 'lua/markdown.lua';
import markdown_hugo from 'lua/markdown+hugo.lua';
import pdf from 'lua/pdf.lua';

const files = {
'utf8_filenames.lua': utf8_filenames,
Expand All @@ -12,6 +13,7 @@ const files = {
'math_block.lua': math_block,
'markdown.lua': markdown,
'markdown+hugo.lua': markdown_hugo,
'pdf': pdf
};

export default files;
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"1.1.2": "0.12.0",
"1.1.3": "0.12.0",
"1.1.4": "0.12.0",
"1.1.5": "0.12.0"
"1.1.5": "0.12.0",
"1.1.6": "0.12.0"
}

0 comments on commit 9feec47

Please sign in to comment.