[texhax] typset mistranslates the anglbrackets

Reinhard Kotucha reinhard.kotucha at web.de
Tue Mar 19 23:04:43 CET 2013


On 2013-03-19 at 14:13:46 +0100, Uwe Lück wrote:

 > Practical recommendations:
 > 
 > I sometimes use \angled{...} instead of $\langle$...$\rangle$, 
 > after \def\angled#1{$\langle$#1$\rangle$} or 
 > \newcommand*\angled[1]{$\langle$#1$\rangle$}.
 > 
 > If the mathematical relation symbol is not needed at all, 
 > <...> may yield good typography after
 > 
 >     \catcode`\<\active \def<#1>{$\langle$#1$\rangle$}

It's possible to write something like 

  \catcode`\<=13
  \def<{\ifmmode\char60\relax\else$\langle$\fi}

but you have to hide stuff using \ifdim or \ifnum in macros before.
Don't know whether the code is safe enough.

However, IMO your \angled approach is better, especially if a control
sequence name is chosen which describes what's between the braces
(logical markup).

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the texhax mailing list