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édentesRévision précédente
Prochaine révision
Révision précédente
composition:texte:lignes:arguments_incorrects_pour_newline [2018/12/03 23:42] jejust3_composition:texte:lignes:arguments_incorrects_pour_newline [2022/11/29 15:52] (Version actuelle) – Usage de ⟨...⟩ dbitouze
Ligne 1: Ligne 1:
-====== Start of line goes awry ======+====== Pourquoi cette ligne commence-t-elle mal? ======
  
 +Cette réponse concerne deux types de problèmes : 
 +  * ceux où un astérisque au début d'une ligne ne parvient mystérieusement pas à apparaître dans le document final ;
 +  * ceux générant une erreur de la forme :
  
-This answer concerns two sorts of problems: errors of the form +<code text>
- +
-<code latex>+
 ! Missing number, treated as zero. ! Missing number, treated as zero.
 <to be read again>  <to be read again> 
Ligne 10: Ligne 11:
 <*> [perhaps] <*> [perhaps]
 </code> </code>
-and errors where a single asterisk at the start of a line mysteriously 
-fails to appear in the typeset output. 
  
-Both problems arise because ''\\'' takes optional arguments The +Les deux problèmes surviennent car la commande ''\\'' prend des arguments optionnels : 
-command ''\\*'' means +  * la commande ''\\*'' signifie « couper la ligne ici et empêcher le saut de page après le saut de ligne » 
-"break the line here, and inhibit page break following the line break"+  * la commande ''\\[⟨dimension⟩]'' signifie « couper la ligne ici et ajouter un espace vertical de taille ⟨dimension⟩ à la suite ».
-the command ''\\[''<//dimen//>'']'' +
-means +
-"break the line here and add <//dimen//> extra vertical space afterwards".+
  
-The problem arises because ''\\'' looks for the next +Et ces problèmes arrivent parce que la commande ''\\'' recherche le prochain élément non vide. Cette recherche ignore la fin de la ligne dans votre textede sorte que ''\\'' en vient à imaginer que vous lui donnez un « modificateur ».
-non-blank thing; the test it uses ignores the end of the line in +
-your input textso that ''\\'' comes to imagine that you +
-were giving it a "modifier".+
  
-An obvious solution is to enclose the stuff at the start of the new +===== Dans le texte =====
-line in braces, typing:+
  
 +Une solution évidente est de mettre l'élément en début de la nouvelle ligne entre accolades. Par exemple :
  
 <code latex> <code latex>
 {\ttfamily {\ttfamily
-  /* C-language comment\\ +  /* Commentaire en langage C\\ 
-  {[perhaps]} this could be done better\\+  {[Important]} à traiter\\
   {*}/   {*}/
 } }
 </code> </code>
  
-This particular example could be coded (without any problemsin +Cet exemple particulier pourrait être codé (sans aucun problèmeen mode verbatim, mais ce mode déroute souvent les utilisateurs. 
-verbatim, but the behaviour does confuse people.+ 
 +===== Dans les mathématiques =====
  
-The problem also appears in maths mode, in arrays and so on In this +Ce problème apparaît également en mode mathématiquedans les tableaux et autres éléments demandant la présence de la commande ''\\''Dans ce casla mise entre accolades à grande échelle des choses n'est //pas// une bonne idée. En lieu et place, la primitive ''\relax'' (qui ne fait que bloquer les recherches de cette nature) peut être utiliséeVoici un exemple :
-caselarge-scale bracketing of things is //not// a good idea; the +
-TeX primitive ''\relax'' (which does nothing except to block +
-searches of this nature) may be used From another +
-''comp.text.tex'' example:+
  
 <code latex> <code latex>
 \begin{eqnarray} \begin{eqnarray}
-  [a] &=& b \\+  [a]       &=& b  \\
   \relax[a] &=& b   \relax[a] &=& b
 \end{eqnarray} \end{eqnarray}
 </code> </code>
-which is a usage this FAQ would not recommend, anyway: refer 
-to the [[FAQ-eqnarray|reason not to use ''eqnarray'']]. 
  
-Note that the [[ctanpkg>amsmath|amsmath]] package modifies the behaviour of +Cet exemple n'est toutefois pas recommandé par cette FAQ, comme indiqué à la question « [[4_domaines_specialises:mathematiques:equations:arguments_contre_eqnarray|Quels sont les arguments contre l'utilisation d'« eqnarray » ?]] ».
-''\\'' in maths.  With [[ctanpkg>amsmath|amsmath]], the +
-''eqnarray'' example doesn't need any special action +
-(''\relax'' or braces).+
  
 +Notez que l'extension [[ctanpkg>amsmath|amsmath]] modifie le comportement de la commande ''\\'' en mode mathématique : dans l'exemple ci-dessus, il n'y a plus besoin d'action spéciale (''\relax'' ou les accolades).
  
 ----- -----
Ligne 65: Ligne 51:
 //Source:// [[faquk>FAQ-newlineargs|Start of line goes awry]] //Source:// [[faquk>FAQ-newlineargs|Start of line goes awry]]
  
-{{htmlmetatags>metatag-keywords=(LaTeX,errors+{{htmlmetatags>metatag-keywords=(LaTeX,erreur,eqnarray,début de ligne,\\,saut de ligne
-metatag-og:title=(Start of line goes awry)+metatag-og:title=(Pourquoi cette ligne commence-t-elle mal)
 metatag-og:site_name=(FAQ LaTeX francophone) metatag-og:site_name=(FAQ LaTeX francophone)
 }} }}
  
3_composition/texte/lignes/arguments_incorrects_pour_newline.1543880528.txt.gz · Dernière modification : 2018/12/03 23:42 de jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0