Comments (7)
PDF export is using pandoc, which is using LaTeX under the hood. There, not all normally installed fonts are supported. See https://pandoc.org/MANUAL.html#fonts
from panwriter.
Okay. But I have a font which works with pandoc on another machine, but I do not use panwriter there. So what would be the correct syntax to tell pandoc from panwriter where the fontfile resides?
I already tried the full path to the font file but I did not succeed.
from panwriter.
I checked as described here: https://fedidat.com/160-installing-fonts-for-pandoc/
and I can see: My font is installed.
from panwriter.
Update:
pandoc -f markdown --pdf-engine=xelatex --to pdf -o Untitled.pdf Untitled.md
This works with my intended font "Avenir Next"
but when I define in the document or defaults.yaml
papersize: A4
mainfont: Avenir Next
output:
latex:
toc: true
pdf-engine: xelatex
panWriter fails
Called: pandoc --metadata-file '/Users/skeeve/Library/Application Support/PanWriterUserData/default.yaml' --toc --pdf-engine xelatex --metadata 'mainfont=-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif' --metadata monobackgroundcolor=#f0f0f0 --output /Users/skeeve/Desktop/Untitled.pdf --to latex --standalone
Error producing PDF.
! Package fontspec Error: The font "-apple-system, BlinkMacSystemFont, Segoe
(fontspec) UI, sans-serif" cannot be found.
For immediate help type H <return>.
...
l.24 \fi
from panwriter.
Update: mainfont
works if
a) You put it into the document, not in the defaults.yaml
b) You use xelatex as the pdf-engine
from panwriter.
Would, maybe, this solve the issue?
if (docMeta.mainfont === undefined) {
out.metadata.mainfont = extMeta.mainfont || '-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif';
}
Yes, it does. Please see PR #134
from panwriter.
Will be fixed when PR #134 is merged.
from panwriter.
Related Issues (20)
- Mac OSX Monterey security HOT 1
- Word Count HOT 5
- Takes over DOCX default without asking HOT 4
- Feature Requests HOT 1
- Export problem with AppImage 0.8.4 on Linux Slackware HOT 14
- Preview: image width in units other than px are not converted HOT 2
- Linux AppImage: ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. HOT 4
- White screen on launch HOT 6
- If anybody has time to try to add [markdown-it-highlightjs](https://www.npmjs.com/package/markdown-it-highlightjs) to [markdown-it-pandoc](https://github.com/mb21/markdown-it-pandoc/) without breaking attributes, that would be welcome!
- TOC? HOT 2
- defaults.yaml in PanWriterUserData partially ignored HOT 1
- Does not compile HOT 2
- Markdown Table Formatting HOT 1
- Feature request: do not force to auto update the application (Mac) HOT 2
- ICML as a target export format HOT 2
- windows 7 HOT 1
- Export to reveal.js HOT 2
- DEV ISSUE: npm ERR! No workspaces found: HOT 4
- Please could we have an Arm Linux package? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panwriter.