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/06/03 12:47] samcarter3_composition:texte:lignes:arguments_incorrects_pour_newline [2022/11/29 15:52] (Version actuelle) – Usage de ⟨...⟩ dbitouze
Ligne 1: Ligne 1:
---+====== Pourquoi cette ligne commence-t-elle mal? ======
-title: Start of line goes awry +
-category: errors +
-permalink: /FAQ-newlineargs +
-date: 2014-06-10 +
----+
  
-This answer concerns two sorts of problemserrors of the form +Cette réponse concerne deux types de problèmes :  
-```latex+  * 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 : 
 + 
 +<code text>
 ! Missing number, treated as zero. ! Missing number, treated as zero.
 <to be read again>  <to be read again> 
                    p                    p
 <*> [perhaps] <*> [perhaps]
-``` +</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 `\\[`&lsaquo;_dimen_&rsaquo;`]+
-means +
-"break the line here and add &lsaquo;_dimen_&rsaquo; 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+ 
-<!-- {% raw %} --> +Une solution évidente est de mettre l'élément en début de la nouvelle ligne entre accolades. Par exemple 
-```latex+ 
 +<code latex>
 {\ttfamily {\ttfamily
-  /* C-language comment\\ +  /* Commentaire en langage C\\ 
-  {[perhaps]} this could be done better\\+  {[Important]} à traiter\\
   {*}/   {*}/
 } }
-``` +</code>
-<!-- {% endraw %} --> +
-This particular example could be coded (without any problems) in +
-verbatim, but the behaviour does confuse people.+
  
-The problem also appears in maths mode, in arrays and so on In this +Cet exemple particulier pourrait être codé (sans aucun problème) en mode verbatimmais ce mode déroute souvent les utilisateurs
-case, large-scale bracketing of things is _not_ a good idea; the + 
-TeX primitive `\relax(which does nothing except to block +===== Dans les mathématiques ===== 
-searches of this nature) may be used From another + 
-`comp.text.tex` example+Ce problème apparaît également en mode mathématique, dans les tableaux et autres éléments demandant la présence de la commande ''\\''. Dans ce cas, la 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 
-```latex+ 
 +<code latex>
 \begin{eqnarray} \begin{eqnarray}
-  [a] &=& b \\+  [a]       &=& b  \\
   \relax[a] &=& b   \relax[a] &=& b
 \end{eqnarray} \end{eqnarray}
-``` +</code> 
-which is a usage this FAQ would not recommendanywayrefer + 
-to the [reason not to use `eqnarray`](FAQ-eqnarray).+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 » ?]] ». 
 + 
 +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). 
 + 
 +-----
  
-Note that the [`amsmath`](https://ctan.org/pkg/amsmath) package modifies the behaviour of +//Source:// [[faquk>FAQ-newlineargs|Start of line goes awry]]
-`\\` in maths.  With [`amsmath`](https://ctan.org/pkg/amsmath), the +
-`eqnarray` example doesn't need any special action +
-(`\relax` or braces).+
  
 +{{htmlmetatags>metatag-keywords=(LaTeX,erreur,eqnarray,début de ligne,\\,saut de ligne)
 +metatag-og:title=(Pourquoi cette ligne commence-t-elle mal)
 +metatag-og:site_name=(FAQ LaTeX francophone)
 +}}
  
3_composition/texte/lignes/arguments_incorrects_pour_newline.1528030046.txt.gz · Dernière modification : 2018/06/03 12:47 de samcarter
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0