Document ClassesFloating Chapterheads

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
zr0iq
Posts: 5
Joined: Wed Mar 16, 2011 7:31 pm

Floating Chapterheads

Post by zr0iq »

I recently dabbled into modifing document classes and writing my own, rather insuccessfully, but I managed to do one or other thing by patching and altering stuff together, and it worked, I think even without errors once I remove the fontspec stuff and go back to latex, but that is another story.

Well I am currently writing on a two column document and I asked myself if it was possible to position the chapterhead in between the text, so it flows like this:

\cleardoublepage
\begin multicolumn text \end multicolumn text [like four-five lines]
\chapterhead
\begin multicolumn text ...

I have no clue on how to do it. Clues on how to do it, if you know how to, are more appreciated than a working example, learning and fiddling you know ;)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Floating Chapterheads

Post by 5gon12eder »

So that would be something like this, right?

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{multicol}

% the following two packages allow me to produce
% a paragraph of lorem ipsum via \blindtext:
\usepackage[latin]{babel}
\usepackage{blindtext}

\newenvironment{mySection}[1]
               {
                 \begin{center}\section{#1}\end{center}
                 \begin{multicols}{2}
               }
               {
                 \end{multicols}
               }

\begin{document}
  \begin{mySection}{First Section}
    \blindtext
  \end{mySection}
  \begin{mySection}{Second Section}
    \blindtext
  \end{mySection}
\end{document}
Looking like the attachment. For aesthetic reasons I would consider turning off section numbering.
Attachments
document.pdf
(29.5 KiB) Downloaded 207 times
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
zr0iq
Posts: 5
Joined: Wed Mar 16, 2011 7:31 pm

Re: Floating Chapterheads

Post by zr0iq »

well, if you substitute section 2 with chapter-title, and remove section 1, then it is exactly the design I look for.

I want the chapterhead be parskipped into the chapter itself, so that some lines, well something like the first 10th [29mm or so] is displayed above the chapter stuff.

edit:
well probably I should abandon the multicol idea. just leave it as a float and move it down.
Post Reply