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: