From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: hoe maak ik een :-) smile in LaTeX?
Date: Fri, 12 Jan 2001 09:47:11 +0100 [thread overview]
Message-ID: <3.0.6.32.20010112094711.01837260@server-1> (raw)
In-Reply-To: <Pine.LNX.4.21.0101112259210.2117-100000@boldface.c75.net>
I cc this mail to the context list. The question concerned smilies. If
someone can provide me a full set of what these things are and represent, i
can make a few more definitions. Makes a good example for metafun.
At 11:01 PM 1/11/01 +0100, you wrote:
>Een dubbele-punt-streepje-haakje ziet er niet uit. Toch wil ik ook in een
>LaTeX documentje nog wel eens glimlachen. Hoe doe ik dat?
Ik zou zeggen, met metapost:
prologues := 2 ; % input mp-tool ;
numeric smilesize ; smilesize := 12pt ;
beginfig (1) ;
pickup pencircle xscaled (smilesize/6) yscaled (smilesize/12) ;
draw halfcircle rotated -90 scaled smilesize ;
pickup pencircle scaled (smilesize/4) ;
for i=-1,+1 : draw origin shifted (0,i*smilesize/4) ; endfor ;
endfig ;
beginfig (2) ;
pickup pencircle xscaled (smilesize/6) yscaled (smilesize/12) ;
draw halfcircle rotated -90 scaled smilesize ;
pickup pencircle scaled (smilesize/4) ;
for i=-1,+1 : draw origin shifted (-smilesize/2,i*smilesize/4) ; endfor ;
pickup pencircle scaled (smilesize/6) ;
draw (smilesize/4,0) -- (-smilesize/4,0) ;
endfig ;
end .
Met mpost thisfile.mp krijg je dan thisfile.1 en thisfile.2 die je
vervolgens met weet ik wat voor'n commando kunt includen.
In ConTeXt zou het ook als volgt kunnen [zie metafun manual]:
% output=pdftex interface=english
\setupcolors[state=start]
\setupMPvariables[smile][type=1,height=1.25ex,color=green]
\startuniqueMPgraphic{smile}{type,height,color}
numeric size ; size := \MPvar{height} ;
drawoptions(withcolor \MPvar{color}) ;
pickup pencircle xscaled (size/6) yscaled (size/12) ;
draw halfcircle rotated -90 scaled size ;
pickup pencircle scaled (size/4) ;
if \MPvar{type}=1 :
for i=-1,+1 : draw origin shifted (0,i*size/4) ; endfor ;
elseif \MPvar{type}=2 :
for i=-1,+1 : draw origin shifted (-size/2,i*size/4) ; endfor ;
pickup pencircle scaled (size/6) ;
draw (size/4,0) -- (-size/4,0) ;
fi ;
\stopuniqueMPgraphic
\definesymbol[smile] [\uniqueMPgraphic{smile}{type=1}]
\definesymbol[smilemore][\uniqueMPgraphic{smile}{type=2}]
\starttext
Say it with a \symbol [smile]\ or maybe even a \symbol
[smilemore], although seeing too many \dorecurse {10}
{\symbol [smile]\ } \unskip in one text may make you cry.
\setupMPvariables[smile][height=1ex,color=blue]
Say it with a \symbol [smile]\ or maybe even a \symbol
[smilemore], although seeing too many \dorecurse {10}
{\symbol [smile]\ } \unskip in one text may make you cry.
\setupMPvariables[smile][color=red]
\midaligned{\switchtobodyfont[60pt]\symbol[smile]}
\stoptext
In dit geval worden de figuurtjes runtime berekent, passen ze zich aan het
korps aan, worden hergebruikt, en zijn manipuleerbaar.
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
-------------------------------------------------------------------------
next parent reply other threads:[~2001-01-12 8:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.21.0101112259210.2117-100000@boldface.c75.net>
2001-01-12 8:47 ` Hans Hagen [this message]
2001-01-12 9:31 ` Marc van Dongen
2001-01-12 22:35 ` H. Ramm
2001-01-12 10:24 ` Wybo Dekker
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=3.0.6.32.20010112094711.01837260@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).