I'm writing some xsl
that takes xml
source and outputs a .tex
file. The source has an element that is meant to frequently become a multicols
environment in the .tex
output, and it has a cols
attribute to specify how many columns there are.
I'd like the default to be one column if no cols
attribute has been specified. But it appears that \begin{multicols}{1}
still produces two-column output. I could write the xsl
in a casewise way and skip the multicols
environment altogether when cols
is not specified (or is specified as 1
), but for the sake of consistency I'd prefer not to.
Is there any LaTeX way to get the multicols
environment to produce one-column output?
multicol
documentation (texdoc multicol
) contains single-column segments, such as the start of section 4. the source for that document would show how it's done.multicols
environment. If I were writing a one-off.tex
file, that would be fine. But thexsl
element to this question is pushing me to try to make\begin{multicols}{1}
work.multicol.dtx
and the relevant section begins\begin{multicols}{2}[\section{The Implementation} % We are now switching to two-column output ...]
there's also a\subsection
within the scope of the optional argument. but definitely not\begin{multicols}{1}
.