3

I am trying to put some boxes on the second with the paquage

\usepackage{fancybox}

My code looks like that

\documentclass{article}
\usepackage{fancybox,color}

\begin{document}

\boxput*(-0.4,1.1){    
 \textbf{MathBox : }Akaike information criterion    }{
        \colorbox{blue}{
        \ovalbox{
    \begin{minipage}{0.9\textwidth}    
     \newline   
    Text    
    $eqation$    
    Text
\footnote{\textit{Everitt (1998), The Cambridge Dictionary of Statistics }}
    \end{minipage}  
    }}}

\end{document}

I use this type of boxing three time, and it made me an error on two of them at the end of the boxing. I do not have any \\ in the boxes or next before. The strangest is that the code finish to compile and the box appear in the pdf. I compile with pdflatex in TexMaker (on ubuntu)

I really do not know what is the problem.

Thank you

1 Answer 1

3

The error comes from the \newline which you have immediately at the start of the minipage You can not end the current line and start a new line until you have started the paragraph, hence the error. Simply deleting the \newline makes the error go.

5
  • And if you cannot remove that newline, because your whole file is one big hack: adding a whitespace ~ before the newline should work as well
    – lucidbrot
    Commented Oct 4, 2018 at 19:43
  • @lucidbrot but that's probably worse than simply ignoring the error. As you get bad output with no warning. Commented Oct 4, 2018 at 19:48
  • how is the output bad though? It looks well. Thanks for speaking up: I have now tried some variation of my hack which allows me to remove the whitespace and the newline (which was in fact a negative vertical offset). That gives much cleaner code.
    – lucidbrot
    Commented Oct 4, 2018 at 19:49
  • Thanks! Page breaking is a good argument. (I only had the box in order to be able to move its whole content, so breaking alignment is fine by me)
    – lucidbrot
    Commented Oct 4, 2018 at 20:00
  • 1
    @lucidbrot Oh OK I was just going to point out that you could ask the staff to merge the accounts if you were (I'm going to delete most of these comments in a minute) Commented Oct 4, 2018 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .