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 {minipage} blocks next to each other in HTML, but extremely painful 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: \iflatexml .

Here is an example setup that you can add to your header.tex file:

\def\onlyHTML#1{\iflatexml #1\fi}
\def\onlyPDF#1{\iflatexml\else #1\fi}

and then use it to specify PDF-only line-breaks for your {minipage} blocks:

% 
\end{minipage}\onlyPDF{\newline}
\begin{minipage}{% 

The most common use of PDF-specific directives would likely remain the need for hard page breaks:

\onlyPDF{\newpage}

Last, but very importantly, please be reminded that at Authorea we strongly advise against attempting to do low-level tweaking of your document, both because of the numerous dragons lurking on that road, and because the Authorea editing experience is much more rewarding in both speed and writing enjoyment.