\documentclass{article}
\def\punctation#1{#1}
\usepackage{amsmath,amsthm,xcolor}
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{remark}{Remark}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage[margin=0.6cm,paperwidth=6in, paperheight=5in]{geometry}
\pagestyle{empty}
\let\rmdefault\sfdefault
\begin{document}
\ifx\PreviewEnvironment\undefined\pagecolor{blue!10}\fi

\title{Demo file for configuration}

\section{References (and tooltips)}

Theorem \ref{th}, Remark \ref{rem}, equations \eqref{eq:0},
\eqref{eq:1} and \eqref{eq:2}, citation \cite{lit}.

Figure \ref{fig:1}. Figures \ref{fig:2} and \ref{fig:3} are in two
minipage environments in common float.


\section{Sample text}

\begin{theorem}[{\cite[page 118]{lit}}]\label{th}
  This is an example of theorem environment. We use short equation
  \begin{equation}
    \label{eq:0}
    (x+1)^2\geq 0\punctation,
  \end{equation}
  as well as long equation
  \begin{equation}
    \label{eq:1}
    \begin{aligned}
      &(p-1)r^{1-q}(t)h^{-q}(t)H(t,v(t))\\
      &\quad =(p-1)r^{1-q}(t)h^{-q}(t)\bigl[|v(t)+G(t)|^q-q\Phi^{-1}(G(t))v(t)-|G(t)|^q\bigr]\\
      &\quad
      =(p-1)r(t)|h'(t)|^p\left[\bigl|1+\frac{v(t)}{G(t)}\bigr|^q-q\frac{v(t)}{G(t)}-1\right]\punctation.
    \end{aligned}
  \end{equation}
\end{theorem}

\begin{remark}\label{rem}
  From Figure \ref{fig:1} and
  \begin{equation}
    \label{eq:2}
    \rho(x,y)=\sqrt{x^2+y^2}
  \end{equation}
  we get an interesting conclusion.  \lipsum[1]
\end{remark}

\begin{figure}
  \centering
  \begin{minipage}{1.0\linewidth}\centering
    \fbox{\begin{minipage}{0.5\linewidth}\null\vskip
        2\bigskipamount\centering \Huge Test Figure 1 \vskip
        3\bigskipamount \null
      \end{minipage}}
    \caption{Floating figure}\label{fig:1}
  \end{minipage}
\end{figure}

\begin{figure}
  \centering
  \begin{minipage}[t]{0.45\linewidth}
  \fbox{\begin{minipage}{0.9\linewidth}\null\vskip 2\bigskipamount\centering
    \Huge Test Figure 2
    \vskip 3\bigskipamount
    \null
  \end{minipage}}
    \caption{Figure on the left}
    \label{fig:2}
  \end{minipage}
  \begin{minipage}[t]{0.45\linewidth}
  \fbox{\begin{minipage}{0.9\linewidth}\null\vskip 2\bigskipamount\centering
    \Huge Test Figure 3
    \vskip 3\bigskipamount
    \null
  \end{minipage}}
    \caption{Figure on the right}
    \label{fig:3}
  \end{minipage}
\end{figure}

\clearpage
\begin{thebibliography}{99}
\bibitem{lit} D. A. Troy and S. H. Zweben, {\em Measuring the Quality of
Structured Designs}, Journal of Systems and Software, {\bf 2}, 1981, 113--120

\end{thebibliography}
\end{document}
