From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31749 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Terence Eden Newsgroups: gmane.text.pandoc Subject: Re: Bug with fonts in subdirectory? Date: Sun, 13 Nov 2022 08:14:04 -0800 (PST) Message-ID: References: <62aceeb4-46d0-4079-9c5b-1be3dd5e2bben@googlegroups.com> <87zgcuhnl8.fsf@fastmail.fm> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2910_1279501066.1668356044100" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31438"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDHOHBPUZIBBBTNPYSNQMGQEQ5UIP4Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 13 17:14:09 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ouFcW-0007x2-Rb for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 13 Nov 2022 17:14:08 +0100 Original-Received: by mail-ot1-f61.google.com with SMTP id l31-20020a9d1b22000000b0066c48e9249fsf5010283otl.5 for ; Sun, 13 Nov 2022 08:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=Qr2q6W35zCw29C7ZR4GAPscB6pxez8F4bvfUAT0f5DY=; b=NJraISiF6UvHa1cAxmV8LlokM31lrj4ha3ZJACia2tmiC14YViuR18mObbjC2mrLBq vBehpTpmM94xBfVYHKuBAjZIzidT5UH13eheJ9VJaiBoY8+bYnARQR6Gzu1rnwHxO5J/ Mirdl3D0SAyao8UZxtAC/12vtghEsdhbQSAq464sFmyid0ANxraOVcsE7Wy1tqX/BNch d9FXu9tJ2RxJucPMRAp1SNYnBDwGseqqiHc7phlAECU8vkCP1wPTm+Vp5IQry4MigMu0 Mbg13Tkcd/cRGjYZcsqZF5RaHwkFmhnzBfJ4T05Q+/AKFJVshFSgiLpQgj/cKqibBn8K TPUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Qr2q6W35zCw29C7ZR4GAPscB6pxez8F4bvfUAT0f5DY=; b=ZptQ7QWJ34ezz16HNrsHoOx3bVk2i5JBhcTu9me0upPTjVwP44ANXl51kBxFJLZmNe GJJKgTSd20Dhu/68dpsfCAQFnTEpZQQ1azPuGi2MuPkpaPDHwzPzf7i22r/L9b1i8kws vw+LMUCUxtw1snQL41yJ5fZgLcvNNBRHzBYTejQY2gJHbJqKtIfkKGl2oXj5jGrK/62p 4+Wd6KML7p53RwCB2z6BYaTtORMOFSRbySkrSyfmlbYXYDLubQIwQ7HOpVHIQ+ezI9pO x6cRWSxrysDvVX9pBX4nu/fy0xeJbbddPvKA6PugqhCf9SHZ/888cqr8T3LOxKahsOgk AUaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=Qr2q6W35zCw29C7ZR4GAPscB6pxez8F4bvfUAT0f5DY=; b=I6H+qFPWex96pMQh4jXpYsbLv15IPDYUlkW0zqItW3faQYgPdydZJAlfZsKG+HQQ/q 390q7YlLp9yUXSi7yaFeJP7He1F+x0xPQZKTrxOs/lj0vk6MnMJi4LRxuUud7S7QSMVq RmapBbvxh05Spwv3kJX8WOEU7AuS7Si75JHRul+EqBNw8s9aPaySW3GP3NL+iQ3eXcKf Q/6Jmug19fCYaf+V5CP9PQvgqbJlgco+65McioBVUxwTC4VqkVQrYjK6R+VYSqLipfzW CgU+uzS4NY88qlQiaH84Tzp6h/xjmUuQr/hqnc3aFE+RfWkMaryumSwP2UBLNKrwSNBe dSag== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkDhgchCW8iVjWwmk/4bgLdVPGh/vsXYsOcKVnPTDTZlA4R7S6Z phXmKSD9NYEf1JKS/UP4EFs= X-Google-Smtp-Source: AA0mqf4apZi3AP6B2ulR/sQxKzpN9ljc2yQTgkZm49dSs7LXsY78+ezAzLXx630uJutI+iYJj9zTYA== X-Received: by 2002:a05:6870:d0c4:b0:136:437a:a460 with SMTP id k4-20020a056870d0c400b00136437aa460mr5012330oaa.148.1668356047600; Sun, 13 Nov 2022 08:14:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:7719:b0:141:8ce4:295a with SMTP id dw25-20020a056870771900b001418ce4295als1473169oab.10.-pod-prod-gmail; Sun, 13 Nov 2022 08:14:05 -0800 (PST) X-Received: by 2002:a05:6870:fd9b:b0:13d:9ace:3395 with SMTP id ma27-20020a056870fd9b00b0013d9ace3395mr4939849oab.104.1668356044917; Sun, 13 Nov 2022 08:14:04 -0800 (PST) In-Reply-To: <87zgcuhnl8.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> X-Original-Sender: terence.eden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31749 Archived-At: ------=_Part_2910_1279501066.1668356044100 Content-Type: multipart/alternative; boundary="----=_Part_2911_1669650827.1668356044100" ------=_Part_2911_1669650827.1668356044100 Content-Type: text/plain; charset="UTF-8" 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. > > > > 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. ------=_Part_2911_1669650827.1668356044100 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you, that's helpful. I can use the fonts which are installed. Bu= t, 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, 1= 3 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 f= ont.
> Pandoc doesn't work unless the .ttf is in the same directory a= s the .md=20
> file. Is that normal?
>
> This works:
> pandoc in.md --pdf-engine=3Dxelatex -V mainfont=3D"font.ttf&q= uot; -o test.pdf
>
> I get a PDF in my specific font.
>
> But this fails:
> pandoc in.md --pdf-engine=3Dxelatex -V mainfont=3D"fonts/font= name/font.ttf" -o=20
> test.pdf
>
> It gives the error:
>
> Error producing PDF.
> ! Missing number, treated as zero.
> <to be read again>=20
> f
> l.19 \fi
>
> I know Pandoc can read the directory, because if I try to use a .t= tf which=20
> doesn't exist, I get the error "! Package fontspec Error:= The font=20
> "fonts/foo/bar" cannot be found."
>
> Is this a bug, or me not understanding how to use Pandoc properly = (a=20
> distinct possibility!)

The mainfont variable is not a Pandoc option but something that's p= assed to the
fontspec package used by XeLaTeX. It doesn't take a font file as va= lue, but a
font name.

For it to work, you need to make sure that XeLaTeX can find the font. A= s far as
I know, this means that the font must be installed on your system. If t= hat'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 applicati= on that
will allow you to install it.

If you do not wish to install the font, you'll need to figure out i= f XeLaTeX can
be taught to use fonts from fonts file that aren't installed. I don= 't know if
that's possible.


--=20
Joost Kremers
Life has its moments

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_2911_1669650827.1668356044100-- ------=_Part_2910_1279501066.1668356044100--