ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <bourbaki@bigfoot.com>
Subject: Nice guillemots
Date: Tue, 23 Oct 2001 16:32:25 +0200	[thread overview]
Message-ID: <17912203807.20011023163225@bigfoot.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Hello,

Attached to this mail are two small symbol modules I wrote,
temporary called symb-wnc and symb-lsy, that redefine the left and
right guillemots using respectively the wncyr fonts and the LaTeX
Symbol (LaSy) fonts. The latter are nicer but slower.

Two question:

(1) should they be named differently?

(2) can they be merged? Is there a way to pass options to module
so that they can select a certain predefined behaviour, and change
it when appropriate commands are issued? That is, I can do it 'the
TeX way', but I wonder if ConTeXt shouldn't provide a default
interface for this. something like

\usemodule[whatever][starting options]

\setmoduleoption[something]

--
Giuseppe "Oblomov" Bilotta

[-- Attachment #2: symb-lsy.tex --]
[-- Type: application/octet-stream, Size: 1647 bytes --]

%D \module
%D   [       file=symb-lsy,
%D        version=2001.10.23,
%D          title=\CONTEXT\ Symbol Libraries,
%D       subtitle=Guillemots from LaTeX Symbols,
%D         author=Giuseppe Bilotta,
%D           date=\currentdate,
%D      copyright={PRAGMA / Giuseppe Bilotta}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

\unprotect

%D First of all, define the font file. TODO: how to choose the
%D appropriate font design size?

\definefontsynonym [LasySerif]        [lasy10]

\def\Lasy#1{\getglyph{Lasy}{\char#1}}

%D The LaSy font doesn't have double guillemots, but only left
%D and right single guillemots; we build the double ones by
%D duplicating the single one, shifted by half their size

\newdimen\LeftLazyShift
\newdimen\RightLazyShift

%D Since different sizes require different shifts, we have to
%D calculate it each time. Another way would be to plug into the
%D typescript stuff, and recalculate only at size-change time.
%D This way is slower but doesn't mess with internal stuff

\def\SetLeftLazyShift%
    {\setbox\scratchbox\hbox{\Lasy{40}}%
     \LeftLazyShift=.5\wd\scratchbox}

\def\SetRightLazyShift%
    {\setbox\scratchbox\hbox{\Lasy{41}}%
     \RightLazyShift=.5\wd\scratchbox}

%D Here we define the quick-access commands

\def\leftguillemot%
  {\dontleavehmode\hbox{\SetLeftLazyShift%
      \Lasy{40}\kern-\LeftLazyShift\Lasy{40}}}

\def\rightguillemot%
  {\hbox{\SetRightLazyShift%
      \Lasy{41}\kern-\RightLazyShift\Lasy{41}}}

\def\leftsubguillemot{\Lasy{40}}

\def\rightsubguillemot{\Lasy{41}}

\protect

\endinput 

[-- Attachment #3: symb-wnc.tex --]
[-- Type: application/octet-stream, Size: 813 bytes --]

%D \module
%D   [       file=symb-wnc,
%D        version=2001.10.23,
%D          title=\CONTEXT\ Symbol Libraries,
%D       subtitle=Guillemots from the Cyrillic fonts,
%D         author=Giuseppe Bilotta,
%D           date=\currentdate,
%D      copyright={PRAGMA / Giuseppe Bilotta}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

\unprotect

\definefontsynonym [GuillsSerif]        [wncyr10]
\definefontsynonym [GuillsSerifBold]    [wncyb10]
\definefontsynonym [GuillsSerifItalic]  [wncyi10]
\definefontsynonym [GuillsSerifCaps]    [wncysc10]
\definefontsynonym [GuillsSans]         [wncyss10]

\def\Guill#1{\getglyph{Guills}{\char#1}}

\def\leftguillemot{\Guill{60}}
\def\rightguillemot{\Guill{62}}

\protect

\endinput 

             reply	other threads:[~2001-10-23 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-23 14:32 Giuseppe Bilotta [this message]
2001-10-23 15:55 ` 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=17912203807.20011023163225@bigfoot.com \
    --to=bourbaki@bigfoot.com \
    /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).