public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* LaTeX Headers/Macros in pandoc conversion
@ 2015-01-09 18:27 Mike Hynes
       [not found] ` <90cb9924-0ed1-441a-8ef2-f2e3928a165c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 18:27 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Hello,

I am trying to use pandoc to convert my latex files into other doc types, 
mainly html and doc.

My latex documents generally have the following format:

\input{header}
\begin{document}
   body text as usual
\end{document}

The file header.tex is either contained in the same directory, or in 
~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros 
such as:

\newcommand{\FIG}[3]{
\begin{figure}[h!] 
\centering 
\includegraphics[width=#2\columnwidth,angle=0]{#1} 
\caption{#3}
\label{fig:#1}
\end{figure} 
} 

That is, I use almost *no* latex commands in my writing, and make frequent 
use of macros to simplify inclusion tables, figures, algorithms, 
mathematical formulae, etc.

I would like to run pandoc on such documents, but am having trouble. My 
macros are not getting parsed, and when I run pandoc with 
--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I often 
just have the file echoed back to with, without any conversion of the 
specified input files.

Can someone please direct me to the most efficient way of processing my tex 
files, given their macro-heavy format? I can't seem to find the correct 
flags in the documentation for what I'm trying to do.

Thanks

-- 
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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found] ` <90cb9924-0ed1-441a-8ef2-f2e3928a165c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-09 18:44   ` Matthew Pickering
       [not found]     ` <CALuQ0m_pvBqPZvXnOjsT8+Ev5+xRKz8osw_zVuhW=sKMGESz9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2015-01-09 19:33   ` John MacFarlane
  1 sibling, 1 reply; 14+ messages in thread
From: Matthew Pickering @ 2015-01-09 18:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Can you please provide a small complete example which shows the problem?


On Fri, Jan 9, 2015 at 6:27 PM, Mike Hynes <91mbbh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello,
>
> I am trying to use pandoc to convert my latex files into other doc types,
> mainly html and doc.
>
> My latex documents generally have the following format:
>
> \input{header}
> \begin{document}
>    body text as usual
> \end{document}
>
> The file header.tex is either contained in the same directory, or in
> ~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros
> such as:
>
> \newcommand{\FIG}[3]{
> \begin{figure}[h!]
> \centering
> \includegraphics[width=#2\columnwidth,angle=0]{#1}
> \caption{#3}
> \label{fig:#1}
> \end{figure}
> }
>
> That is, I use almost *no* latex commands in my writing, and make frequent
> use of macros to simplify inclusion tables, figures, algorithms,
> mathematical formulae, etc.
>
> I would like to run pandoc on such documents, but am having trouble. My
> macros are not getting parsed, and when I run pandoc with
> --template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I often
> just have the file echoed back to with, without any conversion of the
> specified input files.
>
> Can someone please direct me to the most efficient way of processing my tex
> files, given their macro-heavy format? I can't seem to find the correct
> flags in the documentation for what I'm trying to do.
>
> Thanks
>
> --
> 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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]     ` <CALuQ0m_pvBqPZvXnOjsT8+Ev5+xRKz8osw_zVuhW=sKMGESz9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-09 19:11       ` Mike Hynes
       [not found]         ` <ef300118-1ee9-4e4e-8cb8-1cc47dc4d192-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 19:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Certainly---please see below:

Sample header=myhead.tex: http://pastie.org/9822676#
Sample file=test.tex: http://pastie.org/9822685
Sample image=test.jpg (attached; it's just someone from google images)

Running:
>> pandoc --listings test.tex -o test_out.tex
produces just the body of test.tex, with my macros excluded (and no 
equation environment).

Running:
>> pandoc -s --listings test.tex -o test_out.tex
produces almost the same, except the default header is included (no macros, 
however).

Running:
>> pandox -s --listings --template=myhead.tex test.tex -o test_out.tex
simply echoes back myhead.tex


On Friday, 9 January 2015 13:44:31 UTC-5, Matthew Pickering wrote:
>
> Can you please provide a small complete example which shows the problem? 
>
>
> On Fri, Jan 9, 2015 at 6:27 PM, Mike Hynes <91m...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> 
> wrote: 
> > Hello, 
> > 
> > I am trying to use pandoc to convert my latex files into other doc 
> types, 
> > mainly html and doc. 
> > 
> > My latex documents generally have the following format: 
> > 
> > \input{header} 
> > \begin{document} 
> >    body text as usual 
> > \end{document} 
> > 
> > The file header.tex is either contained in the same directory, or in 
> > ~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros 
> > such as: 
> > 
> > \newcommand{\FIG}[3]{ 
> > \begin{figure}[h!] 
> > \centering 
> > \includegraphics[width=#2\columnwidth,angle=0]{#1} 
> > \caption{#3} 
> > \label{fig:#1} 
> > \end{figure} 
> > } 
> > 
> > That is, I use almost *no* latex commands in my writing, and make 
> frequent 
> > use of macros to simplify inclusion tables, figures, algorithms, 
> > mathematical formulae, etc. 
> > 
> > I would like to run pandoc on such documents, but am having trouble. My 
> > macros are not getting parsed, and when I run pandoc with 
> > --template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I 
> often 
> > just have the file echoed back to with, without any conversion of the 
> > specified input files. 
> > 
> > Can someone please direct me to the most efficient way of processing my 
> tex 
> > files, given their macro-heavy format? I can't seem to find the correct 
> > flags in the documentation for what I'm trying to do. 
> > 
> > Thanks 
> > 
> > -- 
> > 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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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/ef300118-1ee9-4e4e-8cb8-1cc47dc4d192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

[-- Attachment #2: test.jpg --]
[-- Type: image/jpeg, Size: 2445 bytes --]

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]         ` <ef300118-1ee9-4e4e-8cb8-1cc47dc4d192-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-09 19:13           ` Mike Hynes
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 19:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Small typo; should be \input{myhead} in test.tex:
http://pastie.org/9822702

-- 
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/78956143-7463-4a54-829a-33aa24ae5875%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found] ` <90cb9924-0ed1-441a-8ef2-f2e3928a165c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-01-09 18:44   ` Matthew Pickering
@ 2015-01-09 19:33   ` John MacFarlane
       [not found]     ` <20150109193307.GA90254-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: John MacFarlane @ 2015-01-09 19:33 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

What pandoc version are you using?

`\input` should be supported, but you'd need `header.tex` to be in the
working directory.

You can also try simply putting `header.tex` on the command line:

    pandoc header.tex main.tex

This produces the same output as if you had the contents of
`header.tex` at the beginning of `main.tex`.


+++ Mike Hynes [Jan 09 15 10:27 ]:
>Hello,
>
>I am trying to use pandoc to convert my latex files into other doc types,
>mainly html and doc.
>
>My latex documents generally have the following format:
>
>\input{header}
>\begin{document}
>   body text as usual
>\end{document}
>
>The file header.tex is either contained in the same directory, or in
>~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros
>such as:
>
>\newcommand{\FIG}[3]{
>\begin{figure}[h!]
>\centering
>\includegraphics[width=#2\columnwidth,angle=0]{#1}
>\caption{#3}
>\label{fig:#1}
>\end{figure}
>}
>
>That is, I use almost *no* latex commands in my writing, and make frequent
>use of macros to simplify inclusion tables, figures, algorithms,
>mathematical formulae, etc.
>
>I would like to run pandoc on such documents, but am having trouble. My
>macros are not getting parsed, and when I run pandoc with
>--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I often
>just have the file echoed back to with, without any conversion of the
>specified input files.
>
>Can someone please direct me to the most efficient way of processing my tex
>files, given their macro-heavy format? I can't seem to find the correct
>flags in the documentation for what I'm trying to do.
>
>Thanks
>
>-- 
>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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]     ` <20150109193307.GA90254-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2015-01-09 20:12       ` Mike Hynes
       [not found]         ` <039f5de8-68e3-42a7-9f9c-cdc6bde24bc4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 20:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Version: 

>> pandoc -v
pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate 0.5.11.1. 
Syntax highlighting is supported for the following languages: abc, 
actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c, 
changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, 
curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd, 
eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go, 
haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp, 
julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4, 
makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki, 
metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb, 
objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike, 
postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml, 
roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, 
sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul, 
yacc, yaml, zsh Default user data directory: /home//mike/.pandoc Copyright 
(C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc This is 
free software; see the source for copying conditions. There is no warranty, 
not even for merchantability or fitness for a particular purpose. 

>> uname -a
Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014 
x86_64 GNU/Linux 

As for running 
>> pandoc -s --listings header.tex main.tex -o output.tex
I get the same problem (with or without the -s flag) that my macros are not 
processed.

I also commented out the lines:
\documentclass{article}
and
\input{header} 
in the respective files when supplying the files on the commandline to be 
concatenated. The same problem occurs: my macros are not expanded. With the 
-s flag, I will see my macro definitions in the output file, but any 
reference to them in the body is obliterated.

Thank you for your time---any ideas you have are appreciated.


On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote:
>
> What pandoc version are you using? 
>
> `\input` should be supported, but you'd need `header.tex` to be in the 
> working directory. 
>
> You can also try simply putting `header.tex` on the command line: 
>
>     pandoc header.tex main.tex 
>
> This produces the same output as if you had the contents of 
> `header.tex` at the beginning of `main.tex`. 
>
>
> +++ Mike Hynes [Jan 09 15 10:27 ]: 
> >Hello, 
> > 
> >I am trying to use pandoc to convert my latex files into other doc types, 
> >mainly html and doc. 
> > 
> >My latex documents generally have the following format: 
> > 
> >\input{header} 
> >\begin{document} 
> >   body text as usual 
> >\end{document} 
> > 
> >The file header.tex is either contained in the same directory, or in 
> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros 
> >such as: 
> > 
> >\newcommand{\FIG}[3]{ 
> >\begin{figure}[h!] 
> >\centering 
> >\includegraphics[width=#2\columnwidth,angle=0]{#1} 
> >\caption{#3} 
> >\label{fig:#1} 
> >\end{figure} 
> >} 
> > 
> >That is, I use almost *no* latex commands in my writing, and make 
> frequent 
> >use of macros to simplify inclusion tables, figures, algorithms, 
> >mathematical formulae, etc. 
> > 
> >I would like to run pandoc on such documents, but am having trouble. My 
> >macros are not getting parsed, and when I run pandoc with 
> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I often 
> >just have the file echoed back to with, without any conversion of the 
> >specified input files. 
> > 
> >Can someone please direct me to the most efficient way of processing my 
> tex 
> >files, given their macro-heavy format? I can't seem to find the correct 
> >flags in the documentation for what I'm trying to do. 
> > 
> >Thanks 
> > 
> >-- 
> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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/039f5de8-68e3-42a7-9f9c-cdc6bde24bc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]         ` <039f5de8-68e3-42a7-9f9c-cdc6bde24bc4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-09 20:22           ` Mike Hynes
       [not found]             ` <40a476ba-e1a8-413e-ab7e-584f21f70101-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 20:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

I should also mention that even just concatenating my header and body files 
into the classic latex slurry produces the same effect: no \FIG macros.

I've also defined a simple, no-parameter testing macro:
\newcommand{\varName}{TESTMACRO!}

This does not get converted correctly using pandoc; the macro is removed 
entirely if it is contained simply in text, as in \varName\ in the current 
sentence. If I write $\varName$, my macros appears as: the following in the 
output file: \(\varName\).

This seems like a strange bug to me---is no \newcommand supported? Or have 
I not supplied the correct flags to pandoc?

On Friday, January 9, 2015 at 3:12:58 PM UTC-5, Mike Hynes wrote:
>
> Version: 
>
> >> pandoc -v
> pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate 0.5.11.1. 
> Syntax highlighting is supported for the following languages: abc, 
> actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c, 
> changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, 
> curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd, 
> eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go, 
> haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp, 
> julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4, 
> makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki, 
> metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb, 
> objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike, 
> postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml, 
> roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, 
> sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul, 
> yacc, yaml, zsh Default user data directory: /home//mike/.pandoc Copyright 
> (C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc This 
> is free software; see the source for copying conditions. There is no 
> warranty, not even for merchantability or fitness for a particular purpose. 
>
> >> uname -a
> Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014 
> x86_64 GNU/Linux 
>
> As for running 
> >> pandoc -s --listings header.tex main.tex -o output.tex
> I get the same problem (with or without the -s flag) that my macros are 
> not processed.
>
> I also commented out the lines:
> \documentclass{article}
> and
> \input{header} 
> in the respective files when supplying the files on the commandline to be 
> concatenated. The same problem occurs: my macros are not expanded. With the 
> -s flag, I will see my macro definitions in the output file, but any 
> reference to them in the body is obliterated.
>
> Thank you for your time---any ideas you have are appreciated.
>
>
> On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote:
>>
>> What pandoc version are you using? 
>>
>> `\input` should be supported, but you'd need `header.tex` to be in the 
>> working directory. 
>>
>> You can also try simply putting `header.tex` on the command line: 
>>
>>     pandoc header.tex main.tex 
>>
>> This produces the same output as if you had the contents of 
>> `header.tex` at the beginning of `main.tex`. 
>>
>>
>> +++ Mike Hynes [Jan 09 15 10:27 ]: 
>> >Hello, 
>> > 
>> >I am trying to use pandoc to convert my latex files into other doc 
>> types, 
>> >mainly html and doc. 
>> > 
>> >My latex documents generally have the following format: 
>> > 
>> >\input{header} 
>> >\begin{document} 
>> >   body text as usual 
>> >\end{document} 
>> > 
>> >The file header.tex is either contained in the same directory, or in 
>> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros 
>> >such as: 
>> > 
>> >\newcommand{\FIG}[3]{ 
>> >\begin{figure}[h!] 
>> >\centering 
>> >\includegraphics[width=#2\columnwidth,angle=0]{#1} 
>> >\caption{#3} 
>> >\label{fig:#1} 
>> >\end{figure} 
>> >} 
>> > 
>> >That is, I use almost *no* latex commands in my writing, and make 
>> frequent 
>> >use of macros to simplify inclusion tables, figures, algorithms, 
>> >mathematical formulae, etc. 
>> > 
>> >I would like to run pandoc on such documents, but am having trouble. My 
>> >macros are not getting parsed, and when I run pandoc with 
>> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I 
>> often 
>> >just have the file echoed back to with, without any conversion of the 
>> >specified input files. 
>> > 
>> >Can someone please direct me to the most efficient way of processing my 
>> tex 
>> >files, given their macro-heavy format? I can't seem to find the correct 
>> >flags in the documentation for what I'm trying to do. 
>> > 
>> >Thanks 
>> > 
>> >-- 
>> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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/40a476ba-e1a8-413e-ab7e-584f21f70101%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]             ` <40a476ba-e1a8-413e-ab7e-584f21f70101-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-09 22:31               ` Matthew Pickering
       [not found]                 ` <CALuQ0m9YSVo7qSaUZg2nf+3JnUL7aN-tscHMt1xONj2dCUe5fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Matthew Pickering @ 2015-01-09 22:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

\newcommand is supported.

Does the simple file not work for you

```
\newcommand{\varName}{TESTMACRO!}
\varName
```

?

On Fri, Jan 9, 2015 at 8:22 PM, Mike Hynes <91mbbh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I should also mention that even just concatenating my header and body files
> into the classic latex slurry produces the same effect: no \FIG macros.
>
> I've also defined a simple, no-parameter testing macro:
> \newcommand{\varName}{TESTMACRO!}
>
> This does not get converted correctly using pandoc; the macro is removed
> entirely if it is contained simply in text, as in \varName\ in the current
> sentence. If I write $\varName$, my macros appears as: the following in the
> output file: \(\varName\).
>
> This seems like a strange bug to me---is no \newcommand supported? Or have I
> not supplied the correct flags to pandoc?
>
>
> On Friday, January 9, 2015 at 3:12:58 PM UTC-5, Mike Hynes wrote:
>>
>> Version:
>>
>> >> pandoc -v
>> pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate 0.5.11.1.
>> Syntax highlighting is supported for the following languages: abc,
>> actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
>> changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
>> curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
>> eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go,
>> haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp,
>> julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4,
>> makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
>> metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
>> objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike,
>> postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml,
>> roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
>> sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
>> yacc, yaml, zsh Default user data directory: /home//mike/.pandoc Copyright
>> (C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc This is
>> free software; see the source for copying conditions. There is no warranty,
>> not even for merchantability or fitness for a particular purpose.
>>
>> >> uname -a
>> Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014
>> x86_64 GNU/Linux
>>
>> As for running
>> >> pandoc -s --listings header.tex main.tex -o output.tex
>> I get the same problem (with or without the -s flag) that my macros are
>> not processed.
>>
>> I also commented out the lines:
>> \documentclass{article}
>> and
>> \input{header}
>> in the respective files when supplying the files on the commandline to be
>> concatenated. The same problem occurs: my macros are not expanded. With the
>> -s flag, I will see my macro definitions in the output file, but any
>> reference to them in the body is obliterated.
>>
>> Thank you for your time---any ideas you have are appreciated.
>>
>>
>> On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote:
>>>
>>> What pandoc version are you using?
>>>
>>> `\input` should be supported, but you'd need `header.tex` to be in the
>>> working directory.
>>>
>>> You can also try simply putting `header.tex` on the command line:
>>>
>>>     pandoc header.tex main.tex
>>>
>>> This produces the same output as if you had the contents of
>>> `header.tex` at the beginning of `main.tex`.
>>>
>>>
>>> +++ Mike Hynes [Jan 09 15 10:27 ]:
>>> >Hello,
>>> >
>>> >I am trying to use pandoc to convert my latex files into other doc
>>> > types,
>>> >mainly html and doc.
>>> >
>>> >My latex documents generally have the following format:
>>> >
>>> >\input{header}
>>> >\begin{document}
>>> >   body text as usual
>>> >\end{document}
>>> >
>>> >The file header.tex is either contained in the same directory, or in
>>> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used macros
>>> >such as:
>>> >
>>> >\newcommand{\FIG}[3]{
>>> >\begin{figure}[h!]
>>> >\centering
>>> >\includegraphics[width=#2\columnwidth,angle=0]{#1}
>>> >\caption{#3}
>>> >\label{fig:#1}
>>> >\end{figure}
>>> >}
>>> >
>>> >That is, I use almost *no* latex commands in my writing, and make
>>> > frequent
>>> >use of macros to simplify inclusion tables, figures, algorithms,
>>> >mathematical formulae, etc.
>>> >
>>> >I would like to run pandoc on such documents, but am having trouble. My
>>> >macros are not getting parsed, and when I run pandoc with
>>> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I
>>> > often
>>> >just have the file echoed back to with, without any conversion of the
>>> >specified input files.
>>> >
>>> >Can someone please direct me to the most efficient way of processing my
>>> > tex
>>> >files, given their macro-heavy format? I can't seem to find the correct
>>> >flags in the documentation for what I'm trying to do.
>>> >
>>> >Thanks
>>> >
>>> >--
>>> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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/40a476ba-e1a8-413e-ab7e-584f21f70101%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                 ` <CALuQ0m9YSVo7qSaUZg2nf+3JnUL7aN-tscHMt1xONj2dCUe5fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-09 22:43                   ` Mike Hynes
       [not found]                     ` <a7b24022-c931-46ed-a2bf-ae80a3ca79f0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-09 22:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Nope!
Not even a file with only those two statements works; please see above.


On Friday, January 9, 2015 at 5:31:16 PM UTC-5, Matthew Pickering wrote:
>
> \newcommand is supported. 
>
> Does the simple file not work for you 
>
> ``` 
> \newcommand{\varName}{TESTMACRO!} 
> \varName 
> ``` 
>
> ? 
>
> On Fri, Jan 9, 2015 at 8:22 PM, Mike Hynes <91m...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> 
> wrote: 
> > I should also mention that even just concatenating my header and body 
> files 
> > into the classic latex slurry produces the same effect: no \FIG macros. 
> > 
> > I've also defined a simple, no-parameter testing macro: 
> > \newcommand{\varName}{TESTMACRO!} 
> > 
> > This does not get converted correctly using pandoc; the macro is removed 
> > entirely if it is contained simply in text, as in \varName\ in the 
> current 
> > sentence. If I write $\varName$, my macros appears as: the following in 
> the 
> > output file: \(\varName\). 
> > 
> > This seems like a strange bug to me---is no \newcommand supported? Or 
> have I 
> > not supplied the correct flags to pandoc? 
> > 
> > 
> > On Friday, January 9, 2015 at 3:12:58 PM UTC-5, Mike Hynes wrote: 
> >> 
> >> Version: 
> >> 
> >> >> pandoc -v 
> >> pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate 
> 0.5.11.1. 
> >> Syntax highlighting is supported for the following languages: abc, 
> >> actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c, 
> >> changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, 
> css, 
> >> curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, 
> dtd, 
> >> eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, 
> go, 
> >> haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp, 
> >> julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4, 
> >> makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki, 
> >> metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb, 
> >> objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, 
> pike, 
> >> postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, 
> rhtml, 
> >> roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, 
> >> sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul, 
> >> yacc, yaml, zsh Default user data directory: /home//mike/.pandoc 
> Copyright 
> >> (C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc 
> This is 
> >> free software; see the source for copying conditions. There is no 
> warranty, 
> >> not even for merchantability or fitness for a particular purpose. 
> >> 
> >> >> uname -a 
> >> Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014 
> >> x86_64 GNU/Linux 
> >> 
> >> As for running 
> >> >> pandoc -s --listings header.tex main.tex -o output.tex 
> >> I get the same problem (with or without the -s flag) that my macros are 
> >> not processed. 
> >> 
> >> I also commented out the lines: 
> >> \documentclass{article} 
> >> and 
> >> \input{header} 
> >> in the respective files when supplying the files on the commandline to 
> be 
> >> concatenated. The same problem occurs: my macros are not expanded. With 
> the 
> >> -s flag, I will see my macro definitions in the output file, but any 
> >> reference to them in the body is obliterated. 
> >> 
> >> Thank you for your time---any ideas you have are appreciated. 
> >> 
> >> 
> >> On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote: 
> >>> 
> >>> What pandoc version are you using? 
> >>> 
> >>> `\input` should be supported, but you'd need `header.tex` to be in the 
> >>> working directory. 
> >>> 
> >>> You can also try simply putting `header.tex` on the command line: 
> >>> 
> >>>     pandoc header.tex main.tex 
> >>> 
> >>> This produces the same output as if you had the contents of 
> >>> `header.tex` at the beginning of `main.tex`. 
> >>> 
> >>> 
> >>> +++ Mike Hynes [Jan 09 15 10:27 ]: 
> >>> >Hello, 
> >>> > 
> >>> >I am trying to use pandoc to convert my latex files into other doc 
> >>> > types, 
> >>> >mainly html and doc. 
> >>> > 
> >>> >My latex documents generally have the following format: 
> >>> > 
> >>> >\input{header} 
> >>> >\begin{document} 
> >>> >   body text as usual 
> >>> >\end{document} 
> >>> > 
> >>> >The file header.tex is either contained in the same directory, or in 
> >>> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used 
> macros 
> >>> >such as: 
> >>> > 
> >>> >\newcommand{\FIG}[3]{ 
> >>> >\begin{figure}[h!] 
> >>> >\centering 
> >>> >\includegraphics[width=#2\columnwidth,angle=0]{#1} 
> >>> >\caption{#3} 
> >>> >\label{fig:#1} 
> >>> >\end{figure} 
> >>> >} 
> >>> > 
> >>> >That is, I use almost *no* latex commands in my writing, and make 
> >>> > frequent 
> >>> >use of macros to simplify inclusion tables, figures, algorithms, 
> >>> >mathematical formulae, etc. 
> >>> > 
> >>> >I would like to run pandoc on such documents, but am having trouble. 
> My 
> >>> >macros are not getting parsed, and when I run pandoc with 
> >>> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I 
> >>> > often 
> >>> >just have the file echoed back to with, without any conversion of the 
> >>> >specified input files. 
> >>> > 
> >>> >Can someone please direct me to the most efficient way of processing 
> my 
> >>> > tex 
> >>> >files, given their macro-heavy format? I can't seem to find the 
> correct 
> >>> >flags in the documentation for what I'm trying to do. 
> >>> > 
> >>> >Thanks 
> >>> > 
> >>> >-- 
> >>> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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-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/40a476ba-e1a8-413e-ab7e-584f21f70101%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/a7b24022-c931-46ed-a2bf-ae80a3ca79f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                     ` <a7b24022-c931-46ed-a2bf-ae80a3ca79f0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-09 22:50                       ` Matthew Pickering
       [not found]                         ` <CALuQ0m8pi4zuxCiCCoa4uiS=8yAWAPeYoqRoODpJ32KquSgYCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Matthew Pickering @ 2015-01-09 22:50 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I can't reproduce this on such a simple example. On the more complex
example I see the output you describe.

```
.cabal-sandbox/bin/pandoc -f latex -t native --listings
\newcommand{\varName}{TESTMACRO!}
\varName
[Para [Span ("",[],[]) [Str "TESTMACRO!"]]]
```

On Fri, Jan 9, 2015 at 10:43 PM, Mike Hynes <91mbbh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Nope!
> Not even a file with only those two statements works; please see above.
>
>
> On Friday, January 9, 2015 at 5:31:16 PM UTC-5, Matthew Pickering wrote:
>>
>> \newcommand is supported.
>>
>> Does the simple file not work for you
>>
>> ```
>> \newcommand{\varName}{TESTMACRO!}
>> \varName
>> ```
>>
>> ?
>>
>> On Fri, Jan 9, 2015 at 8:22 PM, Mike Hynes <91m...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > I should also mention that even just concatenating my header and body
>> > files
>> > into the classic latex slurry produces the same effect: no \FIG macros.
>> >
>> > I've also defined a simple, no-parameter testing macro:
>> > \newcommand{\varName}{TESTMACRO!}
>> >
>> > This does not get converted correctly using pandoc; the macro is removed
>> > entirely if it is contained simply in text, as in \varName\ in the
>> > current
>> > sentence. If I write $\varName$, my macros appears as: the following in
>> > the
>> > output file: \(\varName\).
>> >
>> > This seems like a strange bug to me---is no \newcommand supported? Or
>> > have I
>> > not supplied the correct flags to pandoc?
>> >
>> >
>> > On Friday, January 9, 2015 at 3:12:58 PM UTC-5, Mike Hynes wrote:
>> >>
>> >> Version:
>> >>
>> >> >> pandoc -v
>> >> pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate
>> >> 0.5.11.1.
>> >> Syntax highlighting is supported for the following languages: abc,
>> >> actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
>> >> changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs,
>> >> css,
>> >> curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua,
>> >> dtd,
>> >> eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler,
>> >> go,
>> >> haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp,
>> >> julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4,
>> >> makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
>> >> metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
>> >> objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php,
>> >> pike,
>> >> postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest,
>> >> rhtml,
>> >> roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
>> >> sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
>> >> yacc, yaml, zsh Default user data directory: /home//mike/.pandoc
>> >> Copyright
>> >> (C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc
>> >> This is
>> >> free software; see the source for copying conditions. There is no
>> >> warranty,
>> >> not even for merchantability or fitness for a particular purpose.
>> >>
>> >> >> uname -a
>> >> Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014
>> >> x86_64 GNU/Linux
>> >>
>> >> As for running
>> >> >> pandoc -s --listings header.tex main.tex -o output.tex
>> >> I get the same problem (with or without the -s flag) that my macros are
>> >> not processed.
>> >>
>> >> I also commented out the lines:
>> >> \documentclass{article}
>> >> and
>> >> \input{header}
>> >> in the respective files when supplying the files on the commandline to
>> >> be
>> >> concatenated. The same problem occurs: my macros are not expanded. With
>> >> the
>> >> -s flag, I will see my macro definitions in the output file, but any
>> >> reference to them in the body is obliterated.
>> >>
>> >> Thank you for your time---any ideas you have are appreciated.
>> >>
>> >>
>> >> On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote:
>> >>>
>> >>> What pandoc version are you using?
>> >>>
>> >>> `\input` should be supported, but you'd need `header.tex` to be in the
>> >>> working directory.
>> >>>
>> >>> You can also try simply putting `header.tex` on the command line:
>> >>>
>> >>>     pandoc header.tex main.tex
>> >>>
>> >>> This produces the same output as if you had the contents of
>> >>> `header.tex` at the beginning of `main.tex`.
>> >>>
>> >>>
>> >>> +++ Mike Hynes [Jan 09 15 10:27 ]:
>> >>> >Hello,
>> >>> >
>> >>> >I am trying to use pandoc to convert my latex files into other doc
>> >>> > types,
>> >>> >mainly html and doc.
>> >>> >
>> >>> >My latex documents generally have the following format:
>> >>> >
>> >>> >\input{header}
>> >>> >\begin{document}
>> >>> >   body text as usual
>> >>> >\end{document}
>> >>> >
>> >>> >The file header.tex is either contained in the same directory, or in
>> >>> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used
>> >>> > macros
>> >>> >such as:
>> >>> >
>> >>> >\newcommand{\FIG}[3]{
>> >>> >\begin{figure}[h!]
>> >>> >\centering
>> >>> >\includegraphics[width=#2\columnwidth,angle=0]{#1}
>> >>> >\caption{#3}
>> >>> >\label{fig:#1}
>> >>> >\end{figure}
>> >>> >}
>> >>> >
>> >>> >That is, I use almost *no* latex commands in my writing, and make
>> >>> > frequent
>> >>> >use of macros to simplify inclusion tables, figures, algorithms,
>> >>> >mathematical formulae, etc.
>> >>> >
>> >>> >I would like to run pandoc on such documents, but am having trouble.
>> >>> > My
>> >>> >macros are not getting parsed, and when I run pandoc with
>> >>> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I
>> >>> > often
>> >>> >just have the file echoed back to with, without any conversion of the
>> >>> >specified input files.
>> >>> >
>> >>> >Can someone please direct me to the most efficient way of processing
>> >>> > my
>> >>> > tex
>> >>> >files, given their macro-heavy format? I can't seem to find the
>> >>> > correct
>> >>> >flags in the documentation for what I'm trying to do.
>> >>> >
>> >>> >Thanks
>> >>> >
>> >>> >--
>> >>> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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-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/40a476ba-e1a8-413e-ab7e-584f21f70101%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/a7b24022-c931-46ed-a2bf-ae80a3ca79f0%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                         ` <CALuQ0m8pi4zuxCiCCoa4uiS=8yAWAPeYoqRoODpJ32KquSgYCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-09 23:06                           ` Matthew Pickering
       [not found]                             ` <CALuQ0m8t5ejcyS6mZ05eZn+=JoGoJ8FK4i_mF0Wira7AHcPwjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Matthew Pickering @ 2015-01-09 23:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

From my investigations it seems that pandoc doesn't like "figure"
environments in macros.

On Fri, Jan 9, 2015 at 10:50 PM, Matthew Pickering
<matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I can't reproduce this on such a simple example. On the more complex
> example I see the output you describe.
>
> ```
> .cabal-sandbox/bin/pandoc -f latex -t native --listings
> \newcommand{\varName}{TESTMACRO!}
> \varName
> [Para [Span ("",[],[]) [Str "TESTMACRO!"]]]
> ```
>
> On Fri, Jan 9, 2015 at 10:43 PM, Mike Hynes <91mbbh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Nope!
>> Not even a file with only those two statements works; please see above.
>>
>>
>> On Friday, January 9, 2015 at 5:31:16 PM UTC-5, Matthew Pickering wrote:
>>>
>>> \newcommand is supported.
>>>
>>> Does the simple file not work for you
>>>
>>> ```
>>> \newcommand{\varName}{TESTMACRO!}
>>> \varName
>>> ```
>>>
>>> ?
>>>
>>> On Fri, Jan 9, 2015 at 8:22 PM, Mike Hynes <91m...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>> > I should also mention that even just concatenating my header and body
>>> > files
>>> > into the classic latex slurry produces the same effect: no \FIG macros.
>>> >
>>> > I've also defined a simple, no-parameter testing macro:
>>> > \newcommand{\varName}{TESTMACRO!}
>>> >
>>> > This does not get converted correctly using pandoc; the macro is removed
>>> > entirely if it is contained simply in text, as in \varName\ in the
>>> > current
>>> > sentence. If I write $\varName$, my macros appears as: the following in
>>> > the
>>> > output file: \(\varName\).
>>> >
>>> > This seems like a strange bug to me---is no \newcommand supported? Or
>>> > have I
>>> > not supplied the correct flags to pandoc?
>>> >
>>> >
>>> > On Friday, January 9, 2015 at 3:12:58 PM UTC-5, Mike Hynes wrote:
>>> >>
>>> >> Version:
>>> >>
>>> >> >> pandoc -v
>>> >> pandoc 1.13.2 Compiled with texmath 0.8.0.1, highlighting-kate
>>> >> 0.5.11.1.
>>> >> Syntax highlighting is supported for the following languages: abc,
>>> >> actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
>>> >> changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs,
>>> >> css,
>>> >> curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua,
>>> >> dtd,
>>> >> eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler,
>>> >> go,
>>> >> haskell, haxe, html, ini, isocpp, java, javadoc, javascript, json, jsp,
>>> >> julia, latex, lex, lilypond, literatecurry, literatehaskell, lua, m4,
>>> >> makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
>>> >> metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
>>> >> objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php,
>>> >> pike,
>>> >> postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest,
>>> >> rhtml,
>>> >> roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
>>> >> sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
>>> >> yacc, yaml, zsh Default user data directory: /home//mike/.pandoc
>>> >> Copyright
>>> >> (C) 2006-2014 John MacFarlane Web: http://johnmacfarlane.net/pandoc
>>> >> This is
>>> >> free software; see the source for copying conditions. There is no
>>> >> warranty,
>>> >> not even for merchantability or fitness for a particular purpose.
>>> >>
>>> >> >> uname -a
>>> >> Linux seuss 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014
>>> >> x86_64 GNU/Linux
>>> >>
>>> >> As for running
>>> >> >> pandoc -s --listings header.tex main.tex -o output.tex
>>> >> I get the same problem (with or without the -s flag) that my macros are
>>> >> not processed.
>>> >>
>>> >> I also commented out the lines:
>>> >> \documentclass{article}
>>> >> and
>>> >> \input{header}
>>> >> in the respective files when supplying the files on the commandline to
>>> >> be
>>> >> concatenated. The same problem occurs: my macros are not expanded. With
>>> >> the
>>> >> -s flag, I will see my macro definitions in the output file, but any
>>> >> reference to them in the body is obliterated.
>>> >>
>>> >> Thank you for your time---any ideas you have are appreciated.
>>> >>
>>> >>
>>> >> On Friday, January 9, 2015 at 2:33:21 PM UTC-5, John MacFarlane wrote:
>>> >>>
>>> >>> What pandoc version are you using?
>>> >>>
>>> >>> `\input` should be supported, but you'd need `header.tex` to be in the
>>> >>> working directory.
>>> >>>
>>> >>> You can also try simply putting `header.tex` on the command line:
>>> >>>
>>> >>>     pandoc header.tex main.tex
>>> >>>
>>> >>> This produces the same output as if you had the contents of
>>> >>> `header.tex` at the beginning of `main.tex`.
>>> >>>
>>> >>>
>>> >>> +++ Mike Hynes [Jan 09 15 10:27 ]:
>>> >>> >Hello,
>>> >>> >
>>> >>> >I am trying to use pandoc to convert my latex files into other doc
>>> >>> > types,
>>> >>> >mainly html and doc.
>>> >>> >
>>> >>> >My latex documents generally have the following format:
>>> >>> >
>>> >>> >\input{header}
>>> >>> >\begin{document}
>>> >>> >   body text as usual
>>> >>> >\end{document}
>>> >>> >
>>> >>> >The file header.tex is either contained in the same directory, or in
>>> >>> >~/texmf/tex/latex/headers/. In my headers, I have frequently-used
>>> >>> > macros
>>> >>> >such as:
>>> >>> >
>>> >>> >\newcommand{\FIG}[3]{
>>> >>> >\begin{figure}[h!]
>>> >>> >\centering
>>> >>> >\includegraphics[width=#2\columnwidth,angle=0]{#1}
>>> >>> >\caption{#3}
>>> >>> >\label{fig:#1}
>>> >>> >\end{figure}
>>> >>> >}
>>> >>> >
>>> >>> >That is, I use almost *no* latex commands in my writing, and make
>>> >>> > frequent
>>> >>> >use of macros to simplify inclusion tables, figures, algorithms,
>>> >>> >mathematical formulae, etc.
>>> >>> >
>>> >>> >I would like to run pandoc on such documents, but am having trouble.
>>> >>> > My
>>> >>> >macros are not getting parsed, and when I run pandoc with
>>> >>> >--template=$USER/texmf/tex/latex/report.tex (or with an -H flag), I
>>> >>> > often
>>> >>> >just have the file echoed back to with, without any conversion of the
>>> >>> >specified input files.
>>> >>> >
>>> >>> >Can someone please direct me to the most efficient way of processing
>>> >>> > my
>>> >>> > tex
>>> >>> >files, given their macro-heavy format? I can't seem to find the
>>> >>> > correct
>>> >>> >flags in the documentation for what I'm trying to do.
>>> >>> >
>>> >>> >Thanks
>>> >>> >
>>> >>> >--
>>> >>> >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/90cb9924-0ed1-441a-8ef2-f2e3928a165c%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-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/40a476ba-e1a8-413e-ab7e-584f21f70101%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/a7b24022-c931-46ed-a2bf-ae80a3ca79f0%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                             ` <CALuQ0m8t5ejcyS6mZ05eZn+=JoGoJ8FK4i_mF0Wira7AHcPwjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-10  0:02                               ` Matthew Pickering
       [not found]                                 ` <CALuQ0m9f8Zvtnv=eyBGu=3afxZvLb3uCW=-i8cVWLDgxLwhCQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Matthew Pickering @ 2015-01-10  0:02 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I've done some more investigating...

When building from HEAD your example file actually fails to compile.
(This is because of the parseFromString changes John).

So this is what happens.. the macro parsing is all ok. The problem
comes when \FIG is parsed. \FIG is replaced with the following..

```
{
  \begin{figure}[h!]
    \centering
    \includegraphics[width=0.5\columnwidth,angle=0]{test.jpg}
    \caption{Test caption}
    \label{fig:test.jpg}
  \end{figure}
}
```

The next line now fails

```
parseFromString inlines transformed
```

The next step is into `grouped inline` which matches the first `{`.
Little does this function know, what is inside this block is actually
a block level element.

Next `inline` tries to match `\begin{figure}` but all paths fail so
the parse fails. Pre pandoc 1.13.3 (ie any released version of pandoc)
the `parseFromString` function succeeded even if it didn't consume all
the input (it just silently threw it away). Now in HEAD, it fails if
not all the input is consumed.

I have copied this message over onto the issue tracker[1].

I think the whole LaTeX reader is in need of a bit of an overhaul, the
macro inclusion code is quite difficult to follow and the error
messages uninformative (as well as the result being wrong!)

[1]: https://github.com/jgm/pandoc/issues/1866


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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                                 ` <CALuQ0m9f8Zvtnv=eyBGu=3afxZvLb3uCW=-i8cVWLDgxLwhCQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-10 17:00                                   ` Mike Hynes
       [not found]                                     ` <18984b29-d0e1-4f6c-85a3-3de241601d2c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Hynes @ 2015-01-10 17:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Thanks Matthew for looking into this so deeply! I will follow the issue on 
github.


On Friday, January 9, 2015 at 7:02:16 PM UTC-5, Matthew Pickering wrote:
>
> I've done some more investigating... 
>
> When building from HEAD your example file actually fails to compile. 
> (This is because of the parseFromString changes John). 
>
> So this is what happens.. the macro parsing is all ok. The problem 
> comes when \FIG is parsed. \FIG is replaced with the following.. 
>
> ``` 
> { 
>   \begin{figure}[h!] 
>     \centering 
>     \includegraphics[width=0.5\columnwidth,angle=0]{test.jpg} 
>     \caption{Test caption} 
>     \label{fig:test.jpg} 
>   \end{figure} 
> } 
> ``` 
>
> The next line now fails 
>
> ``` 
> parseFromString inlines transformed 
> ``` 
>
> The next step is into `grouped inline` which matches the first `{`. 
> Little does this function know, what is inside this block is actually 
> a block level element. 
>
> Next `inline` tries to match `\begin{figure}` but all paths fail so 
> the parse fails. Pre pandoc 1.13.3 (ie any released version of pandoc) 
> the `parseFromString` function succeeded even if it didn't consume all 
> the input (it just silently threw it away). Now in HEAD, it fails if 
> not all the input is consumed. 
>
> I have copied this message over onto the issue tracker[1]. 
>
> I think the whole LaTeX reader is in need of a bit of an overhaul, the 
> macro inclusion code is quite difficult to follow and the error 
> messages uninformative (as well as the result being wrong!) 
>
> [1]: https://github.com/jgm/pandoc/issues/1866 
>

-- 
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/18984b29-d0e1-4f6c-85a3-3de241601d2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX Headers/Macros in pandoc conversion
       [not found]                                     ` <18984b29-d0e1-4f6c-85a3-3de241601d2c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-10 17:48                                       ` Mike Hynes
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Hynes @ 2015-01-10 17:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

I have a bandaid solution here. If anyone uses macros frequently, but would 
like to produce html using pandoc, the following perl script can help 
preprocess the macros:

http://pages.iu.edu/~thornbuj/src/tme/tme

There is a warning when I run this script with perl v5.20.1, but I don't 
see any errors in stdout; so it seems to correctly replace all macros as 
needed.

After running this script on my file as such:
./tme header.tex <main.tex >out.tex
pandoc successfully converts out.tex, so far as I can tell. 

Many thanks to Jonathon Thornburg for provided the perl script.


On Saturday, January 10, 2015 at 12:00:33 PM UTC-5, Mike Hynes wrote:
>
> Thanks Matthew for looking into this so deeply! I will follow the issue on 
> github.
>
>
> On Friday, January 9, 2015 at 7:02:16 PM UTC-5, Matthew Pickering wrote:
>>
>> I've done some more investigating... 
>>
>> When building from HEAD your example file actually fails to compile. 
>> (This is because of the parseFromString changes John). 
>>
>> So this is what happens.. the macro parsing is all ok. The problem 
>> comes when \FIG is parsed. \FIG is replaced with the following.. 
>>
>> ``` 
>> { 
>>   \begin{figure}[h!] 
>>     \centering 
>>     \includegraphics[width=0.5\columnwidth,angle=0]{test.jpg} 
>>     \caption{Test caption} 
>>     \label{fig:test.jpg} 
>>   \end{figure} 
>> } 
>> ``` 
>>
>> The next line now fails 
>>
>> ``` 
>> parseFromString inlines transformed 
>> ``` 
>>
>> The next step is into `grouped inline` which matches the first `{`. 
>> Little does this function know, what is inside this block is actually 
>> a block level element. 
>>
>> Next `inline` tries to match `\begin{figure}` but all paths fail so 
>> the parse fails. Pre pandoc 1.13.3 (ie any released version of pandoc) 
>> the `parseFromString` function succeeded even if it didn't consume all 
>> the input (it just silently threw it away). Now in HEAD, it fails if 
>> not all the input is consumed. 
>>
>> I have copied this message over onto the issue tracker[1]. 
>>
>> I think the whole LaTeX reader is in need of a bit of an overhaul, the 
>> macro inclusion code is quite difficult to follow and the error 
>> messages uninformative (as well as the result being wrong!) 
>>
>> [1]: https://github.com/jgm/pandoc/issues/1866 
>>
>

-- 
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/52e0488e-2699-4af5-b677-28dbadbe5d52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2015-01-10 17:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-09 18:27 LaTeX Headers/Macros in pandoc conversion Mike Hynes
     [not found] ` <90cb9924-0ed1-441a-8ef2-f2e3928a165c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-09 18:44   ` Matthew Pickering
     [not found]     ` <CALuQ0m_pvBqPZvXnOjsT8+Ev5+xRKz8osw_zVuhW=sKMGESz9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-09 19:11       ` Mike Hynes
     [not found]         ` <ef300118-1ee9-4e4e-8cb8-1cc47dc4d192-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-09 19:13           ` Mike Hynes
2015-01-09 19:33   ` John MacFarlane
     [not found]     ` <20150109193307.GA90254-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-01-09 20:12       ` Mike Hynes
     [not found]         ` <039f5de8-68e3-42a7-9f9c-cdc6bde24bc4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-09 20:22           ` Mike Hynes
     [not found]             ` <40a476ba-e1a8-413e-ab7e-584f21f70101-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-09 22:31               ` Matthew Pickering
     [not found]                 ` <CALuQ0m9YSVo7qSaUZg2nf+3JnUL7aN-tscHMt1xONj2dCUe5fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-09 22:43                   ` Mike Hynes
     [not found]                     ` <a7b24022-c931-46ed-a2bf-ae80a3ca79f0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-09 22:50                       ` Matthew Pickering
     [not found]                         ` <CALuQ0m8pi4zuxCiCCoa4uiS=8yAWAPeYoqRoODpJ32KquSgYCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-09 23:06                           ` Matthew Pickering
     [not found]                             ` <CALuQ0m8t5ejcyS6mZ05eZn+=JoGoJ8FK4i_mF0Wira7AHcPwjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-10  0:02                               ` Matthew Pickering
     [not found]                                 ` <CALuQ0m9f8Zvtnv=eyBGu=3afxZvLb3uCW=-i8cVWLDgxLwhCQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-10 17:00                                   ` Mike Hynes
     [not found]                                     ` <18984b29-d0e1-4f6c-85a3-3de241601d2c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-10 17:48                                       ` Mike Hynes

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