Fwd: accents in plain tex
Bob Tennent <[email protected]>
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <CAGtK6=FbwfRhMFMKZ_dvVM4P-w=vf85oaoOatTUd_prsb9A0-g@mail.gmail.com> |
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.