# Illegal unit of measure (pt inserted)?

This block of code is outputting correctly:

{\includegraphics[height=4em]{logo.png}}

{\bf\textsc{Title}\vspace{0.5em}}

{\textsc{\{ \ names \} \hspace{12pt} }}

{\includegraphics[height=4em]{logo.png}}


But the 4th line gives me an error saying it doesn't recognize 4em, and has inserted "pt". How to fix this?

Here is the rest of my code, including the packages I used:

\documentclass[landscape,a0paper,fontscale=0.285]{baposter} % Adjust the font scale/size here

\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Directory in which figures are stored

\usepackage{amsmath} % For typesetting math
\usepackage{amssymb} % Adds new symbols to be used in math mode

\usepackage{booktabs} % Top and bottom rules for tables
\usepackage{enumitem} % Used to reduce itemize/enumerate spacing
\usepackage{palatino} % Use the Palatino font
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures

\usepackage{multicol} % Required for multiple columns
\setlength{\columnsep}{1.5em} % Slightly increase the space between columns
\setlength{\columnseprule}{0mm} % No horizontal rule between columns

\usepackage{tikz} % Required for flow chart
\usetikzlibrary{shapes,arrows} % Tikz libraries required for the flow chart in the template

\newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}

\definecolor{lightblue}{rgb}{0.145,0.6666,1} % Defines the color used for content box headers

\begin{document}

\begin{poster}
{
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=white, % Background color for the gradient on the right side of the poster
borderColor=lightblue, % Border color
headerColorOne=black, % Background color for the header in the content boxes (left side)
headerColorTwo=lightblue, % Background color for the header in the content boxes (right side)
headerFontColor=white, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=roundedleft, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
headershape=roundedright, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headerfont=\Large\bf\textsc, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
}

{\includegraphics[height=4em]{example-image}}
{\bf\textsc{Title}\vspace{0.5em}}
{\textsc{\ Names \ \hspace{12pt} }}
{\includegraphics[height=4em]{example-image}}

Filler text.
}

More filler text.
}

\end{poster}
\end{document}

• Welcome to TeX.SX! The code snipped you posted does not produce any errors. Can you please verify and make a compilable example that throws the error you say? – Phelype Oleinik May 29 at 0:11
• @PhelypeOleinik The entire document is pretty huge and relies on other files to compile correctly (logo.png, etc..). Should I post the entire thing? Isn't that too much? Sorry, i'm pretty new to posting on here. – Ana Coolkid May 29 at 0:19
• The document class you use and the loaded packages besides the four lines you posted are basically enough. – AboAmmar May 29 at 0:30
• @AnaCoolkid Yes, usually the entire document is too much, but you can, say, make a copy of it, then replace the text by some dummy text, replace images by example-image, and narrow down the issue to a smaller piece of code. Once you can't narrow down anymore by yourself, post it here and we'll do the rest :-) – Phelype Oleinik May 29 at 1:00
• @AnaCoolkid KJO's answer is correct, although he didn't explain the problem properly (in my opinion). The document you posted does not compile because of the two blank lines before {\includegraphics[height=4em]{example-image}}. You can't have these blanks lines there because the following four {...} are all arguments to \begin{poster}. The other error is that the value for bottomaligned should be the name of another box, for example bottomaligned=introduction. – Phelype Oleinik May 29 at 11:55

Beware white colours whilst working on a white background it not always easy to see where things are, so I had set headerFontColor=red so as to see them whilst working thus ignore where mine are red I have reset yours to white.

@PhelypeOleinik has explained my changes better so am amending my wording again

I got an error message pgf Error: No shape named bottomse is known.
Its related to the second column bottom definition so in Phelype's words "The other error is that the value for bottomaligned should be the name of another box, for example bottomaligned=introduction"

However I simply removed that so my version completed.

NOTE my only real change is tightening up of the header definition so there are no spaces floating about in the order.

As Phelype explains The document you posted does not compile because of the two blank lines.

P.S. there is one residual warning about Snakes which you can generally ignore. However to check if you will be affected or think you need to make changes to baposter see
baposter.cls - problems with \usetikzlibrary{snakes}

\documentclass[landscape,a0paper,fontscale=0.285]{baposter} % Adjust the font scale/size here

\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Directory in which figures are stored

\usepackage{amsmath} % For typesetting math
\usepackage{amssymb} % Adds new symbols to be used in math mode

\usepackage{booktabs} % Top and bottom rules for tables
\usepackage{enumitem} % Used to reduce itemize/enumerate spacing
\usepackage{palatino} % Use the Palatino font
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures

\usepackage{multicol} % Required for multiple columns
\setlength{\columnsep}{1.5em} % Slightly increase the space between columns
\setlength{\columnseprule}{0mm} % No horizontal rule between columns

\usepackage{tikz} % Required for flow chart
\usetikzlibrary{shapes,arrows} % Tikz libraries required for the flow chart in the template

\newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}

\definecolor{lightblue}{rgb}{0.145,0.6666,1} % Defines the color used for content box headers

\begin{document}

\begin{poster}
{
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=white, % Background color for the gradient on the right side of the poster
borderColor=lightblue, % Border color
headerColorOne=black, % Background color for the header in the content boxes (left side)
headerColorTwo=lightblue, % Background color for the header in the content boxes (right side)
headerFontColor=white, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=roundedleft, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
headershape=roundedright, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headerfont=\Large\bf\textsc, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
} % Keep the following header lines close without blank space
{\includegraphics[height=4em]{example-image}} % Left logo
{\bf\textsc{Title}\vspace{0.5em}} % Top Title line
{\textsc{\ Names \ \hspace{12pt}}} % Lower Title Line
{\includegraphics[height=4em]{example-image}} % Right logo