Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
2_programmation:macros:def_newcommand_providecommand [2018/05/22 13:35]
joseph.wright créée
2_programmation:macros:def_newcommand_providecommand [2018/06/03 16:22]
joseph.wright
Ligne 1: Ligne 1:
-Transcribing LaTeX command definitions+--- 
 +title: ​Transcribing LaTeX command definitions 
 +category: programming 
 +tags: macros 
 +permalink: /​FAQ-cvtlatex 
 +---
  
 At several places in this FAQ, questions are answered in terms At several places in this FAQ, questions are answered in terms
Ligne 16: Ligne 21:
 defined; LaTeX has no direct equivalent of `\def`, which ignores defined; LaTeX has no direct equivalent of `\def`, which ignores
 the present state of the command. ​ The final command of this sort is the present state of the command. ​ The final command of this sort is
-`\DeclareRobustCommand`,​ which creates a command which is ''​robust''​ +`\DeclareRobustCommand`,​ which creates a command which is "robust" 
-(i.e., will not expand if subjected to LaTeX ''​protected +(i.e., will not expand if subjected to LaTeX "protected expansion"); 
-expansion''​); from the Plain TeX user's point of view,+from the Plain TeX user's point of view,
 `\DeclareRobustCommand` should be treated as a non-checking version `\DeclareRobustCommand` should be treated as a non-checking version
 of `\newcommand`. of `\newcommand`.
Ligne 39: Ligne 44:
     ...     ...
 ``` ```
-(`gobble` simply throws away its argument).+(`\@gobble` simply throws away its argument).
  
 The arguments of a LaTeX command are specified by two optional The arguments of a LaTeX command are specified by two optional
Ligne 59: Ligne 64:
 Coding of commands with optional arguments is exemplified by the Coding of commands with optional arguments is exemplified by the
 coding of the last `\foo` above: coding of the last `\foo` above:
 +<!-- {% raw %} -->
 ```latex ```latex
 \def\foo{\futurelet\next\@r@foo} \def\foo{\futurelet\next\@r@foo}
Ligne 70: Ligne 76:
 \def\@x@foo[#​1]#​2{...#​1...#​2...} \def\@x@foo[#​1]#​2{...#​1...#​2...}
 ``` ```
 +<!-- {% endraw %} -->
  
  
2_programmation/macros/def_newcommand_providecommand.txt · Dernière modification: 2018/12/04 00:26 par jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0