You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by JPZ4-5 March 4, 2025
When using LaTeX2docx conversion, how can we achieve field-based cross-references (for captions and text references) rather than hyperlinks? This is crucial for automatic numbering updates when merging DOCX documents.
Current Behavior:
pandoc -o output.docx main.tex can convert \caption{XX} in the table and figure environments in LaTeX to captions in plain text, above tables or below figures. The \ref{} in the text can be converted to hyperlinks.
pandoc -F pandoc-crossref -o output.docx main.tex can convert \caption{XX} in the table and figure environments in LaTeX to captions with numbering in plain text, above tables or below figures. The \ref{} in the text can be converted to hyperlinks.
pandoc -F pandoc-tex-numbering -o output.docx main.tex can customize captions well, where Figure X-XX: XXXXX has Figure X-XX as a hyperlink and : XXXXX as plain text. The \ref in the text can be converted to hyperlinks. This is also the recommended latex2docx filter in the pandoc-crossref documentation.
Problem:
Haven't found any existing method produces Word field codes (like SEQ fields) for captions/references. Manual conversion (inserting caption fields + replacing hyperlinks with cross-reference fields) is prohibitively tedious.
Questions:
Are there mature solutions for automatic field-based conversion?
If not, is it better to:
Develop a custom Pandoc filter (preferred), or
Create VBA macros (undesirable due to lack of VBA expertise)?
record a macro in Word and execute it in a loop?
Recommendation
jgm: What we could perhaps do is add a specially marked Span around the generated numbers; this would be enough of a hook for the docx reader to substitute a field.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Discussed in #10660
Originally posted by JPZ4-5 March 4, 2025
When using LaTeX2docx conversion, how can we achieve field-based cross-references (for captions and text references) rather than hyperlinks? This is crucial for automatic numbering updates when merging DOCX documents.
Current Behavior:
pandoc -o output.docx main.tex
can convert\caption{XX}
in thetable
andfigure
environments in LaTeX to captions in plain text, above tables or below figures. The\ref{}
in the text can be converted to hyperlinks.pandoc -F pandoc-crossref -o output.docx main.tex
can convert\caption{XX}
in thetable
andfigure
environments in LaTeX to captions with numbering in plain text, above tables or below figures. The\ref{}
in the text can be converted to hyperlinks.pandoc -F pandoc-tex-numbering -o output.docx main.tex
can customize captions well, whereFigure X-XX: XXXXX
hasFigure X-XX
as a hyperlink and: XXXXX
as plain text. The\ref
in the text can be converted to hyperlinks. This is also the recommended latex2docx filter in thepandoc-crossref
documentation.Problem:
Haven't found any existing method produces Word field codes (like SEQ fields) for captions/references. Manual conversion (inserting caption fields + replacing hyperlinks with cross-reference fields) is prohibitively tedious.
Questions:
Recommendation
jgm: What we could perhaps do is add a specially marked Span around the generated numbers; this would be enough of a hook for the docx reader to substitute a field.
The text was updated successfully, but these errors were encountered: