From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27684 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'Marek Stepanek' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: How to include Cyrillic Characters in Markdown for Pandoc Date: Wed, 3 Feb 2021 21:18:02 -0800 (PST) Message-ID: <6767d7e4-7277-483a-9227-a3684692aeban@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_194_622036887.1612415882460" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38711"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD6M3P4AXQHRBQ5D62AAMGQE35EYGXI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Feb 05 19:43:17 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f188.google.com ([209.85.167.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l864b-0009y0-CB for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 05 Feb 2021 19:43:17 +0100 Original-Received: by mail-oi1-f188.google.com with SMTP id f132sf1912190oig.13 for ; Fri, 05 Feb 2021 10:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=K1wjsYyBOunpRovDFXimMntxd3rcJO8+XFAEfOd9SCg=; b=HDNv0PoF22gUivp1PFazrHPIKTiTaXXlxgdApel1iFUp5XMjINKF3ul6t8cennyVIO C6ZLHslw/fUOA6EqrWgCRCqCuPq68/vkJSZEbeuLxn4qgzocusCt6xkEhS9yG9sa5YOL fBCZWLiD8WdIDBe+fMkysTL4O1sjcgned0lSvXrnlFKhT/+ny5o6j9ohguKVKCYdE7Y8 E+qisC8HRqINaUh6AeVEnufm7xwzU5h+d6CGGZzkk+2/vyp9BlToUgjcty27Gf2Ek4oa SRLlDwVez/e9imOZQ8haZLlL2f/pc9jy+ay/cS9rHEW1H7A3p66TPvyQq2XNVtJlBzos Wj5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:x-original-sender:reply-to:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=K1wjsYyBOunpRovDFXimMntxd3rcJO8+XFAEfOd9SCg=; b=VlIhY3cl7Xktd1nfS2oCDEgTvAc6KkCj/T34UB6TvPkX/dgg3TWxYz+k7wj1XKYulm 6T0wehPriyw0aA2usK9vsO+o1uodPlKB1dC+niaOGFPnUcB+68XZTJAFGhvZVEGs0AqY xDipeI2YYPiKybYrOhnb2cDj16KfA0c1tfVC6ZmvMym7A7XaOKZE1ZIGZSiCxYvms8N/ N4C4La6ogYbaEFjKKhRoYpspy+ABZsQuabwuSx0zCGTNiZApZAwyjn0v/5OgMiImsCn9 fp+zAjozbYbNt6Qg1wJ11IEUlsgvK1AgcoAW+abTaLwZzB4FJlgpf0HPz4v0aF9pRoyg n+6w== X-Gm-Message-State: AOAM531FtnH1mmBiDxgtAgmwSL3vmOW7AlW3xtxQU4kfa7XlrjHgL1zu gUhONYG7mGiXJ5KNIUO/Fug= X-Google-Smtp-Source: ABdhPJwhhGLUFRL72m17b5qPBJsgCsIx6d60qzRTS1K/JZDQGd2rSfg5FNqfUBlv8n4vcns8Cdba3A== X-Received: by 2002:aca:ab08:: with SMTP id u8mr3920315oie.84.1612550596438; Fri, 05 Feb 2021 10:43:16 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:1614:: with SMTP id g20ls2492057otr.1.gmail; Fri, 05 Feb 2021 10:43:15 -0800 (PST) X-Received: by 2002:a9d:32e2:: with SMTP id u89mr4272366otb.196.1612550595281; Fri, 05 Feb 2021 10:43:15 -0800 (PST) Original-Received: by 2002:aca:cfc8:0:b029:f7:edb9:98f4 with SMTP id f191-20020acacfc80000b02900f7edb998f4msoig; Wed, 3 Feb 2021 21:18:03 -0800 (PST) X-Received: by 2002:aca:b6c1:: with SMTP id g184mr4159028oif.47.1612415883194; Wed, 03 Feb 2021 21:18:03 -0800 (PST) In-Reply-To: X-Original-Sender: mstep.germany-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org X-Original-From: Marek Stepanek 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:27684 Archived-At: ------=_Part_194_622036887.1612415882460 Content-Type: multipart/alternative; boundary="----=_Part_195_775608423.1612415882460" ------=_Part_195_775608423.1612415882460 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Merci infiniment Julien! Ainsi s'ach=C3=A8ve une longue recherche d'un mois= ou=20 plus.=20 Thank you for your help marek On Wednesday, 3 February 2021 at 23:45:19 UTC+1 Julien Dutant wrote: > For a MWE, run =20 > > pandoc test.md --pdf-engine xelatex -o output.pdf > on the following saved as `test.md`: > > --- > documentclass: scrartcl > lang: de > header-includes:=20 > - \newfontfamily{\cyrillicfont}{Georgia} > --- > > Bongard Problem [=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB =D0=9C=D0=BE=D0=B8= =D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87 =D0=91=D0=BE=D0=BD=D0=B3=D0=B0=D1=80= =D0=B4]{lang=3Dru} > > On Wednesday, February 3, 2021 at 10:39:51 PM UTC Julien Dutant wrote: > >> Try adding this to the header-include section (you probably have these= =20 >> fonts, but change if appropriate): >> >> - \newfontfamily{\cyrillicfont}{Georgia} >> - \newfontfamily{\cyrillicfontsf}{Arial} >> >> Cf.=20 >> https://tex.stackexchange.com/questions/318394/sans-monospace-font-for-o= therlanguage >> and=20 >> https://tex.stackexchange.com/questions/539296/overleafs-polyglossia-pac= kage-with-cyrillic-fonts >> =20 >> for some background. >> >> Best, >> >> Julien >> >> >> >> On Wednesday, February 3, 2021 at 6:22:25 AM UTC mstep....-gM/Ye1E23myhRSP0FMvGiw@public.gmane.org= m=20 >> wrote: >> >>> Hello all! Hope I will not be banned from this list. My minimal working= =20 >>> example became a maximal (much too long) not working example. Questions= are=20 >>> in this Markdown document. For beginners: save the two files, change in= to=20 >>> the folder with your shell, and issue `make` ... >>> >>> Thank you for your answers. >>> >>> marek >>> >>> ***save as cyrillic_test.md*** >>> --- >>> documentclass: scrartcl >>> fontsize: 12pt >>> pagesize: a4paper >>> lang: de >>> header-includes:=20 >>> - \usepackage{fancyhdr} >>> - \pagestyle{fancy} >>> - \lhead{Pandoc, Cyrillic, Markdown to PDF} >>> - \rhead{\today} >>> colorlinks: >>> red >>> urlcolor: >>> blue >>> include-before: >>> - | >>> ```{=3Dlatex} >>> \begin{center} >>> \hfill \break% >>> \Huge{ Include Cyrillic in Markdown for Pandoc }\\[0.5em] >>> \Large{ Test-Paper to solve an Encoding Problem }\\[1.2em] >>> \Large{ University of Homeoffice }\\[1.2em] >>> \Large{ Klasse: Ambrosius Anonymus }\\[1.2em] >>> \large{ Last Edit: Munich \today}\\[1.5em] >>> \end{center} >>> ``` >>> - \tableofcontents >>> --- >>> >>> # How to include Cyrillic Characters in Markdown for Pandoc >>> >>> ## Foreword >>> >>> Original Thread: < >>> https://groups.google.com/g/pandoc-discuss/c/xBZxIfEH1vI>=20 >>> >>> I am on Catalina, Newest `Pandoc` installed via `Homebrew`. I am using= =20 >>> `Pandoc > Mardkown > LaTeX > PDF`.^[comp. the `Makefile`]=20 >>> >>> >>> >>> ## How to insert Cyrillic Text into Markdown=20 >>> >>> - My questions are: How to choose a character-set with Cyrillic script= =20 >>> ^[Cyrillic: from code point ux0400 to ux04FF)]; how to know, whether fo= r=20 >>> example Arial in `/System/Library/Fonts/Supplemental` has this alphabet= =20 >>> included?^[Just now before posting I discovered in `Font Book.app`: cho= ose=20 >>> `Arial` then `View > Language > Russian`] >>> - From where I choose the fonts:\ >>> + `/System/Library/Fonts/Supplemental` >>> + `/System/Library/Fonts/` >>> + `~/Library/Fonts` >>> + `/usr/local/texlive/2020/texmf-dist/fonts/` >>> >>> >>> >>> When issuing `make` with a snippet in Cyrillic in the Markdown Original= =20 >>> I get following error: >>> >>> ``` >>> Error producing PDF. >>> ! Package polyglossia Error: The current latin font=20 >>> latinmodern-math.otf(3)\ >>> does not contain the "Cyrillic" script! >>> (polyglossia)\ >>> Please define \cyrillicfont with \newfontfamily command. >>> ``` >>> >>> Apparently the font `latinmodern-math.otf` resides in:=20 >>> `/System/Volumes/Data/texlive/2019/\ >>> texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf`^[What is= =20 >>> that? A huge folder, and my Texlive is from 2020! Is this a sort of Bac= kup?=20 >>> May I delete this `texlive` folder?] and=20 >>> `/usr/local/texlive/2020/texmf-dist/fonts/opentype/public/\ >>> lm-math/latinmodern-math.otf`. I have to choose my character set from= =20 >>> here? Converting with `Pandoc` the font is certainly chosen in the \LaT= eX{}=20 >>> install automatically. No need to define the path to the font. Right? >>> >>> Inserting in the YAML Headers: >>> >>> ``` >>> >>> header-includes:=20 >>> - \usepackage[T1,T2A]{fontenc} >>> - \usepackage[utf8]{inputenc} >>> - \usepackage[english,russian,main=3Dgerman]{babel} >>> >>> ``` >>> >>> is not working. Thank you for your patience. And for this long text. >>> >>> ***End*** >>> >>> ***save as Makefile*** >>> all: save typeset open >>> >>> .PHONY: all >>> save: >>> w >>> >>> typeset: >>> pandoc \ >>> --from markdown \ >>> --to latex \ >>> --out cyrillic_test.pdf \ >>> --pdf-engine xelatex \ >>> cyrillic_test.md >>> >>> open:=20 >>> open cyrillic_test.pdf >>> >>> ***End*** >>> >> --=20 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 e= mail 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/6767d7e4-7277-483a-9227-a3684692aeban%40googlegroups.com. ------=_Part_195_775608423.1612415882460 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Merci infiniment Julien! Ainsi s'ach=C3=A8ve une longue recherche d'un mois= ou plus. 

Thank you for your help

marek

On Wednesday, 3 February 2021 at 23:45:19 UTC+1 Julien D= utant wrote:
= For a MWE, run=C2=A0

pandoc test.md --pdf-engine xelatex -o output.pdf

on the followi= ng saved as `test.md`:

---
document= class: scrartcl
lang: de
header-includes:=C2=A0
- \newfontfamily{\cyrillicfont}{Georgia}
---
<= div>
Bongard Problem [=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB = =D0=9C=D0=BE=D0=B8=D1=81=D0=B5=D0=B5=D0=B2=D0=B8=D1=87 =D0=91=D0=BE=D0=BD= =D0=B3=D0=B0=D1=80=D0=B4]{lang=3Dru}

On Wednesday, Febru= ary 3, 2021 at 10:39:51 PM UTC Julien Dutant wrote:
Try adding this to the header-include section= (you probably have these fonts, but change if appropriate):

=
- \newfontfamily{\cyrillicfont}{Georgia}
- \newfontfami= ly{\cyrillicfontsf}{Arial}

for some background.

Best= ,

Julien



On We= dnesday, February 3, 2021 at 6:22:25 AM UTC mstep....@g= ooglemail.com wrote:
Hello all! Hope I will not be banned from this list. My minimal workin= g example became a maximal (much too long) not working example. Questions a= re in this Markdown document. For beginners: save the two files, change int= o the folder with your shell, and issue `make` ...

Thank= you for your answers.

marek

<= div>***save as cyrillic_test.md***
---
documentcla= ss: scrartcl
fontsize: 12pt
pagesize: a4paper
lang: de
header-includes:=C2=A0
- \usepackage{fancyhdr= }
- \pagestyle{fancy}
- \lhead{Pandoc, Cyrillic, Markdo= wn to PDF}
- \rhead{\today}
colorlinks:
=C2= =A0red
urlcolor:
=C2=A0blue
include-before:
- |
=C2=A0```{=3Dlatex}
=C2=A0\begin{center}
=C2=A0\hfill \break%
=C2=A0\Huge{ Include Cyrillic in Ma= rkdown for Pandoc }\\[0.5em]
=C2=A0\Large{ Test-Paper to solve an= Encoding Problem }\\[1.2em]
=C2=A0\Large{ University of Homeoffi= ce }\\[1.2em]
=C2=A0\Large{ Klasse: Ambrosius Anonymus }\\[1.2em]=
=C2=A0\large{ Last Edit: Munich \today}\\[1.5em]
=C2= =A0\end{center}
=C2=A0```
- \tableofcontents
= ---

# How to include Cyrillic Characters in Markdo= wn for Pandoc

## Foreword

Original Thread: <https://groups.google.com/g/pa= ndoc-discuss/c/xBZxIfEH1vI>=C2=A0

I am on C= atalina, Newest `Pandoc` installed via `Homebrew`. I am using `Pandoc > = Mardkown > LaTeX > PDF`.^[comp. the `Makefile`]=C2=A0

<= /div>
<!--=C2=A0
I tried with=C2=A0

header-includes:=C2=A0
- \usepackage[english,russian,main=3Dge= rman]{babel}
- \usepackage[T1,T2A]{fontenc}
- \usepacka= ge[utf8]{inputenc}
-->

## How to inse= rt Cyrillic Text into Markdown=C2=A0

- My question= s are: How to choose a character-set with Cyrillic script ^[Cyrillic: from = code point ux0400 to ux04FF)]; how to know, whether for example Arial in `/= System/Library/Fonts/Supplemental` has this alphabet included?^[Just now be= fore posting I discovered in `Font Book.app`: choose `Arial` then `View >= ; Language > Russian`]
- From where I choose the fonts:\
=
=C2=A0 + `/System/Library/Fonts/Supplemental`
=C2=A0 + `/Sys= tem/Library/Fonts/`
=C2=A0 + `~/Library/Fonts`
=C2=A0 += `/usr/local/texlive/2020/texmf-dist/fonts/`

<!= --
Uncomment for testing:
Bongard Problem [=D0=9C=D0=B8= =D1=85=D0=B0=D0=B8=D0=BB =D0=9C=D0=BE=D0=B8=D1=81=D0=B5=D0=B5=D0=B2=D0=B8= =D1=87 =D0=91=D0=BE=D0=BD=D0=B3=D0=B0=D1=80=D0=B4]{lang=3Dru}
--&= gt;

When issuing `make` with a snippet in Cyrillic= in the Markdown Original I get following error:

`= ``
Error producing PDF.
! Package polyglossia Error: Th= e current latin font latinmodern-math.otf(3)\
does not contain th= e "Cyrillic" script!
(polyglossia)\
Please de= fine \cyrillicfont with \newfontfamily command.
```
Apparently the font `latinmodern-math.otf` resides in: `/System= /Volumes/Data/texlive/2019/\
texmf-dist/fonts/opentype/public/lm-= math/latinmodern-math.otf`^[What is that? A huge folder, and my Texlive is = from 2020! Is this a sort of Backup? May I delete this `texlive` folder?] a= nd `/usr/local/texlive/2020/texmf-dist/fonts/opentype/public/\
lm= -math/latinmodern-math.otf`. I have to choose my character set from here? C= onverting with `Pandoc` the font is certainly chosen in the \LaTeX{} instal= l automatically. No need to define the path to the font. Right?
<= br>
Inserting in the YAML Headers:

```

header-includes:=C2=A0
- \usepackage[T1,T= 2A]{fontenc}
- \usepackage[utf8]{inputenc}
- \usepackag= e[english,russian,main=3Dgerman]{babel}

```
<= div>
is not working. Thank you for your patience. And for thi= s long text.

***End***

<= div>***save as Makefile***
all: save typeset open
=
.PHONY: all
save:
w

typeset:
pandoc =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
=C2= =A0--from =C2=A0 =C2=A0 =C2=A0 =C2=A0 markdown =C2=A0 =C2=A0 =C2=A0 \
=C2=A0--to =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 latex =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
= =C2=A0--out cyrillic_test= .pdf \
=C2=A0--pdf-engine = xelatex \
=C2=A0cyrillic_test.md

open:=C2=A0
open= cyrillic_test.pdf

***End***

--
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/6767d7e4-7277-483a-9227-a3684692aeban%40googlegroups.= com.
------=_Part_195_775608423.1612415882460-- ------=_Part_194_622036887.1612415882460--