From 7966163c81ccf49d8e9d999d03f79f41291e16e2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 22 Jun 2018 12:09:12 +0200 Subject: [PATCH] Added \addprotected --- ucwmac.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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: -- 2.39.2