* Bug with fonts in subdirectory? @ 2022-11-13 13:55 Terence Eden [not found] ` <62aceeb4-46d0-4079-9c5b-1be3dd5e2bben-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Terence Eden @ 2022-11-13 13:55 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --] I am trying to convert a .md file to a .pdf using a specific TTF font. Pandoc doesn't work unless the .ttf is in the same directory as the .md file. Is that normal? This works: pandoc in.md --pdf-engine=xelatex -V mainfont="font.ttf" -o test.pdf I get a PDF in my specific font. But this fails: pandoc in.md --pdf-engine=xelatex -V mainfont="fonts/fontname/font.ttf" -o test.pdf It gives the error: Error producing PDF. ! Missing number, treated as zero. <to be read again> f l.19 \fi I know Pandoc can read the directory, because if I try to use a .ttf which doesn't exist, I get the error "! Package fontspec Error: The font "fonts/foo/bar" cannot be found." Is this a bug, or me not understanding how to use Pandoc properly (a distinct possibility!) Thanks pandoc 2.19.2 Compiled with pandoc-types 1.22.2.1, texmath 0.12.5.2, skylighting 0.13, citeproc 0.8.0.1, ipynb 0.2, hslua 2.2.1 Scripting engine: Lua 5.4 Ubuntu: 22.04 -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/62aceeb4-46d0-4079-9c5b-1be3dd5e2bben%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2012 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <62aceeb4-46d0-4079-9c5b-1be3dd5e2bben-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Bug with fonts in subdirectory? [not found] ` <62aceeb4-46d0-4079-9c5b-1be3dd5e2bben-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2022-11-13 15:32 ` Joost Kremers [not found] ` <87zgcuhnl8.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Joost Kremers @ 2022-11-13 15:32 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: Terence Eden On Sun, Nov 13 2022, Terence Eden wrote: > I am trying to convert a .md file to a .pdf using a specific TTF font. > Pandoc doesn't work unless the .ttf is in the same directory as the .md > file. Is that normal? > > This works: > pandoc in.md --pdf-engine=xelatex -V mainfont="font.ttf" -o test.pdf > > I get a PDF in my specific font. > > But this fails: > pandoc in.md --pdf-engine=xelatex -V mainfont="fonts/fontname/font.ttf" -o > test.pdf > > It gives the error: > > Error producing PDF. > ! Missing number, treated as zero. > <to be read again> > f > l.19 \fi > > I know Pandoc can read the directory, because if I try to use a .ttf which > doesn't exist, I get the error "! Package fontspec Error: The font > "fonts/foo/bar" cannot be found." > > Is this a bug, or me not understanding how to use Pandoc properly (a > distinct possibility!) The mainfont variable is not a Pandoc option but something that's passed to the fontspec package used by XeLaTeX. It doesn't take a font file as value, but a font name. For it to work, you need to make sure that XeLaTeX can find the font. As far as I know, this means that the font must be installed on your system. If that's OK for you, you can simply double-click the ttf file in your file manager and your system should install the font automatically, or open it in a application that will allow you to install it. If you do not wish to install the font, you'll need to figure out if XeLaTeX can be taught to use fonts from fonts file that aren't installed. I don't know if that's possible. -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <87zgcuhnl8.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>]
* Re: Bug with fonts in subdirectory? [not found] ` <87zgcuhnl8.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> @ 2022-11-13 16:14 ` Terence Eden [not found] ` <cd84e8c7-0bc4-4828-a090-12e7c679cf1fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Terence Eden @ 2022-11-13 16:14 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2442 bytes --] Thank you, that's helpful. I can use the fonts which are installed. But, weirdly, I can use a TTF which is *not* installed as long as the file is in the same directory as the input file. I'll go look through the XeLaTeX documentation. Thanks once again. On Sunday, 13 November 2022 at 15:38:04 UTC Joost wrote: > > On Sun, Nov 13 2022, Terence Eden wrote: > > I am trying to convert a .md file to a .pdf using a specific TTF font. > > Pandoc doesn't work unless the .ttf is in the same directory as the .md > > file. Is that normal? > > > > This works: > > pandoc in.md --pdf-engine=xelatex -V mainfont="font.ttf" -o test.pdf > > > > I get a PDF in my specific font. > > > > But this fails: > > pandoc in.md --pdf-engine=xelatex -V mainfont="fonts/fontname/font.ttf" > -o > > test.pdf > > > > It gives the error: > > > > Error producing PDF. > > ! Missing number, treated as zero. > > <to be read again> > > f > > l.19 \fi > > > > I know Pandoc can read the directory, because if I try to use a .ttf > which > > doesn't exist, I get the error "! Package fontspec Error: The font > > "fonts/foo/bar" cannot be found." > > > > Is this a bug, or me not understanding how to use Pandoc properly (a > > distinct possibility!) > > The mainfont variable is not a Pandoc option but something that's passed > to the > fontspec package used by XeLaTeX. It doesn't take a font file as value, > but a > font name. > > For it to work, you need to make sure that XeLaTeX can find the font. As > far as > I know, this means that the font must be installed on your system. If > that's OK > for you, you can simply double-click the ttf file in your file manager and > your > system should install the font automatically, or open it in a application > that > will allow you to install it. > > If you do not wish to install the font, you'll need to figure out if > XeLaTeX can > be taught to use fonts from fonts file that aren't installed. I don't know > if > that's possible. > > > -- > Joost Kremers > Life has its moments > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cd84e8c7-0bc4-4828-a090-12e7c679cf1fn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 3279 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <cd84e8c7-0bc4-4828-a090-12e7c679cf1fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Bug with fonts in subdirectory? [not found] ` <cd84e8c7-0bc4-4828-a090-12e7c679cf1fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2022-11-13 17:40 ` Bastien DUMONT 2022-11-13 19:29 ` Joost Kremers 1 sibling, 0 replies; 5+ messages in thread From: Bastien DUMONT @ 2022-11-13 17:40 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw See the manual of fontspec p. 10-11. You will probably have to write the relevant code in your template file or in your YAML header via header-includes. Le Sunday 13 November 2022 à 08:14:04AM, Terence Eden a écrit : > Thank you, that's helpful. I can use the fonts which are installed. But, > weirdly, I can use a TTF which is *not* installed as long as the file is in the > same directory as the input file. > > I'll go look through the XeLaTeX documentation. Thanks once again. > > On Sunday, 13 November 2022 at 15:38:04 UTC Joost wrote: > > > On Sun, Nov 13 2022, Terence Eden wrote: > > I am trying to convert a .md file to a .pdf using a specific TTF font. > > Pandoc doesn't work unless the .ttf is in the same directory as the .md > > file. Is that normal? > > > > This works: > > pandoc in.md --pdf-engine=xelatex -V mainfont="font.ttf" -o test.pdf > > > > I get a PDF in my specific font. > > > > But this fails: > > pandoc in.md --pdf-engine=xelatex -V mainfont="fonts/fontname/font.ttf" > -o > > test.pdf > > > > It gives the error: > > > > Error producing PDF. > > ! Missing number, treated as zero. > > <to be read again> > > f > > l.19 \fi > > > > I know Pandoc can read the directory, because if I try to use a .ttf > which > > doesn't exist, I get the error "! Package fontspec Error: The font > > "fonts/foo/bar" cannot be found." > > > > Is this a bug, or me not understanding how to use Pandoc properly (a > > distinct possibility!) > > The mainfont variable is not a Pandoc option but something that's passed to > the > fontspec package used by XeLaTeX. It doesn't take a font file as value, but > a > font name. > > For it to work, you need to make sure that XeLaTeX can find the font. As > far as > I know, this means that the font must be installed on your system. If > that's OK > for you, you can simply double-click the ttf file in your file manager and > your > system should install the font automatically, or open it in a application > that > will allow you to install it. > > If you do not wish to install the font, you'll need to figure out if > XeLaTeX can > be taught to use fonts from fonts file that aren't installed. I don't know > if > that's possible. > > > -- > Joost Kremers > Life has its moments > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/msgid/ > pandoc-discuss/cd84e8c7-0bc4-4828-a090-12e7c679cf1fn%40googlegroups.com. > > References: > > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/cd84e8c7-0bc4-4828-a090-12e7c679cf1fn%40googlegroups.com?utm_medium=email&utm_source=footer -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/Y3Er9er4oAJpbjFm%40localhost. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug with fonts in subdirectory? [not found] ` <cd84e8c7-0bc4-4828-a090-12e7c679cf1fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2022-11-13 17:40 ` Bastien DUMONT @ 2022-11-13 19:29 ` Joost Kremers 1 sibling, 0 replies; 5+ messages in thread From: Joost Kremers @ 2022-11-13 19:29 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: Terence Eden On Sun, Nov 13 2022, Terence Eden wrote: > Thank you, that's helpful. I can use the fonts which are installed. But, > weirdly, I can use a TTF which is *not* installed as long as the file is in > the same directory as the input file. > > I'll go look through the XeLaTeX documentation. Thanks once again. Let me correct myself: it's the fontspec package that's relevant here, not XeLaTeX per se. So you should look at the fontspec docs. -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-13 19:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-11-13 13:55 Bug with fonts in subdirectory? Terence Eden [not found] ` <62aceeb4-46d0-4079-9c5b-1be3dd5e2bben-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2022-11-13 15:32 ` Joost Kremers [not found] ` <87zgcuhnl8.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 2022-11-13 16:14 ` Terence Eden [not found] ` <cd84e8c7-0bc4-4828-a090-12e7c679cf1fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2022-11-13 17:40 ` Bastien DUMONT 2022-11-13 19:29 ` Joost Kremers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).