[ 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/01/07 17:25]
bejcek Aligning of the special last element in the line
tex:triky [2010/07/02 19:15]
bejcek grouping question resolved
Line 10: Line 10:
   * Useful page (and a figure) for **lists**:   * Useful page (and a figure) for **lists**:
     * http://latex.computersci.org/Reference/ListEnvironments     * http://latex.computersci.org/Reference/ListEnvironments
 +
 +  * The **if** condition in TeX:
 +    * construction **if ''\variable'' is empty**:
 +      * ''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''
 +    * **comparing** two strings:\\ ''\newif\ifsame\\ \newcommand{\strcfstr}[2]{%\\ \ \samefalse\\ \ \begingroup\\ \ \ \def\1{#1}\def\2{#2}%\\ \ \ \ifx\1\2\endgroup \sametrue\\ \ \ \else   \endgroup\\ \ \ \fi}''
 +      * (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)]]
 +    * allocator **''\newif''** is used in a sequention:\\ a declaration ''\newif\ifsomething''\\ setting either ''\somethingtrue'' or ''\somethingfalse''\\ and asking ''\ifsomething YES\else NO\fi''
  
   * **foreach** in TeX <html><font color="gray" size="-5">(thanks to TMA)</font></html>:   * **foreach** in TeX <html><font color="gray" size="-5">(thanks to TMA)</font></html>:
Line 32: Line 41:
           \hbox{#1}\par}</code>           \hbox{#1}\par}</code>
  
 +
 +==== počítání slov (a dalších věcí) ====
 +
 +<code>texcount soubor.tex</code>
 +
 +''texcount -inc soubor.tex'' ... započítá správně slova i v souborech vložených v hlavním souboru pomocí ''\include''
 +
 +Podrobnosti v dokumentaci: ''texdoc texcount''

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