public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Possible bug with defaults and raw latex in header
@ 2020-04-20  8:17 Lyndon Drake
       [not found] ` <bd07e9d0-e3f8-481b-9a3f-3c952b11499c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Lyndon Drake @ 2020-04-20  8:17 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

When I put the following in a YAML block in my Markdown file:

  header-includes:
  - |
    ```{=latex}
    \usepackage{imakeidx}
    ```

it works fine. The same text in a defaults file, in the metadata: section, 
ends up in the LaTeX file after being backslash-escaped.

Is that intended behaviour? If not I'll put a bug report in the issue 
tracker.

Best,
Lyndon

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bd07e9d0-e3f8-481b-9a3f-3c952b11499c%40googlegroups.com.

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

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

* Re: Possible bug with defaults and raw latex in header
       [not found] ` <bd07e9d0-e3f8-481b-9a3f-3c952b11499c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-20 16:31   ` John MacFarlane
       [not found]     ` <m2lfmqp1a0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2020-04-20 16:31 UTC (permalink / raw)
  To: Lyndon Drake, pandoc-discuss


Yes, this is intended. In a markdown file YAML fields are parsed
as Markdown.  So if you want raw LaTeX you need to indicate this
as you do.  In a defaults file metadata section, it works just
like with --metadata-file or --metadata on the command line:
the contents are interpreted as plain strings.

Lyndon Drake <lyndon-S8RYeTzMgQ3QT0dZR+AlfA@public.gmane.org> writes:

> Hi,
>
> When I put the following in a YAML block in my Markdown file:
>
>   header-includes:
>   - |
>     ```{=latex}
>     \usepackage{imakeidx}
>     ```
>
> it works fine. The same text in a defaults file, in the metadata: section, 
> ends up in the LaTeX file after being backslash-escaped.
>
> Is that intended behaviour? If not I'll put a bug report in the issue 
> tracker.
>
> Best,
> Lyndon
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bd07e9d0-e3f8-481b-9a3f-3c952b11499c%40googlegroups.com.


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

* Re: Possible bug with defaults and raw latex in header
       [not found]     ` <m2lfmqp1a0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-04-20 20:51       ` Lyndon Drake
       [not found]         ` <28a7dbf5-113c-4287-be57-96996e083406-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Lyndon Drake @ 2020-04-20 20:51 UTC (permalink / raw)
  To: pandoc-discuss


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

For clarity, this is what ends up in the LaTeX file:

\textbackslash usepackage\{imakeidx\}

Is there a way to include raw LaTeX in the defaults file, and avoid having 
it escaped (the \textbackslash etc. in there)?

What's the best way to include raw LaTeX using a defaults file?

Best,
Lyndon

On Tuesday, 21 April 2020 04:31:19 UTC+12, John MacFarlane wrote:
>
>
> Yes, this is intended. In a markdown file YAML fields are parsed 
> as Markdown.  So if you want raw LaTeX you need to indicate this 
> as you do.  In a defaults file metadata section, it works just 
> like with --metadata-file or --metadata on the command line: 
> the contents are interpreted as plain strings. 
>
> Lyndon Drake <lyn...-S8RYeTzMgQ3QT0dZR+AlfA@public.gmane.org <javascript:>> writes: 
>
> > Hi, 
> > 
> > When I put the following in a YAML block in my Markdown file: 
> > 
> >   header-includes: 
> >   - | 
> >     ```{=latex} 
> >     \usepackage{imakeidx} 
> >     ``` 
> > 
> > it works fine. The same text in a defaults file, in the metadata: 
> section, 
> > ends up in the LaTeX file after being backslash-escaped. 
> > 
> > Is that intended behaviour? If not I'll put a bug report in the issue 
> > tracker. 
> > 
> > Best, 
> > Lyndon 
> > 
> > -- 
> > 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/bd07e9d0-e3f8-481b-9a3f-3c952b11499c%40googlegroups.com. 
>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/28a7dbf5-113c-4287-be57-96996e083406%40googlegroups.com.

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

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

* Re: Possible bug with defaults and raw latex in header
       [not found]         ` <28a7dbf5-113c-4287-be57-96996e083406-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-20 21:21           ` John MacFarlane
  0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2020-04-20 21:21 UTC (permalink / raw)
  To: Lyndon Drake, pandoc-discuss


Put it in header-includes in variables. Anything in variables in
the defaults file will be passed verbatim to the template. This
material is not really metadata, anyway, so it doesn't
conceptually belong there.

Lyndon Drake <lyndon-S8RYeTzMgQ3QT0dZR+AlfA@public.gmane.org> writes:

> For clarity, this is what ends up in the LaTeX file:
>
> \textbackslash usepackage\{imakeidx\}
>
> Is there a way to include raw LaTeX in the defaults file, and avoid having 
> it escaped (the \textbackslash etc. in there)?
>
> What's the best way to include raw LaTeX using a defaults file?
>
> Best,
> Lyndon
>
> On Tuesday, 21 April 2020 04:31:19 UTC+12, John MacFarlane wrote:
>>
>>
>> Yes, this is intended. In a markdown file YAML fields are parsed 
>> as Markdown.  So if you want raw LaTeX you need to indicate this 
>> as you do.  In a defaults file metadata section, it works just 
>> like with --metadata-file or --metadata on the command line: 
>> the contents are interpreted as plain strings. 
>>
>> Lyndon Drake <lyn...-S8RYeTzMgQ3QT0dZR+AlfA@public.gmane.org <javascript:>> writes: 
>>
>> > Hi, 
>> > 
>> > When I put the following in a YAML block in my Markdown file: 
>> > 
>> >   header-includes: 
>> >   - | 
>> >     ```{=latex} 
>> >     \usepackage{imakeidx} 
>> >     ``` 
>> > 
>> > it works fine. The same text in a defaults file, in the metadata: 
>> section, 
>> > ends up in the LaTeX file after being backslash-escaped. 
>> > 
>> > Is that intended behaviour? If not I'll put a bug report in the issue 
>> > tracker. 
>> > 
>> > Best, 
>> > Lyndon 
>> > 
>> > -- 
>> > 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/bd07e9d0-e3f8-481b-9a3f-3c952b11499c%40googlegroups.com. 
>>
>>
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/28a7dbf5-113c-4287-be57-96996e083406%40googlegroups.com.


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

end of thread, other threads:[~2020-04-20 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20  8:17 Possible bug with defaults and raw latex in header Lyndon Drake
     [not found] ` <bd07e9d0-e3f8-481b-9a3f-3c952b11499c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-20 16:31   ` John MacFarlane
     [not found]     ` <m2lfmqp1a0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-20 20:51       ` Lyndon Drake
     [not found]         ` <28a7dbf5-113c-4287-be57-96996e083406-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-20 21:21           ` John MacFarlane

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