public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "kurt.pfeifle via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: YAML block to carry LaTeX font details -- how do I preserve '{' and ‘}‘ ?
Date: Sat, 9 Apr 2016 15:34:18 -0700 (PDT)	[thread overview]
Message-ID: <6c4977e8-6dca-4d33-a44b-a72a31603e60@googlegroups.com> (raw)


[-- 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 --]

             reply	other threads:[~2016-04-09 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 22:34 kurt.pfeifle via pandoc-discuss [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c4977e8-6dca-4d33-a44b-a72a31603e60@googlegroups.com \
    --to=pandoc-discuss-/jypxa39uh5tlh3mbocffw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).