* inline latex being escaped
@ 2015-07-02 19:43 Jeff Larkin
[not found] ` <32fdb0b6-daa1-49d8-b9e1-c3731102d5a3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Larkin @ 2015-07-02 19:43 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1.1: Type: text/plain, Size: 1459 bytes --]
Hi all. I've been using pandoc to convert markdown files into a pdf book. I
want to be able to highlight certain paragraphs, so I've created a custom
latex range called bestpractice. When I try to embed it in my document, the
interpreter seems to escape the opening slash rather than passing the
command through.
\begin{bestpractice}
This is the *markdown* text.
\end{bestpractice}
When I generate the PDF or the intermediate .tex, the opening slash is
escaped, so the command isn't executed. I've tried working around this
using both the raw_tex and latex_macros extensions, but can't seem to find
a solution. I've even tried adding an extra blank line between the command
and the contained text and also \\begin{}. Other latex commands, like
\appendix work. I'm using pandoc 1.13.1. Thank you for any suggestions,
I've been pulling my hair out trying to get this working.
--
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/32fdb0b6-daa1-49d8-b9e1-c3731102d5a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 1934 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inline latex being escaped
[not found] ` <32fdb0b6-daa1-49d8-b9e1-c3731102d5a3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-07-02 20:58 ` Thell Fowler
[not found] ` <95951b6c-20e3-4bcb-8545-7211677f6b63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Thell Fowler @ 2015-07-02 20:58 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1.1: Type: text/plain, Size: 1275 bytes --]
On Thursday, July 2, 2015 at 2:43:01 PM UTC-5, Jeff Larkin wrote:
>
> Hi all. I've been using pandoc to convert markdown files into a pdf book.
> I want to be able to highlight certain paragraphs, so I've created a custom
> latex range called bestpractice. When I try to embed it in my document, the
> interpreter seems to escape the opening slash rather than passing the
> command through.
>
> \begin{bestpractice}
> This is the *markdown* text.
> \end{bestpractice}
>
> Pandoc passes those latex blocks as-is to latex, to get them processed as
markdown you can do something like...
\def{bbp}{\begin{bestpractice}}
\def{ebp}{\end{bestpractice}}
\bbp
This is the *markdown* text.
\ebp
--
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/95951b6c-20e3-4bcb-8545-7211677f6b63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 4223 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inline latex being escaped
[not found] ` <95951b6c-20e3-4bcb-8545-7211677f6b63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-07-02 21:52 ` BPJ
[not found] ` <CADAJKhCdtVhptXMGV3asyVFgEVWLo-x+NZtxXyMz2837hRh6Kg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: BPJ @ 2015-07-02 21:52 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1: Type: text/plain, Size: 3036 bytes --]
>
> If I understand the OP correctly he •wants* them to be processed as LaTeX
> but they aren't.
>
> To the OP: are those `\begin ... \end` blocks by any chance indented
> (relative to the surrounding text)? If they are rendered as code blocks,
> which may look like what you describe.
>
> BTW you can't use Markdown inside a `\begin ... \end` block; pandoc treats
> everything inside as raw LaTeX.
>
> The workaround, if you want one, is to use `\let` in your LaTeX preamble
> to define aliases for `\begin` and `\end` which will be accepted by LaTeX
> but will fool pandoc:
>
> In your LaTeX preamble:
> (note the case change!)
>
> \let\Begin\begin
> \let\End\end
>
> In your Markdown:
>
> \Begin{foo}
>
> Content *with* Markdown!
>
> \End{foo}
>
> ote the blank lines around the content which are necessary since pandoc
> sees `\Begin{foo}` and `\End{foo}` as inline LaTeX, so they need to be in
> their own (pandoc) paragraphs.
>
> torsdag 2 juli 2015 skrev Thell Fowler <tbfowler4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
>
> On Thursday, July 2, 2015 at 2:43:01 PM UTC-5, Jeff Larkin wrote:
> Hi all. I've been using pandoc to convert markdown files into a pdf book.
> I want to be able to highlight certain paragraphs, so I've created a custom
> latex range called bestpractice. When I try to embed it in my document, the
> interpreter seems to escape the opening slash rather than passing the
> command through.
>
> \begin{bestpractice}
> This is the *markdown* text.
> \end{bestpractice}
>
> Pandoc passes those latex blocks as-is to latex, to get them processed as
> markdown you can do something like...
>
> \def{bbp}{\begin{bestpractice}}
>
>
> \def{ebp}{\end{bestpractice}}
>
>
> \bbp
>
>
> This is the *markdown* text.
>
>
> \ebp
>
>
> --
> 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/95951b6c-20e3-4bcb-8545-7211677f6b63%40googlegroups.com
> .
> For more options, visit 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/CADAJKhCdtVhptXMGV3asyVFgEVWLo-x%2BNZtxXyMz2837hRh6Kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 4424 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inline latex being escaped
[not found] ` <CADAJKhCdtVhptXMGV3asyVFgEVWLo-x+NZtxXyMz2837hRh6Kg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-07-06 14:02 ` Jeff Larkin
[not found] ` <54388edb-22cc-4a7c-b1f8-8b913cdd920a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Larkin @ 2015-07-06 14:02 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: bpj-J3H7GcXPSITLoDKTGw+V6w
[-- Attachment #1.1: Type: text/plain, Size: 3575 bytes --]
You read correctly, in my case the markdown is being interpreted rather
than the latex. It's not indented, but I wonder if the use of markdown
within that block is causing the code to be incorrectly escaped. I'll try
your workaround today, thanks for posting it. I think I eventually want to
move this into a filter so that I can generate either latex or HTML.
On Thursday, July 2, 2015 at 5:52:38 PM UTC-4, BPJ wrote:
>
> If I understand the OP correctly he •wants* them to be processed as LaTeX
>> but they aren't.
>>
>> To the OP: are those `\begin ... \end` blocks by any chance indented
>> (relative to the surrounding text)? If they are rendered as code blocks,
>> which may look like what you describe.
>>
>> BTW you can't use Markdown inside a `\begin ... \end` block; pandoc
>> treats everything inside as raw LaTeX.
>>
>> The workaround, if you want one, is to use `\let` in your LaTeX preamble
>> to define aliases for `\begin` and `\end` which will be accepted by LaTeX
>> but will fool pandoc:
>>
>> In your LaTeX preamble:
>> (note the case change!)
>>
>> \let\Begin\begin
>> \let\End\end
>>
>> In your Markdown:
>>
>> \Begin{foo}
>>
>> Content *with* Markdown!
>>
>> \End{foo}
>>
>> ote the blank lines around the content which are necessary since pandoc
>> sees `\Begin{foo}` and `\End{foo}` as inline LaTeX, so they need to be in
>> their own (pandoc) paragraphs.
>>
>> torsdag 2 juli 2015 skrev Thell Fowler <tbfo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>>:
>>
>>
>> On Thursday, July 2, 2015 at 2:43:01 PM UTC-5, Jeff Larkin wrote:
>> Hi all. I've been using pandoc to convert markdown files into a pdf book.
>> I want to be able to highlight certain paragraphs, so I've created a custom
>> latex range called bestpractice. When I try to embed it in my document, the
>> interpreter seems to escape the opening slash rather than passing the
>> command through.
>>
>> \begin{bestpractice}
>> This is the *markdown* text.
>> \end{bestpractice}
>>
>> Pandoc passes those latex blocks as-is to latex, to get them processed as
>> markdown you can do something like...
>>
>> \def{bbp}{\begin{bestpractice}}
>>
>>
>> \def{ebp}{\end{bestpractice}}
>>
>>
>> \bbp
>>
>>
>> This is the *markdown* text.
>>
>>
>> \ebp
>>
>>
>> --
>> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/95951b6c-20e3-4bcb-8545-7211677f6b63%40googlegroups.com
>> .
>> For more options, visit 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/54388edb-22cc-4a7c-b1f8-8b913cdd920a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 5884 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inline latex being escaped
[not found] ` <54388edb-22cc-4a7c-b1f8-8b913cdd920a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-07-06 14:14 ` Jeff Larkin
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Larkin @ 2015-07-06 14:14 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: bpj-J3H7GcXPSITLoDKTGw+V6w
[-- Attachment #1.1: Type: text/plain, Size: 3761 bytes --]
That workaround did the trick. Thanks for the help!!
On Monday, July 6, 2015 at 10:02:14 AM UTC-4, Jeff Larkin wrote:
>
> You read correctly, in my case the markdown is being interpreted rather
> than the latex. It's not indented, but I wonder if the use of markdown
> within that block is causing the code to be incorrectly escaped. I'll try
> your workaround today, thanks for posting it. I think I eventually want to
> move this into a filter so that I can generate either latex or HTML.
>
> On Thursday, July 2, 2015 at 5:52:38 PM UTC-4, BPJ wrote:
>>
>> If I understand the OP correctly he •wants* them to be processed as LaTeX
>>> but they aren't.
>>>
>>> To the OP: are those `\begin ... \end` blocks by any chance indented
>>> (relative to the surrounding text)? If they are rendered as code blocks,
>>> which may look like what you describe.
>>>
>>> BTW you can't use Markdown inside a `\begin ... \end` block; pandoc
>>> treats everything inside as raw LaTeX.
>>>
>>> The workaround, if you want one, is to use `\let` in your LaTeX preamble
>>> to define aliases for `\begin` and `\end` which will be accepted by LaTeX
>>> but will fool pandoc:
>>>
>>> In your LaTeX preamble:
>>> (note the case change!)
>>>
>>> \let\Begin\begin
>>> \let\End\end
>>>
>>> In your Markdown:
>>>
>>> \Begin{foo}
>>>
>>> Content *with* Markdown!
>>>
>>> \End{foo}
>>>
>>> ote the blank lines around the content which are necessary since pandoc
>>> sees `\Begin{foo}` and `\End{foo}` as inline LaTeX, so they need to be in
>>> their own (pandoc) paragraphs.
>>>
>>> torsdag 2 juli 2015 skrev Thell Fowler <tbfo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>>>
>>>
>>> On Thursday, July 2, 2015 at 2:43:01 PM UTC-5, Jeff Larkin wrote:
>>> Hi all. I've been using pandoc to convert markdown files into a pdf
>>> book. I want to be able to highlight certain paragraphs, so I've created a
>>> custom latex range called bestpractice. When I try to embed it in my
>>> document, the interpreter seems to escape the opening slash rather than
>>> passing the command through.
>>>
>>> \begin{bestpractice}
>>> This is the *markdown* text.
>>> \end{bestpractice}
>>>
>>> Pandoc passes those latex blocks as-is to latex, to get them processed
>>> as markdown you can do something like...
>>>
>>> \def{bbp}{\begin{bestpractice}}
>>>
>>>
>>> \def{ebp}{\end{bestpractice}}
>>>
>>>
>>> \bbp
>>>
>>>
>>> This is the *markdown* text.
>>>
>>>
>>> \ebp
>>>
>>>
>>> --
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/95951b6c-20e3-4bcb-8545-7211677f6b63%40googlegroups.com
>>> .
>>> For more options, visit 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/a76e7a95-c018-4ac1-bd72-57954cabf740%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 5672 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-06 14:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02 19:43 inline latex being escaped Jeff Larkin
[not found] ` <32fdb0b6-daa1-49d8-b9e1-c3731102d5a3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-02 20:58 ` Thell Fowler
[not found] ` <95951b6c-20e3-4bcb-8545-7211677f6b63-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-02 21:52 ` BPJ
[not found] ` <CADAJKhCdtVhptXMGV3asyVFgEVWLo-x+NZtxXyMz2837hRh6Kg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-06 14:02 ` Jeff Larkin
[not found] ` <54388edb-22cc-4a7c-b1f8-8b913cdd920a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-06 14:14 ` Jeff Larkin
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).