I have a relatively complex diagram created in LibreOffice Draw (I use that tool, because it has a very nice implementation of connectors automatically adapting to moving objects).
I attach the simplified ODG drawing that shows the problem: trial.odg
I need to use it in my LaTeX document, but I also need to replace some text placeholders in the diagram with LaTeX generated text. I wanted, as usual, to use pstool for that task. The minimized LaTeX document showing the problem is as follows:
\documentclass{article}
\usepackage{pstool}
\usepackage{hyperref}
\begin{document}
\psfragfig*{trial}{
\psfrag{sec:b1}{See section ~\ref{sec:bl1}}
\psfrag{sec:b2_long_placeholder}{See section ~\ref{sec:bl2}}
\psfrag{eq1}{{\Huge $y=x^{z^v}$}}
}
Some random text before the section.
\pagebreak
\section{Block 1}
\label{sec:bl1}
Here should be description of the block 1.
\pagebreak
\section{Block 2}
\label{sec:bl2}
Here should be description of the block 2.
\end{document}
When I export the diagram to the EPS file with:
lodraw --headless --convert-to eps trial.odg
I get the EPS file with all the text “dissolved”. It seems that the export filter converts all the strings into single characters or even splines.
When I later process it with:
latex --sheel-escape test.tex
latex --sheel-escape test.tex
dvipdf test.dvi
I get the “placeholders” not replaced:
I have managed to partially solve the problem by exporting the diagram first in the SVG format, and then converting it to EPS:
lodraw --headless --convert-to svg trial.odg
inkscape -z -Etrial.eps -f trial.svg
latex --sheel-escape test.tex
latex --sheel-escape test.tex
dvipdf test.dvi
However, that solution is also not foolproof. For example the placeholder “sec:b2_long_placeholder” was converted to “(sec:b2_lon)-3(g_place)-3(holder)” instead of just “(sec:b2_long_placeholder)”. It seems that short placeholders are converted correctly, but longer ones are broken:
Is it possible to mark selected strings as “protected” so that they will be passed untouched into EPS file so that they can be used with pstool?