From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16809 Path: news.gmane.org!.POSTED!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Ancient Greek in output PDF Date: Wed, 25 Jan 2017 18:46:56 +0100 Message-ID: <920a0f68-a164-53aa-b3bb-224307772512@gmail.com> References: <45028ac1-86cf-40ee-b3b8-7560eb9dce47@googlegroups.com> <91f1b15e-860d-8b35-1451-aca9fdf4ec45@web.de> <631d8a2d-12a0-4dbd-ad98-6988e9db6d54@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485366441 6085 195.159.176.226 (25 Jan 2017 17:47:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2017 17:47:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDIY76M674FRBF6JUPCAKGQEJHZXQKI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 25 18:47:16 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-vk0-f56.google.com ([209.85.213.56]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWRes-00086j-Fb for gtp-pandoc-discuss@m.gmane.org; Wed, 25 Jan 2017 18:46:58 +0100 Original-Received: by mail-vk0-f56.google.com with SMTP id r136sf79844209vke.1 for ; Wed, 25 Jan 2017 09:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=fBt4jaED1/TGwJbdsh9xpvNmyJO+c1ufocL7r/27Kpg=; b=TRMot7FctTOkuPJ1jH5JjV3aeyxKzb6Al8eRMk0lykM3nMafZknLqZO/PoOTH2k4V3 RMyS3fDONFYYvt7qo8q+RgkP7PlFPRxUx5T0TOiZBdr4PlVwwHyqotlj++FYsgpL7mud C9uDUwuoIv4lsLWXhmnNhE4oQuvMnX7bO99vvEf0Q6y/2UJVCLtoHn/bJ3Bnhgze5s4A fjEilXGBlwiaOh0cyaiZm5rBefpAjsxf9SFuEBqv4ol+CHvTPVwOqa3qFpru4PmkNzKB jWD1Ji2ZB6vA+S0o7Kn2NSC0MmDWZISRryjX8OH8ycUHXkEwYKTQyREGnWuKKwh/RisM acyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=fBt4jaED1/TGwJbdsh9xpvNmyJO+c1ufocL7r/27Kpg=; b=CRECPLEsV8QgRR0viJpIBTFlubUrfls5thXrsxkIyKTXXgACVvxh9GDw8xVrse+dfV 6HxBtp+eJ7WTnqfvsz7RrPBY6dpuUzBLWK5EDdKwVHoNnc17wcrYBM+CYBk0caMW33rt aZwYREK2zsPyHfvEMD+ZwvUvDmhxmEG3n0m26oGGlYy8FXVDCMsFoMCzTZMo91tj1hmS ThQdsSAeSVX+AKaH0vW0wchi8SbxgDnVZMGjesl+yyV5+Lq9hS7hsq0Tkw3ylHsnkrVo PicvXu48LjdI2SrXC0nPRJxLdB6fuTZGHkey5vQ8K3VFdD+CvMjBagPFG9M5SBe Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AIkVDXKQFVS77yhtIPNXllKegdw6luRX68a5IHvIH0b/gVEKm9z4IJr79nNpwmM4hrD+iA== X-Received: by 10.157.39.202 with SMTP id c68mr2353009otb.8.1485366423722; Wed, 25 Jan 2017 09:47:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.10.79 with SMTP id 73ls20380025otg.29.gmail; Wed, 25 Jan 2017 09:47:03 -0800 (PST) X-Received: by 10.129.155.201 with SMTP id s192mr11674464ywg.159.1485366423205; Wed, 25 Jan 2017 09:47:03 -0800 (PST) Original-Received: from manu6.manufrog.com (manu6.manufrog.com. [138.128.164.242]) by gmr-mx.google.com with ESMTPS id r5si925089vkf.4.2017.01.25.09.47.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 09:47:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org does not designate 138.128.164.242 as permitted sender) client-ip=138.128.164.242; Original-Received: from [178.249.150.162] (port=53746 helo=[192.168.1.251]) by manu6.manufrog.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cWRet-001YFr-KW for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 25 Jan 2017 18:46:59 +0100 In-Reply-To: <631d8a2d-12a0-4dbd-ad98-6988e9db6d54-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - manu6.manufrog.com X-AntiAbuse: Original Domain - googlegroups.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gmail.com X-Get-Message-Sender-Via: manu6.manufrog.com: authenticated_id: bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org X-Authenticated-Sender: manu6.manufrog.com: bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org X-Source: X-Source-Args: X-Source-Dir: X-Original-Sender: bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org does not designate 138.128.164.242 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:16809 Archived-At: Please excuse me for not noticing this thread until now! Den 2017-01-24 kl. 20:15, skrev John Muccigrosso: >=20 > On Tuesday, January 24, 2017 at 12:35:08 PM UTC-5, ousia wrote: >> >> Even defining a fallaback font for Greek characters should be easy with= =20 >> fontspec. But I haven=E2=80=99t used LaTeX for years and I don=E2=80=99t= remember how to=20 >> do it.=20 >> >> > A quick look at the font spec docs didn't help me much. I think ideally I= 'd=20 > like to be able to use something like \setgreekfont{blah} and have it use= =20 > that font whenever there's some continuous text using the Greek section o= f=20 > Unicode. >=20 > That might be too much to ask though.=20 In fact you can, at least assuming that you use XeLaTeX, which is a good id= ea anyway. =20 The easiest way would be to include the necessary LaTeX commands in the doc= ument metadata: ``` --- header-includes: # Hide command with non-standard arg structure so pandoc doesn't mess i= t up! - \newcommand{\NoPandoc}[1]{#1} - \NoPandoc{\newfontfamily\greekfont{GFS Didot}[Script=3DGreek,Scale=3DMa= tchLowercase]} ... ## Tetrapharmacus | Don't fear god, | Don't worry about death; | What is good is easy to get, | What is terrible is easy to endure ## [=CE=A4=CE=B5=CF=84=CF=81=CE=B1=CF=86=CE=AC=CF=81=CE=BC=CE=B1=CE=BA=CE= =BF=CF=82]{lang=3D"grc"}
| =E1=BC=8C=CF=86=CE=BF=CE=B2=CE=BF=CE=BD =E1=BD=81 =CE=B8=CE=B5=CF=8C=CF= =82, | =E1=BC=80=CE=BD=CF=8D=CF=80=CE=BF=CF=80=CF=84=CE=BF=CE=BD =E1=BD=81 =CE= =B8=CE=AC=CE=BD=CE=B1=CF=84=CE=BF=CF=82 | =CE=BA=CE=B1=E1=BD=B6 =CF=84=E1=BC=80=CE=B3=CE=B1=CE=B8=E1=BD=B8=CE=BD = =CE=BC=E1=BD=B2=CE=BD =CE=B5=E1=BD=94=CE=BA=CF=84=CE=B7=CF=84=CE=BF=CE=BD, | =CF=84=E1=BD=B8 =CE=B4=E1=BD=B2 =CE=B4=CE=B5=CE=B9=CE=BD=E1=BD=B8=CE=BD = =CE=B5=E1=BD=90=CE=B5=CE=BA=CE=BA=CE=B1=CF=81=CF=84=CE=AD=CF=81=CE=B7=CF=84= =CE=BF=CE=BD
``` (You said that you want the Computer/Latin Modern style, and GFS Didot is a Gre= ek font in Modern style which you probably will find blends well with Latin= Modern. As it happens Greek Modern fonts are usually not as extremely Mode= rn as their Latin counterparts, but who are we to argue with Firmin Didot w= hat a Greek Modern font should look like!? :-) Now run pandoc with `--latexengine=3Dxelatex` and everythiing should take c= are of itself. Including code for setting the Greek font in your template is also relative= ly straightforward. Look for the place in the default LaTeX template where = the polyglossia package is loaded: ``` \else \usepackage{polyglossia} \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlan= gs.name$} $endfor$ \fi ``` and just before the `\fi` insert the following: ``` $if(greekfont)$ \newfontfamily\greekfont{$greekfont$}[Script=3DGreek,Scale=3DMatchLowerca= se] $endif$ ``` Then you can use `-V greekfont=3D'Font Name'` on the command line or `greek= font: Font Name` in the document metadata to specify the Greek font. Since I use several languages using different fonts in my documents I have = included a more general mechanism in my LaTeX template: ``` $for(lang-fonts)$ \newfontfamily\$lang-fonts.lang$font{$lang-fonts.font$}[$if(lang-fonts.la= nguage)$Language=3D$lang-fonts.language$$endif$$if(lang-fonts.script)$Scrip= t=3D$lang-fonts.script$$endif$$if(lang-fonts.options)$$lang-fonts.options$$= else$Scale=3DMatchLowercase$endif$] $endfor$ ``` (BTW the `\$` in that template code may throw your editor's highlighting if= you use LaTeX highlighting. The solution is to comment out that line while= editing the rest of the template.) Then in my metadata I say: ``` lang-fonts: - lang: greek font: GFS Neohellenic script: Greek language: Greek ``` The multiplication of parameters is polyglossia's and fontspec's fault. You= must use their terms here unlike when loading languages where pandoc does = some streamlining behind the scenes. (I use GFS Neohellenic together with Charis SIL. While it looks quite diff= erent it blends well. If I don't need any fancy characters in sans I usuall= y set GFS Neohellenic as the sans font too.) /bpj --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/920a0f68-a164-53aa-b3bb-224307772512%40gmail.com. For more options, visit https://groups.google.com/d/optout.