我正在制作一张海报,我想从标题中删除标签位“图 xx:” figure
,如https://stackoverflow.com/questions/3162234/getting-rid-of-the-figure-1-bit。
部分代码如下:
\documentclass{sciposter}
\usepackage{lipsum}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{graphicx,url}
\usepackage{authblk}
\usepackage[portuges, brazil, english]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{fancybullets}
%\usepackage{caption}
\usepackage[labelformat=empty]{caption}
\newtheorem{Def}{Definition}
\title{Title1}
\author[1]{name1}
\affil[1]{Insti1}
\leftlogo[1]{Instilogo}
\rightlogo[1]{lablogo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Begin of Document
\begin{document}
\conference{Famous conference}
\maketitle
%%% Begin of Multicols-Enviroment
\begin{multicols}{3}
% Other irrelavent sections not shown here
\section*{Simulation Set-up}
\begin{itemize}
\item Approach is validated using DNS simulations.
\begin{figure}[H]
\centering
\includegraphics[width = \columnwidth]{Simulation.png}
\caption{Numerical Set-up}
%\label{fig:enter-label}
\end{figure}
\item Pt 2
\end{itemize}
% Other irrelavent sections not shown here
\bibliographystyle{plain}\bibliography{poster}
\end{multicols}
\end{document}
您能否指出可能出了什么问题?
非常感谢。
答案1
问题的直接原因是多色包及其multicols
环境不允许使用table
和figure
浮动。全宽figure*
和table*
是允许;但是,这与你无关,是吗?
但从更深层次的意义上讲,错误在于你:由于您无意让图表浮动在任何地方,因此您figure
一开始就不应该使用环境。([H]
这里,微弱的放置说明符无法帮助您。)相反,您应该做的是 (a) 使用基本center
环境(告诉 LaTeX 在图表/标题组合的上方和下方插入一些空白)和 (b) 使用\captionof
而不是\caption
排版未编号的标题。
关于您的代码还有一点说明:您应该使用选项width=\linewidth
而不是width=\columnwidth
,因为\includegraphics
发生在itemize
环境中,这会自动降低的值\linewidth
(但不会降低的值\columnwidth
)。
\documentclass[demo]{sciposter} % remove 'demo' option in real document
\usepackage{lipsum} % filler text
%%%\usepackage{epsfig} % is loaded automatically by 'graphixc'
\usepackage{amsmath,amssymb}
\usepackage{multicol} % for 'multicols' env.
\usepackage{graphicx,xurl} % use 'xurl', not 'url'
\usepackage{authblk}
\usepackage[portuges, brazil, english]{babel}
%%%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage[T1]{fontenc} % <-- new
\usepackage{enumitem} % <-- new
\usepackage{caption} % provides '\captionof' macro
\captionsetup{labelformat=empty,
skip=0.5\baselineskip} % <--- new
\title{Title1}
\author[1]{Name1}
\affil[1]{Insti1}
\leftlogo{Instilogo}
\rightlogo{lablogo}
\conference{Famous conference}
\begin{document}
\maketitle
\begin{multicols}{3}
% Other irrelevant sections not shown here
\section*{Simulation Set-up}
\begin{itemize}[left=0pt] % '[left=0pt]' is new
\item Approach is validated using DNS simulations
%%%\begin{figure}[H] % cannot use 'figure' float
\begin{center}
%%%\centering
\includegraphics[width=\linewidth]{Simulation.png} % NOT '\columnwidth'
%%%\caption{Numerical Set-up}
\captionof{figure}{Numerical Setup}
\label{fig:enter-label}
%%%\end{figure}
\end{center}
\item Pt 2
\item Pt 3
\end{itemize}
\lipsum[1-3] % filler text
% Other irrelevant sections not shown here
\end{multicols}
\end{document}