如何平衡包含two-column
图形的文档中的行?换句话说 - 如何设置带标题的图形的垂直边距,以便图形后的行与下一列(右列或左列)中的行相对应?
我在一份two-column
文档中排版了字典条目,包括放置在条目下方或页面顶部的照片(每列最多 1 张照片)。如果页面的每一列都有一个图片(放置在条目正下方),则两列中的线条对应。如果有两张照片(其中一张放置在顶部),则线条不对应。如果只有一列中有照片,则线条不对应。即使每列顶部都有一个图片,线条也不对应。
梅威瑟:
\documentclass[8pt,c5paper,twocolumn]{extbook}
\usepackage[paper=c5paper, top=1.5cm, headsep=0.4cm, bottom=1.5cm, left=1cm, right=1cm]{geometry}
\usepackage{fancyhdr}
\usepackage[icelandic, latin, czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\usepackage[scaled=0.90]{helvet} % ss
\usepackage{enumitem}
\usepackage{hanging}
% example text and images
\usepackage{lipsum}
\usepackage{mwe}
\usepackage{color}
% float control
% Alter some LaTeX defaults for better treatment of figures:
% See p.105 of "TeX Unbound" for suggested values.
% See pp. 199-200 of Lamport's "LaTeX" book for details.
% General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{1}
\setcounter{bottomnumber}{1}
\setcounter{totalnumber}{1} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
% remember to use [htp] or [htpb] for placement
\makeatletter
\setlength{\@fptop}{0pt}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatother
%COMMANDS
\newcommand\entry[3][]{\hangpara{1em}{1}{\fontfamily{phv}\selectfont{\textbf{{#2}}}}\
#3\ifx\relax#1\relax\markboth{#2}{#2}\else\markboth{#1}{#1}\fi
\par}\nopagebreak[4]
%FANCY PAGE STYLES
\pagestyle{fancy}
% DICTIONARY PAGE STYLE
\fancypagestyle{dictstyle}{%
\renewcommand{\headrulewidth}{0.4pt}
\fancyhf{}
\fancyhead[LE,LO]{{\fontfamily{phv}\selectfont{\textbf{\rightmark}}}}
\fancyhead[CO,CE]{\thepage}%the page numbers will be printed when the dictionary is ready
\fancyhead[RE,RO]{{\fontfamily{phv}\selectfont{\textbf{\leftmark}}}}}
\begin{document}
\twocolumn
\pagestyle{dictstyle}
% the letters in alphabetical order
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}}
\entry[VS]{{Example entry} }{{\color{blue}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ example word}}}\foreignlanguage{czech}{{ \lipsum[23]}}
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{example-image-b}}
\caption{Vöðuselur}
\end{figure}}
\clearpage
\end{document}
创建字典条目的命令:
\newcommand\entry[3][]{\hangpara{1em}{1}{\fontfamily{phv}\selectfont{\textbf{{#2}}}}\
#3\ifx\relax#1\relax\markboth{#2}{#2}\else\markboth{#1}{#1}\fi
\par}\nopagebreak[4]
示例条目:
\entry[VS]{{VS} }{{\color{darkgreen}{\small{\textbf{ zkr}}}}{\foreignlanguage{icelandic}{\textbf{ vatnssalerni}}}\foreignlanguage{czech}{{ WC, záchodky}}}
照片放置示例。
\begin{figure}[ht]
\centering
\setlength\fboxsep{0pt}\setlength\fboxrule{0.5pt}\fbox{\includegraphics[width=5.5cm]{ds_image_voduselur_0_2.jpg}}
\caption{Vöðuselur}
\end{figure}
更新(上面的 MWE 没有正确显示不良行为)