%LaTeX convention card editor
%v1.0 - Gordon Bower - 17 December 2017

%Filled-out example convention card from the author
%grbcce.sty contains the TikZ formatting instructions

%grbcce requires the following packages: tikz, txfonts, microtype, ifthen, xstring

\documentclass[12pt]{article}
%the card is 8'' wide so the margins are very narrow to fit on letter size paper:
\usepackage{grbcce}
\usepackage[left=5mm,right=5mm,top=5mm]{geometry}
\usepackage{nicefrac} %to get ``1/2''
\begin{document}

%There is a boolean to turn on or off every checkbox on the card.
%To fill in any checkbox, remove the ``%'' in front of the \setboolean statement
%that activates that particular checkbox.
%You may delete unused setboolean statements.

%There is a text item to insert a description on every blank line of the card.
%You WILL get errors if you delete any \newcommand statements!
%if you want to leave a line blank, use \newcommand{\nameoftextfield}{} .

%Use any of the following types of text:
%\regtext{...} for regular black text
%\redreg{...} for regular red text (for conventions you will alert)
%\bluereg{...} for regular blue text (for announcements)
%\boldtext{...} for bold black text
%\redbold{...} for bold red text
%\bluebold{...} for bold blue text (e.g. more visible 1NT ranges)
%Use whatever other LaTeX formatting you wish. All fillable fields are \scriptsize.

%To insert (black) suit symbols: \s, \h, \d, \c.
%To insert a red heart: \textcolor{red}{\h}

%To specify what card you lead from a given holding, indicate that card's
%POSITION in the given sequence:
%e.g. if you lead T from KJTx, \newcommand}{\KTJx}{3}
%You MAY circle more than one card if you wish. e.g., \newcommand{\TNxx}{14}

%You WILL get errors if you delete any \newcommand statements!
%If you lead the default card, you may use \newcommand}{cardcombination}{}.

\newcommand{\names}{\boldtext{Doug Dorland --- Gordon Bower}}
\newcommand{\playernumber}{\regtext{2035553}}

%General approach:
\newcommand{\generalapproach}{\bigboldtext{Standard American}}
%\setboolean{gf}{true} %2/1 Game Forcing
%\setboolean{gfewsr}{true}
%\setbooleab{vlop}{true} %Very light...
%\setboolean{vl3h}{true}
%\setboolean{vloc}{true}
%\setboolean{vlpr}{true}
%\setboolean{fo1c}{true} %Forcing openings...
\setboolean{fo2c}{true}
%\setboolean{fon2b}{true}
%\setboolean{foother}{true}
\newcommand{\foothertext}{\redreg{}}%Other forcing opening bids

%Notrump openings:
%First column:
\newcommand{\ntlowtext}{\bluebold{15}}
\newcommand{\nthightext}{\bluebold{17}}
\newcommand{\altntlowtext}{} %If variable NT, second range here
\newcommand{\altnthightext}{}
\setboolean{nt5cm}{true}
\newcommand{\sysontext}{\regtext{X,2\c}} %Systems on after 1NT-(X), 2\c, etc...
\setboolean{staym}{true}
%\setboolean{puppe}{true}
\setboolean{jac2d}{true}
%\setboolean{fstay}{true}
\setboolean{jac2h}{true}
\newcommand{\ntsptext}{\regtext{$\Rightarrow$3\c\ (3\c\ likes)}} %1NT-2S
\newcommand{\ntnttext}{\regtext{$\Rightarrow$3\d\ }} %1NT-2NT

%NT openings - 2nd column:
\newcommand{\ntcjumptext}{ \regtext{(3-1)(5-4)}} %1NT-3C
\newcommand{\ntdjumptext}{ \regtext{5-5 minors GF}}
\newcommand{\nthjumptext}{\regtext{Natural GF}}
\newcommand{\ntsjumptext}{\regtext{Natural GF}} %1NT-3S
\newcommand{\ntextratext}{} %Blank line next to puppet stayman
\setboolean{texas}{true}
\setboolean{smole}{true}
%\setboolean{leben}{true}
\newcommand{\ntlebentext}{\redreg{fast}} %Lebensohl: Fast or slow denies?
\setboolean{ntneg}{true}
\newcommand{\ntnegtext}{\regtext{3-level only\pfix}} %Negative doubles over 1NT?
\newcommand{\ntothertext}{\regtext{Rubensohl}} %Other conventions over 1NT

%2NT/3NT openings
\newcommand{\twonlowtext}{\boldtext{20}}
\newcommand{\twonhightext}{\boldtext{21}}
%\setboolean{pup2n}{true}
\setboolean{jac2n}{true}
\setboolean{tex2n}{true}
\newcommand{\twonsptext}{\regtext{MSS}} %2NT-3S
\newcommand{\twonextratext}{} %Blank line in 2NT box
\newcommand{\threenlowtext}{} %3NT range
\newcommand{\threenhightext}{}
\newcommand{\threenextratext}{\regtext{Kantar (solid major)\pfix}} %Blank line in 3NT box
\newcommand{\convnttext}{} % Blank lines under 3NT box
\newcommand{\convntextratext}{}

%Major openings:
%\setboolean{h12l4}{true} %4 cards in 1st/2nd seat
%\setboolean{h34l4}{true} %4 cards in 3rd/4th seat
\setboolean{h12l5}{true}
\setboolean{h34l5}{true}
%\setboolean{dblrf}{true} %double raise
\setboolean{dblri}{true}
%\setboolean{dblrw}{true}
%\setboolean{ocdrf}{true} %double raise in comp
%\setboolean{ocdri}{true}
\setboolean{ocdrw}{true}
%\setboolean{ra2nt}{true} %Jacoby
\setboolean{ra3nt}{true} %1M-3NT
\setboolean{raspl}{true} %Splinter
\newcommand{\majraisetext}{\regtext{1\h-2N/1\s-3\c\ bal GF; other JS raises}} %Text line for Bergen, fitjumps, etc
%\setboolean{ntfor}{true} %1NT forcing
%\setboolean{ntsem}{true} %1NT semiforcing
\setboolean{twonf}{true}
%\setboolean{twoni}{true}
\newcommand{\majtwonlowtext}{\regtext{14+}}
\newcommand{\majtwonhightext}{\regtext{}}
\newcommand{\majthreenlowtext}{} %1M-3NT range
\newcommand{\majthreenhightext}{}
\newcommand{\majthreennote}{} %Empty space next to the 1M-3NT box: I might write ``4333'' here if I play 1M-3NT as a 13-15 4333 hand.
%\setboolean{drury}{true} %What kind of drury?
%\setboolean{drrev}{true}
%\setboolean{dr2wy}{true}
%\setboolean{drfit}{true}
\newcommand{\majothertext}{\regtext{2-way GT, Fit jumps by passed hand}} %Other major methods: HSGT, Mathe asking bid, etc

%Minor openings:
%\setboolean{club4}{true} %1C length
\setboolean{club3}{true}
%\setboolean{cl2nf}{true}
%\setboolean{clcon}{true}
\newcommand{\clopennote}{} % Insert text in blank space next to 1C
\newcommand{\diopennote}{} % Insert text in blank space next to 1D e.g. ``4 unless 4-4-3-2'' 
%\setboolean{diam4}{true} %1D length
\setboolean{diam3}{true}
%\setboolean{di2nf}{true}
%\setboolean{dicon}{true}
%\setboolean{midrf}{true} %double raise
%\setboolean{midri}{true}
\setboolean{midrw}{true}
%\setboolean{modrf}{true} %double raise in comp
%\setboolean{modri}{true}
\setboolean{modrw}{true}
\setboolean{jsomi}{true} %JS in other minor
\setboolean{inver}{true} %Inverted raise
\newcommand{\minraisetext}{\regtext{JS 8-10, Invtd 11+}} %Textbox next to inverted raise
\setboolean{bypas}{true}
\newcommand{\minonenlowtext}{\regtext{8}} %1C-1NT range
\newcommand{\minonenhightext}{\regtext{10}}
\setboolean{m2ntf}{true} %1C-2NT
%\setboolean{m2nti}{true}
\newcommand{\mintwonlowtext}{\regtext{14-15}}
\newcommand{\mintwonhightext}{\regtext{or 18+}}
\newcommand{\minthreenlowtext}{\regtext{16}}
\newcommand{\minthreenhightext}{\regtext{17}}
\newcommand{\minothertext}{\regtext{1m-2\h\ Reverse Flannery}} %Other minor suit methods (1m-3M splinter etc)

%2-bids
\setboolean{st2cl}{true} %2C strong?
%\setboolean{ot2cl}{true}
%\setboolean{neg2d}{true} %2D neg or waiting?
\setboolean{wai2d}{true}
\newcommand{\twoclowtext}{\regtext{22+}} %2C point range
\newcommand{\twochightext}{\regtext{or 8\nicefrac{1}{2}QT}}
\newcommand{\twocldescribetop}{} %3 lines of text on left side of 2C divider
\newcommand{\twocldescribemiddle}{\regtext{2C-2D-3M demands cue}}
\newcommand{\twocldescribebottom}{\regtext{2C-2D-4M 9 tricks}}
\newcommand{\twoclresponsetop}{\regtext{2\h\,= No A or K or 2Q}} %3 lines of text on right side of 2C divider
\newcommand{\twoclresponsemiddle}{\regtext{2NT = \h}}
\newcommand{\twoclresponsebottom}{}

\newcommand{\twodlowtext}{\regtext{5}} %2D point range
\newcommand{\twodhightext}{\regtext{10}}
\newcommand{\twoddescribe}{}
\newcommand{\twodresponse}{\regtext{Feature; relay after TOX}}

\setboolean{wk2di}{true} %2D weak
%\setboolean{in2di}{true}
%\setboolean{st2di}{true}
%\setboolean{co2di}{true} %2D conventional
\setboolean{dintf}{true} %2NT forcing
%\setboolean{dnsnf}{true} %new suit NF
%2H:
\newcommand{\twohlowtext}{\regtext{5}}
\newcommand{\twohhightext}{\regtext{10}}
\newcommand{\twohdescribe}{}
\newcommand{\twohresponse}{\regtext{Feature; relay after TOX}}
\setboolean{wk2he}{true}
%\setboolean{in2he}{true}
%\setboolean{st2he}{true}
%\setboolean{co2he}{true}
\setboolean{hentf}{true}
%\setboolean{hnsnf}{true}
%2S:
\newcommand{\twoslowtext}{\regtext{5}}
\newcommand{\twoshightext}{\regtext{10}}
\newcommand{\twosdescribe}{}
\newcommand{\twosresponse}{\regtext{Feature; relay after TOX}}
\setboolean{wk2sp}{true}
%\setboolean{in2sp}{true}
%\setboolean{st2sp}{true}
%\setboolean{co2sp}{true}
\setboolean{spntf}{true}
%\setboolean{snsnf}{true}

%Bottom of card:
\setboolean{nmf1w}{true} %1-way new minor
\newcommand{\nmftext}{\regtext{Always 2\c}}
%\setboolean{nmf2w}{true} %2-way new minor
\newcommand{\twowaytext}{}
\setboolean{wjsnc}{true} %Weak jump shifts
\newcommand{\wjstext}{\regtext{only 1m-2\s}}
\setboolean{fsfrd}{true} %Fourth suit
%\setboolean{fsfgf}{true}
\newcommand{\footnotestop}{\regtext{Unus over Unus; Lebensohl/Reverse; Sandwich NT}} % 3 lines for additional conventions at bottom
\newcommand{\footnotesmiddle}{\regtext{Good/Bad 2NT; Truscott vs. strong club}}
\newcommand{\footnotesbottom}{}

%Back of card:
%\setboolean{penax}{true} %Penalty doubles through...
\newcommand{\penaxthru}{} 
\setboolean{negax}{true} %Negative doubles through...
\newcommand{\negaxthru}{\regtext{3\s }}
\setboolean{respx}{true} %Responsive
\newcommand{\respxthru}{\regtext{3\s }}
\setboolean{maxix}{true} %Maximal
\setboolean{suppx}{true} %Support
\newcommand{\suppxthru}{\regtext{2\s}}
\setboolean{supxx}{true} %Support redouble
%\setboolean{cardx}{true}
%\setboolean{ostox}{true}
\newcommand{\doubletext}{\regtext{Support X promises A/K/Q}} %Other special doubles

%Simple overcalls:
\newcommand{\oclowtext}{\regtext{7}} %point range
\newcommand{\ochightext}{\regtext{16}}
%\setboolean{oc4cd}{true}
%\setboolean{ocvls}{true}
%\setboolean{nsfor}{true} %New suit forcing
\setboolean{nsnfc}{true} %NF Constructive
%\setboolean{nsnon}{true} %NF
%\setboolean{jrfor}{true} %Jump raise...
%\setboolean{jrinv}{true}
\setboolean{jrwea}{true}
\newcommand{\overcalltext}{\regtext{JS=Fit; Jump Q=mixed; Transfer Advances}} %Other info about simple overcalls

% Jump overcalls
%\setboolean{jostr}{true} %strong
%\setboolean{joint}{true}
\setboolean{jowea}{true} %weak
\newcommand{\jumpovercalltext}{\regtext{Except 1\c-2\d\ and 1\d-2\h=Roman\pfix}} %Other info about jump overcalls

% Opening preempts
\setboolean{prsou}{true} %sound -- rule of 2/3/4
%\setboolean{prlig}{true} %light 
%\newvoolean{prver}{true} %very light
\newcommand{\preempttext}{} %other info about preempts

%Direct cuebid
%\setboolean{qnami}{true} %natural...
%\setboolean{qnama}{true}
\setboolean{qnaar}{true}
%\setboolean{qstmi}{true} %string takeout...
%\setboolean{qstma}{true}
%\setboolean{qstar}{true}
%\setboolean{qmimi}{true} %michaels
%\setboolean{qmima}{true}
%\setboolean{qmiar}{true}
\newcommand{\cuebidtext}{\regtext{1\c-2\c=4\s\ 5+Red; 1\d-2\d=4M 5+\c}} %other cuebid comments

%Competitive bidding column - NT overcalls
\newcommand{\directlowtext}{\regtext{15}} %range
\newcommand{\directhightext}{\regtext{18}}
\setboolean{syson}{true} %systems on
%\setboolean{dntco}{true}
\newcommand{\directconvtext}{} %info line re direct overcalls
\newcommand{\ballowtext}{\regtext{11}} %balancing range
\newcommand{\balhightext}{\regtext{16}}
%\setboolean{unumi}{true}
%\setboolean{unu2l}{true} %Unusual: minors
\setboolean{bntco}{true} %Unusual: 2 lowers
\newcommand{\ntconvtext}{\regtext{Sandwich (4-5)}} %conventional overcalls (Sandwich etc)

%Defense vs. NT:
\newcommand{\firstcondition}{\regtext{ALL}} %''vs.'' line, first half
\newcommand{\firstvstwocl}{\regtext{Majors (2\d\ asks)}} %1NT-2C
\newcommand{\firstvstwodi}{\regtext{One major}} %1NT-2D
\newcommand{\firstvstwohe}{\regtext{5+\h\ 4+ minor}} %1NT-2H
\newcommand{\firstvstwosp}{\regtext{5+\s\ 4+ minor}} %1NT-2S
\newcommand{\firstvsdbl}{\regtext{4M 5+m (2\c\ asks m, 2\d\ asks M)}} %1NT-X
\newcommand{\secondcondition}{} %the same six lines, right half
\newcommand{\secondvstwocl}{}
\newcommand{\secondvstwodi}{}
\newcommand{\secondvstwohe}{}
\newcommand{\secondvstwosp}{}
\newcommand{\secondvsdbl}{}
\newcommand{\othernttop}{\regtext{(Woolsey)}} %two lines of other NT defense info
\newcommand{\otherntbottom}{}

%Over opp's takeout double
\setboolean{nsf1l}{true} %New suit forcing?
%\setboolean{nsf2l}{true}
%\setboolean{jsfor}{true} %Jump shifts
%\setboolean{jsinv}{true}
%\setboolean{jswea}{true}
%\setboolean{xximp}{true} %Rdbl implies no fit
%\setboolean{maunl}{true} %Jordan
%\setboolean{malim}{true}
%\setboolean{mawea}{true}
\setboolean{miunl}{true}
%\setboolean{milim}{true}
%\setboolean{miwea}{true}
\newcommand{\xxtext}{\boldtext{JS = FIT}} %Blank space next to Rdbl implies no fit. Can write in ``any 10+'' 
\newcommand{\toxothertext}{\regtext{Transfers after 1M-X}} %Line at bottom of Opps TOX section

%vs. opening preempts
\setboolean{opdto}{true}
\newcommand{\opdtothru}{\regtext{4\s }} %Takeout through...
%\setboolean{oppen}{true}
\newcommand{\opconvtakeout}{\regtext{4NT=2 suits}} %Conv Takeout line
\setboolean{opleb}{true} %Lebensohl
\newcommand{\opothertext}{} %Other line

%Slam conventions
\setboolean{gerbe}{true} %Gerber
%\setboolean{black}{true} %Blackwood
%\setboolean{b0314}{true} %RKC
\setboolean{b1430}{true} %1430
\setboolean{dopi}{true}
%\setboolean{depo}{true}
%\setboolean{ropi}{true}
\newcommand{\slamtexttop}{\regtext{SWEEP CUES: 4NT after a cuebid is not Blackwood!}} %Two lines for slam convention info
\newcommand{\slamtextbottom}{}
\newcommand{\dopilevel}{} %DOPI/ROPI level

%Carding:

%Leads:
%Leads vs. suit:  indicate whether to circle the 1st, 2nd, etc. card (more than one is OK)
%e.g. if you lead Ace from Ace-King, \newcommand{AKx}{1} 
\newcommand{\suitxx}{}
\newcommand{\suitxxx}{}
\newcommand{\AKx}{1}
\newcommand{\KQx}{}
\newcommand{\QJx}{}
\newcommand{\JTN}{}
\newcommand{\suitKQTN}{}

\newcommand{\suitxxxx}{}
\newcommand{\suitxxxxx}{}
\newcommand{\TNx}{}
\newcommand{\KJTx}{3}
\newcommand{\KTNx}{3}
\newcommand{\suitQTNx}{3}

%Leads vs. NT:
\newcommand{\ntxx}{}
\newcommand{\ntxxx}{}
\newcommand{\AKJx}{}
\newcommand{\AJTN}{}
\newcommand{\KQJx}{}
\newcommand{\QJTx}{}
\newcommand{\JTNx}{}

\newcommand{\ntxxxx}{}
\newcommand{\ntxxxxx}{}
\newcommand{\AQJx}{3}
\newcommand{\ATNx}{}
\newcommand{\ntKQTN}{}
\newcommand{\ntQTNx}{3}
\newcommand{\TNxx}{}

%\setboolean{su4th}{true} %4th best vs. suit
%\setboolean{nt4th}{true} %4th best vs. NT
\setboolean{su3rd}{true} %3/5 suit
\setboolean{nt3rd}{true} %3/5 NT
%\setboolean{ntatt}{true} %Attitude vs NT
\newcommand{\leadtext}{} %Other lead info:e.g. A-attidude K-kount
\setboolean{pratt}{true} %Primary signal to partner's lead
%\setboolean{prcou}{true}
%\setboolean{prsui}{true}

%Signals:
\setboolean{stdsu}{true} %std vs suits
\setboolean{stdnt}{true} %std vs NT
%\setboolean{excep}{true}
\newcommand{\signaltexttop}{}
\newcommand{\signaltextbottom}{}
%\setboolean{udcsu}{true} %upside down count suits
%\setboolean{udcnt}{true} %NT
%\setboolean{udasu}{true} %upside down attitude suits
%\setboolean{udant}{true} %NT
%\setboolean{lavsu}{true} %Lavinthal
%\setboolean{lavnt}{true}
%\setboolean{oddsu}{true} %Odd-Even
%\setboolean{oddnt}{true}
\newcommand{\discardtext}{} %Other discard info
%\setboolean{othsu}{true} 
%\setboolean{othnt}{true}
%\setboolean{smisu}{true} %Smith echo - suit
%\setboolean{smint}{true} %Smith - NT
%\setboolean{trump}{true} %Trump suit pref
%\setboolean{fossu}{true} %Foster echo - suit
%\setboolean{fosnt}{true} %Foster echo - NT
%\setboolean{speci}{true} %Special Carding Please Ask ``red dot''

% END of pre-set blanks on the convention card

% Finally, if you want to insert a completely new field in the place of your
% choice, you may do so by placing additional TikZ commands into this wrapper
% if you don't want to edit the style file.

% If not, leave it blank as it is below.

% To create a new text field:
% \node at (x,y) {Text to position at this location};
% The semicolon is essential!

\newcommand{\additionaltikz}{%
%Rather than editing the style file, I place white blocks over areas I want to erase
\node [rectangle,draw,color=white,fill=white,inner sep=4pt] at (20,95) {};
\node [rectangle,draw,color=white,fill=white,inner sep=4pt] at (30,95) {};
\node [right] at (11.8,95) {\regtext{\s\ only!}};
\node at (31,95) {\regtext{1\h-2\h=4\s\ 5+min}};
%
}%end of \additionaltikz
\drawconventioncard
\end{document}