Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bridge Writing Software?

12 views
Skip to first unread message

David Levy

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
You may want to explore the Alpine fonts for chess and other games at:

http://www.partae.com/

The bridge font is called Bermuda. Be sure to check out the frequently
asked questions to get a sense of the text you need to type in order
to render a diagram (the example given is for chess).

I have purchased and used the Monte Carlo font for backgammon -- you
can see the results on my trictrac web site:

http://www.best.com/~dlevy/trictrac/rules/rules.htm

I found it most helpful to write a program that read a more simple format
for the board and wrote out the "text" that the Monte Carlo font expected.
More details available on request.

David Levy


Jude Goodwin-Hanson <webm...@greatbridgelinks.com> wrote in message
news:3A1330E5...@greatbridgelinks.com...
> Greatbridgelinks recently received this query:
>
>
> My husband has written a book about bridge and has asked me to type out
> his manuscript.
> Could you please tell me if there is software available that makes it
> easier for me to type out the specific bridge symbols.
> Thank you so much for your answer,
>
> Katja Boonstra-Blom
> Fen...@worldonline.nl
>
> If you can help these people, please send to their email above
> thanks!
>
> GREAT BRIDGE LINKS
> http://www.greatbridgelinks.com
> Linking You to All That's Bridge On the Web
>

nco...@bridgetrix.com

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
In article <8uvfm...@news2.newsguy.com>, ADhar...@WorldBank.Org
(Ashok) wrote:
>
>I just use tabs to format a bridge hand, but there might be people who have
>Word macros to do that, which would be handy. Does anyone have access to
>a macro?

Here are some old notes I copied this from rgb that may be relevant. I
no longer know exactly what they are. Jeff might be Jeff Goldstein.
Perhaps it came from the FAQ, the site in Australia. No idea what kind of
macros it is.

Neil Cohen

Using Jeff's HTML Bridge Macro Package dnldivert(-1) # These are macros
for building bridge diagrams in HTML.# They are somewhat patterened after
a set I stole for# LaTeX. I don't remember their origin. See README for#
use details.# image files define(`SIMG',s.gif) dnldefine(`HIMG',h.gif)
dnldefine(`DIMG',d.gif) dnldefine(`CIMG',c.gif)
dnldefine(`TIMG',table11.gif) dnl# inline suit symbols during text
define(`SPADE',<IMG SRC = SIMG ALT = "S:">) dnldefine(`HEART',<IMG SRC =
HIMG ALT = "H:">) dnldefine(`DIAMOND',<IMG SRC = DIMG ALT = "D:">)
dnldefine(`CLUB',<IMG SRC = CIMG ALT = "C:">)
dnldefine(`CARD',`ifelse($2,,<nobr>SUITREPLACE($1)</nobr>,<nobr>SUITREPLACE($1)SUITREPLACE($2)</nobr>)')define(`SUITREPLACE',`ifelse($1,Dbl,Dbl,
$1,Pass,Pass, $1,All Pass,All Pass,
$1,dbl,dbl, $1,pass,pass, $1,all pass,all
pass, $1,All pass,All pass,
substr($1,0,1),S,SPADE{substr($1,1)},
substr($1,0,1),H,HEART{substr($1,1)},
substr($1,0,1),D,DIAMOND{substr($1,1)},
substr($1,0,1),C,CLUB{substr($1,1)},
substr($1,0,1),s,SPADE{substr($1,1)},
substr($1,0,1),h,HEART{substr($1,1)},
substr($1,0,1),d,DIAMOND{substr($1,1)},
substr($1,0,1),c,CLUB{substr($1,1)},
substr($1,eval(len($1)-1),1),S,{substr($1,0,eval(len($1)-1))}SPADE,
substr($1,eval(len($1)-1),1),H,{substr($1,0,eval(len($1)-1))}HEART,
substr($1,eval(len($1)-1),1),D,{substr($1,0,eval(len($1)-1))}DIAMOND,
substr($1,eval(len($1)-1),1),C,{substr($1,0,eval(len($1)-1))}CLUB,
substr($1,eval(len($1)-1),1),s,{substr($1,0,eval(len($1)-1))}SPADE,
substr($1,eval(len($1)-1),1),h,{substr($1,0,eval(len($1)-1))}HEART,
substr($1,eval(len($1)-1),1),d,{substr($1,0,eval(len($1)-1))}DIAMOND,
substr($1,eval(len($1)-1),1),c,{substr($1,0,eval(len($1)-1))}CLUB,
$1)')# suit symbols for diagramsdefine(`VSPADE',<IMG SRC = SIMG ALT =
"S:">) dnldefine(`VHEART',<IMG SRC = HIMG ALT = "H:">)
dnldefine(`VDIAMOND',<IMG SRC = DIMG ALT = "D:">) dnldefine(`VCLUB',<IMG
SRC = CIMG ALT = "C:">) dnl# the table markerdefine(`TMARKER',<IMG SRC =
TIMG WIDTH = 60 HEIGHT = 60>) dnl# horizontal
handsdefine(`HHAND',<NOBR>`&#160;'SPADE$1 HEART$2 DIAMOND$3 CLUB$4</NOBR>)
dnl# vertical handsdefine(`VHAND',VSPADE $1 `<br>'VHEART $2 `<br>'VDIAMOND
$3 `<br>'VCLUB $4) dnl# full hand
diagramsdefine(`HAND',<table><TR><TD></TD><TD>$1</TD><TD></TD></TR><TR><TD>$2`</TD><TD>'TMARKER`</TD><TD>'$3</TD></TR><TR><TD></TD><TD>$4</TD><TD></TD></TR></table>)
dnl# bidding:
2-playerdefine(`BIDHEAD',<table><tr><td><b>`ifelse($1,,North,$1)'</b></td><td><b>`ifelse($2,,South,$2)'</b></td></tr>)
dnldefine(`BIDNAMES',<tr><td><i>`ifelse($1,,North,$1)'</i></td><td><i>`ifelse($2,,South,$2)'</i></td></tr>)
dnldefine(`BIDROUND',`ifelse($1,,,<tr><td>CARD($1)</td><td>CARD($2)</td></tr>)')
dnldefine(`BIDEND',</table>)
dnldefine(`BIDDING',`BIDHEAD($1,$2)'`BIDROUND(shift(shift($@)))'`BIDROUND(shift(shift(shift(shift($@)))))'`BIDROUND(shift(shift(shift(shift(shift(shift($@)))))))'`BIDROUND(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))'`BIDROUND(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))))'`BIDEND')
dnl# old
versiondefine(`OBIDHEAD',<table><tr><td><b>`ifelse($1,,North,$1)'</b></td><td><b>`ifelse($2,,South,$2)'</b></td></tr>)
dnldefine(`OBIDNAMES',<tr><td><i>`ifelse($1,,North,$1)'</i></td><td><i>`ifelse($2,,South,$2)'</i></td></tr>)
dnldefine(`OBIDROUND',`ifelse($1,,,<tr><td>$1</td><td>$2</td></tr>)')
dnldefine(`OBIDEND',</table>)
dnldefine(`OBIDDING',`OBIDHEAD($1,$2)'`OBIDROUND(shift(shift($@)))'`OBIDROUND(shift(shift(shift(shift($@)))))'`OBIDROUND(shift(shift(shift(shift(shift(shift($@)))))))'`OBIDROUND(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))'`OBIDROUND(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))))'`OBIDEND')
dnl# bidding:
4-playerdefine(`BID4HEAD',<table><tr><td><b>`ifelse($1,,North,$1)'</b></td><td><b>`ifelse($2,,East,$2)'</b></td><td><b>`ifelse($3,,South,$3)'</b></td><td><b>`ifelse($4,,West,$4)'</b></td></tr>)
dnldefine(`BID4NAMES',<tr><td><i>`ifelse($1,,North,$1)'</i></td><td><i>`ifelse($2,,East,$2)'</i></td><td><i>`ifelse($3,,South,$3)'</i></td><td><i>`ifelse($4,,West,$4)'</i></td></tr>)
dnldefine(`BID4ROUND',`ifelse(CARD($1),,,<tr><td>CARD($1)</td><td>CARD($2)</td><td>CARD($3)</td><td>CARD($4)</td></tr>)')
dnldefine(`BID4END',</table>)
dnldefine(`BID4',`BID4HEAD($1,$2,$3,$4)'`BID4ROUND(shift(shift(shift(shift($@)))))'`BID4ROUND(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))'`BID4ROUND(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))))))'`BID4END')
dnl# old
versiondefine(`OBID4HEAD',<table><tr><td><b>`ifelse($1,,North,$1)'</b></td><td><b>`ifelse($2,,East,$2)'</b></td><td><b>`ifelse($3,,South,$3)'</b></td><td><b>`ifelse($4,,West,$4)'</b></td></tr>)
dnldefine(`OBID4NAMES',<tr><td><i>`ifelse($1,,North,$1)'</i></td><td><i>`ifelse($2,,East,$2)'</i></td><td><i>`ifelse($3,,South,$3)'</i></td><td><i>`ifelse($4,,West,$4)'</i></td></tr>)
dnldefine(`OBID4ROUND',`ifelse($1,,,<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td></tr>)')
dnldefine(`OBID4END',</table>)
dnldefine(`OBID4',`OBID4HEAD($1,$2,$3,$4)'`OBID4ROUND(shift(shift(shift(shift($@)))))'`OBID4ROUND(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))'`OBID4ROUND(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift(shift($@)))))))))))))'`OBID4END')
dnl# suit
combinationdefine(`SUIT',<table><tr><td><i>Dummy</i></td></tr><tr><td>$1</td></tr><tr><td></td></tr><tr><td><i>Declarer</i></td></tr><tr><td>$2</td></tr></table>)
dnl# miscellanydefine(`FOOTNOTE',<sup><font size =
1>$1</sup></font>)define(`PANELIST',<dt><i>$*</i><dd>)# try to avoid some
collisionsundefine(`define')undefine(`include')undefine(`index')changequote({,})changecomdivert
dnl

----------------------------------------------------------------------------
[Top | Up | Search | Help | Contents | What's New | Bridge FAQ | WWWBridge |
Email Maintainer ]
----------------------------------------------------------------------------

Publishing-and-Publications/TypeSetting/HTML Area

----------------------------------------------------------------------------

How to use the bridge macro package

At the top of the source file, include this line:

To "compile" your HTML file, type:
m4 yourfile >newfile
This converts all the bridge macros
into unreadable HTML. Trust me.

Using the package, one can do the following:

-- Include suit symbols in text. Just specify
them as all caps, i.e., 1 SPADE or HEART J

-- A better way to use suit symbols in text:
CARD(first,second) If first or second
matches c,h,d,s,C,H,D, or S, it is converted
to the appropriate suit symbol. So, CARD(3,s)
is equivalent to 3SPADE (as is CARD(3,SPADE)).

New: CARD can also take just one argument.
If the first or last character is one of
SHDCshdc, then that character is translated
into the approprate suit symbol and the
rest of the text is left alone. That means
CARD(1S), and CARD(SA) work as expected, as
will CARD(Sxxxx).

-- Include a hand in horizontal text. Use
HHAND(spades, hearts, diamonds, clubs)

-- Include a hand that's four lines long. Use
VHAND(spades, hearts, diamonds, clubs)

-- Do a full hand diagram. Do this:
HAND(VHAND(northcards),VHAND(westcards),VHAND(eastcards),VHAND(southcards))

-- Do two-player bidding up to five rounds. Use
BIDDING(player1,player2,bid,bid,bid,bid,bid,...)
If you leave off player1 or player2, they'll
default to North and South respectively.

-- Do 4-player bidding up to four rounds. Use
BID4(p1,p2,p3,p4,bid,bid,...)

-- Do more complex bidding. You have to build
it yourself, thusly:
2-player bidding:
BIDHEAD({player1},{player2})
BIDROUND(bid,bid)
BIDROUND(bid,bid)
...
BIDEND()

4-player:
BID4HEAD({p1},{p2},{p3},{p4})
BID4ROUND(bid,bid,bid,bid)
...
BID4END

All the "BID" macros assume that arguments are
"CARD" structures. It'll translate them automatically
unless the string is "Dbl", "Pass", or "All Pass".
There's a set of macros called "OBID*" that don't
translate, so they can be used for "Dbl *" constructions.
As I come up with more exceptions ("pass" and "dbl" come
to mind right now (I added them)) I'll put them in the
exception list.

Examples:

HHAND(KQJ4,AJ84,984,J4)


VHAND(KQJ4,AJ84,984,J4)


HAND(VHAND(KQJ4,AJ84,984,J4),,,VHAND(A83,Q5,Q72,AQ1095))

HAND(VHAND(KQJ4,AJ84,984,J4),VHAND(AKQ,AKQ,AKQJ,AKQ),VHAND(AKQ,AKQ,AKQJ,AKQ),VHAND(A83,Q5,Q72,AQ1095))

BIDDING(,,1SPADE,1NT,2CLUB,2HEART,3HEART,4HEART,4NT,5CLUB,5DIAMOND,5HEART,5SPADE,5NT)

BID4(,,,,1SPADE,1NT,2CLUB,2HEART,3HEART,4HEART,4NT,5CLUB,5DIAMOND,5HEART,5SPADE,5NT)


BIDHEAD(You,CHO)
BIDROUND(1S,1NT (forcing))
BIDROUND(2C,2D)
BIDROUND(2H,2S)
BIDROUND(3NT,Pass)
BIDEND()


BID4HEAD()
BID4ROUND(---,---,1C,Pass)
BID4ROUND(1S,1NT,Dbl,Rdbl)
BID4ROUND(All Pass)
BID4END()

Note that the "All Pass" line looks pretty bad.
To make it look right, do instead:
All Pass
When/if I think of a good way to make that
into a general-purpose macro, I shall, but
until then, so it goes.

One gotcha: you might have the word "shift"
in your text. It'll vanish. To avoid that,
change it to "{shift}". (No double quotes,
just the curly braces.) Sorry, but I haven't
figured out a way around it, yet.

It also creams curly braces. No big deal.

Some notes...

Using suit symbols in text is convenient, but
there are two problems with the simple way:
1) if the suit symbol occurs at the beginning
of the text line, is is misaligned vertically.
I think this is a bug that will get fixed.
2) html interpreters will sometimes put line
breaks between the symbol and the other part
of the text, either the card or bid level. To
fix that, use CARD(part1,part2) or put
around the 7SPADE constructions.

If you want two macros adjacent without space
between them, use a pair of curly braces to
separate them, e.g. SPADE{}HEART{}DIAMOND{}CLUB
will produce the suit symbols in a row.


----------------------------------------------------------------------------

Files

* bridgemacros.m4 (5K) [01/Mar/96 15:54]
* c.gif (113 bytes) [07/Dec/95 15:56]
* d.gif (109 bytes) [07/Dec/95 15:55]
* example-oneright.bml (1K) [07/Dec/95 15:51]
* example-oneright.html (2K) [07/Dec/95 15:54]
* h.gif (112 bytes) [07/Dec/95 15:55]
* m4.README (3K) [07/Dec/95 15:50]
* s.gif (111 bytes) [07/Dec/95 15:55]
* table11.gif (1K) [07/Dec/95 15:56]

----------------------------------------------------------------------------

Path:
news.eden.com!arlut.utexas.edu!geraldo.cc.utexas.edu!cs.utexas.edu!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!lll-winken.llnl.gov!fnnews.fnal.gov!nntp-server.caltech.edu!jeff
From: je...@gg.caltech.edu (Jeff Goldsmith)
Newsgroups: rec.games.bridge,comp.text.tex
Subject: Re: How do i use the bridge-i LaTeX2e package?
Date: 5 Dec 1995 18:23:18 GMT
Organization: California Institute of Technology, Pasadena
Lines: 40
Message-ID: <4a22mm$9...@gap.cco.caltech.edu>
References: <JORGEN.95...@opal.elixir.e.kth.se>
NNTP-Posting-Host: shaggy.gg.caltech.edu
X-Newsreader: NN version 6.5.0 (NOV)
Xref: news.eden.com rec.games.bridge:44068 comp.text.tex:85620

jor...@elixir.e.kth.se (Jorgen Johansson) writes:

>I found the file bridge-i.sty and I tried to use it this way.
>This the top of my LaTeX file:

I have no idea about your problem, but I have a set of LaTeX
bridge macros that work well and are easy to use. See
http://muggy.caltech.edu/~jeff/ to find them. They work
by just doing:
\input{bridgehead.tex}
\begin{document}
...

The file contains macros for hand diagrams, single
hands, card combination diagrams, bidding sequences
and a few other things. I don't like the bidding
macro (I stole it from someone else) but instead do
this: (I suppose I could write a macro to do this,
but I just cut and paste these things, so I never got
the impetus to build a new macro.)

\begin{tabular}{llll}
{\sc East} & {\sc South} & {\sc West} & {\sc North} \\
{\em Rodwell} & {\em Robson} & {\em Meckstroth} & {\em Forrester} \\
2\clubs & 2\spades & 4\clubs & 4\spades \\
\multicolumn{4}{l}{(All Pass)} \\
\end{tabular}
\end{center}

I like the look of the thereby produced bidding sequences.
If you can't use the web to grab the file, I'll email it to you.

I also have a set of m4 macros that produce html code for
the same sort of things. They look a little different
from the LaTeX ones, but are very easy to use and do a
decent job. They are at the same site.
--Jeff
--
His tale is told and done. Jerry Garcia

Neil Cohen
Bridge Trix
Producers of the Bobby Wolff Bridge Mentoring Series
http://www.bridgetrix.com

Jude Goodwin-Hanson

unread,
Nov 15, 2000, 7:57:11 PM11/15/00
to

Ashok

unread,
Nov 15, 2000, 9:10:19 PM11/15/00
to
In article <3A1330E5...@greatbridgelinks.com>, webm...@greatbridgelinks.com says...

>
>Greatbridgelinks recently received this query:
>
>
>My husband has written a book about bridge and has asked me to type out
>his manuscript.
>Could you please tell me if there is software available that makes it
>easier for me to type out the specific bridge symbols.
>Thank you so much for your answer,
>
>Katja Boonstra-Blom
>Fen...@worldonline.nl
>
>If you can help these people, please send to their email above
>thanks!
>


I find it most convenient to stay with my usual Windows-based wordprocessing
software. The Symbols font that comes with Windows includes the four suit
symbols needed. For example, in Word,

Insert -> Symbol

takes one to that font display. One clicks on the desired symbol and hits
Close. And right there, can also define short-cuts for those symbols, for
example:
CTRL-Shift-s for spades
CTRL-Shift-h for hearts, etc.

I just use tabs to format a bridge hand, but there might be people who have
Word macros to do that, which would be handy. Does anyone have access to
a macro?


Ashok

APBluthman

unread,
Nov 15, 2000, 10:53:37 PM11/15/00
to
Dear Ms. Boonstra-Blom:

I have seen your inquiry posted on rec.games.bridge ("r.g.b."), and I will try
to help you.

In attempting to maintain my own notes (with hand records), I have tried
different approaches, and have found that it is much easier to use template
format for each needed type of hand diagram, and to insert a copy of the
template into the text, than to directly type hand diagrams into the body of a
text document.

The most straightforward approach to doing this is to start with your template
for the hand diagram (which will contain the suit symbols in appropriate
positions), insert a copy of the template into the text and then type the card
symbols on the row after the suit symbols.

As others have recently discussed on r.g.b., this leads to some difficulties in
spacing (i. e., proper tabbing and indentation) when using proportional fonts.
Also, inserting the card symbols onto an East-West line moves the suit symbols
for the East hand out of proper alignment.

If you attempt this approach, you may want to download the Bridge World's free
template set (www.bridgeworld.com) that the magazine's editors created for
submittals by their writers. I have not tried the Bridge World's templates, but
invite you to try them out and inform r.g.b. (and myself by e-mail) of your
results.

Alternatively, commercially available software exists for hand creation and
diagramming. Among the many features of DealMaster Pro (www.dealmaster.com) is
the ability to call up a template hand diagram on your screen, click in the
cards for insertion into each hand (using a mouse), type in (keyboard or mouse)
the bidding, dealer, and and vulnerability, and then save the entire diagram as
a computer file. Both Microsoft Word and Corel Word Perfect files are supported
(check with the program's developer, Ed Marzo, if you need other formats).
Then, when you type the text, you simply use the word processor's "insert"
feature to bring in the completed diagram.

The only negative feature, from a publishing standpoint, is that the bidding
diagram starts with the dealer in the left-hand column. When the dealer is
either East or North, this will cause East's bidding to "cross-over" underneath
West's hand (and vice-versa). I and others have pointed this out to Mr. Marzo,
and he has ststed that he is working on a fix.

Nonetheless, Deal Master Pro is an outstanding commercial dealer program, and
easily usable for your stated purposes.

Alvin P. Bluthman
apblu...@aol.com

0 new messages