Page Layouttwo column book

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
sachinrajsharma
Posts: 35
Joined: Sun Apr 08, 2012 5:48 am

two column book

Post by sachinrajsharma »

Hi,
I want to spread the heading in the attached document on the top of the doc which is "HIV / AIDS Myths and Facts" that means I want to write this heading in a way such that it will spread over the two columns on the top i.e. on the top of the left hand column which starts from "HIV/AIDS has been visible in the United States" and other right hand side column which starts with heading "How is HIV transmitted?"

I am attaching tex file and pdf file both for reference.

Regards,

Sachin Sharma
Attachments
AIDS Awareness Document.tex
(8.61 KiB) Downloaded 323 times
AIDS Awareness Document.pdf
(66.88 KiB) Downloaded 434 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

two column book

Post by cgnieder »

Before presenting a solution to your problem at hand (using \twocolumn) I have a few remarks regarding your text:
  • Instead of ending a paragraph with \\ you should leave the \\ completely out. An empty line in the source will terminate a paragraph
  • Instead of saying \noindent at the beginning of each paragraph
    set the length \parindent to 0 once in the preamble.
  • instead of inserting section headings with \textbf{heading} use \section{heading} and customize the appearance, e.g., with titlesec
  • instead of enumerating lists manually use an enumeration environment like {enumerate}. Its appearance can be customized with enumitem
  • Don't use "quote" but ``quote'' in order to get
    true quotation marks
  • it might be a good idea to adjust \hfuzz in a twocolumn document
    so TeX doesn't complain too often about overfull boxes if a line protrudes into the margin.
For the problem at hand I'd not use the class option twocolumn but use \twocolumn manually. It has an optional argument for placing a title that spans over the whole textwidth.

I have done all of the above in the document you posted with the effect that now there are no warnings at all instead of the dozens of underfull and overfull boxes you had. I'll attach it below.

Regards
Attachments
AIDS.tex
(9.03 KiB) Downloaded 405 times
site moderator & package author
sachinrajsharma
Posts: 35
Joined: Sun Apr 08, 2012 5:48 am

Re: two column book

Post by sachinrajsharma »

Hi,
Thanks a lot , it was really wonderful and got solution. One query about it that on the third page the distance between two column in not even could you please give clarity on that also.

Thanks once again.

Regards,

Sachin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

two column book

Post by cgnieder »

That can be achieved using the multicol package. Use

Code: Select all

\usepackage{multicol}
in the preamble and replace

Code: Select all

\twocolumn[\LARGE\bfseries HIV / AIDS Myths and Facts]
with

Code: Select all

\begin{multicols}{2}[
  \begin{center}
    \LARGE\bfseries HIV / AIDS Myths and Facts
  \end{center}]
and add

Code: Select all

\end{multicols}
at the end of the document.

Regards
site moderator & package author
Post Reply