Dear syndicate, Sometimes I make a definition like \def\TR{\it} for certain purposes (structural consistency, etc.). How do I modify this to automatically do an italic correction the way \em is set up to do in \ConTeXt? ====================== By the way, did Hans ever make a "final" ConTeXt logo? I still think that \def\Context{{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern -.1667em\lower .5ex\hbox {e}\kern -.125emx\kern -.0549emt}} looks better than Con\TeX{}t (and the smaller \TeX better reflects its relative role in the whole package), and I've been using the former up to now. Hope that's not a problem-) best Idris
Idris S Hamid
Sometimes I make a definition like
\def\TR{\it}
for certain purposes (structural consistency, etc.). How do I modify this to automatically do an italic correction the way \em is set up to do in \ConTeXt?
I'd do it like this: \def\TR{\aftergroup \emphasiscorrection\it} see the examples: \def\TR{\aftergroup \/\it} \startlines {\it this is a roof}right? {\TR this is a roof}right? {\TR this is a roof}, right? \def\TR{\aftergroup \emphasiscorrection\it} {\TR this is a roof}right? {\TR this is a roof}, right? \stoplines But I bet that there is a more clever way. Patrick -- Silent is the goldfish in its bowl
At 19:25 23/09/2003 +0200, you wrote:
Idris S Hamid
writes: Hi,
Sometimes I make a definition like
\def\TR{\it}
for certain purposes (structural consistency, etc.). How do I modify this to automatically do an italic correction the way \em is set up to do in \ConTeXt?
I'd do it like this:
\def\TR{\aftergroup \emphasiscorrection\it}
see the examples:
\def\TR{\aftergroup \/\it} \startlines {\it this is a roof}right? {\TR this is a roof}right? {\TR this is a roof}, right? \def\TR{\aftergroup \emphasiscorrection\it} {\TR this is a roof}right? {\TR this is a roof}, right? \stoplines
But I bet that there is a more clever way.
Of course: \def\MyIt{\groupedcommand\it\/} \ruledhbox{\it oeps} \ruledhbox{\MyIt{oeps}} \ruledhbox{{\MyIt oeps}} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hi,
Of course:
\def\MyIt{\groupedcommand\it\/}
I came across \groupedcommand some time ago and I wondered why it is in there (and not in supp-fun.tex for example...). OK, I still don't understand \HandleGroup ... completely, but the day just began and coffee is almost ready. Patrick -- Silent is the goldfish in its bowl
At 09:36 24/09/2003 +0200, you wrote:
Hi,
Of course:
\def\MyIt{\groupedcommand\it\/}
I came across \groupedcommand some time ago and I wondered why it is in there (and not in supp-fun.tex for example...). OK, I still don't understand \HandleGroup ... completely, but the day just began and coffee is almost ready.
it's a clever command, since it supports \something{grouped} as well as {\something ...} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
At 10:39 23/09/2003 -0600, you wrote:
Dear syndicate,
Sometimes I make a definition like
\def\TR{\it}
for certain purposes (structural consistency, etc.). How do I modify this to automatically do an italic correction the way \em is set up to do in \ConTeXt?
======================
By the way, did Hans ever make a "final" ConTeXt logo? I still think that
\def\Context{{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern -.1667em\lower .5ex\hbox {e}\kern -.125emx\kern -.0549emt}}
looks better than Con\TeX{}t (and the smaller \TeX better reflects its relative role in the whole package), and I've been using the former up to now. Hope that's not a problem-)
To suit your needs i've added: \def\italicsequence#1#2% {\ifx\fontalternative\c!sl#1\else \ifx\fontalternative\c!it#1\else \ifx\fontalternative\c!bs#1\else \ifx\fontalternative\c!bi#1\else#2\fi\fi\fi\fi} \def\symbolicscaledfont#1#2% {\scaledfont\fontbody \scaledfont#1\scaledfont \font\definedfont\truefontname{\glyphfontfile{#2}} at \currentfontbodyscale\scaledfont \definedfont} \def\symbolicfont {\symbolicscaledfont\plusone} \unexpanded\def\getscaledglyph#1#2#3% {{\symbolicscaledfont{#1}{#2}\doifnumberelse{#3}\char\donothing#3}} \def\Context {\dontleavehmode{C\kern -.0667em\getscaledglyph{.8}\empty{O\kern -.0667emN\kern -.0549emT\italicsequence{\kern-.1em}{\kern-.1667em}\lower.5ex\hbox {E}\italicsequence\empty{\kern-.11em}X\kern-.055emT}}} This one adapts itself to sizes and styles and ... {\Context \Context \sl \Context \bid\Context} (maybe some values will change) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Idris S Hamid
-
Patrick Gundlach