Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
3_composition:texte:listes:interrompre_une_liste_numerotee [2018/05/25 00:02]
joseph.wright
3_composition:texte:listes:interrompre_une_liste_numerotee [2018/12/05 08:35]
jejust Renommage des sections de base: correction des liens internes.
Ligne 1: Ligne 1:
---- +====== Interrupting enumerated lists ======
-section: How do I do&​hellip;?​ +
-subsection: Lists +
-permalink: /​FAQ-interruptlist.html +
-date: 2014-06-10 +
----+
  
-# Interrupting enumerated lists 
  
-It's often convenient to have commentary text, ''​outside'' ​the list,+It's often convenient to have commentary text, "outside" ​the list,
 between successive entries of a list.  In the case of between successive entries of a list.  In the case of
-`itemizelists this is no problem, since there'​s never+''​itemize'' ​lists this is no problem, since there'​s never
 anything to distinguish successive items, while in the case of anything to distinguish successive items, while in the case of
-`descriptionlists, the item labels are under the user's+''​description'' ​lists, the item labels are under the user's
 control so there'​s no automatic issue of continuity. control so there'​s no automatic issue of continuity.
  
-For `enumeratelists, the labels are generated +For ''​enumerate'' ​lists, the labels are generated automatically,​ 
-automatically,​ and are context-sensitive,​ so the context (in this +and are context-sensitive,​ so the context (in this case, the state 
-case, the state of the enumeration counter) needs to be preserved.+of the enumeration counter) needs to be preserved.
  
 The belt-and-braces approach is to remember the state of the The belt-and-braces approach is to remember the state of the
 enumeration in your own counter variable, and then restore it when enumeration in your own counter variable, and then restore it when
 restarting enumerate: restarting enumerate:
-```latex+ 
 +<​code ​latex>
 \newcounter{saveenum} \newcounter{saveenum}
  ...  ...
Ligne 34: Ligne 29:
   ...   ...
 \end{enumerate} \end{enumerate}
-```+</​code>​
  
-This is reasonable, in small doses&​hellip; ​Problems (apart from sheer +This is reasonable, in small doses... Problems (apart from sheer 
-verbosity) are getting the level right (''​should I use counter +verbosity) are getting the level right 
-`enumi``enumii`, &​hellip;​''​) and remembering not to+("should I use counter ​''​enumi''​''​enumii''​, ...") and remembering not to
 nest the interruptions (i.e., not to have a separate list, that is nest the interruptions (i.e., not to have a separate list, that is
-itself interrupted) in the ''​commentary text''​).+itself interrupted) in the "commentary text").
  
-The [`mdwlist`](https://​ctan.org/​pkg/​mdwlist) ​package defines commands ​`\suspendand +The [[ctanpkg>​mdwlist]package defines commands ​''​\suspend'' ​and 
-`\resumethat simplify the process: +''​\resume'' ​that simplify the process: 
-```latex+ 
 +<​code ​latex>
 \begin{enumerate} \begin{enumerate}
   ...   ...
Ligne 52: Ligne 48:
   ...   ...
 \end{enumerate} \end{enumerate}
-``` +</​code>​ 
-The package allows an optional name (as in +The package allows an optional name (as in ''​\suspend[id]{enumerate}''​) 
-`\suspend[id]{enumerate}`) to allow you to identify a +to allow you to identify a particular suspension, and hence provide 
-particular suspension, and hence provide a handle for manipulating +a handle for manipulating nested suspensions.
-nested suspensions.+
  
-If you're suspending a [fancy-enumeration list](FAQ-enumerate.md)+If you're suspending a [[2_composition:​texte:​listes:​modifier_le_style_des_listes_numerotees|fancy-enumeration list]]
-you need to  +you need to re-supply the optional ​"item label layout" ​parameters required by 
-re-supply the optional ​''​item label layout'' ​parameters required by +the [[ctanpkg>​enumerate]package when resuming the list, whether by the 
-the [`enumerate`](https://​ctan.org/​pkg/​enumerate) ​package when resuming the list, whether by the +belt-and-braces approach, or by the [[ctanpkg>​mdwlist]] 
-belt-and-braces approach, or by the [`mdwlist`](https://​ctan.org/​pkg/​mdwlist) +''​\resume{enumerate}'' ​technique. ​ The task is a little tedious 
-`\resume{enumerate}technique. ​ The task is a little tedious +in the [[ctanpkg>​mdwlist]case, since the optional argument has to be 
-in the [`mdwlist`](https://​ctan.org/​pkg/​mdwlist) ​case, since the optional argument has to be +encapsulated,​ whole, inside an optional argument to ''​\resume''​,
-encapsulated,​ whole, inside an optional argument to `\resume`,+
 which requires use of extra braces: which requires use of extra braces:
-```latex+ 
 +<​code ​latex>
 \begin{enumerate}[\textbf{Item} i] \begin{enumerate}[\textbf{Item} i]
   ...   ...
Ligne 75: Ligne 70:
 ... ...
 \end{enumerate} \end{enumerate}
-``` +</​code>​ 
-The [`enumitem`](https://​ctan.org/​pkg/​enumitem) ​package, in its most recent+The [[ctanpkg>​enumitem]package, in its most recent
 release, will also allow you to resume lists: release, will also allow you to resume lists:
-```latex+ 
 +<​code ​latex>
 \begin{enumerate} \begin{enumerate}
 ... ...
Ligne 86: Ligne 82:
 ... ...
 \end{enumerate} \end{enumerate}
-``` +</​code>​ 
-which feels just as ''​natural'' ​as the [`mdwtools`](https://​ctan.org/​pkg/​mdwtools) ​facility,+which feels just as "natural" ​as the [[ctanpkg>​mdwtools]facility,
 and has the advantage of playing well with the other excellent and has the advantage of playing well with the other excellent
-facilities of [`enumitem`](https://​ctan.org/​pkg/​enumitem).+facilities of [[ctanpkg>​enumitem]].
  
-[`Expdlist`](https://​ctan.org/​pkg/​Expdlist) ​has a neat way of providing for comments, with its +[[ctanpkg>​expdlist|Expdlist]has a neat way of providing for comments, with its 
-`\listpartcommand. ​ The command'​s argument becomes a comment+''​\listpart'' ​command. ​ The command'​s argument becomes a comment
 between items of the list: between items of the list:
-```latex+ 
 +<​code ​latex>
 \begin{enumerate} \begin{enumerate}
 \item item 1 \item item 1
Ligne 101: Ligne 98:
 \item item 3 \item item 3
 \end{enumerate} \end{enumerate}
-```+</​code>​
 This, you will realise, means it doesn'​t even have to think about This, you will realise, means it doesn'​t even have to think about
 suspending or resuming the list, and of course it works equally well suspending or resuming the list, and of course it works equally well
 in any of the list environments (thought it's not actually in any of the list environments (thought it's not actually
-_necessary_ ​for any but `enumerate`).+//​necessary// ​for any but ''​enumerate''​).
  
-[`Enumitem`](https://​ctan.org/​pkg/​Enumitem) ​also allows multi-level suspension and resumption+[[ctanpkg>​enumitem|Enumitem]also allows multi-level suspension and resumption
 of lists: of lists:
-```latex+ 
 +<​code ​latex>
 \begin{enumerate} \begin{enumerate}
 \item outer item 1 \item outer item 1
Ligne 128: Ligne 126:
 % end outer enumerate % end outer enumerate
 \end{enumerate} \end{enumerate}
-``` +</​code>​ 
-However, the ''​nested comment'' ​interpolated in the nested enumeration +However, the "nested comment" ​interpolated in the nested enumeration 
-appears as if it were a second paragraph to ''​outer item 2''​, which is+appears as if it were a second paragraph to "outer item 2", which is
 hardly satisfactory. hardly satisfactory.
  
 +
 +-----
 +//Source:// [[faquk>​FAQ-interruptlist|Interrupting enumerated lists]]
 +
 +{{htmlmetatags>​metatag-keywords=(LaTeX,​listes et énumérations,​couper une liste,​interrompre une liste)
 +metatag-og:​title=(Interrupting enumerated lists)
 +metatag-og:​site_name=(FAQ LaTeX francophone)
 +}}
  
3_composition/texte/listes/interrompre_une_liste_numerotee.txt · Dernière modification: 2021/01/28 17:47 par dbitouze
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0