public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Add variables for LaTeX: CJKsansfont, CJKmonofont, and their options
@ 2019-05-15  3:24 Yasu Atsu
  0 siblings, 0 replies; only message in thread
From: Yasu Atsu @ 2019-05-15  3:24 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1611 bytes --]

Hi, I suggest updating L138-L143 of default.latex to give more supports on 
CJK in LaTeX 
such as sans and mono fonts in addition to the main one.
https://github.com/jgm/pandoc/blob/8b00bc6029b9285f872ae517a8d4538c66070fa9/data/templates/default.latex#L138-L142

My implementation requires assigning CJKmainfont in order to use 
CJKsansfont and CJKmonofont because

- It is strange to set the non-main fonts without setting the main one.
- Checking $if(...)$ repeatedly at the top levels for each CJK require 
`\usepackage{xeCJK}` repeatedly.

```
$if(CJKmainfont)$
  \ifxetex
    \usepackage{xeCJK}
    
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
    $if(CJKsansfont)$
      
\setCJKsansfont[$for(CJKsansoptions)$$CJKsansoptions$$sep$,$endfor$]{$CJKsansfont$}
    $endif$
    $if(CJKmonofont)$
      
\setCJKmonofont[$for(CJKmonooptions)$$CJKmonooptions$$sep$,$endfor$]{$CJKmonofont$}
    $endif$
  \fi
$endif$
```

LuaTex can also be supported by using \setsansjfont and \setmonojfont.

Any suggestions?

-- 
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 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/e4debb61-db4d-487d-aff1-e5d07a1e1617%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2348 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-15  3:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  3:24 Add variables for LaTeX: CJKsansfont, CJKmonofont, and their options Yasu Atsu

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).