thys2/Journal/railsetup.sty
author Chengsong
Fri, 30 Dec 2022 23:41:44 +0000
changeset 640 bd1354127574
parent 369 e00950ba4514
permissions -rw-r--r--
more proofreading done, last version before submission
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
369
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     1
% rail.sty - style file to support railroad diagrams
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     2
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     3
% 09-Jul-90 L. Rooijakkers
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     4
% 08-Oct-90 L. Rooijakkers	fixed centering bug when \rail@tmpc<0.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     5
% 07-Feb-91 L. Rooijakkers	added \railoptions command, indexing
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     6
% 08-Feb-91 L. Rooijakkers	minor fixes
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     7
% 28-Jun-94 K. Barthelmann	turned into LaTeX2e package
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     8
% 08-Dec-96 K. Barthelmann	replaced \@writefile
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
     9
% 13-Dec-96 K. Barthelmann	cleanup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    10
% 22-Feb-98 K. Barthelmann	fixed catcodes of special characters
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    11
% 18-Apr-98 K. Barthelmann	fixed \par handling
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    12
% 19-May-98 J. Olsson		Added new macros to support arrow heads.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    13
% 26-Jul-98 K. Barthelmann	changed \par to output newlines
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    14
% 02-May-11 M. Wenzel           default setup for Isabelle
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    15
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    16
% This style file needs to be used in conjunction with the 'rail'
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    17
% program. Running LaTeX as 'latex file' produces file.rai, which should be
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    18
% processed by Rail with 'rail file'. This produces file.rao, which will
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    19
% be picked up by LaTeX on the next 'latex file' run.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    20
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    21
% LaTeX will warn if there is no file.rao or it's out of date.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    22
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    23
% The macros in this file thus consist of two parts: those that read and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    24
% write the .rai and .rao files, and those that do the actual formatting
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    25
% of the railroad diagrams.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    26
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    27
\NeedsTeXFormat{LaTeX2e}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    28
\ProvidesPackage{rail}[1998/05/19]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    29
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    30
% railroad diagram formatting parameters (user level)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    31
% all of these are copied into their internal versions by \railinit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    32
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    33
% \railunit : \unitlength within railroad diagrams
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    34
% \railextra : extra length at outside of diagram
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    35
% \railboxheight : height of ovals and frames
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    36
% \railboxskip : vertical space between lines
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    37
% \railboxleft : space to the left of a box
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    38
% \railboxright : space to the right of a box
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    39
% \railovalspace : extra space around contents of oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    40
% \railframespace : extra space around contents of frame
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    41
% \railtextleft : space to the left of text
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    42
% \railtextright : space to the right of text
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    43
% \railtextup : space to lift text up
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    44
% \railjoinsize : circle size of join/split arcs
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    45
% \railjoinadjust : space to adjust join
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    46
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    47
% \railnamesep : separator between name and rule body
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    48
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    49
\newlength\railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    50
\newlength\railextra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    51
\newlength\railboxheight
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    52
\newlength\railboxskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    53
\newlength\railboxleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    54
\newlength\railboxright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    55
\newlength\railovalspace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    56
\newlength\railframespace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    57
\newlength\railtextleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    58
\newlength\railtextright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    59
\newlength\railtextup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    60
\newlength\railjoinsize
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    61
\newlength\railjoinadjust
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    62
\newlength\railnamesep
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    63
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    64
% initialize the parameters
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    65
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    66
\setlength\railunit{1sp}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    67
\setlength\railextra{4ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    68
\setlength\railboxleft{1ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    69
\setlength\railboxright{1ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    70
\setlength\railovalspace{2ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    71
\setlength\railframespace{2ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    72
\setlength\railtextleft{1ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    73
\setlength\railtextright{1ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    74
\setlength\railjoinadjust{0pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    75
\setlength\railnamesep{1ex}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    76
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    77
\DeclareOption{10pt}{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    78
  \setlength\railboxheight{16pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    79
  \setlength\railboxskip{24pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    80
  \setlength\railtextup{5pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    81
  \setlength\railjoinsize{16pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    82
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    83
\DeclareOption{11pt}{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    84
  \setlength\railboxheight{16pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    85
  \setlength\railboxskip{24pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    86
  \setlength\railtextup{5pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    87
  \setlength\railjoinsize{16pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    88
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    89
\DeclareOption{12pt}{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    90
  \setlength\railboxheight{20pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    91
  \setlength\railboxskip{28pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    92
  \setlength\railtextup{6pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    93
  \setlength\railjoinsize{20pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    94
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    95
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    96
\ExecuteOptions{10pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    97
\ProcessOptions
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    98
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
    99
% internal versions of the formatting parameters
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   100
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   101
% \rail@extra   : \railextra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   102
% \rail@boxht   : \railboxheight
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   103
% \rail@boxsp   : \railboxskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   104
% \rail@boxlf   : \railboxleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   105
% \rail@boxrt   : \railboxright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   106
% \rail@boxhht  : \railboxheight / 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   107
% \rail@ovalsp  : \railovalspace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   108
% \rail@framesp : \railframespace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   109
% \rail@textlf  : \railtextleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   110
% \rail@textrt  : \railtextright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   111
% \rail@textup  : \railtextup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   112
% \rail@joinsz  : \railjoinsize
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   113
% \rail@joinhsz : \railjoinsize / 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   114
% \rail@joinadj : \railjoinadjust
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   115
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   116
% \railinit : internalize all of the parameters.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   117
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   118
\newcount\rail@extra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   119
\newcount\rail@boxht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   120
\newcount\rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   121
\newcount\rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   122
\newcount\rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   123
\newcount\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   124
\newcount\rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   125
\newcount\rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   126
\newcount\rail@textlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   127
\newcount\rail@textrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   128
\newcount\rail@textup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   129
\newcount\rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   130
\newcount\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   131
\newcount\rail@joinadj
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   132
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   133
\newcommand\railinit{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   134
\rail@extra=\railextra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   135
\divide\rail@extra by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   136
\rail@boxht=\railboxheight
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   137
\divide\rail@boxht by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   138
\rail@boxsp=\railboxskip
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   139
\divide\rail@boxsp by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   140
\rail@boxlf=\railboxleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   141
\divide\rail@boxlf by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   142
\rail@boxrt=\railboxright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   143
\divide\rail@boxrt by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   144
\rail@boxhht=\railboxheight
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   145
\divide\rail@boxhht by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   146
\divide\rail@boxhht by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   147
\rail@ovalsp=\railovalspace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   148
\divide\rail@ovalsp by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   149
\rail@framesp=\railframespace
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   150
\divide\rail@framesp by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   151
\rail@textlf=\railtextleft
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   152
\divide\rail@textlf by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   153
\rail@textrt=\railtextright
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   154
\divide\rail@textrt by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   155
\rail@textup=\railtextup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   156
\divide\rail@textup by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   157
\rail@joinsz=\railjoinsize
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   158
\divide\rail@joinsz by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   159
\rail@joinhsz=\railjoinsize
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   160
\divide\rail@joinhsz by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   161
\divide\rail@joinhsz by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   162
\rail@joinadj=\railjoinadjust
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   163
\divide\rail@joinadj by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   164
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   165
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   166
\AtBeginDocument{\railinit}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   167
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   168
% \rail@param : declarations for list environment
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   169
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   170
% \railparam{TEXT} : sets \rail@param to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   171
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   172
% \rail@reserved : characters reserved for grammar
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   173
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   174
\newcommand\railparam[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   175
\def\rail@param{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   176
  \setlength\leftmargin{0pt}\setlength\rightmargin{0pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   177
  \setlength\labelwidth{0pt}\setlength\labelsep{0pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   178
  \setlength\itemindent{0pt}\setlength\listparindent{0pt}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   179
  #1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   180
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   181
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   182
\railparam{}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   183
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   184
\newtoks\rail@reserved
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   185
\rail@reserved={:;|*+?[]()'"}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   186
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   187
% \rail@termfont : format setup for terminals
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   188
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   189
% \rail@nontfont : format setup for nonterminals
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   190
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   191
% \rail@annofont : format setup for annotations
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   192
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   193
% \rail@rulefont : format setup for rule names
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   194
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   195
% \rail@indexfont : format setup for index entry
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   196
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   197
% \railtermfont{TEXT} : set terminal format setup to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   198
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   199
% \railnontermfont{TEXT} : set nonterminal format setup to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   200
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   201
% \railannotatefont{TEXT} : set annotation format setup to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   202
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   203
% \railnamefont{TEXT} : set rule name format setup to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   204
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   205
% \railindexfont{TEXT} : set index entry format setup to TEXT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   206
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   207
\def\rail@termfont{\ttfamily\upshape}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   208
\def\rail@nontfont{\rmfamily\upshape}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   209
\def\rail@annofont{\rmfamily\itshape}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   210
\def\rail@namefont{\rmfamily\itshape}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   211
\def\rail@indexfont{\rmfamily\itshape}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   212
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   213
\newcommand\railtermfont[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   214
\def\rail@termfont{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   215
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   216
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   217
\newcommand\railnontermfont[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   218
\def\rail@nontfont{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   219
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   220
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   221
\newcommand\railannotatefont[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   222
\def\rail@annofont{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   223
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   224
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   225
\newcommand\railnamefont[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   226
\def\rail@namefont{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   227
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   228
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   229
\newcommand\railindexfont[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   230
\def\rail@indexfont{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   231
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   232
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   233
% railroad read/write macros
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   234
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   235
% \begin{rail} TEXT \end{rail} : TEXT is written out to the .rai file,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   236
%                                as \rail@i{NR}{TEXT}. Then the matching
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   237
%                                \rail@o{NR}{FMT} from the .rao file is
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   238
%                                executed (if defined).
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   239
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   240
% \railoptions{OPTIONS} : OPTIONS are written out to the .rai file,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   241
%                         as \rail@p{OPTIONS}.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   242
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   243
% \railterm{IDENT,IDENT,...} : format IDENT as terminals. writes out
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   244
%                              \rail@t{IDENT} to the .rai file
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   245
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   246
% \railalias{IDENT}{TEXT} : format IDENT as TEXT. defines \rail@t@IDENT as
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   247
%                           TEXT.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   248
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   249
% \railtoken{IDENT}{TEXT} : abbreviates \railalias{IDENT}{TEXT}\railterm{IDENT}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   250
%                           (for backward compatibility)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   251
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   252
% \rail@setcodes : guards special characters
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   253
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   254
% \rail@makeother{CHARACTER} : sets \catcode of CHARACTER to "other"
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   255
%                              used inside a loop for \rail@setcodes
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   256
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   257
% \rail@nr : railroad diagram counter
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   258
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   259
% \ifrail@match : current \rail@i{NR}{TEXT} matches
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   260
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   261
% \rail@first : actions to be done first. read in .rao file,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   262
%               open .rai file if \@filesw true, undefine \rail@first.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   263
%               executed from \begin{rail}, \railoptions and \railterm.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   264
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   265
% \rail@i{NR}{TEXT} : defines \rail@i@NR as TEXT. written to the .rai
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   266
%                     file by \rail, read from the .rao file by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   267
%                     \rail@first
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   268
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   269
% \rail@t{IDENT} : tells Rail that IDENT is to be custom formatted,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   270
%                  written to the .rai file by \railterm.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   271
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   272
% \rail@o{NR}{TEXT} : defines \rail@o@NR as TEXT, read from the .rao
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   273
%                     file by \rail@first.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   274
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   275
% \rail@p{OPTIONS} : pass options to rail, written to the .rai file by
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   276
%                    \railoptions
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   277
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   278
% \rail@write{TEXT} : write TEXT to the .rai file
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   279
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   280
% \rail@warn : warn user for mismatching diagrams
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   281
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   282
% \rail@endwarn : either \relax or \rail@warn
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   283
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   284
% \ifrail@all : checked at the end of the document
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   285
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   286
\def\rail@makeother#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   287
  \expandafter\catcode\expandafter`\csname\string #1\endcsname=12
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   288
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   289
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   290
\def\rail@setcodes{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   291
\let\par=\relax
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   292
\let\\=\relax
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   293
\expandafter\@tfor\expandafter\rail@symbol\expandafter:\expandafter=%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   294
  \the\rail@reserved
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   295
\do{\expandafter\rail@makeother\rail@symbol}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   296
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   297
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   298
\newcount\rail@nr
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   299
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   300
\newif\ifrail@all
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   301
\rail@alltrue
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   302
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   303
\newif\ifrail@match
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   304
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   305
\def\rail@first{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   306
\begingroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   307
\makeatletter
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   308
\rail@setcodes
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   309
\InputIfFileExists{\jobname.rao}{}{\PackageInfo{rail}{No file \jobname.rao}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   310
\makeatother
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   311
\endgroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   312
\if@filesw
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   313
\newwrite\tf@rai
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   314
\immediate\openout\tf@rai=\jobname.rai
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   315
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   316
\global\let\rail@first=\relax
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   317
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   318
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   319
\long\def\rail@body#1\end{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   320
{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   321
\newlinechar=`^^J
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   322
\def\par{\string\par^^J}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   323
\rail@write{\string\rail@i{\number\rail@nr}{#1}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   324
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   325
\xdef\rail@i@{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   326
\end
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   327
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   328
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   329
\newenvironment{rail}{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   330
\global\advance\rail@nr by 1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   331
\rail@first
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   332
\begingroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   333
\rail@setcodes
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   334
\rail@body
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   335
}{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   336
\endgroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   337
\rail@matchtrue
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   338
\@ifundefined{rail@o@\number\rail@nr}{\rail@matchfalse}{}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   339
\expandafter\ifx\csname rail@i@\number\rail@nr\endcsname\rail@i@
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   340
\else
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   341
\rail@matchfalse
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   342
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   343
\ifrail@match
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   344
\csname rail@o@\number\rail@nr\endcsname
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   345
\else
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   346
\PackageWarning{rail}{Railroad diagram {\number\rail@nr} doesn't match}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   347
\global\let\rail@endwarn=\rail@warn
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   348
\begin{list}{}{\rail@param}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   349
\rail@begin{1}{}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   350
\rail@setbox{\bfseries ???}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   351
\rail@oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   352
\rail@end
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   353
\end{list}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   354
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   355
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   356
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   357
\newcommand\railoptions[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   358
\rail@first
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   359
\rail@write{\string\rail@p{#1}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   360
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   361
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   362
\newcommand\railterm[1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   363
\rail@first
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   364
\@for\rail@@:=#1\do{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   365
\rail@write{\string\rail@t{\rail@@}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   366
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   367
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   368
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   369
\newcommand\railalias[2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   370
\expandafter\def\csname rail@t@#1\endcsname{#2}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   371
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   372
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   373
\newcommand\railtoken[2]{\railalias{#1}{#2}\railterm{#1}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   374
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   375
\long\def\rail@i#1#2{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   376
\expandafter\gdef\csname rail@i@#1\endcsname{#2}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   377
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   378
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   379
\def\rail@o#1#2{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   380
\expandafter\gdef\csname rail@o@#1\endcsname{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   381
\begin{list}{}{\rail@param}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   382
#2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   383
\end{list}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   384
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   385
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   386
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   387
\def\rail@t#1{}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   388
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   389
\def\rail@p#1{}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   390
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   391
\long\def\rail@write#1{\@ifundefined{tf@rai}{}{\immediate\write\tf@rai{#1}}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   392
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   393
\def\rail@warn{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   394
\PackageWarningNoLine{rail}{Railroad diagram(s) may have changed.
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   395
                            Use 'rail' and rerun}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   396
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   397
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   398
\let\rail@endwarn=\relax
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   399
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   400
\AtEndDocument{\rail@endwarn}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   401
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   402
% index entry macro
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   403
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   404
% \rail@index{IDENT} : add index entry for IDENT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   405
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   406
\def\rail@index#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   407
\index{\rail@indexfont#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   408
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   409
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   410
% railroad formatting primitives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   411
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   412
% \rail@x : current x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   413
% \rail@y : current y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   414
% \rail@ex : current end x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   415
% \rail@sx : starting x for \rail@cr
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   416
% \rail@rx : rightmost previous x for \rail@cr
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   417
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   418
% \rail@tmpa : temporary count
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   419
% \rail@tmpb : temporary count
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   420
% \rail@tmpc : temporary count
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   421
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   422
% \rail@put : put at (\rail@x,\rail@y)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   423
% \rail@vput : put vector at (\rail@x,\rail@y)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   424
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   425
% \rail@eline : end line by drawing from \rail@ex to \rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   426
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   427
% \rail@vreline : end line by drawing a vector from \rail@x to \rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   428
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   429
% \rail@vleline : end line by drawing a vector from \rail@ex to \rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   430
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   431
% \rail@sety{LEVEL} : set \rail@y to level LEVEL
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   432
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   433
\newcount\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   434
\newcount\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   435
\newcount\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   436
\newcount\rail@sx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   437
\newcount\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   438
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   439
\newcount\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   440
\newcount\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   441
\newcount\rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   442
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   443
\def\rail@put{\put(\number\rail@x,\number\rail@y)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   444
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   445
\def\rail@vput{\put(\number\rail@ex,\number\rail@y)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   446
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   447
\def\rail@eline{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   448
\rail@tmpb=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   449
\advance\rail@tmpb by -\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   450
\rail@put{\line(-1,0){\number\rail@tmpb}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   451
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   452
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   453
\def\rail@vreline{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   454
\rail@tmpb=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   455
\advance\rail@tmpb by -\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   456
\rail@vput{\vector(1,0){\number\rail@tmpb}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   457
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   458
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   459
\def\rail@vleline{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   460
\rail@tmpb=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   461
\advance\rail@tmpb by -\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   462
\rail@put{\vector(-1,0){\number\rail@tmpb}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   463
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   464
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   465
\def\rail@sety#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   466
\rail@y=#1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   467
\multiply\rail@y by -\rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   468
\advance\rail@y by -\rail@boxht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   469
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   470
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   471
% \rail@begin{HEIGHT}{NAME} : begin a railroad diagram of height HEIGHT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   472
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   473
% \rail@end : end a railroad diagram
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   474
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   475
% \rail@expand{IDENT} : expand IDENT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   476
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   477
\def\rail@begin#1#2{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   478
\item
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   479
\begin{minipage}[t]{\linewidth}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   480
\ifx\@empty#2\else
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   481
{\rail@namefont \rail@expand{#2}}\\*[\railnamesep]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   482
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   483
\unitlength=\railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   484
\rail@tmpa=#1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   485
\multiply\rail@tmpa by \rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   486
\begin{picture}(0,\number\rail@tmpa)(0,-\number\rail@tmpa)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   487
\rail@ex=0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   488
\rail@rx=0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   489
\rail@x=\rail@extra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   490
\rail@sx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   491
\rail@sety{0}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   492
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   493
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   494
\def\rail@end{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   495
\advance\rail@x by \rail@extra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   496
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   497
\end{picture}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   498
\end{minipage}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   499
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   500
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   501
\def\rail@vend{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   502
\advance\rail@x by \rail@extra
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   503
\rail@vreline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   504
\end{picture}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   505
\end{minipage}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   506
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   507
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   508
\def\rail@expand#1{\@ifundefined{rail@t@#1}{#1}{\csname rail@t@#1\endcsname}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   509
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   510
% \rail@token{TEXT}[ANNOT] : format token TEXT with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   511
% \rail@ltoken{TEXT}[ANNOT] : format token TEXT with annotation, arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   512
% \rail@rtoken{TEXT}[ANNOT] : format token TEXT with annotation, arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   513
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   514
% \rail@ctoken{TEXT}[ANNOT] : format token TEXT centered with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   515
% \rail@lctoken{TEXT}[ANNOT] : format token TEXT centered with annotation, arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   516
% \rail@rctoken{TEXT}[ANNOT] : format token TEXT centered with annotation, arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   517
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   518
% \rail@nont{TEXT}[ANNOT] : format nonterminal TEXT with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   519
% \rail@lnont{TEXT}[ANNOT] : format nonterminal TEXT with annotation, arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   520
% \rail@rnont{TEXT}[ANNOT] : format nonterminal TEXT with annotation. arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   521
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   522
% \rail@cnont{TEXT}[ANNOT] : format nonterminal TEXT centered with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   523
% \rail@lcnont{TEXT}[ANNOT] : format nonterminal TEXT centered with annotation,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   524
%                             arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   525
% \rail@rcnont{TEXT}[ANNOT] : format nonterminal TEXT centered with annotation,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   526
%                             arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   527
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   528
% \rail@term{TEXT}[ANNOT] : format terminal TEXT with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   529
% \rail@lterm{TEXT}[ANNOT] : format terminal TEXT with annotation, arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   530
% \rail@rterm{TEXT}[ANNOT] : format terminal TEXT with annotation, arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   531
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   532
% \rail@cterm{TEXT}[ANNOT] : format terminal TEXT centered with annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   533
% \rail@lcterm{TEXT}[ANNOT] : format terminal TEXT centered with annotation, arrow left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   534
% \rail@rcterm{TEXT}[ANNOT] : format terminal TEXT centered with annotation,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   535
%                             arrow right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   536
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   537
% \rail@annote[TEXT] : format TEXT as annotation
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   538
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   539
\def\rail@token#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   540
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   541
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   542
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   543
\rail@oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   544
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   545
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   546
\def\rail@ltoken#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   547
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   548
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   549
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   550
\rail@vloval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   551
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   552
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   553
\def\rail@rtoken#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   554
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   555
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   556
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   557
\rail@vroval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   558
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   559
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   560
\def\rail@ctoken#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   561
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   562
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   563
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   564
\rail@coval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   565
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   566
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   567
\def\rail@lctoken#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   568
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   569
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   570
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   571
\rail@vlcoval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   572
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   573
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   574
\def\rail@rctoken#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   575
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   576
{\rail@termfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   577
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   578
\rail@vrcoval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   579
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   580
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   581
\def\rail@nont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   582
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   583
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   584
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   585
\rail@frame
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   586
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   587
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   588
\def\rail@lnont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   589
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   590
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   591
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   592
\rail@vlframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   593
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   594
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   595
\def\rail@rnont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   596
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   597
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   598
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   599
\rail@vrframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   600
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   601
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   602
\def\rail@cnont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   603
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   604
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   605
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   606
\rail@cframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   607
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   608
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   609
\def\rail@lcnont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   610
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   611
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   612
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   613
\rail@vlcframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   614
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   615
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   616
\def\rail@rcnont#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   617
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   618
{\rail@nontfont \rail@expand{#1}}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   619
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   620
\rail@vrcframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   621
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   622
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   623
\def\rail@term#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   624
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   625
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   626
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   627
\rail@oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   628
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   629
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   630
\def\rail@lterm#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   631
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   632
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   633
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   634
\rail@vloval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   635
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   636
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   637
\def\rail@rterm#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   638
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   639
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   640
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   641
\rail@vroval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   642
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   643
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   644
\def\rail@cterm#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   645
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   646
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   647
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   648
\rail@coval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   649
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   650
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   651
\def\rail@lcterm#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   652
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   653
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   654
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   655
\rail@vlcoval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   656
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   657
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   658
\def\rail@rcterm#1[#2]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   659
\rail@setbox{%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   660
{\rail@termfont #1}\ifx\@empty#2\else\ {\rail@annofont #2}\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   661
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   662
\rail@vrcoval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   663
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   664
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   665
\def\rail@annote[#1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   666
\rail@setbox{\rail@annofont #1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   667
\rail@text
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   668
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   669
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   670
% \rail@box : temporary box for \rail@oval and \rail@frame
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   671
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   672
% \rail@setbox{TEXT} : set \rail@box to TEXT, set \rail@tmpa to width
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   673
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   674
% \rail@oval : format \rail@box of width \rail@tmpa inside an oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   675
% \rail@vloval : format \rail@box of width \rail@tmpa inside an oval, vector left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   676
% \rail@vroval : format \rail@box of width \rail@tmpa inside an oval, vector right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   677
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   678
% \rail@coval : same as \rail@oval, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   679
%               \rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   680
% \rail@vlcoval : same as \rail@oval, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   681
%                 \rail@mx, vector left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   682
% \rail@vrcoval : same as \rail@oval, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   683
%                 \rail@mx, vector right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   684
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   685
% \rail@frame : format \rail@box of width \rail@tmpa inside a frame
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   686
% \rail@vlframe : format \rail@box of width \rail@tmpa inside a frame, vector left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   687
% \rail@vrframe : format \rail@box of width \rail@tmpa inside a frame, vector right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   688
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   689
% \rail@cframe : same as \rail@frame, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   690
%                \rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   691
% \rail@vlcframe : same as \rail@frame, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   692
%                  \rail@mx, vector left
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   693
% \rail@vrcframe : same as \rail@frame, but centered between \rail@x and
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   694
%                  \rail@mx, vector right
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   695
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   696
% \rail@text : format \rail@box of width \rail@tmpa above the line
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   697
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   698
\newbox\rail@box
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   699
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   700
\def\rail@setbox#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   701
\setbox\rail@box\hbox{\strut#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   702
\rail@tmpa=\wd\rail@box
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   703
\divide\rail@tmpa by \railunit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   704
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   705
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   706
\def\rail@oval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   707
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   708
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   709
\advance\rail@tmpa by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   710
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   711
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   712
\divide\rail@tmpb by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   713
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   714
\rail@put{\makebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   715
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   716
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   717
\rail@put{\oval(\number\rail@tmpa,\number\rail@boxht)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   718
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   719
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   720
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   721
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   722
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   723
\def\rail@vloval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   724
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   725
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   726
\advance\rail@tmpa by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   727
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   728
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   729
\divide\rail@tmpb by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   730
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   731
\rail@put{\makebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   732
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   733
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   734
\rail@put{\oval(\number\rail@tmpa,\number\rail@boxht)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   735
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   736
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   737
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   738
\rail@vleline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   739
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   740
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   741
\def\rail@vroval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   742
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   743
\rail@vreline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   744
\advance\rail@tmpa by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   745
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   746
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   747
\divide\rail@tmpb by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   748
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   749
\rail@put{\makebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   750
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   751
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   752
\rail@put{\oval(\number\rail@tmpa,\number\rail@boxht)}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   753
\advance\rail@x by \rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   754
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   755
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   756
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   757
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   758
\def\rail@coval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   759
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   760
\advance\rail@tmpb by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   761
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   762
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   763
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   764
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   765
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   766
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   767
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   768
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   769
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   770
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   771
\rail@oval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   772
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   773
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   774
\def\rail@vlcoval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   775
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   776
\advance\rail@tmpb by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   777
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   778
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   779
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   780
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   781
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   782
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   783
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   784
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   785
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   786
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   787
\rail@vloval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   788
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   789
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   790
\def\rail@vrcoval{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   791
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   792
\advance\rail@tmpb by \rail@ovalsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   793
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   794
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   795
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   796
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   797
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   798
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   799
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   800
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   801
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   802
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   803
\rail@vroval
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   804
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   805
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   806
\def\rail@frame{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   807
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   808
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   809
\advance\rail@tmpa by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   810
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   811
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   812
\rail@put{\framebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   813
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   814
\advance\rail@x by \rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   815
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   816
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   817
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   818
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   819
\def\rail@vlframe{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   820
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   821
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   822
\advance\rail@tmpa by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   823
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   824
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   825
\rail@put{\framebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   826
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   827
\advance\rail@x by \rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   828
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   829
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   830
\rail@vleline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   831
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   832
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   833
\def\rail@vrframe{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   834
\advance\rail@x by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   835
\rail@vreline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   836
\advance\rail@tmpa by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   837
\ifnum\rail@tmpa<\rail@boxht\rail@tmpa=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   838
\advance\rail@y by -\rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   839
\rail@put{\framebox(\number\rail@tmpa,\number\rail@boxht){\box\rail@box}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   840
\advance\rail@y by \rail@boxhht
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   841
\advance\rail@x by \rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   842
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   843
\advance\rail@x by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   844
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   845
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   846
\def\rail@cframe{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   847
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   848
\advance\rail@tmpb by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   849
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   850
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   851
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   852
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   853
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   854
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   855
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   856
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   857
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   858
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   859
\rail@frame
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   860
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   861
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   862
\def\rail@vlcframe{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   863
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   864
\advance\rail@tmpb by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   865
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   866
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   867
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   868
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   869
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   870
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   871
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   872
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   873
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   874
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   875
\rail@vlframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   876
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   877
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   878
\def\rail@vrcframe{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   879
\rail@tmpb=\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   880
\advance\rail@tmpb by \rail@framesp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   881
\ifnum\rail@tmpb<\rail@boxht\rail@tmpb=\rail@boxht\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   882
\advance\rail@tmpb by \rail@boxlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   883
\advance\rail@tmpb by \rail@boxrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   884
\rail@tmpc=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   885
\advance\rail@tmpc by -\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   886
\advance\rail@tmpc by -\rail@tmpb
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   887
\divide\rail@tmpc by 2
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   888
\ifnum\rail@tmpc>0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   889
\advance\rail@x by \rail@tmpc
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   890
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   891
\rail@vrframe
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   892
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   893
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   894
\def\rail@text{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   895
\advance\rail@x by \rail@textlf
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   896
\advance\rail@y by \rail@textup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   897
\rail@put{\box\rail@box}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   898
\advance\rail@y by -\rail@textup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   899
\advance\rail@x by \rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   900
\advance\rail@x by \rail@textrt
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   901
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   902
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   903
% alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   904
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   905
% \rail@jx \rail@jy : current join point
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   906
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   907
% \rail@gx \rail@gy \rail@gex \rail@grx : global versions of \rail@x etc,
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   908
%                                         to pass values over group closings
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   909
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   910
% \rail@mx : maximum x so far
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   911
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   912
% \rail@sy : starting \rail@y for alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   913
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   914
% \rail@jput : put at (\rail@jx,\rail@jy)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   915
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   916
% \rail@joval[PART] : put \oval[PART] with adjust
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   917
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   918
\newcount\rail@jx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   919
\newcount\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   920
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   921
\newcount\rail@gx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   922
\newcount\rail@gy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   923
\newcount\rail@gex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   924
\newcount\rail@grx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   925
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   926
\newcount\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   927
\newcount\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   928
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   929
\def\rail@jput{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   930
\put(\number\rail@jx,\number\rail@jy)
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   931
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   932
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   933
\def\rail@joval[#1]{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   934
\advance\rail@jx by \rail@joinadj
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   935
\rail@jput{\oval(\number\rail@joinsz,\number\rail@joinsz)[#1]}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   936
\advance\rail@jx by -\rail@joinadj
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   937
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   938
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   939
% \rail@barsplit : incoming split for '|'
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   940
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   941
% \rail@plussplit : incoming split for '+'
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   942
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   943
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   944
\def\rail@barsplit{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   945
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   946
\rail@joval[tr]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   947
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   948
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   949
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   950
\def\rail@plussplit{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   951
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   952
\advance\rail@jx by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   953
\rail@joval[tl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   954
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   955
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   956
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   957
% \rail@alt{SPLIT} : start alternatives with incoming split SPLIT
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   958
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   959
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   960
\def\rail@alt#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   961
\rail@sy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   962
\rail@jx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   963
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   964
\advance\rail@x by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   965
\rail@mx=0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   966
\let\rail@list=\@empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   967
\let\rail@comma=\@empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   968
\let\rail@split=#1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   969
\begingroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   970
\rail@sx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   971
\rail@rx=0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   972
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   973
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   974
% \rail@nextalt{FIX}{Y} : start next alternative at vertical position Y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   975
%                         and fix-up FIX
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   976
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   977
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   978
\def\rail@nextalt#1#2{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   979
\global\rail@gx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   980
\global\rail@gy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   981
\global\rail@gex=\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   982
\global\rail@grx=\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   983
\endgroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   984
#1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   985
\ifnum\rail@gx>\rail@mx\rail@mx=\rail@gx\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   986
\ifnum\rail@grx>\rail@mx\rail@mx=\rail@grx\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   987
\edef\rail@list{\rail@list\rail@comma\number\rail@gex:\number\rail@gy}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   988
\def\rail@comma{,}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   989
\rail@split
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   990
\let\rail@split=\@empty
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   991
\rail@sety{#2}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   992
\rail@tmpa=\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   993
\advance\rail@tmpa by -\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   994
\advance\rail@tmpa by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   995
\rail@jput{\line(0,-1){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   996
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   997
\advance\rail@jy by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   998
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
   999
\rail@joval[bl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1000
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1001
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1002
\begingroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1003
\rail@sx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1004
\rail@rx=0
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1005
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1006
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1007
% \rail@barjoin : outgoing join for first '|' alternative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1008
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1009
% \rail@plusjoin : outgoing join for first '+' alternative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1010
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1011
% \rail@altjoin : join for subsequent alternative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1012
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1013
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1014
\def\rail@barjoin{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1015
\ifnum\rail@y<\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1016
\global\rail@gex=\rail@jx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1017
\else
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1018
\global\rail@gex=\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1019
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1020
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1021
\rail@joval[tl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1022
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1023
\ifnum\rail@y<\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1024
\rail@altjoin
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1025
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1026
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1027
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1028
\def\rail@plusjoin{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1029
\global\rail@gex=\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1030
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1031
\advance\rail@jx by -\rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1032
\rail@joval[tr]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1033
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1034
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1035
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1036
\def\rail@altjoin{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1037
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1038
\rail@tmpa=\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1039
\advance\rail@tmpa by -\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1040
\advance\rail@tmpa by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1041
\rail@jput{\line(0,-1){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1042
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1043
\advance\rail@jy by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1044
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1045
\rail@joval[br]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1046
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1047
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1048
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1049
% \rail@eltsplit EX:Y; : split EX:Y into \rail@ex \rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1050
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1051
% \rail@endalt{JOIN} : end alternatives with outgoing join JOIN
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1052
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1053
\def\rail@eltsplit#1:#2;{\rail@ex=#1\rail@y=#2}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1054
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1055
\def\rail@endalt#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1056
\global\rail@gx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1057
\global\rail@gy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1058
\global\rail@gex=\rail@ex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1059
\global\rail@grx=\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1060
\endgroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1061
\ifnum\rail@gx>\rail@mx\rail@mx=\rail@gx\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1062
\ifnum\rail@grx>\rail@mx\rail@mx=\rail@grx\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1063
\edef\rail@list{\rail@list\rail@comma\number\rail@gex:\number\rail@gy}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1064
\rail@x=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1065
\rail@jx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1066
\rail@jy=\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1067
\advance\rail@jx by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1068
\let\rail@join=#1
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1069
\@for\rail@elt:=\rail@list\do{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1070
\expandafter\rail@eltsplit\rail@elt;
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1071
\rail@join
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1072
\let\rail@join=\rail@altjoin
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1073
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1074
\rail@x=\rail@mx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1075
\rail@y=\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1076
\rail@ex=\rail@gex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1077
\advance\rail@x by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1078
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1079
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1080
% \rail@bar : start '|' alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1081
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1082
% \rail@nextbar : next '|' alternative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1083
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1084
% \rail@endbar : end '|' alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1085
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1086
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1087
\def\rail@bar{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1088
\rail@alt\rail@barsplit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1089
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1090
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1091
\def\rail@nextbar{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1092
\rail@nextalt\relax
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1093
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1094
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1095
\def\rail@endbar{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1096
\rail@endalt\rail@barjoin
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1097
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1098
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1099
% \rail@plus : start '+' alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1100
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1101
% \rail@nextplus: next '+' alternative
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1102
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1103
% \rail@endplus : end '+' alternatives
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1104
%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1105
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1106
\def\rail@plus{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1107
\rail@alt\rail@plussplit
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1108
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1109
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1110
\def\rail@nextplus{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1111
\rail@nextalt\rail@fixplus
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1112
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1113
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1114
\def\rail@fixplus{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1115
\ifnum\rail@gy<\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1116
\begingroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1117
\rail@x=\rail@gx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1118
\rail@y=\rail@gy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1119
\rail@ex=\rail@gex
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1120
\rail@rx=\rail@grx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1121
\ifnum\rail@x<\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1122
\rail@x=\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1123
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1124
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1125
\rail@jx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1126
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1127
\advance\rail@jy by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1128
\rail@joval[br]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1129
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1130
\rail@tmpa=\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1131
\advance\rail@tmpa by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1132
\advance\rail@tmpa by -\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1133
\rail@jput{\line(0,1){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1134
\rail@jy=\rail@sy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1135
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1136
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1137
\rail@joval[tl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1138
\advance\rail@jy by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1139
\global\rail@gx=\rail@jx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1140
\global\rail@gy=\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1141
\global\rail@gex=\rail@gx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1142
\global\rail@grx=\rail@rx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1143
\endgroup
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1144
\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1145
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1146
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1147
\def\rail@endplus{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1148
\rail@endalt\rail@plusjoin
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1149
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1150
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1151
% \rail@cr{Y} : carriage return to vertical position Y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1152
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1153
\def\rail@cr#1{
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1154
\rail@tmpa=\rail@sx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1155
\advance\rail@tmpa by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1156
\ifnum\rail@x<\rail@tmpa\rail@x=\rail@tmpa\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1157
\rail@eline
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1158
\rail@jx=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1159
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1160
\advance\rail@x by \rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1161
\ifnum\rail@x>\rail@rx\rail@rx=\rail@x\fi
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1162
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1163
\rail@joval[tr]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1164
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1165
\rail@sety{#1}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1166
\rail@tmpa=\rail@jy
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1167
\advance\rail@tmpa by -\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1168
\advance\rail@tmpa by -\rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1169
\advance\rail@tmpa by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1170
\rail@jput{\line(0,-1){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1171
\rail@jy=\rail@y
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1172
\advance\rail@jy by \rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1173
\advance\rail@jy by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1174
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1175
\rail@joval[br]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1176
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1177
\rail@tmpa=\rail@jx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1178
\advance\rail@tmpa by -\rail@sx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1179
\advance\rail@tmpa by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1180
\rail@jput{\line(-1,0){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1181
\rail@jx=\rail@sx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1182
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1183
\advance\rail@jy by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1184
\rail@joval[tl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1185
\advance\rail@jx by -\rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1186
\rail@tmpa=\rail@boxsp
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1187
\advance\rail@tmpa by -\rail@joinsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1188
\rail@jput{\line(0,-1){\number\rail@tmpa}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1189
\advance\rail@jy by -\rail@tmpa
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1190
\advance\rail@jx by \rail@joinhsz
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1191
\rail@joval[bl]
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1192
\rail@x=\rail@jx
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1193
\rail@ex=\rail@x
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1194
}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1195
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1196
% default setup for Isabelle
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1197
\newenvironment{railoutput}%
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1198
{\begin{list}{}{\rail@param}\def\rail@expand{\relax}\makeatletter}{\makeatother\end{list}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1199
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1200
\def\rail@termfont{\isabellestyle{tt}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1201
\def\rail@nontfont{\isabellestyle{it}}
e00950ba4514 added all files in Journal folder
Chengsong
parents:
diff changeset
  1202
\def\rail@namefont{\isabellestyle{it}}