On 2010-09-25 09:33:20 +0930, Gareth Hughes
<garzoh...@gmail.com> said:
Will Robertson wrote:
It doesn't seem to. In that case I'd write something like
\let\oldemph\emph
\renewcommand\emph{%
\...@rtl \expandafter\aemph \else \expandafter\oldelse \fi
}
I still can't figure out how to do this for \eminnershape as defined in
fixltx2e. Any suggestions how to do that?
Do you mean so that you can write
\aemph{ ... \aemph{ ...} ... }
and have the inner \aemph not put the overline on top? In this case,
you can write (and this might be a reasonable addition to polyglossia)
\documentclass{article}
\makeatletter
\def\aemph#1{%
\begingroup
\let\aemph\inneraemph
$\overline{\hbox{#1}}$%
\endgroup
}
\def\inneraemph#1{%
\egroup% close \hbox
\egroup% close \overline
$% close math
{\eminnershape #1}% inner emphasis!
$% "reopen" math
\expandafter\overline\bgroup % "reopen" \overline
\hbox\bgroup % "reopen" \hbox
}
\makeatother
\begin{document}
hello there \aemph{foo \aemph{oof rab} bar} baz black
\end{document}
Modulo checks for bidi and using \hboxR instead of \hbox and a
"correct" definition for \eminnershape in this context, and so on. But
this has nothing to do with the idea of \eminnershape: if you want to
tie the two together, fontspec actually overrides fixltx2e's
emph/eminnershape code:
\ExplSynaxOn
\DeclareRobustCommand \em {
\...@nomath\em
\tl_if_eq:xxTF \...@shape \itdefault \eminnershape
{
\tl_if_eq:xxTF \...@shape \sldefault \eminnershape \emshape
}
}
\DeclareTextFontCommand{\emph}{\em}
\cs_set_eq:NN \emshape \itshape
\cs_set_eq:NN \eminnershape \upshape
\ExplSyntaxOff
Not sure if that helps directly...
Will
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex