I want to crop the page to exactly fit the tikz graph in it. When i used standalone
document class, all the page content became on one line. Here is my code
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\tikzstyle{myarrow}=[draw=black,-triangle 45]
\begin{document}
$X^2$ = $\frac{c}{b}$ \\
\begin{tikzpicture}
\draw [myarrow] (0,0) -- (13,0) node [at end, below] {$\lambda$};
\draw (0,2.2) -- (12,2.2);
\draw[ultra thick, black] (0,0) sin (3,2);
\draw[ultra thick, red] (3,2) cos (6,0);
\draw[ultra thick, black] (6,0) sin (9,-2);
\draw[ultra thick, red] (9,-2) cos (12,0);
\end{tikzpicture}\\
$A$ \hspace{1cm}Hello \\
C \hspace{1.3cm}hello \\
B \hspace{1cm}hello \\
d \hspace{1.4cm}hello \\
\end{document}
I want the result to be like this
But here is what i got
I also tried preview
but it didn't work
Got the ideas from here