0

I am having some trouble with an error message that I am receiving and was hoping that someone could provide some advice. The code is as follows:

\documentclass[a4paper]{article}
\usepackage[grid, gridcolor=red!50,subgridcolor=green!20,gridunit=pt]{eso-pic}
\usepackage{pdfpages,picture}
\usepackage{amsmath}
\newcommand{\bigO}[1]{\ensuremath{\mathop{}\mathopen{}\mathcal{O}\mathopen{}\left(#1\right)}}

\begin{document}
 \AddToShipoutPictureFG*{
    \AtPageLowerLeft{
        \setlength{\fboxrule}{.5}  
        \setlength{\fboxsep}{.5}
        \put(50pt,500pt){
            \makebox(0,0){%
            \fcolorbox{red}{yellow!20}{%
            \begin{minipage}{3cm}
               \end{minipage}}
            }%
        }
    }
}
\includepdf[pages=1]{dyngraphcon_A8_ts.pdf}      

 \AddToShipoutPictureFG*{
    \AtPageLowerLeft{
        \setlength{\fboxrule}{.5}  
        \setlength{\fboxsep}{.5}
        \put(50pt,500pt){
            \makebox(0,0){%
                \fcolorbox{red}{yellow!20}{%
     \begin{minipage}{3cm}
            \end{minipage}}
                }%
            }
        }
    }
    \includepdf[pages=2]{dyngraphcon_A8_ts.pdf} 



\end{document}

Basically, the pdf file is a reference to another document contained in the folder and I wasn't so sure how to include it here so that it is universal... but nonetheless, the error message that I am receiving is given by: "Illegal unit of measure (pt inserted). \includepdf[pages=1]{dynagraphcon_A8_ts.pdf}".

I know that it isn't something wrong with the pdf file as I have tried others and still ran into the same issue. Also, in case it helps, the compiler I am using is TeXstudio but I also ran into the same issue with TeXshop.

Any advice would be appreciated.

  • 2
    the error is occurring before the reported code. i believe the complaint is about the two commands \setlength{\fboxrule}{.5} \setlength{\fboxsep}{.5} where one would expect something like .5pt or .5em. – barbara beeton May 6 '16 at 0:29
3

the error is occurring before the reported code.

the complaint is about the two commands

\setlength{\fboxrule}{.5}
\setlength{\fboxsep}{.5}

where one would expect something like .5pt or .5em. (of course, you will need to adjust these suggestions to what is appropriate.)

this occurs twice in this example, so be sure to fix both places.

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.