Вертикальные буквы в перечислении не выравниваются

Вертикальные буквы в перечислении не выравниваются

Я использую несколько перечислений в Theorem-environments. Шрифт курсивный, но я хотел установить метки (для которых я использую буквы) вертикально. Я прочитал, что я делаю это через \normalfontи это работает. Но я увидел, что метки не установлены по ширине. Вот картинка: введите описание изображения здесь

Если присмотреться, то можно увидеть, что (b) расположен на несколько пикселей дальше левого левого края: введите описание изображения здесь

Я хотел бы их настроить, и желательно не жестко закодировать. Это возможно?

Вот мой MWE:

\documentclass[ngerman, fontsize=11pt, DIV=12 ,BCOR = 10mm, parskip=half-, twoside]{scrbook}

\usepackage{enumitem}
\usepackage{amsthm}

\newtheoremstyle{style:lemma}
{3pt}% Space above
{3pt}% Space below
{\itshape}% Body fonti
{}% Indent amount
{\bfseries}% Theorem head font
{.}% Punctuation after theorem head
{.5em}% Space after theorem head
{}% Theorem head spec (can be left empty, meaning ‘normal’)

\theoremstyle{style:lemma}
    \newtheorem{lemma}[]{Lemma}

\begin{document}
    \begin{lemma}
        There are several points to show. These are

    \begin{enumerate}[label = \normalfont(\alph*)]
        \item $a = b+1$
        \item $\sqrt{n} = 2$
        \item and the third.
    \end{enumerate}
\end{lemma}
\end{document}

решение1

Используя enumitemпакет с опциями wide=0pt, left=0pt, решается проблема выравнивания.

\documentclass[ngerman, fontsize=11pt, DIV=12, BCOR=10mm, parskip=half-, twoside]{scrbook}

\usepackage{enumitem}
\usepackage{amsthm}

\newtheoremstyle{style:lemma}
{3pt}% Space above
{3pt}% Space below
{\itshape}% Body font
{}% Indent amount
{\bfseries}% Theorem head font
{.}% Punctuation after theorem head
{.5em}% Space after theorem head
{}% Theorem head spec (can be left empty, meaning ‘normal’)

\theoremstyle{style:lemma}
\newtheorem{lemma}[]{Lemma}

\begin{document}
    \begin{lemma}
        There are several points to show. These are

        \begin{enumerate}[label=\normalfont(\alph*), wide=0pt, left=0pt]
            \item $a = b+1$
            \item $\sqrt{n} = 2$
            \item and the third.
        \end{enumerate}
    \end{lemma}
\end{document}

введите описание изображения здесь

решение2

enumitemпредоставляет alignключ, который можно задать leftдля выравнивания перечисления по левому краю. Однако это может потребовать некоторой корректировки других измерений горизонтального списка. В примере ниже делается попытка повторить вывод, чтобы они были похожи, последний просто добавляет align=leftв смесь.

введите описание изображения здесь

\documentclass{article}

\usepackage{enumitem}
\usepackage{amsthm}

\newtheorem{lemma}{Lemma}

\begin{document}

\begin{lemma}
There are several points to show. These are
\begin{enumerate}[label=\normalfont(\alph*)]
  \item $a = b + 1$
  \item $\sqrt{n} = 2$
  \item and the third.
\end{enumerate}
\end{lemma}

\begin{lemma}
There are several points to show. These are
\begin{enumerate}[label=\normalfont(\alph*),align=left,labelwidth=1em,labelindent=0.8em,labelsep=0.25em,leftmargin=*]
  \item $a = b + 1$
  \item $\sqrt{n} = 2$
  \item and the third.
\end{enumerate}
\end{lemma}

\end{document}

Вы можете создать список специально для этого, добавив

\newlist{theoremenum}{enumerate}{1}
\setlist[theoremenum]{%
  label=\normalfont(\alph*),
  align=left,
  labelwidth=1em,
  labelindent=0.8em,
  labelsep=0.25em,
  leftmargin=*
}

к вашей преамбуле. Это позволяет вам использовать

\begin{theoremenum}
  \item ...
  \item ...
  ...
\end{theoremenum}

везде, где вам нужно такое перечисление/форматирование.

Связанный контент