\documentclass{book}
\usepackage[a4paper,margin=1cm,landscape]{geometry}
\usepackage{multicol}
\newenvironment{flagsAndExplanation}[2]
{
\begin{itemize}
\item \textit{#1} %commandFlags
\begin{itemize}
\item #2 %commandDescription
\end{itemize}
\end{itemize}
}
\newenvironment{commandTemplate}[3]
{
\chapter{#1} %commandName
\section{#2} %sectionName
}
\begin{document}
\begin{multicol}{3}
\newcommand{\mainSomething}{GNU}
\newcommand{\derivedPackage}{coreutils}
\newcommand{\commandName}{ls}
\newcommand{\sectionName}{FilesFilter}
\begin{commandTemplate}{\mainSomething}{\derivedPackage}{\commandName}
\end{commandTemplate}
\newcommand{\commandFlags}{{\texttt{-a, --all}}}
\newcommand{\commandDescription}
{
do not ignore file names that start with '.' .
}
\begin{flagsAndExplanation}{\commandFlags}{\commandDescription}
\end{flagsAndExplanation}
\renewcommand{\commandFlags}{{\texttt{
-d, --directory /
}}}
\renewcommand{\commandDescription}
{
List just the names of directories in current
}
\begin{flagsAndExplanation}{\commandFlags}{\commandDescription}
\end{flagsAndExplanation}
\end{multicol}
\end{document}
Is there something I have done wrong? Why does it work with a simple document, but not on mine?
\documentclass
directive and the instruction\usepackage{multicol}
. And the body of the document could be simplified to\begin{document} \begin{multicol}{3} bla bla bla \end{multicol} \end{document}
. Everything else is fluff.\newenvironment
s are working because of sheer luck. They expect two mandatory arguments, the second one being presently grabbed as\par
because of the empty lines you are leaving in the code.