public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: "kurt.pfeifle via pandoc-discuss"
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: YAML block to carry LaTeX font details -- how do I preserve '{' and ‘}‘ ?
Date: Sat, 9 Apr 2016 19:39:30 -0700	[thread overview]
Message-ID: <20160410023930.GA96031@MacBook-Air-2.local> (raw)
In-Reply-To: <6c4977e8-6dca-4d33-a44b-a72a31603e60-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

See BP Johnson's suggestions (recently in this list) about
using a dummy latex macro to protect text from being
interpreted as Markdown.

+++ kurt.pfeifle via pandoc-discuss [Apr 09 16 15:34 ]:
>   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:
>
>   [1][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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [4]https://groups.google.com/d/msgid/pandoc-discuss/6c4977e8-6dca-4d33-
>   a44b-a72a31603e60%40googlegroups.com.
>   For more options, visit [5]https://groups.google.com/d/optout.
>
>References
>
>   1. https://lh3.googleusercontent.com/-rI8n718kiu8/VwmBiyHwHiI/AAAAAAAAAiY/FEjuI3w6YDwCfgEW65d-VRn_DkorZO6Xw/s1600/1.png
>   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. https://groups.google.com/d/msgid/pandoc-discuss/6c4977e8-6dca-4d33-a44b-a72a31603e60-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout

-- 
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/20160410023930.GA96031%40MacBook-Air-2.local.
For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2016-04-10  2:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 22:34 kurt.pfeifle via pandoc-discuss
     [not found] ` <6c4977e8-6dca-4d33-a44b-a72a31603e60-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-10  2:39   ` John MacFarlane [this message]
     [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=20160410023930.GA96031@MacBook-Air-2.local \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=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).