Michalis Kamburelis edited this page Jan 7, 2017 · 7 revisions
Clone this wiki locally

When you run pasdoc with CommandLine option --format=latex2rtf you will get docs.tex file suitable for processing with latex2rtf.

This is very similar to normal LatexOutput but a little simplified (because latex2rtf can’t handle many advanced features of TeX). Note that the generated docs.tex file cannot be processed by normal latex tools (like latex or pdflatex) because we had to remove some things crucial for normal latex tools. So

  • if you want to process your file by latex or pdflatex you must use LatexOutput (--format=latex).

  • if you want to process your file by latex2rtf you must use latex2rtf output (--format=latex2rtf).

Other latex2rtf problems:

Problem with links


Links in RTF file generated by latex2rtf will not work out of the box. If you generate docs.tex file using

pasdoc --format=latex2rtf ...

and then you will try to process it with latex2rtf using

latex2rtf docs.tex

latex2rtf will print a warning

docs.tex:102 Cannot open <docs.aux> docs.tex:102 No .aux file.
Run LaTeX to create docs.aux

and generated docs.rtf file will have invalid links ((?) will be displayed where section numbers like (6.3) should be).


Like instructed by latex2rtf, you must first generate docs.aux using one of normal latex tools. E.g. use the following set of commands:

# Make docs.tex usable with latex
pasdoc --format=latex --output=latex/ ...

# Make latex/docs.aux file
cd latex/
latex docs.tex
cd ../

# Make docs.tex usable with latex2rtf
pasdoc --format=latex2rtf --output=latex2rtf/ ...

# Make docs.rtf using latex/docs.aux file
cd latex2rtf/
latex2rtf -a ../latex/docs.aux docs.tex

Other latex2rtf warnings

No solution. Just ignore them, it’s normal. We could probably make them disappear by modifying latex2rtf output format, but it would complicate latex generator code without much gain.