ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Re[2]: \=i
Date: Tue, 01 Jun 2004 21:04:49 +0200	[thread overview]
Message-ID: <6.1.1.1.2.20040601205229.07dab140@server-1> (raw)
In-Reply-To: <opr8qrrfq8u9mfh0@lamar.colostate.edu>

At 05:24 29/05/2004, you wrote:
>On Thu, 27 May 2004 23:47:07 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>>ah, we stand you sitting there crying over tex, can we?
>
>Sometimes I want to curse TeX, believe me... Seriously though, I have a 
>real phobia for all that low low-level stuff...
>
>Did u have a chance 2 look at my general solution 4 medium fonts? I would 
>like to generalize it to bold and small caps but I don't understand how to 
>set up a conditionals macro that expands in accordance with the 
>surrounding font. I need sthing like
>
>\ifboldtrue
>\IBARA % parameterized for bold fonts
>\else
>\ifsctrue
>\IBARB % parameterized for sc fonts
>\else
>\IBAR  % parameterized for medium fonts
>\fi\fi

take a look at font-ini and search for the definition of \em; but since you 
suffered already a lot:

\unprotect

\definesystemvariable{sx}

\def\definestylecollection
   {\dotripleargument\dodefinestylecollection}

\def\dodefinestylecollection[#1][#2][#3]%
   {\unexpanded\setvalue{#1}{\styleinstance[#1]}%
    \setvalue{\??sx#1:#2}{#3}}

\unexpanded\def\styleinstance[#1]%
   {\executeifdefined{\??sx#1:\fontalternative}{\getvalue{\??sx#1:\s!default}}}

\protect

\definestylecollection[mine][default][sorry]
\definestylecollection[mine][bf][\sl]
\definestylecollection[mine][sl][\tt]

{\bf test \mine test \sl test \mine test \bs oeps \mine oeps}

let me know if this works ok, maybe i can add it to the kernel then

Hans  

  reply	other threads:[~2004-06-01 19:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 23:50 \=i Idris Samawi Hamid
2004-05-21 10:28 ` \=i Hans Hagen
2004-05-21 15:58   ` \=i Idris Samawi Hamid
2004-05-24 18:42   ` \=i Idris Samawi Hamid
2004-05-26 19:33     ` \=i Idris Samawi Hamid
2004-05-27 10:31       ` Re[2]: \=i Giuseppe Bilotta
2004-05-27 19:11         ` Idris Samawi Hamid
2004-05-27 21:47         ` Hans Hagen
2004-05-29  3:24           ` Idris Samawi Hamid
2004-06-01 19:04             ` Hans Hagen [this message]
2004-06-02 19:45               ` \=i Adam Lindsay
2004-06-03 11:31                 ` \=i Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.1.1.1.2.20040601205229.07dab140@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).