Open maheshbansode opened 9 months ago
If you can extract the definitions you need into a .sty file, pandoc can parse these (as long as they don't have low-level TeX stuff in them). You can either \include
them or just put the sty file before the tex file on the command line.
The question is: why does pandoc not read the elsarticle.cls file that is indicated in the \documentclass statement in the LaTeX file? \documentclass[final,5p,times,twocolumn]{elsarticle}
. The definitions in that class file, like \ead, and in use in the LaTeX file, \author{Forename Surname}\corref{cor1} \cortext[cor1]{corresponding author} \ead{forename.surname@example.com},
are ignored by pandoc. Regular LaTeX compilation into a PDF will show these details in the footnote on the first page, but pandoc does not appear to output footnotes. Samples are available on request.
That could be a good enhancement to consider. However, pandoc isn't currently capable of parsing the kind of low-level TeX generally found in .cls files (including this one).
Easiest approach is to use a shim that defines the macros you need using simple LaTeX macro definitions; add this shim when you convert with pandoc (it can just be a separate .tex file on the command line before your main one).
This is a problem that people using premade classes for latex academic articles face. Is there a way to circumvent this?
Yes @alex180500 , If you want to extract specific fields then you can add definitions for those fields in .sty file and provide that .sty file while Pandoc conversion on command line. “pandoc -s anyname.sty filename.tex -o output.html --mathml --mathjax“
Thanks I will try! What about .clo
and .bst
files?
I don't have much idea about such files @alex180500 may be @fuchtr has.
Describe your proposed improvement and the problem it solves.
Describe alternatives you've considered.