% $Id: memberapp.tex,v 1.67 2024/04/01 15:48:43 karl Exp $
% TUG membership form.  This file is not copyrighted and may be used freely.
% 
% debug:
%\loggingall

\ifx\pdfoutput\undefined
  \input epsf
\else
  \ifx\papersize\undefined \def\papersize{l}\fi
  \if\papersize l
    \pdfpagewidth=8.5 true in
    \pdfpageheight=11 true in
  \else
    \pdfpagewidth=210 true mm
    \pdfpageheight=297 true mm
  \fi
\fi

% for renewal letter where we preprint the address
\ifx\undefined\renewallettertrue
  \csname newif\expandafter\endcsname\csname  ifrenewalletter\endcsname\fi

\newif\ifearlybird \earlybirdfalse
\def\tugyear{2024}%
\def\prevyear{2023}%
\def\earlybird{March 31}%

% Assuming US 8.5x11 paper: we need more space.
\hoffset=-.25in
\voffset=-.6in  % .3in top margin 

\def\computermodern{%
  \font\rm=cmr10
  \font\sc=cmcsc10
  \font\it=cmti10
  \font\bf=cmb10
  
  \font\erm=cmr8
  \font\ebf=cmb10 at 8pt
  \font\eit=cmti8
  \font\ett=cmtt8

  \font\ttlfont=cmti9 %ss9
  \font\Ttlfont=cmti9 %ss9

  \font\mrm=cmr9
  \font\mbf=cmb10 at 9pt
  \font\mtt=cmtt9
  \font\nineit=cmti9
  
  \font\bbf=cmbx12 at 14pt
  \font\bbi=cmti12 at 14pt
}%
%
\def\eight{%
  \let\rm=\erm\let\bf=\ebf\let\it=\eit\let\tt=\ett \rm
  \setbox\strutbox=\hbox{\vrule height7.1pt depth2.9pt width0pt}%
  \baselineskip=1.2em}%
\def\nine{%
  \let\rm=\mrm\let\bf=\mbf\let\it=\nineit \let\tt=\mtt \rm
  \setbox\strutbox=\hbox{\vrule height7.8pt depth3.2pt width0pt}%
  \baselineskip=1.2em}%
%
% assume we're only called from main text.
\def\acro#1{{\nine #1}}%
\def\tug{\acro{TUG}}%
%
\def\enrule{\raise.15ex\hbox{\kern.1em -}}%
\let\,=\thinspace
%
\def\checkboxdepth{.15em }
\def\checkbox{%
 \leavevmode
 \lower\checkboxdepth \hbox{%
  \vbox{%
   \dimen2=.3pt  % thickness of rule
   \dimen4=.9em  % size of square
   \dimen0=\dimen4
    \advance\dimen0 by-\checkboxdepth
    \advance\dimen0 by-\dimen2
   \hrule height\dimen2
   \nointerlineskip
   \hbox to \dimen4{%
    \vrule height\dimen0 depth\checkboxdepth width\dimen2
    \hfill
    \vrule height\dimen0 depth\checkboxdepth width\dimen2
   }%
   \nointerlineskip\hrule height\dimen2
  }%
 }%
 \space
}%
\def\Bullet{$\bullet$}%
\def\hlinefill{\leaders\hrule height.2pt \hfill}%
\def\Hlinefill{\leaders\hrule height.8pt \hfill}%
%
\def\fillinform{%
 \smallskip\vfil
 \begingroup
  \baselineskip = 17pt plus1pt
  \leftskip = 0pt
  \line{Name                                         \hrulefill}%
  \line{Department                                   \hrulefill}%
  \line{Institution                                  \hrulefill}%
  \setbox0\hbox{Address }%
  \line{Address                                      \hrulefill}%
  \line{\kern\wd0                                    \hrulefill}%
  \line{\hbox to .5\hsize{City \hrulefill\ }\hss
        \hbox to .5\hsize{State/Province \hrulefill}}%
  \line{\hbox to .5\hsize{Postal code \hrulefill\ }\hss
        \hbox to .5\hsize{Country \hrulefill}}%
  \line{Email address                                \hrulefill}%
  \line{\hbox to .5\hsize{Phone \hrulefill\ }\hss
        \hbox to .5\hsize{Fax \hrulefill}}%
  \line{\hbox to .5\hsize{Position \hrulefill\ }\hss
        \hbox to .5\hsize{Affiliation \hrulefill}}%
  \par
 \endgroup
}%
%

\def\LaTeX{%
  L\kern-.36em
  {\setbox0=\hbox{T}%
   \vbox to \ht0{\hbox{\sevenrm A}\vss}}%
  \kern-.15em
  \TeX
}

%  upper-left: letterhead, sort of.
% 
\newbox\mybox  % so we can see overfull boxes
\setbox\mybox = \vbox to 10.19in{%
 \ifx\undefined\typeface \def\typeface{\computermodern}\fi
 \typeface \rm
 %
 % Parameters:
 \hsize=7in
 \parindent = 0pt
 \parskip = 0pt
 %
 % Not outside the group, else the printed renewal forms accumulate.
 \advance\smallskipamount by -.8pt
 %
 \line{%
  % Logo and address
  \def\topheight{530pt}%
  \vbox to \topheight{%
    \hsize=11.5pc
    %
    {\bbf \baselineskip=2.5ex
     \leftskip = 4pt plus1fil \rightskip = 4pt plus1fil
     \parfillskip = 0pt
     \noindent\ \TeX\ Users Group \break
     Membership Form
     \tugyear{}
     \par
    }%
    \smallskip
    %
    \ifx\pdfoutput\undefined %  dvips:
      \epsfxsize = \hsize
      \epsfbox{tuglogo.epsf}%
    \else  % pdftex:
      \immediate\pdfximage width \hsize {tuglogo.pdf}%
      \pdfrefximage \pdflastximage  % to make it appear
    \fi
    \medskip
    {\bbi \lefthyphenmin\maxdimen \baselineskip=2.66ex
     \leftskip = 4pt plus1fil \rightskip = 4pt plus1fil
     \parfillskip = 0pt
     Promoting the use of~\TeX\ throughout  the~world.
     \par
    }
    \medskip
    \vfil
    \nine \advance\baselineskip by .7pt
    {\it address:}\par
    {\eight P.O.} Box 2311\par
    Portland, {\eight OR} 97208\enrule2311 \kern.4em USA\par
    \medskip
    \line{{\Ttlfont phone:}\hfil +1 {}503\enrule{}223\enrule{}9994}%
    \line{{\Ttlfont fax:}\hfil   +1 {}815\enrule{}301\enrule{}3568}%
    \line{{\Ttlfont email:}\hfil {\tt office@tug.org}}%
    \line{{\Ttlfont web:}\hfil{\tt https://tug.org}}%
    \medskip\vfil
    \line{{\ttlfont President} \hfil Arthur Rosendahl}%
    \line{{\ttlfont Vice President} \hfil Boris Veytsman}%
    \line{{\ttlfont Treasurer} \hfil Karl Berry}%
    \line{{\ttlfont Secretary} \hfil Klaus H\"oppner}%
    \medskip
    \line{{\ttlfont Office Manager} \hfil Sophia Laakso}%
  }%
  \hfil
  \vrule width.25pt
  \hfil

%  upper-right, order form
  \vbox to \topheight{\hsize=4.9in
    Please check the appropriate boxes and mail the completed form with
    payment (in \acro{US} dollars) to the mailing address at left.  If
    paying by credit\slash debit card\slash paypal, you may join online
    at {\tt tug.org/join}, or fax the form to the number at left.
    The web pages also provide much more information than we have room
    for here.
    \smallskip
    \line{{\bf Member status} (check one)%
          \quad\checkbox New member \quad \checkbox Renewing member\hfil}
% membership campaign
%    \smallskip
%    \line{{\bf Name of TUG member inviting you?} (if applicable)%
%          \quad\hlinefill}
    \smallskip
        \vtop{
          \hbox{{\bf Automatic membership renewal} in future years
                \kern.5em \checkbox}
          \vskip-2pt
          \hbox{\quad \eight Will use given payment information;
                contact office to change/cancel.}}% 
    \smallskip

    {\tabskip0pt
    \halign to\hsize{%
        \strut#\unskip\hfil\tabskip.5em         % col 1 for checkboxes
        &#\unskip\hfil\tabskip1em plus1fil      % col 2 for item
        &\hfil#\unskip                          % col 3 for Rate
        &     #            \tabskip0pt          % col 4 for Amount
        \cr
        \noalign{\vskip-7pt}

        &
        &{\eight Rate}%
        &{\eight Amount}%
        \cr

        \checkbox
        &\vtop{%
           \hbox{{\bf Trial membership} for \tugyear{}}%
           \vskip -2pt
           \hbox{\eight \quad Available for brand-new members.
                              Includes all physical benefits.}%
         }%
        &\$35
        &\hlinefill
        \cr
        \noalign{\smallskip}%

        \checkbox
        &\ifearlybird
          \vtop{%
           \hbox{{\bf Early bird membership} for \tugyear{}}%
           \vskip -2pt
           \hbox{\eight \quad After \earlybird, regular dues are \$115.}%
          }%
          \else
           \hbox{{\bf Regular membership} for \tugyear{}}
          \fi
        &\ifearlybird \$95\else \$115\fi
        &\hlinefill
        \cr
        \noalign{\smallskip}%

        \checkbox
        &\vtop{%
           \hbox{{\bf Special membership} for \tugyear{}}%
           \vskip -2pt
           \hbox{\eight \quad You may join at this special rate
                 \ifearlybird (\$85 after \earlybird) \fi
                 if you are a}%
           \vskip -3pt
           \rlap{\eight \quad senior (62{\sevenrm +}), student, new graduate, or from
                 a country with a}
           \vskip -4pt
           \rlap{\eight \quad modest economy.  Please circle accordingly.}
	   \vskip -2.3pt
           \hbox{\eight If financially feasible for you, please consider
                        checking here to donate}
	   \vskip -2.5pt
           \hbox{\eight the difference from the regular rate (\$30). \checkbox}
           }%
        &\ifearlybird\$65\else \$85\fi
        &\hlinefill
        \cr
        % checkbox for special difference donation is above.
	\noalign{\vskip -8pt}%
        &
        &\$30%
        &\hlinefill
        \cr
        %
        \noalign{\smallskip}%
        \checkbox
        &{\bf Subscription} for \tugyear{}\quad
         {\eight (non-voting, e.g., for libraries)}%
        &\$125%
        &\hlinefill
        \cr
        %
        \noalign{\smallskip}%
        \checkbox
        &\vtop{%
          \hbox{{\bf Institutional membership} for \tugyear{}}
          \vskip-2pt
          \hbox{\quad \eight Includes up to eight individual memberships}
          \vskip-3pt
          \hbox{\quad \eight and site-wide electronic access.}}% 
        &\$550%
        &\hlinefill
        \cr
        %
        \noalign{\smallskip}%
        \checkbox
        &\vtop{%
          \hbox{{\bf Don't ship any physical benefits}}
          \vskip-2pt
          \hbox{\quad \eight {\it TUGboat}
                is also available electronically.}}%
        &\llap{\eight deduct} \$35
        &\hlinefill
        \cr
        %
        \noalign{\smallskip}
        &\vtop{%
           \hbox{{\bf Additional materials from last year}}
           \vskip-.5pt
           }%
        &
        \cr
        %
        \checkbox
        &\quad\kern-1pt previous {\nine\it TUG}{\it boat} volume for \prevyear\ (3 issues)
        &\$30%
        &\hlinefill
        \cr
        %
        \checkbox
        &\vtop{%
           \hbox{\quad \TeX\ Collection \prevyear\ software}%
           \vskip -1pt
           \hbox{\qquad \eight DVD with pro\TeX t, Mac\TeX,
                 \TeX\ Live, \sevenrm CTAN.}% 
           \vskip 1pt
         }
        &\$10%
        &\hlinefill
        \cr
        %
        \noalign{\smallskip}
        &{\bf Voluntary donations}
         \rlap{\nine (more info and options: {\tt tug.org/donate})}
        \cr

        \checkbox
        &\quad General \tug\ contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad \tug\ Bursary Fund contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad \acro{CTAN} contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad \TeX\ Development Fund contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad \LaTeX\ contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad Lua\TeX\ contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad Mac\TeX\ contribution
        &
        &\hlinefill
        \cr

        \checkbox
        &\quad \acro{PDF} Accessibility contribution
        &
        &\hlinefill
        \cr
        %
        \multispan3\hfil{\bf Total \$}%
        &\Hlinefill
        \cr
    }%

    {\nine
    \smallskip {\it Tax deduction:} The membership fee less \$45
    (\$15 if electronic benefits) is
    generally deductible, at least in the \acro{US}. Donations are fully
    deductible.\hfil\break
    \vadjust{\vskip-1pt}%
    {\it Multi-year orders:} To join for more than one year at this
    year's rate (up to ten years, non-refundable), please multiply
    by the number of years desired.}
    \smallskip

    \line{{\bf Payment} (check one)\hfil
          \checkbox\kern-1pt Payment enclosed\hfil
          \checkbox\kern-1pt Visa\hfil
          \checkbox\kern-1pt MasterCard\hfil
          \checkbox\kern-1pt AmEx}%
    \bigskip
    \smallskip
    \vfil
    \line{Account Number: \hlinefill\quad
          Exp.\ date: \hbox to0.5in{\hlinefill}}%
    \vfil
    \bigskip
    \line{Signature: \hlinefill\quad
          CVV: \hbox to0.5in{\hlinefill}}%
    }%
  }%
 }%

 \bigskip
 \vfil
% 
 {\bf Privacy:} \tug\ uses your personal information only to send
 products, publications, notices, and (for voting members) official
 ballots.  \tug\ does not sell or otherwise provide its membership list
 to anyone.  \smallskip

% Electronic notices will generally reach you much earlier than
% printed ones.  However, you may choose not to receive any email from
% \tug, if you prefer.
% \vskip .5pt
% \qquad \checkbox\ Do not send me any \tug\ notices via email.
% \medskip

\ifrenewalletter
  The space below contains your mailing address and other information as
  we have it recorded.  Please take a moment to make any necessary
  corrections.
  
 \begingroup
  \frenchspacing
  % a few 8-bit chars in the database, make them come out right.
  \font\mrm = texnansi-lmr9.tfm
  \font\erm = texnansi-lmr8.tfm
  \eight

  \smallskip
  \def\maybeprefix{\edef\prefixval{\fieldprefix}%
    \ifx\prefixval\empty\else \prefixval\space \fi}
  %
  \def\maybevon{\edef\vonval{\fieldvon}%
    \ifx\vonval\empty\else \space\vonval \fi}
  %
  \def\maybejr{\edef\jrval{\fieldjr}%
    \ifx\jrval\empty\else \space\jrval \fi}
  %
  \def\combinedname{\maybeprefix \fieldfirst \maybevon\space
                    \fieldsurname \maybejr}
  \halign{\qquad \hfil#\quad &#\hfil\cr
    \bf name&\hbox to .4\hsize{\combinedname\hfil}\fieldid\cr
    &\fielddepartment\cr
    &\fieldorganization\cr
    \bf address&\fieldstreet\cr
    &\fieldstreetB\cr
    &\fieldcity, \fieldstate\ \fieldzip \quad \fieldcountry\cr
    \bf email&{\tt \fieldemail}\cr
    \bf phone&\hbox to .4\hsize{\fieldphone\hfil}{\bf fax:} \fieldfax\cr
%    affiliation&\fieldaffiliation\cr
  }
  
  \smallskip
  \vskip 0pt plus1filll
  
  % envelope window is .5" from bottom of paper, and is 1.25" high.
  % except Robin's printer magnifies, or something.
%  \hrule \vskip-0.4pt
  \vbox to 1.25in{%
    \vfil
    \nine
    \def\addrline#1{\ifx#1\empty\else \hbox{\strut#1}\fi}%
    \addrline\combinedname
    \addrline\fieldlabelB
    \addrline\fieldlabelC
    \addrline\fieldlabelD
    \addrline\fieldlabelE
    \addrline\fieldlabelF
    \vfil
  }
%  \hrule \vskip-0.4pt
  \vskip .25in \hrule height0pt depth0pt

 \endgroup
  
\else
 \fillinform
 \vfill
\fi
}% end page

\shipout\box\mybox

% for the preprinted letter, we want to do more than one at a time.
\ifrenewalletter \let\next=\advancepageno \else \let\next=\end \fi
\next
