groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] ds in tmac


From: Erich Hoffmann
Subject: [Groff] ds in tmac
Date: Fri, 5 Sep 2003 22:01:33 +0200

Hello all.

I'm using groff now some time for most of my writing projects and
with the normal use of it I'm quite at ease.  But I'm a full blown
newbie to groff hacking, to be honest to any programming at all.

   To gather some experience I got the idea of a sort of typesetting
chess diagrams with groff.  I want to use it.  Especially I want to
typeset fairy chess diagrams, retro games &c.  Googeling said that
there is no such thing by now.

   I know the LaTeX chess typesetting macro set and I know how to use it,
but anyway I went for to do it myself with groff (skipping the reasons
why for now).  It may be well a pretty silly project and that is why I
expose it right at the beginning as a sort of warning.  What I want is
(1) to use it, typesetting some chess and fairy chess, (2) to gather
some experience how to program and write macros and how to manage the
documentation of a source code so that other people (as well as myself
after a couple of years) will understand what the whole thing is about.

   So I started designing a chess board with pic macros.  Then I designed
the chess pieces with fundamental drawing instructions, they look
as if they escaped from a kindergarden, but I don't mind as I am
using the set for myself.  See the definition of my wite knight in
the post scriptum which can be inserted in an ordinary groff file as
the special character \*(NN .  Then I wrote editor macros to manage the
diagrams & pieces and, by now, it is far from being beautiful and it
still is a bit buggy, but it works and I have started to write down my
black opening repertoire with it.

   To be honest it would be of great help if someone of the experienced
people would have a look at it and tell me his or her opinion.  But as
I said it is sort of a silly project and the request for an opinion
is not the goal of this mail; no, but I have 2 precise questions:


(1) I googled to see how I can insert bitmap diagrams or anything xfig
   or the gimp can produce into a g(t)roff -mm file.  All I found is
   that there is no way.  Is that true?  Am I to keep my [.ds] chess
   pieces?

(2) I defined the chess pieces graphics with fundamental [\D'l x y']
   requests and made up a central file with all the definitions I have
   by now.  Now I'd like to source them in as a tmac with a command
   line option.  But it didn't work for the [.ds] requests, like the
   white knight below, so I source them in with a [.so] request..
   How can I insert [.ds] definitions in a tmac file?  Or did I
   something wrong and it should work?


TIA for reading this,

erich.


POST SCRIPTUM: The white Knight as a chess piece

.\"
.\" %DEF: White Knight      ยง01
.ds NN \
\s+(\nL\
\v'\nIp'\
\D'l \\nfu \\nzu'\
\D'l -\\neu -\\nau'\
\D'l \\nzu -\\nau'\
\D'l \\neu \\nzu'\
\D'l -\\ndu -\\ndu'\
\h'\\nau'\v'-\\nau'\
\D'l -\\neu \\ndu'\
\D'l \\nzu \\neu'\
\h'\\neu'\
\v'-\nIp'\
\s0
.\" End NN


reply via email to

[Prev in Thread] Current Thread [Next in Thread]