在双列模式下跨越文本

在双列模式下跨越文本

我想以双列模式跨越字母名称,以便字母出现在页面的中心。

我。

\documentclass[10pt,a4paper,twocolumn]{extbook}
\usepackage{lipsum}
\usepackage{fancyhdr}

\newcommand*{\dictchar}[1]{
\clearpage
\centerline{\parbox[c][3cm][c]{2cm}{%
\fontsize{24}{24}
\selectfont
{#1}}}\par
}

% BASIC PAGE STYLE
\fancypagestyle{basicstyle}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% No header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyfoot[C]{\thepage}% Page in footer, centred
}

 % INDEX PAGE STYLE  
\fancypagestyle{indexstyle}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0.4pt}% 0.4pt header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyhead[C]{\thepage}% Page in footer, centred
}

% 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}}}}}

% middle rule  
\setlength{\columnsep}{20pt}
\setlength{\columnseprule}{0.1pt}

\begin{document}
\twocolumn
\pagestyle{dictstyle}

\dictchar{E e}

\lipsum[1-20]

\dictchar{F f}
\lipsum[1-20]

\end{document}

答案1

您只需使用命令即可\twoclumn[]。希望我理解正确。

% arara: pdflatex

\documentclass[10pt,a4paper,twocolumn]{extbook}
\usepackage{lipsum}
\usepackage{fancyhdr}

\newcommand*{\dictchar}[1]{
    \clearpage
    \twocolumn[
    \centerline{\parbox[c][3cm][c]{2cm}{%
            \fontsize{24}{24}
            \selectfont
            {#1}}}]
}

% BASIC PAGE STYLE
\fancypagestyle{basicstyle}{%
    \fancyhf{}% Clear header/footer
    \renewcommand{\headrulewidth}{0pt}% No header rule
    \renewcommand{\footrulewidth}{0pt}% No footer rule
    \fancyfoot[C]{\thepage}% Page in footer, centred
}

% INDEX PAGE STYLE  
\fancypagestyle{indexstyle}{%
    \fancyhf{}% Clear header/footer
    \renewcommand{\headrulewidth}{0.4pt}% 0.4pt header rule
    \renewcommand{\footrulewidth}{0pt}% No footer rule
    \fancyhead[C]{\thepage}% Page in footer, centred
}

% 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}}}}}

% middle rule  
\setlength{\columnsep}{20pt}
\setlength{\columnseprule}{0.1pt}

\begin{document}
    \twocolumn
    \pagestyle{dictstyle}

    \dictchar{E e}

    \lipsum[1-20]

    \dictchar{F f}
    \lipsum[1-20]   
\end{document}

在此处输入图片描述


将定义改为:

\newcommand*{\dictchar}[1]{
    \clearpage
    \twocolumn[
    \centerline{\parbox[c][3cm][c]{3cm}{% % or \parbox[t]...
            \centering
            \fontsize{24}{24}
            \selectfont
            {#1}}}]
}

会给出一个真正集中的版本。

在此处输入图片描述

相关内容