Discussion:
[Latex2rtf-users] Using Latex2rtf with pdfcomment
Andy Clifton
2013-04-18 15:29:06 UTC
Permalink
I'm using LaTeX2rtf to convert LaTeX article or report documents into rich text format. I also compile the PDF using pdfLaTeX. In my document, I use the pdfcomment package to create tooltips.

Let's say I have a document, ToolTipTest.tex. It contains:

\documentclass{article}
\usepackage{pdfcomment}
\begin{document}
\pdftooltip{$a^2+b^2=c^2$}{An equation}
\end{document}

The tooltips are correctly rendered in the PDF version.

However, when I run

latex2rtf -o "ToolTipTest.rtf" -f3 ToolTipTest.tex 

\pdftooltip[*options*]{*item*}{*tooltip*} is rendered as [*options*]*item**tooltip*. If *item* is a float, or equation, then the float or equation is shown correctly. *tooltip* is always shown as text.

This is correct as far as LaTeX2rtf is concerned, but I would like to modify this behavior so that I don't have to tidy up my document too much.

Question: How can I force LaTeX2rtf to ignore *tooltip* and just process the *item* argument?

I guess the generic version of this is:

Question: Given a command \command[option]{arg1}{arg2}, how can I get latex2rtf to ignore option and arg2?

FWIW, I've posted a very similar question on stack exchange at http://tex.stackexchange.com/questions/109310/latex2rtf-with-pdftooltip. I'm not sure if the same folks use this mailing list and that website. Any thoughts you might have would be appreciated!

Thanks,

Andy
Wilfried Hennings
2013-04-19 08:39:28 UTC
Permalink
Post by Andy Clifton
I'm using LaTeX2rtf to convert LaTeX article or report documents into rich text format. I also compile the PDF using pdfLaTeX. In my document, I use the pdfcomment package to create tooltips.
\documentclass{article}
\usepackage{pdfcomment}
\begin{document}
\pdftooltip{$a^2+b^2=c^2$}{An equation}
\end{document}
The tooltips are correctly rendered in the PDF version.
However, when I run
latex2rtf -o "ToolTipTest.rtf" -f3 ToolTipTest.tex
\pdftooltip[*options*]{*item*}{*tooltip*} is rendered as [*options*]*item**tooltip*.
If *item* is a float, or equation, then the float or equation
is shown correctly. *tooltip* is always shown as text.
This is correct as far as LaTeX2rtf is concerned, but I would like to
modify this behavior so that I don't have to tidy up my document too much.
Question: How can I force LaTeX2rtf to ignore *tooltip* and
just process the *item* argument?
Question: Given a command \command[option]{arg1}{arg2}, how can I
get latex2rtf to ignore option and arg2?
Hello!
Without modifications to the latex2rtf program code, the only way is
conditional processing. Latex2rtf automatically sets the \iflatex2rtf
condition true, while for pdflatex it is false by default.

\documentclass{article}
\usepackage{pdfcomment}
\newif\iflatextortf
\begin{document}
\iflatextortf
$a^2+b^2=c^2$
\else
\pdftooltip{$a^2+b^2=c^2$}{An equation}
\fi
\end{document}

Regards, Wilfried

Loading...