6

I'm trying to put numbering to the solutions of my assignment in the margin of my document like so:

enter image description here

Ideally I'd like to enter the numbers "1.", "2.", ... etc. manually, i.e. not have them numbered automatically. How do I do this? I'm using a modified article class.

2
  • 4
    Welcome to TeX.SE! This site works best if questions are accompanied by the code that's been used to generate the intended result. Please also be more specific about what you're trying to achieve; e.g., where in the margins should be numbers be located.
    – Mico
    Jan 27, 2015 at 5:57
  • Thanks for the welcome @Mico. In this case my previous attempts had all been so off the mark that I didn't they would even be worth including but I'll remember that for the future. Jan 27, 2015 at 16:32

1 Answer 1

11

It seems to me that you are just using a normal enumerate environment to do that.

So, to achieve what you want

  1. Load the package enumitem and add the optional argument [leftmargin=\labelsep] to your enumerate environment as in

    \begin{enumerate}[leftmargin=\labelsep]
    

    to have your label in the margin.

  2. Simply use the optional argument of \item to manually specify your number as in

    \item[3.] Let $(x_n)$ be a sequence such that $x_n>0$
    

MWE (don't load the showframe package in your document, I've used it just to show the margins)

\documentclass{article}
\usepackage{enumitem}
\usepackage{showframe} % just to show the margins

\begin{document}

\begin{enumerate}[leftmargin=\labelsep]
  \item[3.] Let $(x_n)$ be a sequence such that $x_n>0$
  \[y_n=\frac{1}{\frac{1}{x_1}+}\]
  \begin{enumerate}
    \item Suppose that $x_n$ is a convergent
  \end{enumerate}
\end{enumerate}

\end{document} 

Output

enter image description here


If you instead use [leftmargin=0pt] you will obtain

enter image description here

while, with [leftmargin=*] the result is

enter image description here

0

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.