1

enter image description here

Hi all, I want to write out an argument with numbered premises in which there is a therefore sign in front of the conclusion, but the number corresponding to the conclusion is aligned with the previous numbers (see attached image). Is there a way to do this in the enumerate environment?

2

Unless you want LaTeX to find out if the item is the last one, you could do

\documentclass{article}
\usepackage{amssymb}
\newcommand{\ThereForeLeft}{\makebox[0pt][r]{$\therefore$\ifnum\value{enumi}<10
\hspace{0.85cm}%
\else
\hspace{1.2cm}%
\fi}}
\begin{document}
\renewcommand{\labelenumi}{(\arabic{enumi})}
\begin{enumerate}
 \item Blah
 \item Blub
 \item\ThereForeLeft Blubber
\end{enumerate}
\end{document}

enter image description here

5

Since the \therefore is only used in the last item, there is no problem in redefining a macro at that point.

\documentclass{article}
\usepackage{enumitem,amssymb,etoolbox}
\usepackage{siunitx}

\newlist{modusponens}{enumerate}{1}
\setlist[modusponens]{label=\maybetherefore(\arabic*),ref=(\arabic*)}

\newrobustcmd{\maybetherefore}{}
\newcommand{\lastitem}{\renewrobustcmd\maybetherefore{\makebox[0pt][r]{$\therefore$ }}\item}

\begin{document}

\begin{modusponens}
\item If Halep is \SI{174.7}{cm} and William is \SI{175}{cm}, then William is taller than Halep.
\item Halep is \SI{174.7}{cm} and William is \SI{175}{cm}.
\lasttitem William is taller than Halep.
\end{modusponens}

\end{document}

The redefinition will disappear at \end{modusponens}, so no \therefore will appear in front of the items in the next modusponens environment (it would in items following \lastitem in the same modusponens environment).

enter image description here

With some trickery, you can avoid \lastitem:

\documentclass{article}
\usepackage{enumitem,amssymb,etoolbox,refcount}
\usepackage{siunitx}

\newlist{modusponens}{enumerate}{1}
\setlist[modusponens]{
  label=\maybetherefore(\arabic*),
  ref=\arabic*,
  before=\stepcounter{modusponens},
  after=\addtocounter{modusponensi}{-1}\refstepcounter{modusponensi}\label{\themodusponens},
}
\newcounter{modusponens}

\makeatletter
\newrobustcmd{\maybetherefore}{%
  \edef\temp{\getrefnumber{\themodusponens}}%
  \edef\temp{\expandafter\@firstofone\temp}%
  \ifnum\temp=\value{modusponensi}%
    \makebox[0pt][r]{$\therefore$ }%
  \fi
}

\begin{document}

\begin{modusponens}
\item If Halep is \SI{174.7}{cm} and William is \SI{175}{cm}, then William is taller than Halep.
\item Halep is \SI{174.7}{cm} and William is \SI{175}{cm}.
\item William is taller than Halep.
\end{modusponens}

\end{document}

At the end of the environment, we issue a \label that will reference the last item number. Now \maybetherefore checks whether the item number matches the last.

This may require two LaTeX runs, if other modusponens environments have been added.

If there are always three items, it's much simpler:

\documentclass{article}
\usepackage{enumitem,amssymb,etoolbox}
\usepackage{siunitx}

\newlist{modusponens}{enumerate}{1}
\setlist[modusponens]{
  label=\maybetherefore(\arabic*),
  ref=\arabic*,
}

\makeatletter
\newrobustcmd{\maybetherefore}{%
  \ifnum 3=\value{modusponensi}%
    \makebox[0pt][r]{$\therefore$ }%
  \fi
}

\begin{document}

\begin{modusponens}
\item If Halep is \SI{174.7}{cm} and William is \SI{175}{cm}, then William is taller than Halep.
\item Halep is \SI{174.7}{cm} and William is \SI{175}{cm}.
\item William is taller than Halep.
\end{modusponens}

\end{document}
-1

Try (by hand) \item[\llap{$\therefore$\ }(3)].

3
  • Why this downvote?
    – Bernard
    Oct 23 '19 at 15:14
  • There is not a downvote now. Your answer is correct.
    – Sebastiano
    Aug 6 '20 at 14:19
  • 1
    Thanks, @Sebastiano!
    – Bernard
    Aug 6 '20 at 14:31

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.