LaTeX LaTeX Question (formating section headings)

  • Thread starter Thread starter Metazeno
  • Start date Start date
  • Tags Tags
    Latex Section
AI Thread Summary
The discussion centers around the challenge of formatting a document into two columns, with section headings on the left and section text on the right. The user attempted to create a new command to achieve this layout using LaTeX, defining dimensions for the columns and a custom command for section headings. However, the implementation resulted in the section text appearing in its usual position, while the headings were misaligned outside the document body. A suggestion was made to use a table as a workaround, which the user has adopted temporarily. The user expresses a desire to eventually create a custom class file (.cls) for a more integrated solution, emphasizing the need for a command that maintains the document's flow.
Metazeno
Messages
2
Reaction score
0
I would like to divide the body of my document into two columns. In the left column go the section headings and in the right column go the section text.

My attempt is to make a new command:
\newdimen\sectionwidth
\newdimen\resumewidth
\sectionwidth=0.25 \textwidth
\resumewidth=0.75 \textwidth
\newcommand{\ressection}[1]
{
\hbox to 0pt
{
\hss
\vtop to 0pt
{
\leftskip=0pt
\hsize=\sectionwidth
\textwidth=\sectionwidth
\raggedright
\bf
#1
\vss
}
}
\vskip-\baselineskip
}
Unfortunately this puts the section text where it would be normally and the section headings far off to the left outside the document body.

Does anyone know how to fix this?
 
Physics news on Phys.org
I'd recommend using a table instead.
 
//I'd recommend using a table instead.// I've done that for now as a quick fix (making a \newenvironment). But I would like to write my own .cls for this document eventually so it has to be more like the flow of a \newcommand.
 

Similar threads

Replies
4
Views
3K
Replies
4
Views
4K
Back
Top