1

The result of the following code snippet is:

\documentclass[a4paper, 12pt]{article}
\usepackage[]{ragged2e}

\begin{document}

    \begin{enumerate}
        \item {\raggedleft  \textbf {Inference Rules}}\\
        \begin{enumerate}
            \item First Item
        \end{enumerate}
        {\raggedleft \textbf {Logic}}
    \end{enumerate}

\end{document}

enter image description here

Can anyone help me align with the word "Logic" on the left below number 1?

  • 1
    No need for the raggedleft. – azetina Aug 1 '19 at 17:46
  • Without this command, "Logic" is below "Inference Rules, not 1. – gmn_1450 Aug 1 '19 at 17:50
  • @gmn_1450: Why not put Logic outside the enumerate? – Werner Aug 1 '19 at 18:05
2

Simple with enumitem: use the wideoption`, like this:

\documentclass[a4paper, 12pt]{article}
\usepackage[]{ragged2e}
\usepackage[showframe]{geometry} 
\usepackage{enumitem}

\begin{document}

    \begin{enumerate}[wide, leftmargin=\parindent]
        \item \textbf {Inference Rules}\\
        \begin{enumerate}[leftmargin=2\parindent]
            \item First Item
        \end{enumerate}
         \textbf {Logic}
    \end{enumerate}

\end{document} 

enter image description here

  • Thanks a lot! Can you explain to me what the command does? – gmn_1450 Aug 1 '19 at 17:57
  • wide makes the label left-aligned, with a default indent of \parindent, and the item contents is aligned with the label (for instance, if you set wide=0pt, the label and the item content are aligned on the left margin – Bernard Aug 1 '19 at 18:14

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.