在海报中插入图片时出现问题

在海报中插入图片时出现问题

我在尝试创建的海报中插入图片时遇到了问题。图片出现了,但旁边有不需要的文字。请参见图片“domainSL2(Z).pdfdomainSL2(Z).pdf”不应该出现

我正在使用命令 \includegraphics{}。此外,我有一个用 tikz 编码的图形,它根本不会出现在我的海报上。感谢您提供任何信息。

编辑:根据要求,我已经包含了我正在使用的包和代码。

\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}

\newcommand{\comments}[1]{\textcolor{blue}{(#1)}}

\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}

答案1

LaTeX 无法处理文件名中的空格,因此使用合适的文件名应该可以解决您的问题。下面是根据您的代码编写的更简单的示例。

\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}

在此处输入图片描述

答案2

\includegraphics{}如果不带width或选项则使用height是有风险的。

我看不到您的主屏幕,因为它被我的工作过滤器挡住了。但我猜尺寸选项可能是导致您出现问题的原因。

(我认为 PDF 中可能保存了正确的尺寸。但为了以防万一,请尝试以下方法:)

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

至于 tikz 图像,您能发布该部分的代码吗?目前\begin{tikzpicture}和里面什么都没有\end{tikzpicture},所以什么都不会显示。我不知道有什么方法可以渲染 tikz 图的轮廓,但我们可以绘制一个具有所需尺寸的框。

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

对于我来说,这显示为一个盒子。

相关内容