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

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.

  • 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 Oct 4 '18 at 19:43
  • @lucidbrot but that's probably worse than simply ignoring the error. As you get bad output with no warning. – David Carlisle Oct 4 '18 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 Oct 4 '18 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 Oct 4 '18 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) – David Carlisle Oct 4 '18 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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