From: Martin Mares Date: Fri, 22 Jun 2018 10:09:12 +0000 (+0200) Subject: Added \addprotected X-Git-Tag: v1.99~1^2~10 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=7966163c81ccf49d8e9d999d03f79f41291e16e2;p=ucwmac.git Added \addprotected --- diff --git a/ucwmac.tex b/ucwmac.tex index ea292d7..d73247d 100644 --- a/ucwmac.tex +++ b/ucwmac.tex @@ -39,6 +39,12 @@ \def\sdef#1{\expandafter\def\csname#1\endcsname} \def\slet#1#2{\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} +% Add \protected to an existing macro +\def\addprotected#1{\protected\edef#1{\expandafter\unexpanded\expandafter{#1}}} + +% Protect ~ +\addprotected~ + \def\ucwwarn#1{\immediate\write16{*** Warning: #1 ***}} %%% Page size and margins %%% @@ -320,10 +326,6 @@ % \putimage{width specification}{file} \def\putimage#1#2{\hbox{\pdfximage #1{#2}\pdfrefximage\pdflastximage}} -% Let ~ be protected -\let\plaintilde=~ -\protected\def~{\plaintilde} - %%% Colors %%% % Use of pdfTeX color stack: