2

I would like to achieve a column alignment in twocolumn (note: I need to place many pictures so multicol environment is not an option) and place the letters directly after aligned two column text. The ME differs from this correct answer in not setting the letters on the next page.

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

 % 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-1]

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

\dictchar{G g}
\lipsum[3-20]

\end{document}

In other words I would like to typeset this:

Example of letter P

  • I don't understand the question. Do you want to reduce the vertical spacing before and after your \dictchar-macro content? – user31729 Jan 13 '15 at 8:16
  • So you want to switch to onecolumn mode in between? – user31729 Jan 13 '15 at 8:38
  • Yes, actually. But it envolves no pagebreak and the alignment of the rest of the headwords from the previous letter (in the picture is shown how headwords starting with O aligns, ozonometer is the last headword). – chejnik Jan 13 '15 at 9:00
3

The cuted package and it's strip environment provide the desired feature. (I reduced the height of the parbox however, since cuted seems to add a lot of vertical space.)

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


\newcommand{\dictchar}[1]{%
\begin{strip}
 \centering
 \parbox[c][1cm][c]{2cm}{%
   \centering
      \fontsize{24}{24}
      \selectfont
      {#1}%
}
\end{strip}
}

 % 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}
\pagestyle{dictstyle}

\dictchar{E e}
\lipsum[2]

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

\dictchar{G g}
\lipsum[3-20]

\end{document}

enter image description here

  • That is correct and answer to my question. Unfortunately pictures cause wrong placement. I should probably start new question. – chejnik Jan 14 '15 at 6:10
  • There's a continuation of this question here – chejnik Jan 14 '15 at 7:07

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.