ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Cc: ntg-context@ntg.nl
Subject: Re: pictures for numbers
Date: Fri, 16 Nov 2001 11:36:47 +0100	[thread overview]
Message-ID: <20011116113647.453a22f5.taco@elvenkind.com> (raw)
In-Reply-To: <20011116105527.A29519@cs.uu.nl>

"Andres Loeh" <andres@cs.uu.nl> wrote:
> Hello,
> 
> I am writing a document where I want to give the chapter numbers as roman
> numerals, but with each letter replaced by a (hand-drawn) picture (I have
> them in .jpg ,.png,.eps).
> 
> I wonder what would be the best approach to do it:
> 
> (1) make some kind of virtual (or real) font out of the pictures
>     (but how?)

This definately sounds elegant, but it is quite a large amount of work.

> (3) write a macro that transforms the output of \romannumeral
>     into a sequence  of \useexternalfigure calls; then define
>     a conversion that makes use of that macro

This is the next best bet, I think. Here is a macro that does the
key work. You have to change the \message to do what you want:

\def\expandromannumerals#1%
  {\expandafter\expandromannumeral\romannumeral #1\relax}

\def\expandromannumeral#1%
  {\if #1\relax
     \let\next\relax
   \else
     \message{#1}%
     \let\next\expandromannumeral
   \fi
   \next }

\expandromannumerals{19}% call example

-- 
groeten,

Taco


  reply	other threads:[~2001-11-16 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16  9:55 Andres Loeh
2001-11-16 10:36 ` Taco Hoekwater [this message]
2001-11-16 11:55   ` Hans Hagen
2001-11-16 11:53 ` Hans Hagen
2001-11-16 15:06   ` [ConTeXt] " Andres Loeh
2001-11-16 16:37     ` Hans Hagen
2001-11-16 15:29   ` Andres Loeh
2001-11-16 16:38     ` 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=20011116113647.453a22f5.taco@elvenkind.com \
    --to=taco@elvenkind.com \
    --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).