如何在双栏环境中创建双整页跨页

如何在双栏环境中创建双整页跨页

要创建双页跨页,即图像分布在一本打开的书的两页上,没有空白(没有边距、页眉和页脚),hvfloat建议使用该软件包。

但是,这个软件包似乎不适合我双栏书籍。如果将图表放在章节的最后一页之后,而该章节的左栏比右栏长,那么图表的左侧将靠近页面的中间,而不是像文档承诺的那样与页面的左侧齐平。

在浮动之前插入\clearpage无法解决问题,并且在下一章中产生了更多与列和标题有关的问题(未显示)。

hvfloat语法是从hvfloat示例文档中完全复制的doublepage2s2c.tex

下面是最小工作示例。

\documentclass[12pt, twoside]{book}

\usepackage[letterpaper,
bindingoffset=5mm,
left=16mm,
right=16mm,
top=20mm,
bottom=20mm,
footskip=5mm]{geometry}

\usepackage{hvfloat}
\usepackage{lipsum}

\begin{document}
\twocolumn
\chapter{1}
\lipsum[1-5]


\hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine]%
{figure}%
{\includegraphics[doubleFULLPAGE]{example-image-b}}%
[A doublepage image with a caption on the page following.]%
{A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}%
{fig:doubleFULLPAGE0after2col}

\chapter{2}

\lipsum[1-5]


\end{document}

答案1

将设置更改geometry为:

\usepackage[letterpaper, 
left=21mm,%16mm +5mm
right=16mm, 
top=20mm,
bottom=20mm,
includefoot,% 
showframe % optional, show the margins
]{geometry}

并将其放置\hvFloat在文本之前,使其保持在章节内。同时将其添加bindCorr=5mm到浮动中。

\documentclass[12pt, twoside]{book}

\usepackage[letterpaper, 
left=21mm,%16mm +5mm
right=16mm, 
top=20mm,
bottom=20mm,
includefoot,% 
showframe
]{geometry}


\usepackage{hvfloat}

\usepackage{lipsum}

\begin{document}
    \twocolumn
    \chapter{1}

    \hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine, bindCorr=5mm]% here <<<<
    {figure}%
    {\includegraphics[doubleFULLPAGE]{example-image-b}}%
    [A doublepage image with a caption on the page following.]%
    {A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}%
    {fig:doubleFULLPAGE0after2col}
    
    \lipsum[1-5] 
        
    \chapter{2}
    
    \lipsum[1-5]
    
    
\end{document}

C

在实际文档中,您可以使用该选项nonFloat=true将浮动插入到靠近所需位置的位置。例如:

% !TeX TS-program = pdflatex
\documentclass[12pt, twoside]{book}

\usepackage[letterpaper, 
left=21mm,%16mm +5mm
right=16mm, 
top=20mm,
bottom=20mm,
includefoot,% 
showframe % optional, show the margins
]{geometry}


\usepackage{hvfloat}

\usepackage{lipsum}

\begin{document}
    \twocolumn
    \chapter{1}
    
    \lipsum[1] 

    \hvFloat[doubleFULLPAGE,capWidth=n,twoColumnCaption,capPos=after,separatorLine, bindCorr=5mm, nonFloat=true]% here <<<<
    {figure}%
    {\includegraphics[doubleFULLPAGE]{example-image-b}}%
    [A doublepage image with a caption on the page following.]%
    {A caption for a double-sided image that will be placed on the bottom of the page after the right side of the image. The illustration begins on the left edge of the paper. A short form is used for the LOF. The parameter is \texttt{doubleFULLPAGE}}%
    {fig:doubleFULLPAGE0after2col}
    
    \lipsum[2-5] 
        
    \chapter{2}
    
    \lipsum[1-5]
    
    
\end{document}

相关内容