TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

First Letter of a Word in Bold
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


an example

the latex code

% by Heiko Oberdiek
\newcommand*{\formatfirst}[1]{\textbf{#1}}
\newcommand*{\formatrest}[1]{\textsc{#1}}
\newcommand*{\firstI}[1]{%
  \expandafter\formatfirst\expandafter{\@car #1\@empty\@nil}%
  \expandafter\formatrest\expandafter{\@cdr #1\@empty\@nil}%
}
\newcommand*{\firstBold}[1]{%
  \@firstBold#1 \@nil
}
\def\@firstBold#1 #2\@nil{%
  \firstI{#1}%
  \ifx\\#2\\%
  \else
    \@ReturnAfterFi{%
      \space
      \@firstBold#2\@nil
    }%
  \fi
}
\long\def\@ReturnAfterFi#1\fi{\fi#1}
more examples:

local time: Sat Dec 7 20:59:45 CET 2019 ; file is: 164.173171296296 days old
contact webmaster _at_ TeXnik.de