在使我的 latex 文档正确格式化时遇到了一些问题。我知道在两列文档中使用浮点数很困难,但一定有办法让它正常工作。我想在双列文本格式的页面底部放置一个(几乎)页面宽度的图形,同时还能够将标题放在图形的侧面。
我尝试了各种软件包,包括sidecap
、dblfloatfix
和stfloats
,我相信一定有办法,但我就是想不出来。谢谢大家的帮助!
例子:
这是我的 MnWE。必须创建一个虚拟文档:
\documentclass[twocolumn,superscriptaddress,floatfix,longbibliography]{article}
\usepackage{geometry}
\geometry{margin=1in}
\usepackage[backend=biber, style=chem-acs]{biblatex}
\addbibresource{references.bib}
\usepackage{mathptmx}
\usepackage{amsmath,amssymb} % math symbols
\usepackage{bm} % bold math font
\usepackage{graphicx} % for figures
\usepackage{comment} % allows block comments
\usepackage{textcomp}
\usepackage{float}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{textgreek}
\usepackage[dvipsnames]{xcolor}
% \usepackage{parskip}
\usepackage[version=4]{mhchem}
\usepackage{xstring}
\usepackage{xspace}
\usepackage{titling}
% \usepackage{stfloats}
\usepackage{sidecap}
\usepackage{dblfloatfix}
\usepackage{titlesec}
\titleformat*{\section}{\normalfont \bfseries}
\titleformat*{\subsection}{\normalfont}
\titleformat*{\subsubsection}{\normalfont \itshape}
\usepackage{enumitem}
\setlist{leftmargin=*,topsep=1pt,parsep=0pt}
\usepackage{xcolor}
\usepackage{hyperref}
\begin{document}
\section{\label{sec:introduction}Introduction}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{figure*}[b!]
\includegraphics[width=0.75\textwidth]{example-image-a}
\caption{cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat}
\label{fig:cat}
\end{figure*}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{SCfigure*}[b!]
\includegraphics[width=0.75\textwidth]{example-image-b}
\caption{cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat cat}
\label{fig:cat}
\end{SCfigure*}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{document}
答案1
看看以下内容是否是您想要的:
\documentclass[twocolumn]{article}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\usepackage{graphicx} % for figures
\usepackage{sidecap}
\begin{document}
\section{Introduction}
\label{sec:introduction}
\lipsum
\begin{SCfigure*}[0.25] % <---
\begin{wide} % <--- defined in "sidecap" package
\includegraphics[width=0.75\textwidth]{example-image-b}
\caption{\lipsum[66]}
\label{fig:cat}
\end{wide}
\end{SCfigure*}
\lipsum
\end{document}