3

I would like to span the name of the letters in twocolumn mode so the letters appear in the center of the page.

ME.

\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}
2
  • Is there a reason for using extbook? – Johannes_B Jan 12 '15 at 15:13
  • @Johannes_B Yes, I would like to skip to B5 8pt format at the same time. – chejnik Jan 12 '15 at 15:30
3

You could just use the command \twoclumn[] for this. I hope, I got you correct.

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

enter image description here


Changing the definition to this:

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

would give a really centred version.

enter image description here

1
  • Yes, perfect positioning. – chejnik Jan 12 '15 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.