Andre Poenitz wrote:
On Wed, Oct 22, 2008 at 09:22:35PM +0200, Andre Poenitz wrote:
I think that I remember to have read about so-called catcodes (or whatever?) in TeX, which apparently make it possible to declare certain characters as "active" so that further processing is possible whenever the TeX scanner reads such character. I wonder if it is possible this way to declare in the preamble that
    "C" followed by "+", followed by "+"
is "active" and should be inherently substituted with something like "\mbox{C+\hspace{-.5ex}+}}"
Quick shot: [...]

Somewhat improved version:

\def\plus{+}
\catcode`\+=\active

\def\smallplusplus#1{\raisebox{0.6ex}{\tiny\plus\kern-.3ex\plus}}
\def+{\futurelet\nextchar\pluss}
\def\pluss{%
  \ifx\nextchar+%
  \let\next\smallplusplus%
  \else%
  \let\next\plus%
  \fi%
\next}

And no, I can't explain it.

If you could, I'd be really worried about you. ;-)

rh

Reply via email to