[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tex:triky [2010/07/02 18:36]
bejcek comparing two strings
tex:triky [2010/07/12 11:08]
bejcek latex packages
Line 15: Line 15:
       * ''The variable \if#\variable# is empty.\else contains \variable.\fi''\\ (''\variable'' naturally cannot contain '''#'****'')       * ''The variable \if#\variable# is empty.\else contains \variable.\fi''\\ (''\variable'' naturally cannot contain '''#'****'')
       * ''The variable \ifx\@empty\variable is empty.\else contains \variable.\fi''       * ''The variable \ifx\@empty\variable is empty.\else contains \variable.\fi''
-    * **comparing** two strings:\\ ''\newif\ifsame\\ \newcommand{\strcfstr}[2]{%\\ \samefalse\\ \begingroup\\ \def\1{#1}\def\2{#2}%\\ \ifx\1\2\endgroup \sametrue\\ \else   \endgroup\\ \fi}'' +    * **comparing** two strings:\\ ''\newif\ifsame\\ \newcommand{\strcfstr}[2]{%\\ \ \samefalse\\ \ \begingroup\\ \ \ \def\1{#1}\def\2{#2}%\\ \ \ \ifx\1\2\endgroup \sametrue\\ \ \ \else   \endgroup\\ \ \ \fi}'' 
-      * (I don't know why the grouping is needed there...)+      * (The grouping is needed there to make '\1' and '\2' local but '\sametrue' global.)
       * [[http://www.tug.org/TUGboat/Articles/tb22-4/tb72wilson.pdf|(source, Peter Wilson)]]       * [[http://www.tug.org/TUGboat/Articles/tb22-4/tb72wilson.pdf|(source, Peter Wilson)]]
     * allocator **''\newif''** is used in a sequention:\\ a declaration ''\newif\ifsomething''\\ setting either ''\somethingtrue'' or ''\somethingfalse''\\ and asking ''\ifsomething YES\else NO\fi''     * allocator **''\newif''** is used in a sequention:\\ a declaration ''\newif\ifsomething''\\ setting either ''\somethingtrue'' or ''\somethingfalse''\\ and asking ''\ifsomething YES\else NO\fi''
Line 40: Line 40:
           \nobreak\hfill\penalty71\hskip2em           \nobreak\hfill\penalty71\hskip2em
           \hbox{#1}\par}</code>           \hbox{#1}\par}</code>
 +  * Useful **packages**: 
 +    * Source printing: //''fancyvrb''//
  
 ==== počítání slov (a dalších věcí) ==== ==== počítání slov (a dalších věcí) ====

[ Back to the navigation ] [ Back to the content ]