Как я оставил выравнивание текста между перечислениями в LaTex? - PullRequest
0 голосов
/ 04 декабря 2018
\begin{enumerate}
\def\labelenumi{\Alph{enumi}.}
\item
The \textbf{Definition} of ``Period of Restoration'' is replaced by
the following:

\begin{enumerate}
\def\labelenumii{\arabic{enumii}.}
\setcounter{enumii}{2}
\item
``Period of Restoration'' means the period of time that:

\begin{enumerate}
\def\labelenumiii{\alph{enumiii}.}
\item
  Begins:

  \begin{enumerate}
  \def\labelenumiv{(\arabic{enumiv})}
  \item
    72 hours after the time of direct physical loss or damage for
    Business Income coverage; or
  \item
    Immediately after the time of direct physical loss or damage for
    Extra Expense coverage;
  \end{enumerate}

  caused by or resulting from any Covered Cause of Loss at the
  described premises; and
\item
  Ends on the earlier of:

  \begin{enumerate}
  \def\labelenumiv{(\arabic{enumiv})}
  \item
    The day before the opening of the next school term following the
    date when, with reasonable speed and similar quality, the
    property at the described premises should be repaired, rebuilt
    or replaced; or
  \item
    The date when the school term is resumed at a new permanent
    location.
  \end{enumerate}

«Период восстановления» не включает какой-либо увеличенный период, требуемый в связи с исполнением какого-либо постановления или закона, который:

Мне нужна последняя строка в строке под b.и он выстраивается под (2)

Я получаю это:

Result

Ответы [ 3 ]

0 голосов
/ 05 января 2019

Вы должны использовать \noindent У вас просто есть отступ;)

0 голосов
/ 16 июня 2019

Я написал небольшой макрос под названием unclip.

Используется со всеми строчными буквами, он заканчивает список, записывает заданное содержимое и возобновляет список.В верхнем регистре U он собирает номер перечисления перед записью содержимого и восстанавливает его при возобновлении списка.

\newcommand{\unclip}[2][enumerate]{\end{#1}#2\begin{#1}}%
\makeatletter
\newcommand{\Unclip}[2][enumerate]{%
  \@ifundefined{c@saveenum@\romannumeral\@enumdepth}%    create temporary counter
    {\newcounter{saveenum@\romannumeral\@enumdepth}}{}%
  \setcounter{saveenum@\romannumeral\@enumdepth}%        store item number
    {\value{enum\romannumeral\@enumdepth}}%
  \end{#1}#2\begin{#1}%                                  end list, write content, resume
  \setcounter{enum\romannumeral\@enumdepth}%             restore item number
    {\value{saveenum@\romannumeral\@enumdepth}}}%
\makeatother

Вы можете сложить его для нескольких уровней.Имейте в виду, что это может привести к ошибке, если вы сложите ее, если вы не используете \ item [] после каждого внутреннего вызова.Он все равно будет скомпилирован.

Обширный пример:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\newcommand{\unclip}[2][enumerate]{\end{#1}#2\begin{#1}}%
\makeatletter
\newcommand{\Unclip}[2][enumerate]{%
  \@ifundefined{c@saveenum@\romannumeral\@enumdepth}%    create temporary counter
    {\newcounter{saveenum@\romannumeral\@enumdepth}}{}%
  \setcounter{saveenum@\romannumeral\@enumdepth}%        store item number
    {\value{enum\romannumeral\@enumdepth}}%
  \end{#1}#2\begin{#1}%                                  end list, write content, resume
  \setcounter{enum\romannumeral\@enumdepth}%             restore item number
    {\value{saveenum@\romannumeral\@enumdepth}}}%
\makeatother

\begin{document}

\begin{itemize}
  \item TestItem A
  \begin{description}
    \item[preparation] No Item-number yet, so only smallercase unclip
    \item[test] and action:
    \unclip[description]{This should be below \textit{TestItem A}}
    \item[Test] And now inside a enumeration:
    \begin{enumerate}
      \item One
      \item Two
      \Unclip{This should be under \textit{Test}}
      \item Three
      \Unclip{But now we are stacking, by calling
        \textbackslash Unclip\{\textbackslash unclip[description]\{text\}\}
        \unclip[description]{so this should be under \textit{TestItem A}
        \\Be aware it will raise an error, eventhough it works fine.
        \unclip[itemize]{And while you can have text in front of an inner unclip,
        doing it the other way round would seriously fuck up your layout.}}}
      \item Four
      \begin{enumerate}
        \item Unus
        \item Duo
        \item Tres
        \Unclip{Yes, you can \Unclip{unclip multiple
          \unclip[description]{levels just fine.
          \unclip[itemize]{Still works. :-)}}}}
        \item Quattuor
        \Unclip{\Unclip{\unclip[description]{\unclip[itemize]{By the way:}
          \item[]You can get rid of the errors,}\item[and] stack it back in}
          \item[] by using \textbackslash item[] after the inner unclips}
        \item Quinque
        \item \dots
      \end{enumerate}
    \end{enumerate}
  \end{description}
  \item TestItem B
\end{itemize}

\end{document}

Надеюсь, это поможет.Приветствия.

0 голосов
/ 04 января 2019

Полагаю, вам нужно два \ end {enumerate} после "Дата ... постоянное местоположение".line.

\documentclass[]{article}
\begin{document}


\begin{enumerate}
    \def\labelenumi{\Alph{enumi}.}
    \item
    The \textbf{Definition} of ``Period of Restoration'' is replaced by
    the following:

    \begin{enumerate}
        \def\labelenumii{\arabic{enumii}.}
        \setcounter{enumii}{2}
        \item
        ``Period of Restoration'' means the period of time that:

        \begin{enumerate}
            \def\labelenumiii{\alph{enumiii}.}
            \item
            Begins:

            \begin{enumerate}
                \def\labelenumiv{(\arabic{enumiv})}
                \item
                72 hours after the time of direct physical loss or damage for
                Business Income coverage; or
                \item
                Immediately after the time of direct physical loss or damage for
                Extra Expense coverage;
            \end{enumerate}

            caused by or resulting from any Covered Cause of Loss at the
            described premises; and
            \item
            Ends on the earlier of:

            \begin{enumerate}
                \def\labelenumiv{(\arabic{enumiv})}
                \item
                The day before the opening of the next school term following the
                date when, with reasonable speed and similar quality, the
                property at the described premises should be repaired, rebuilt
                or replaced; or
                \item
                The date when the school term is resumed at a new permanent
                location.
            \end{enumerate}

        \end{enumerate}

        ``Period of Restoration" does not include any increased period required due to the enforcement of any ordinance or law that:

    \end{enumerate}

\end{enumerate}

\end{document}

Первый \ end {enumerate} помог вам выровнять с буквой T в «Дате школьного семестра ....» и выровнять с (2).Вам нужен еще один, чтобы выровнять вас с b.

Если вам нужно взять список с того места, где вы остановились (3c, 3d и т. Д.) Дальше, вы можете сделать это с помощью \setcounter, чтобы он не начинался снова с a;Вот пример:

\documentclass[]{article}
\begin{document}

\begin{enumerate}
\item text
\item text
\item text
\end{enumerate}

Text Text Text

\begin{enumerate}
\setcounter{enumi}{3}
\item pickup where left off
\item text
\end{enumerate}

\end{document}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...