Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to use the adjustbox package. When I use the adjustbox command inside a \ffigbox (floatrow package) it works fine. Now I wanted to use it inside a figure environment. Therfore I used the following code:

\begin{figure}
\centering
\adjustbox{max width=\linewidth}{\include{images/plot/associativity}}
%\include{images/plot/associativity}
\caption{Associativity compared to execution time}\label{fig:intro:associativity}
\floatfoot{Matrix multiplication on the \emph{leon3}, normalized by longest execution time. Lower is better. There is no optimal solution across all problem sizes}
\end{figure}

Latex gives me the following error if I use the \adjustbox line, and works fine if I use the pure include:

Extra }, or forgotten \endgroup \end{figure}

Since my MWE turned out to actually contian an error, but I think the parantheses in this adjustbox line are balanced, I have an issue, I am tryuing to build a new (non working) MWE

MWE:

\documentclass{report}
\usepackage{tikz}
\usepackage{adjustbox}      
\usepackage{filecontents}

\begin{document}
\begin{filecontents}{asso.tex}
\begin{tikzpicture}

\end{tikzpicture}
\end{filecontents}

\begin{figure}
\centering
\adjustbox{max width=\linewidth}{\include{asso}}
%\include{asso}
\end{figure}
\end{document}
share|improve this question
1  
You have an extra }, just like the error says in the \adjustbox line. End it with two }} rather than }}}. –  Werner Jul 24 '13 at 20:47
4  
This question appears to be off-topic because it is about a typing error –  egreg Jul 24 '13 at 20:48
    
give me a sec guzs, I checked for the brace in my main document quite a few times and thought i had it right. I am just checking if I made a mistake putting together the mwe, or I have an actual problem. –  ted Jul 24 '13 at 20:51
    
@egreg I am trying to get a proper MWE, but either I am to tired or I have the wrong MWE. –  ted Jul 24 '13 at 21:04
    
Using \include inside \adjustbox is asking for troubles. Use \include only for big chunks like chapters (and it's not so useful as it was in the past); it should be \input. –  egreg Jul 24 '13 at 21:04
show 3 more comments

closed as off-topic by egreg, Kurt, dustin, Sigur, Xavier Jul 25 '13 at 3:44

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 3 down vote accepted

\include is the wrong command to use; it should be reserved to big chunks of text, such as chapters. See When should I use \input vs. \include? for more information.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.