this is for holding javascript data
Deyan Ginev added subsection_Note_on_Format_specific__.tex
almost 9 years ago
Commit id: 25a676b4e0ad2f41bbdd7f520be803007f8c1640
deletions | additions
diff --git a/subsection_Note_on_Format_specific__.tex b/subsection_Note_on_Format_specific__.tex
new file mode 100644
index 0000000..b8fe79f
--- /dev/null
+++ b/subsection_Note_on_Format_specific__.tex
...
\subsection{Note on Format-specific Directives}
In few unfortunate cases the investment of writing format-independent \latex simply isn't worth the result. For example, it may be very easy to align two \verb|{minipage}| blocks next to each other in HTML, but extremely painfull to fit them on the page in PDF. To achieve a delightful outcome in both formats in such cases, it may be needed to resort to platform-specific directives. \latexml offers support for this distinction using its own conditional operator: \verb|\iflatexml|.
Here is an example setup that you can add to your \verb|header.tex| file:
\begin{lstlisting}
\def\onlyHTML#1{\iflatexml#1\fi}
\def\onlyPDF#1{\iflatexml\else#1\fi}
\end{lstlisting}
and then use it to specify PDF-only line-breaks for your \verb|{minipage}| blocks:
\begin{lstlisting}
% ...
\end{minipage}\onlyPDF{\newline}
\begin{minipage}{% ...
\end{lstlisting}