public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Is there a way to make Pandoc ignore unknown LaTeX macros?
@ 2019-05-01 20:05 nstgc379-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: nstgc379-Re5JQEeQqe8AvxtiuMwx3w @ 2019-05-01 20:05 UTC (permalink / raw)
  To: pandoc-discuss


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

I've read through the user's manual twice, and haven't been able to find 
anything that might allow me to keep Pandoc from removing those LaTeX 
macros it doesn't know what to do with? I can deal with those on my own 
with a simple find and replace, but only if Pandoc doesn't remove them.

-- 
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/b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Is there a way to make Pandoc ignore unknown LaTeX macros?
       [not found] ` <b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-05-01 20:19   ` BPJ
       [not found]     ` <CADAJKhBFg+ewF-WNNtm5hTdidi8iune0HiG_FX2v1a0V=3vPgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: BPJ @ 2019-05-01 20:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

I think you are looking for this:

https://pandoc.org/MANUAL.html#extension-raw_tex

Options -f latex+raw_tex -t markdown+raw_tex should preserve all "unknown"
LaTeX when converting from LaTeX to Markdown.




Den ons 1 maj 2019 22:06 <nstgc379-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> I've read through the user's manual twice, and haven't been able to find
> anything that might allow me to keep Pandoc from removing those LaTeX
> macros it doesn't know what to do with? I can deal with those on my own
> with a simple find and replace, but only if Pandoc doesn't remove them.
>
> --
> 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/b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CADAJKhBFg%2BewF-WNNtm5hTdidi8iune0HiG_FX2v1a0V%3D3vPgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 3217 bytes --]

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

* Re: Is there a way to make Pandoc ignore unknown LaTeX macros?
       [not found]     ` <CADAJKhBFg+ewF-WNNtm5hTdidi8iune0HiG_FX2v1a0V=3vPgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-05-01 20:38       ` nstgc379-Re5JQEeQqe8AvxtiuMwx3w
       [not found]         ` <d815b4d6-f2e6-4b11-81c6-29e0e2bf2e86-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: nstgc379-Re5JQEeQqe8AvxtiuMwx3w @ 2019-05-01 20:38 UTC (permalink / raw)
  To: pandoc-discuss


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

That did not work.

\chapter{test}

\myMacro
 then 
pandoc -f latex+raw_tex -t html+raw_tex -o test.html test.tex
returned
<h1 id="test">test</h1>


In case that minimal working example is too minimal, I also tested it on 
the actual chapter file.



On Wednesday, May 1, 2019 at 4:20:07 PM UTC-4, BP wrote:
>
> I think you are looking for this:
>
> https://pandoc.org/MANUAL.html#extension-raw_tex
>
> Options -f latex+raw_tex -t markdown+raw_tex should preserve all "unknown" 
> LaTeX when converting from LaTeX to Markdown.
>
>
>
>
> Den ons 1 maj 2019 22:06 <nstg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> skrev:
>
>> I've read through the user's manual twice, and haven't been able to find 
>> anything that might allow me to keep Pandoc from removing those LaTeX 
>> macros it doesn't know what to do with? I can deal with those on my own 
>> with a simple find and replace, but only if Pandoc doesn't remove them.
>>
>> -- 
>> 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 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/b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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/d815b4d6-f2e6-4b11-81c6-29e0e2bf2e86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Is there a way to make Pandoc ignore unknown LaTeX macros?
       [not found]         ` <d815b4d6-f2e6-4b11-81c6-29e0e2bf2e86-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-05-01 23:06           ` John MacFarlane
  0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2019-05-01 23:06 UTC (permalink / raw)
  To: nstgc379-Re5JQEeQqe8AvxtiuMwx3w, pandoc-discuss


You're converting to HTML.  HTML doesn't render raw
tex (the +raw_tex extension doesn't do anything).

If you convert to native, you'll see that the unknown
macro is indeed parsed:

% pandoc -f latex+raw_tex -t native
\mymacro
^D
[RawBlock (Format "latex") "\\mymacro"]

You can use a lua filter (or regular json filter) to
convert these raw tex blocks to raw HTML or other
pandoc block constructions.

If it's a macro, you can also try including the
macro definition; pandoc will parse and expand it.

% pandoc -f latex+raw_tex -t native
\newcommand{\mymacro}{Hi there}

\mymacro
^D
[Para [Str "Hi",Space,Str "there"]]

nstgc379-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org writes:

> That did not work.
>
> \chapter{test}
>
> \myMacro
>  then 
> pandoc -f latex+raw_tex -t html+raw_tex -o test.html test.tex
> returned
> <h1 id="test">test</h1>
>
>
> In case that minimal working example is too minimal, I also tested it on 
> the actual chapter file.
>


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

end of thread, other threads:[~2019-05-01 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 20:05 Is there a way to make Pandoc ignore unknown LaTeX macros? nstgc379-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <b7e8d1f5-81ed-4328-bb6e-dceb9a057fe2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-01 20:19   ` BPJ
     [not found]     ` <CADAJKhBFg+ewF-WNNtm5hTdidi8iune0HiG_FX2v1a0V=3vPgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-01 20:38       ` nstgc379-Re5JQEeQqe8AvxtiuMwx3w
     [not found]         ` <d815b4d6-f2e6-4b11-81c6-29e0e2bf2e86-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-01 23:06           ` 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).