1

I want to start an exercise

  1. by a number (I.1 or XII.32)
  2. then some space
  3. and then the beginning of the exercise so that all the beginnings of the exercises (point 3. above) are horizontally aligned, as in the following picture.

enter image description here

Exercises belong to different paragraphs and may have several lines and centered formulas.

How can I align the beginning of the exercises of a same page?

3
  • \makebox[3cm][l]{II.2}{Zzzzz} and \makebox[3cm][l]{XIII.32}{Zzzzz} ? Commented Jan 31, 2021 at 23:25
  • One could also use a table without visible lines. Commented Feb 1, 2021 at 0:16
  • @DavidCarlisle I was thinking of a command but I can't remember its name. It's a command that allows someone to write words on the top one of the other; it's a command that allows someone to "come back at the beginning of a line".
    – Colas
    Commented Feb 1, 2021 at 5:46

2 Answers 2

0

Use \hbox to2cm{...} ...

Use \leavevmode to leave vertical mode and switch to horizontal mode.

\documentclass{article}

\begin{document}
\leavevmode\hbox to2cm{\textbf{I.1}} First exercise 

\leavevmode\hbox to2cm{\textbf{XII.13}} Last exercise
\end{document}

enter image description here

0

I'd suggest a list rather than setting each exercise manually. You can use enumitem to format the list setting globally (like I did below by creating an exercises list):

enter image description here

\documentclass{article}

\usepackage{enumitem,lipsum}

\newlist{exercises}{enumerate}{1}
\setlist[exercises]{
  labelwidth=2cm,
  font=\bfseries,
  align=left
}

\begin{document}

\begin{exercises}
  \item[I.1]
    First exercise 

  \item[IX.78]
    \lipsum[1]
    
  \item[XII.13]
    Last exercise
\end{exercises}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .