Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!agate!usenet From: raymond@math.berkeley.edu (Raymond Chen) Newsgroups: comp.text.tex Subject: Re: undertilde Keywords: latex, tilde Message-ID: <1990Oct4.032554.27582@agate.berkeley.edu> Date: 4 Oct 90 03:25:54 GMT References: <1990Oct4.014728.29527@caen.engin.umich.edu> Sender: usenet@agate.berkeley.edu (USENET Administrator) Reply-To: raymond@math.berkeley.edu (Raymond Chen) Organization: U.C. Berkeley Lines: 32 In-Reply-To: oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA) In article <1990Oct4.014728.29527@caen.engin.umich.edu>, oliveria@caen (ROQUE DONIZETE DE OLIVEIRA) writes: >I looked at the macro for \underbrace but couldn't get my \undertilde to >work in a similar way. You really want to study the \b \c \d macros to see how to place accent marks under characters. Using those as a springboard, I designed these macros quite some time ago, at the request of a chemist friend... % underacc.tex -- allow for placement of accents under characters \def\mathunderaccent#1{\let\theaccent#1\mathpalette\putaccentunder} \def\putaccentunder#1#2{\oalign{$#1#2$\crcr\hidewidth \vbox to.2ex{\hbox{$#1\theaccent{}$}\vss}\hidewidth}} % the truly paranoid may wish to rename \putaccentunder to % \putacc@ntunder. the resulting gizmo is a \mathord. Season to taste if you really wanted a \mathbin or whatever. An important subtlety that many people miss is that the object being accented might be appearing in a display, a superscript or subscript, and hence the macro must be careful to do the right thing. Hence the \mathpalette. Here's a sample usage: % \ttilde puts a double tilde over its argument. \def\ttilde#1{\tilde{\tilde{#1}}} % "x" with double tilde underneath, superscript "y" with tilde underneath. $\mathunderaccent\ttilde x ^ {\mathunderaccent\tilde y}$ \end