# Problem with inserting images in poster

I'm having trouble inserting a graphic in a poster I am trying to create. The graphic appears but with unwanted text next to it. Please see picture

I am using the command \includegraphics{}. Additionally, I have a graphic coded in tikz that will not appear at all on my poster. Thank you for any info.

EDIT: As requested, I have included the packages and code I am using.

\documentclass[a0,landscape]{a0poster}

\usepackage{multicol} % This is so we can have multiple columns of text side-by-side
\columnsep=100pt % This is the amount of white space between the columns in the poster
\columnseprule=3pt % This is the thickness of the black line between the columns in the poster

\usepackage[svgnames]{xcolor} % Specify colors by their 'svgnames', for a full list of all colors available see here: http://www.latextemplates.com/svgnames-colors

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{latexsym}
\usepackage{times} % Use the times font
%\usepackage{palatino} % Uncomment to use the Palatino font
\usepackage[T1]{fontenc}
\usepackage{etoolbox}
\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Location of the graphics files
\usepackage{booktabs} % Top and bottom rules for table
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage{amsfonts, amsmath, amsthm, amssymb} % For math fonts, symbols and environments
\usepackage{wrapfig} % Allows wrapping text around tables and figures

\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newcommand{\qq}{\mathbb Q}
\newcommand{\pp}{\mathbb P}
\newcommand{\nn}{\mathbb N}
\newcommand{\zz}{\mathbb{Z}}
\newcommand{\rr}{\mathbb{R}}
\newcommand{\ff}{\mathbb{F}}
\newcommand{\fx}{\mathbb{F}[x]}
\providecommand{\GL}{\operatorname{GL}}
\providecommand{\SL}{\operatorname{SL}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\h}{\mathbb{H}}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\re}{Re}
\DeclareMathOperator{\id}{id}

\begin{document}

%some written text here

\section*{Preliminaries}

%more text

Under the action of $\SL_2(\Z)$ (or $\Gamma_0(N)$) we can define the fundamental domain $\F$ (or $\F_N$) to be the set of all equivalence classes in the quotient.

\begin{minipage}{\linewidth}

\includegraphics{fundamental domain SL2(Z).pdf}
\includegraphics{fundamental domain gamma0(6).pdf}

\end{minipage}

%text, below is the tikz code that will not appear

\begin{figure}[h]
\centering
\begin{tikzpicture}[x=5cm,y=.3cm]
\draw[black, thick] (-.5, 24/pi+1.25) -- (.5, 24/pi+1.25)node[right] {$\im(z)=\frac{24}{\pi}+c_n^{-\frac{1}{176}}$};

\draw[black, thick] (-.5, 24/pi+4.75) -- (.5, 24/pi+4.75)node[right] {$\im(z)=\frac{24}{\pi}+c_n^{-\frac{1}{240}}$};

\draw[black, thick] (-.5, 30.5) -- (.5, 30.5)node[right] {$\im(z)=\frac{\sqrt{c_n}}{12}$};

%there is more code but I am ommiting it.

\end{tikzpicture}

%\caption{}
\end{figure}

\end{document}

• Without the code that produced this figure it is difficult to figure this one out. Oct 14 '15 at 3:02
• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– erik
Oct 14 '15 at 3:02
• Try using filenames that don't contain spaces.
– erik
Oct 14 '15 at 3:43
• Oct 14 '15 at 3:49
• It worked! Great, thank you so much. Do you know why the tikz code won't appear? Oct 14 '15 at 3:49

LaTeX can't handle spaces in filenames, so using appropriate filenames should solve your problem. Below is a more minimal example based on your code.

\documentclass[a0,landscape]{a0poster}
\usepackage{amsfonts, amsmath, amsthm, amssymb} % For math fonts, symbols and environments
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}

\providecommand{\SL}{\operatorname{SL}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\Z}{\mathbb{Z}}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\re}{Re}
\begin{document}
%some written text here
\section*{Preliminaries}
%more text
Under the action of $\SL_2(\Z)$ (or $\Gamma_0(N)$) we can define the fundamental domain $\F$ (or $\F_N$) to be the set of all equivalence classes in the quotient.

\begin{minipage}{\linewidth}
\includegraphics{example-image-a}
\includegraphics{example-image-b}
\end{minipage}
%text, below is the tikz code that will not appear
\begin{figure}[h]
\centering
\begin{tikzpicture}[x=5cm,y=.3cm]
\draw[black, thick] (-.5, 24/pi+1.25) -- (.5, 24/pi+1.25)node[right] {$\im(z)=\frac{24}{\pi}+c_n^{-\frac{1}{176}}$};

\draw[black, thick] (-.5, 24/pi+4.75) -- (.5, 24/pi+4.75)node[right] {$\im(z)=\frac{24}{\pi}+c_n^{-\frac{1}{240}}$};

\draw[black, thick] (-.5, 30.5) -- (.5, 30.5)node[right] {$\im(z)=\frac{\sqrt{c_n}}{12}$};
\end{tikzpicture}
%\caption{}
\end{figure}
\end{document}


• @KevinSheng You're welcome. If this answered your question, you can accept the answer by clicking on the checkmark (tickmark).
– erik
Oct 14 '15 at 4:12
• note that spaces are supported for input and includegraphics filenames from the 2019-10-01 release (note added for current readers, I'm not suggesting you could have known that 4 years ago:-) Nov 10 '19 at 12:16
• oh and congratulations on passing 10K (I just pushed you over the edge:-) Nov 10 '19 at 12:17
• Thanks @DavidCarlisle!
– erik
Nov 11 '19 at 18:09

Using \includegraphics{} without a width or height option is risky.

I can't see your prinscreen because it's blocked by my work filter. But I'm guessing that the dimension options might be the cause of your problem.

(I suppose the pdf's probably have the right dimensions saved in them. But just in case, try something like:)

\includegraphics[width=0.4\paperwidth]{fundamental domain SL2(Z).pdf}
\includegraphics[width=0.4\paperwidth]{fundamental domain gamma0(6).pdf}


As for the tikz image, can you post the code for that bit? Currently there's nothing inside \begin{tikzpicture} and \end{tikzpicture}, so nothing is supposed to show up. I don't know of any way to render the outline of a tikz diagram, but we can draw a box with the dimensions you want.

\begin{tikzpicture}[x=5cm,y=.3cm]
\draw (0,0) rectangle (5,3);
\end{tikzpicture}


That shows up as a box for me.

• OK I figured it out, it was the \begin{figure} \end{figure} that was messing things up. But when I remove those parts, everything works but the image is compressed. Is there a way to make the image proportional to the poster? Oct 14 '15 at 4:03
• Yes there is. The following makes each of them as wide as 40% of the width of the page. \includegraphics[width=0.4\paperwidth]{fundamental domain SL2(Z).pdf} You could alternatively do it based on height. The following sets the height of each image to 30% of the page height. \includegraphics[height=0.3\paperheight]{fundamental domain SL2(Z).pdf} You can set both height and width, but that can mess up the aspect ratio. Oct 17 '15 at 1:46