I have some difficulties in R Sweave so I hope someone could help me.
I want to include two TikZ pictures using minipage and figure to the R Sweave but I get an error:
Overfull \hbox (2.43085pt too wide).
The code I'm using is (I have deleted some rows because the code is too long):
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{figure}[!ht]
\begin{minipage}[c]{0.5\linewidth}
\centering
\begin{tikzpicture}[>=triangle 45, scale=0.85]
\draw[line width=0.2mm] (-0.25,-0.25)--(-0.25,4.5)--(6.25,4.5)--(6.25,-0.25)--(-0.25,-0.25);
\end{tikzpicture}
\end{minipage}
\begin{minipage}[c]{0.5\linewidth}
\centering
\begin{tikzpicture}[>=triangle 45, scale=0.85]
\draw[line width=0.2mm] (-0.25,-0.25)--(-0.25,4.5)--(6.25,4.5)--(6.25,-0.25)--(-0.25,-0.25);
\end{tikzpicture}
\end{minipage}
\caption{Picture}
\label{fig:pic1}
\end{figure}
\end{document}
On page How do you effectively debug overfull \hbox warnings? that if include I found that \showboxdepth=\maxdimen will tell what the real problem is. But this also shows the same error as before.
So my question is: Why do I get an error? What wrong with my code?
.5\linewidthwide but won't fit on a line as there is a word space (or a paragraph break if you really have a blank line) between them. – David Carlisle Jan 16 '16 at 10:07\hboxof a tikzpicture in a.Rnwor a.texfile. If the.Rnwextension is the unique relation of R and Sweave with this problem, please change the title and the tags of the question. – Fran Jan 16 '16 at 10:33\documentclass{article}\usepackage{tikz}but that gave an error about arrows so I guessed\usetikzlibrary{arrows}but now I get `! Package tikz Error: Cannot parse this coordinate.See the tikz package documentation for explanation. Type H for immediate help.
...
l.9 ...)--(-0.25,4.5)--(6.25,4.5)--(6.25,-0.25)-(- ` so I give up sorry, please post a complete example that reproduces the overfull box that you are asking about.
– David Carlisle Jan 16 '16 at 11:10-not--I'll update your question this time. – David Carlisle Jan 16 '16 at 11:11