JessicaTegner/pypandoc

support for native divs/spans in `format` or `extra_args` argument?

Closed this issue · 1 comments

I have a small filter that takes care of formatting citations appropriately. Here is a snippet of html.

<h1 data-label="850151" class="ltx_title_section">A heading</h1><h2 data-label="367935" class="ltx_title_subsection">Another heading</h2><div>Some text citing <cite class="ltx_cite raw v1">\cite{ebert_epidemiology_2013}</cite></div><div>Some text referencing a Figure <span class="au-ref raw v1">\ref{286335}</span>.</div><div></div>

The <span class="au-ref raw v1">\ref{286335}</span> should be output as\ref{286335}

I'm trying to do the equivalent of
pandoc -f html+raw_html-native_divs-native_spans --filter authorea_scripts/stripreftags.py -s test/TestDocument/untitled.html -t latex, which works as expected, however

html_to_tex = convert_file(
    os.path.join(localdir, ls),
    'latex',
     extra_args=['-f=html-native_divs-native_spans+raw_html'],
     filters=['stripreftags'])

does not, nor does the argument format='html-native_divs-native_spans+raw_html

Did you find a solution?


Nvm. format=html-native_divs-native_spans was what I was looking for