public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* YAML block to carry LaTeX font details -- how do I preserve '{' and ‘}‘ ?
@ 2016-04-09 22:34 kurt.pfeifle via pandoc-discuss
       [not found] ` <6c4977e8-6dca-4d33-a44b-a72a31603e60-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: kurt.pfeifle via pandoc-discuss @ 2016-04-09 22:34 UTC (permalink / raw)
  To: pandoc-discuss


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



I am starting to experience with YAML blocks, so that I store as many as 
possible source-specific Pandoc command line options and variables within 
the Markdown source file for easier reproducability at a later stage.

Most things which I currently use work file, except one (which is: 
successfully passing *some* font features into the LaTeX output).

Here is my complete YAML block:

---
title: Some Document
subtitle:
    - This is a test for using YAML for metadata.
author:
    - name: Some Name
      affiliation: University of Somewhere
    - name: Some Other Name
      affiliation: University of Nowhere
date: 2016-04-10
toc: yes
numbersections: yes
toc-depth: 3
geometry:
    - paperwidth=595pt
    - paperheight=842pt
    - showframe=false
    - showcrop=false
    - hmargin=72pt
    - headsep=54pt
    - top=66pt
    - bottom=78pt
author-meta:  "Some Name, Some GmbH"
subject-meta:  "Knowledge-Based Information Extraction"
title-meta:  "Some Phantasy Title"
pdfstartpage: 2
keywords:  "Essay, Important, Difficult"
fontsize: 12pt
lang: de
mainfont: WeidemannBook*mainfontoptions:  BoldFont=WeidemannStd-Bold.otf, ItalicFont=WeidemannBookItalic.otf, BoldItalicFont=WeidemannStd-BoldItalic.otf, ItalicFeatures=Colour=AA0000, BoldFeatures={Colour=0000AA}, BoldItalicFeatures={Colour=AA00AA}
*monofont:  Letter Gothic Std
monofontoptions: [ Scale=0.8, Colour=AA0000, Numbers=Lining, Numbers=SlashedZero, ]
documentclass: scrartcl
header-includes:
...

My problem is with this line:

*mainfontoptions:  BoldFont=WeidemannStd-Bold.otf, ItalicFont=WeidemannBookItalic.otf, BoldItalicFont=WeidemannStd-BoldItalic.otf, ItalicFeatures=Colour=AA0000, BoldFeatures={Colour=0000AA}, BoldItalicFeatures={Colour=AA00AA}*

In LaTeX the output becomes:

\setmainfont[BoldFont=WeidemannStd-Bold.otf,
  ItalicFont=WeidemannBookItalic.otf, 
  BoldItalicFont=WeidemannStd-BoldItalic.otf,
  ItalicFeatures=*\{*Colour=AA0000*\}*,
  BoldFeatures=*\{*Colour=0000AA*\}*,
  BoldItalicFeatures=*\{*Colour=AA00AA*\}*]{WeidemannBook}

This does not compile to PDF and gives this error:

! LaTeX error: "kernel/misplaced-equals-sign"
....
LaTeX is attempting to parse some key-value input but found two equals signs not separated by a comma.

If I remove the backslashes which escape the curly braces, like so:

\setmainfont[BoldFont=WeidemannStd-Bold.otf,
  ItalicFont=WeidemannBookItalic.otf,
  BoldItalicFont=WeidemannStd-BoldItalic.otf,
  ItalicFeatures=*{*Colour=AA0000*}*,
  BoldFeatures=*{*Colour=0000AA*}*,
  BoldItalicFeatures=*{*Colour=AA00AA*}*]{WeidemannBook}

then the code compiles and works as expected — I get different colors for 
bold, italic and bold-italic text:

<https://lh3.googleusercontent.com/-rI8n718kiu8/VwmBiyHwHiI/AAAAAAAAAiY/FEjuI3w6YDwCfgEW65d-VRn_DkorZO6Xw/s1600/1.png>

How can I get the required curly braces into the LaTeX output un-escaped 
from setting it up in the YAML block?

Or is there an alternative way to get my wanted main font `*Features` to 
work?

Thanks, Kurt
​

-- 
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/6c4977e8-6dca-4d33-a44b-a72a31603e60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-24  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-09 22:34 YAML block to carry LaTeX font details -- how do I preserve '{' and ‘}‘ ? kurt.pfeifle via pandoc-discuss
     [not found] ` <6c4977e8-6dca-4d33-a44b-a72a31603e60-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-10  2:39   ` John MacFarlane
     [not found]     ` <20160410023930.GA96031-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-04-10  5:14       ` John MacFarlane
     [not found]         ` <20160410051448.GB2108-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-04-10 10:42           ` kurt.pfeifle via pandoc-discuss
     [not found]             ` <2222a182-2c72-4c59-935a-feb01e091299-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-24  0:57               ` Rick Dooling

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