I'm interested in achieving a two-column layout like the following, where the columns are flush with the left and right margins of the page:
| section heading | lorem ipsum lorem ipsum lorem ipsum lorem ipsum |
| | lorem ipsum lorem ipsum lorem ipsum lorem ipsum |
| | lorem ipsum lorem ipsum lorem ipsum lorem ipsum |
| | ... |
The basic shape is of course easy to achieve with a (long)table, but the compiler doesn't know what to do with a \section{...}
command inside a table.
Another possibility is to use titlesec with the leftmargin option, as described here, but this places the section heading in the left margin, rather than making its left edge flush with the left margin. The desired effect could be achieved by manually tweaking the margins, but I am wondering if a cleaner solution is possible.
Best Answer
Here I start with the code given in the question cited by the OP.
I don't know the actual numbers are precise, but a
\leftskip
can be used to compensate for theleftmargin
value. I show in this MWE a transition back to the original sectioning system, which must be accompanied by a cancellation of the\leftskip
.