[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Bulleted number - How to do???
From: |
Rüdiger Härtel |
Subject: |
Re: [Groff] Bulleted number - How to do??? |
Date: |
Fri, 3 Aug 2007 11:25:39 +0200 |
User-agent: |
KMail/1.9.7 |
Hello Werner,
thank you for your assistence. I added this to the groff wiki.
http://www.groff-wiki.info/groff/BulletedNumbers
Am Freitag 03 August 2007 11:00:56 schrieben Sie:
> > I am in the need of bulleted numbers, ie. a filled circle with a
> > number in it. Imortant to me is, that I can use such a bulleted
> > numer every where in floating text. But it is not necessary to have
> > it in a table for now.
> >
> > Three possible solutions came to mind:
> > a) a font with special glyphs of this kind
>
> Some Chinese fonts have this up to 100. Normally very ugly.
>
> > b) pic
>
> This can't produce inline images.
>
> > c) postscript
>
> This works. See below.
>
>
> Werner
>
>
> ======================================================================
>
>
> .\" The radius of the circle used in `ci' macro.
> .\"
> .ds ci-radius 0.8m
> .
> .
> .\" .ci <text>
> .\"
> .\" Emit <text>, written in white and centered within a red circle.
> .\"
> .de ci-end
> ..
> .
> .de ci
> . ds ci-text \\$1\"
> . nr ci-width \w'\\$1'
> . nr ci-height \\n[rst]
> . nr ci-depth \\n[rsb]
> . nr ci-rad \\*[ci-radius]
> .
> . de ci-ps ci-end
> ps: exec
> % move to circle center
> \\n[ci-rad] u
> \\n[ci-height] u \\n[ci-depth] u add 2 div neg
> rmoveto
> gsave
> % shift origin to current point temporarily
> currentpoint translate
> 1 0 0 setrgbcolor
> 0 0 \\n[ci-rad] u 0 360 arc
> fill
> 1 1 1 setrgbcolor
> % move to start of text string
> \\n[ci-width] u 2 div neg
> \\n[ci-height] u \\n[ci-depth] u add 2 div
> moveto
> (\\*[ci-text]) show
> grestore
> . ci-end
> .
> \Y[ci-ps]\h'2u*\\n[ci-rad]u'
> ..
>
>
>
> blah blah blah
> .ci 2
> blubb blubb blubb
>
> .ps 30
> .vs 36
> blah blah blah
> .ci 12
> blubb blubb blubb
--
with best regards / salutations distinguées / Cordiali Saluti /
med vänliga hälsningar / mit freundlichen Gruessen
Ruediger Haertel
+===========================================================
| port GmbH phone +49 345 77755-0
| D-06132 Halle/Saale mailto:address@hidden
| Germany http://www.port.de
| CAN Wiki http://www.CAN-Wiki.info/
| Ethernet Powerlink http://www.epl-tools.com
| Newsletter: http://www.port.de/register.html
+===========================================================
port Gesellschaft für computergestützte Automation mbH;
Geschäftsführer: Heinz-Jürgen Oertel;
Sitz der Gesellschaft: Halle/Saale;
Registergericht Sachsen-Anhalt Stendal HRB 212667