1

I want to typeset a document with desired output such as:

1. blah blah ...
   blah blah  ....


2. blah blah ...
   blah blah  ....


3. blah blah ...
   blah blah  ....

That is simply numbered output (with text wrap and aligned), with each item taking the whole page width. One way I tried is to redefine \section{} command by:

\documentclass[12pt]{article}
\usepackage{titlesec}
\titleformat*{\section}{\normalfont}
\begin{document}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\section{blah}
\end{document}

So my document ends up with \begin{document} \section{...} \section{} ...\end{document}. Apparently, this confused the layout processing, it tries to put all section in ONE page and ONE page only, no matter how many sections command I have.

I don't like more obvious enumerate environment because its indention of each item, I'd like each item to take the whole page width like section did.

Can someone tell me what am I doing wrong and how best to get the results? TIA

Edited to add example doc.

  • 2
    The indentation of enumerate isn't fixed it is setable via various parameters (probably most easily using the enumitem package) – David Carlisle Nov 25 '14 at 16:21
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Nov 25 '14 at 16:23
  • I don't understand the connection between \section and enumerates in this OP – user31729 Nov 25 '14 at 16:26
  • Thanks for the suggestion. I added sample doc to illustrate. enumitem looks promising, will try. The other reason I preferred to customized \section command is because vim folding feature allow me to fold/unfold such headings. But apparently it didn't work as I expected. – python152 Nov 25 '14 at 16:40
2

Here are two simple solutions with enumitem:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}

\usepackage[showframe, nomarginpar]{geometry}

\usepackage{enumitem}

\usepackage{lipsum}

\begin{document}

\begin{enumerate}[wide=0pt]
\item \lipsum[2]
\item \lipsum[3]
\end{enumerate}

\begin{enumerate}[align=left, labelwidth=1em, leftmargin=\dimexpr\labelwidth+\labelsep \relax]
\item \lipsum[4]
\item \lipsum[5]
\end{enumerate}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.