Как прервать/возобновить список в ЛАТЕКСЕ?

Дополнение к другим ответам относительно объектного сравнения:

== сравнивает объекты с помощью названия объекта и их значений. Если два объекта имеют тот же тип и имеют те же членские значения, $a == $b верные урожаи.

=== сравнивает внутренний идентификатор объекта объектов. Даже если участники равны, $a !== $b, если они не точно тот же объект.

class TestClassA {
    public $a;
}

class TestClassB {
    public $a;
}

$a1 = new TestClassA();
$a2 = new TestClassA();
$b = new TestClassB();

$a1->a = 10;
$a2->a = 10;
$b->a = 10;

$a1 == $a1;
$a1 == $a2;  // Same members
$a1 != $b;   // Different classes

$a1 === $a1;
$a1 !== $a2; // Not the same object
19
задан Anton Geraschenko 28 August 2009 в 16:45
поделиться

4 ответа

Мне нравится enumitem для такого рода вещей:

\documentclass{article}
\usepackage{enumitem}
\begin{document}

\begin{enumerate}
  \item List item
  \item Another list item
\end{enumerate}

Paragraph of comments on list items 1 and 2.

\begin{enumerate}[resume]
  \item Further item
  \item Final item
\end{enumerate}

\end{document}
21
ответ дан 30 November 2019 в 03:20
поделиться

В TeX FAQ перечислено несколько способов сделать это. Прочтите здесь для получения полной информации.

Я успешно использовал пакет mdwlist (который является частью mdwtools ) в своих собственных документах. Например:

\documentclass{article}
\usepackage{mdwlist}

\begin{document}

\begin{enumerate}
\item List item
\item Another list item
\suspend{enumerate}

Paragraph of comments on list items 1 and 2.

\resume{enumerate}
\item Further item
\item Final item
\end{enumerate}

\end{document}

Спасибо Dervin Thunk за предоставление ссылки на FAQ.

11
ответ дан 30 November 2019 в 03:20
поделиться
\documentclass{article}

\begin{document}

\begin{enumerate}
\item first;

\item second;
\end{enumerate}

This is a paragraph.


\begin{enumerate}
  \setcounter{enumi}{2}
\item third;

\item and so on...
\end{enumerate}
\end{document}

править : как указал Дервин Танк, я жестко запрограммировал 2.

так что вот решение, которое, кажется, работает:

\documentclass{article}

\newcounter{tempcounter}

\begin{document}

\begin{enumerate}
\item first;

\item second;
  \setcounter{tempcounter}{\value{enumi}}
\end{enumerate}

This is a paragraph.


\begin{enumerate}
  \setcounter{enumi}{\value{tempcounter}}
\item third;

\item and so on...
\end{enumerate}
\end{document}
8
ответ дан 30 November 2019 в 03:20
поделиться

Вы можете использовать newcounter и usecounter , чтобы обойти это - вот пример .

0
ответ дан 30 November 2019 в 03:20
поделиться
Другие вопросы по тегам:

Похожие вопросы: