我目前正在写我的硕士论文,在图片换行和大标题/浮动脚方面遇到了一些问题。我使用“Floatrow and Floatsetup”包。问题是:我的图片的浮动脚太大,因此在换行时会出现一些空白,并且我的浮动注释超出了页面的垂直限制。
我想让图片环绕在文本周围(以避免任何空间丢失),并使标题和浮动注释占据整个文本宽度(而不是与图片相同的宽度),规则如下图所示(使用 Microsoft Word 制作)。注意:底部规则也应该出现。
这是我的实际代码:
\usepackage{floatrow}
\floatsetup[wrapfigure]{style=ruled,capposition=bottom,footposition=bottom}
\begin{wrapfigure}{l}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.5\textwidth]{ABCmod}
\end{center}
\caption{Baba general structure}\label{fig:abc}
\floatfoot{babababababababababababababababababababbbaabbabaababbababaababbaabababbabaabababababababababababbabaababababbababaababababbabababababaababababababababababababababababababababababababbababababbabababbababbababababbababababbabababababbababababababababbababababbababababababbabababababababbababababababababbababababababababababbababababababababbababababababababbababab}
\end{wrapfigure}
最小工作示例:
\documentclass[hidelinks, 12pt]{report}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{geometry}
\geometry{a4paper}
\geometry{hscale=0.85,vscale=0.85,centering}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{floatrow}
\floatsetup[wrapfigure]{style=ruled,capposition=bottom,footposition=bottom}
\graphicspath{{Pictures/}}
\begin{document}
Most of the ABC transporters are ATP-dependent transmembrane proteins. Proteins, ions, amino acids or sugars can effectively travel against their concentration gradients thanks to an alternating acces model caused by conformational changes consequent to ATP binding in the NBD and substrate fixation on the TMD. The transport of substrates draws its driving force from the hydrolysis of ATP which defines them as active transporters. However, the precise mechanism is still misunderstood as no fully high-resolution of a complete ABC protein ATP-cycle has been achieved. The ABC family is divided into importers (almost exclusively prokaryots) and exporters. The difference between them lies in the variety of membrane-spanning-domains (MSD) as the NBDs are more structurally conserved. These observations witness the diversity of substrates/ TMD couplings specific to each transporter and support the hypothesis of a universal ATP hydrolysis mechanism by the NBDs.
\\
NBDs contain a Walker A motif (P-loop) and a Walker B motif separated by a C-signature sequence (LSGGQ) which is the specific and conserved sequence of ABC proteins. The dimerization of NBDs make a head-to-tail conformation with interaction between the Walker motifs of one NBD and the signature sequence of the other. Other features commonly found in ABC proteins are the A-, D-, Q- and H-loops.
\begin{wrapfigure}{l}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.5\textwidth]{ABCmod}
\end{center}
\caption{ABC transporters general structure}\label{fig:abc}
\floatfoot{Most of the ABC transporters are ATP-dependent transmembrane proteins. Proteins, ions, amino acids or sugars can effectively travel against their concentration gradients thanks to an alternating acces model caused by conformational changes consequent to ATP binding in the NBD and substrate fixation on the TMD. The transport of substrates draws its driving force from the hydrolysis of ATP which defines them as active transporters}
\end{wrapfigure}
\\
ABC proteins are widely studied firstly due to their involvement in many physiological roles such as metabolites transport, signal transduction, protein secretion or antigen presentation. Secondly, because these proteins are involved in many human diseases both directly (mostly caused by mutations) and indirectly with their role in bacterial anti-drug resistance and chemotherapy failure.
\end {document}
答案1
如此复杂的事情需要手动换行。\nopar
宏对此很有用,但对于此 MWE 来说并不需要。此外,窄列通常使用 进行格式化\sloppy
。
\documentclass[hidelinks, 12pt]{report}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{geometry}
\geometry{a4paper}
\geometry{hscale=0.85,vscale=0.85,centering}
\usepackage{graphicx}
%\usepackage{wrapfig}
%\usepackage{floatrow}
%\floatsetup[wrapfigure]{style=ruled,capposition=bottom,footposition=bottom}
%\graphicspath{{Pictures/}}
\usepackage{caption}
\newcommand{\nopar}{\bgroup\parfillskip=0pt\par\egroup}% insert to manually break a paragraph
\newcommand{\boxcaption}[2][\empty]% same as \caption
{\vspace{\abovecaptionskip}\par
\noindent\fbox{\begin{minipage}{\dimexpr \textwidth-2\fboxsep-2\fboxrule}
\abovecaptionskip=0pt
\belowcaptionskip=0pt
\captionof{figure}[#1]{#2}
\end{minipage}}%
\vspace{\belowcaptionskip}\par}
\edef\normalparindent{\the\parindent}
\begin{document}
Most of the ABC transporters are ATP-dependent transmembrane proteins. Proteins, ions, amino acids or sugars can effectively travel against their concentration gradients thanks to an alternating acces model caused by conformational changes consequent to ATP binding in the NBD and substrate fixation on the TMD. The transport of substrates draws its driving force from the hydrolysis of ATP which defines them as active transporters. However, the precise mechanism is still misunderstood as no fully high-resolution of a complete ABC protein ATP-cycle has been achieved. The ABC family is divided into importers (almost exclusively prokaryots) and exporters. The difference between them lies in the variety of membrane-spanning-domains (MSD) as the NBDs are more structurally conserved. These observations witness the diversity of substrates/ TMD couplings specific to each transporter and support the hypothesis of a universal ATP hydrolysis mechanism by the NBDs.
NBDs contain a Walker A motif (P-loop) and a Walker B motif separated by a C-signature sequence (LSGGQ) which is the specific and conserved sequence of ABC proteins. The dimerization of NBDs make a head-to-tail conformation with interaction between the Walker motifs of one NBD and the signature sequence of the other. Other features commonly found in ABC proteins are the A-, D-, Q- and H-loops.
\noindent\raisebox{-\height}{\begin{minipage}{\dimexpr 0.5\textwidth-0.5\columnsep}
\centering
\includegraphics[width=\textwidth]{example-image}
\end{minipage}}\hfill
\raisebox{-\height}{\begin{minipage}{\dimexpr 0.5\textwidth-0.5\columnsep}
\parindent=\normalparindent\relax
ABC proteins are widely studied firstly due to their involvement in many physiological roles such as metabolites transport, signal transduction, protein secretion or antigen presentation. Secondly, because these proteins are involved in many human diseases both directly (mostly caused by mutations) and indirectly with their role in bacterial anti-drug resistance and chemotherapy failure.
\end{minipage}}
\boxcaption{ABC transporters general structure --
Most of the ABC transporters are ATP-dependent transmembrane proteins. Proteins, ions, amino acids or sugars can effectively travel against their concentration gradients thanks to an alternating acces model caused by conformational changes consequent to ATP binding in the NBD and substrate fixation on the TMD. The transport of substrates draws its driving force from the hydrolysis of ATP which defines them as active transporters}
\label{fig:abc}
\end {document}