[texhax] stretch section title in twocolumn
Paul Tremblay
phthenry at iglou.com
Tue May 16 17:52:28 CEST 2006
On Tue, May 16, 2006 at 08:58:30AM -0400, tom sgouros wrote:
>
> It would help everyone help you if you were to be more specific. Do you
> want the titles in the left column to extend into the right column?
> Right column titles to extend to the left? Only at the top of the page?
> In the middle of the page? Or is there a difficulty with using
> multicols (floats come to mind)? I've fidgeted with this in the past,
> but when I saw your question last night I didn't know enough about what
> you wanted to answer helpfully.
>
Sorry I was unclear. I convert XML documents into LaTeX to format
them. When I want to have a new page run, I use the following code:
\cleardoublepage
\section{Title}
I use this code because it is more flexible. My conversion code only
has to work with customizing the \section each time.
I want the output to have a title across the top of a page before the
columns are set up. I would need the title to stretch across both
columns, both left and right. But I only need the column to stretch
across both columns at the top of the page; there will be no text
above the title.
The structure for the XML document is:
section break with page break
title
section break
title
end section break
end section break with page break
If I use multicols, I have to go against the logic of the structure.
Logically I would start the multicols argument when I get to the
section break with page break, but then have to interrupt that for my
title. The conversion rules work with the logic of the document. So if
I used multicols, my LaTeX document looks like:
\cleardoublepage
% make headers and footers each time
\makepagestyle{first}
\thispagestyle{first}
\makepagestyle{odd-or-even}
\makeoddhead{odd-or-even}{}{}{}
\makeevenhead{odd-or-even}{}{}{}
\makeoddfoot{odd-or-even}{\thepage}{}{}
\makeevenfoot{odd-or-even}{\thepage}{}{}
\pagestyle{odd-or-even}
% start a multicols
\begin{multicols}{2}
\section{The Title}
text\par
\end{multicols}
% end example snippet
The title in this case would only span across one column. I know it
seems easy to simply move my \section{The Title} one line above,
before the multicols environment, but actually in the conversion it
requires a lot more rules. I would have to write two different set of
rules, one for a multicolumn document and one for a one-column
document. In addition, I would have to make sure I started the
multicols environment each time I have a section break.
Thanks
Paul
--
************************
*Paul Tremblay *
*phthenry at iglou.com *
************************
More information about the texhax
mailing list