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
composition:macros:detecter_que_quelque_chose_est_vide [2018/05/25 10:57]
joseph.wright
composition:macros:detecter_que_quelque_chose_est_vide [2018/12/04 00:26] (Version actuelle)
jejust
Ligne 1: Ligne 1:
---- +====== Detecting that something is empty ======
-section: Macro programming +
-subsection: ''​Generic''​ macros and techniques +
-permalink: /FAQ-empty +
-date: 2014-06-10 +
----+
  
-# Detecting that something is empty 
  
 Suppose you need to know that the argument of your command is empty: Suppose you need to know that the argument of your command is empty:
-that is, to distinguish between ​`\cmd{} +that is, to distinguish between ​''​\cmd{}'' ​ 
-and `\cmd{blah}`.  This is pretty simple: +and ''​\cmd{blah}''​.  This is pretty simple: 
-<!-- {% raw %} --> + 
-```latex+ 
 +<code latex>
 \def\cmd#​1{% \def\cmd#​1{%
   \def\tempa{}%   \def\tempa{}%
Ligne 22: Ligne 17:
   \fi   \fi
 } }
-``` +</code> 
-<!-- {% endraw %} -->+
 The case where you want to ignore an argument that consists of nothing The case where you want to ignore an argument that consists of nothing
 but spaces, rather than something completely empty, is more tricky. but spaces, rather than something completely empty, is more tricky.
-It's solved in the code fragment [`ifmtarg`](https://​ctan.org/​pkg/​ifmtarg), which defines +It's solved in the code fragment [[ctanpkg>​ifmtarg|ifmtarg]], which defines 
-commands ​`ifmtargand `ifnotmtarg`, which examine their+commands ​''​\@ifmtarg'' ​and ''​\@ifnotmtarg''​, which examine their
 first argument, and select (in opposite directions) their second or first argument, and select (in opposite directions) their second or
 third argument. ​ The package'​s code also appears in the LaTeX third argument. ​ The package'​s code also appears in the LaTeX
-[`memoir`](https://​ctan.org/​pkg/​memoirclass.+[[ctanpkg>​memoir|memoir]] class.
  
-[`Ifmtarg`](https://​ctan.org/​pkg/​Ifmtargmakes challenging reading; there'​s also a discussion of the +[[ctanpkg>​Ifmtarg|Ifmtarg]] makes challenging reading; there'​s also a discussion of the 
-issue in number two of the ''​around the bend'' ​articles by the late+issue in number two of the "around the bend" ​articles by the late
 lamented Mike Downes. lamented Mike Downes.
  
 +
 +-----
 +
 +//Source:// [[faquk>​FAQ-empty|Detecting that something is empty]]
 +
 +{{htmlmetatags>​metatag-keywords=(LaTeX,​programming)
 +metatag-og:​title=(Detecting that something is empty)
 +metatag-og:​site_name=(FAQ LaTeX francophone)
 +}}
  
composition/macros/detecter_que_quelque_chose_est_vide.1527238678.txt.gz · Dernière modification: 2018/05/25 10:57 par joseph.wright
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0