Fwd: accents in plain tex
Bob Tennent
rdtennent at gmail.com
Mon Jun 24 17:56:33 CEST 2024
Once upon a time David Carlisle sent me the following code intended to
allow accented characters in musixtex scores:
\ifx\documentclass\undefined
\catcode`\@=11
\def\ProvidesFile#1[#2]{}
\def\DeclareFontEncoding#1#2#3{}
\def\DeclareTextAccent#1#2#3{%
\def#1##1{%
\expandafter\ifx\csname T1\string#1-\string##1\endcsname\relax
{\accent#1 ##1}%
\else
\csname T1\string#1-\string##1\expandafter\endcsname
\fi}}
\def\DeclareTextCommand#1#2{\xdtcmd}%not today
\def\xdtcmd#1#{\xxdtcmd}%not today
\def\xxdtcmd#1{}%not today
\def\DeclareTextCompositeCommand#1#2#3#4{}%not today
\def\DeclareTextSymbol#1#2#3{%
\def#1{\char#3\relax}}
\def\DeclareTextComposite#1#2#3#4{%
\expandafter\def\csname T1\string#1-\string#3\endcsname{\char#4\relax}}
\input t1enc.def
% \c needs special treatment
\def\c#1{\leavevmode\ifx c#1\char231
\else\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent11
#1%
\else{\ooalign{\unhbox\z@\crcr
\hidewidth\char11\hidewidth}}\fi\fi}
This works for several accented characters but not \v a, \u e, \=a.
Is there any solution?
Bob T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20240624/84a9d849/attachment.htm>
More information about the texhax
mailing list.