document/isabelle.sty
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sun, 23 Jun 2013 03:55:49 +0100
changeset 12 fb962189e921
parent 10 569222a42cf5
child 13 dd1499f296ea
permissions -rw-r--r--
added reviews from ESORICS
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
301f567e2a8e add document
chunhan
parents:
diff changeset
     1
%%
301f567e2a8e add document
chunhan
parents:
diff changeset
     2
%% macros for Isabelle generated LaTeX output
301f567e2a8e add document
chunhan
parents:
diff changeset
     3
%%
301f567e2a8e add document
chunhan
parents:
diff changeset
     4
301f567e2a8e add document
chunhan
parents:
diff changeset
     5
%%% Simple document preparation (based on theory token language and symbols)
301f567e2a8e add document
chunhan
parents:
diff changeset
     6
301f567e2a8e add document
chunhan
parents:
diff changeset
     7
% isabelle environments
301f567e2a8e add document
chunhan
parents:
diff changeset
     8
301f567e2a8e add document
chunhan
parents:
diff changeset
     9
\newcommand{\isabellecontext}{UNKNOWN}
301f567e2a8e add document
chunhan
parents:
diff changeset
    10
301f567e2a8e add document
chunhan
parents:
diff changeset
    11
\newcommand{\isastyle}{\UNDEF}
301f567e2a8e add document
chunhan
parents:
diff changeset
    12
\newcommand{\isastyleminor}{\UNDEF}
301f567e2a8e add document
chunhan
parents:
diff changeset
    13
\newcommand{\isastylescript}{\UNDEF}
301f567e2a8e add document
chunhan
parents:
diff changeset
    14
\newcommand{\isastyletext}{\normalsize\rm}
301f567e2a8e add document
chunhan
parents:
diff changeset
    15
\newcommand{\isastyletxt}{\rm}
301f567e2a8e add document
chunhan
parents:
diff changeset
    16
\newcommand{\isastylecmt}{\rm}
301f567e2a8e add document
chunhan
parents:
diff changeset
    17
301f567e2a8e add document
chunhan
parents:
diff changeset
    18
\newcommand{\isaspacing}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
    19
  \sfcode 42 1000 % .
301f567e2a8e add document
chunhan
parents:
diff changeset
    20
  \sfcode 63 1000 % ?
301f567e2a8e add document
chunhan
parents:
diff changeset
    21
  \sfcode 33 1000 % !
301f567e2a8e add document
chunhan
parents:
diff changeset
    22
  \sfcode 58 1000 % :
301f567e2a8e add document
chunhan
parents:
diff changeset
    23
  \sfcode 59 1000 % ;
301f567e2a8e add document
chunhan
parents:
diff changeset
    24
  \sfcode 44 1000 % ,
301f567e2a8e add document
chunhan
parents:
diff changeset
    25
}
301f567e2a8e add document
chunhan
parents:
diff changeset
    26
301f567e2a8e add document
chunhan
parents:
diff changeset
    27
%symbol markup -- \emph achieves decent spacing via italic corrections
301f567e2a8e add document
chunhan
parents:
diff changeset
    28
\newcommand{\isamath}[1]{\emph{$#1$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    29
\newcommand{\isatext}[1]{\emph{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    30
\DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isaspacing\isastylescript##1}}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    31
\newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    32
\newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    33
\newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    34
\newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    35
\DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\isaspacing\isastylescript}
301f567e2a8e add document
chunhan
parents:
diff changeset
    36
\DeclareRobustCommand{\isactrlesub}{\egroup\egroup\endmath\egroup}
301f567e2a8e add document
chunhan
parents:
diff changeset
    37
\DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\isaspacing\isastylescript}
301f567e2a8e add document
chunhan
parents:
diff changeset
    38
\DeclareRobustCommand{\isactrlesup}{\egroup\egroup\endmath\egroup}
301f567e2a8e add document
chunhan
parents:
diff changeset
    39
\newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    40
301f567e2a8e add document
chunhan
parents:
diff changeset
    41
\newenvironment{isaantiq}{{\isacharat\isacharbraceleft}}{{\isacharbraceright}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    42
\newcommand{\isaantiqopen}{\isakeyword{\isacharbraceleft}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    43
\newcommand{\isaantiqclose}{\isakeyword{\isacharbraceright}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    44
301f567e2a8e add document
chunhan
parents:
diff changeset
    45
\newdimen\isa@parindent\newdimen\isa@parskip
301f567e2a8e add document
chunhan
parents:
diff changeset
    46
301f567e2a8e add document
chunhan
parents:
diff changeset
    47
\newenvironment{isabellebody}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
    48
\isamarkuptrue\par%
301f567e2a8e add document
chunhan
parents:
diff changeset
    49
\isa@parindent\parindent\parindent0pt%
301f567e2a8e add document
chunhan
parents:
diff changeset
    50
\isa@parskip\parskip\parskip0pt%
301f567e2a8e add document
chunhan
parents:
diff changeset
    51
\isaspacing\isastyle}{\par}
301f567e2a8e add document
chunhan
parents:
diff changeset
    52
301f567e2a8e add document
chunhan
parents:
diff changeset
    53
\newenvironment{isabelle}
301f567e2a8e add document
chunhan
parents:
diff changeset
    54
{\begin{trivlist}\begin{isabellebody}\item\relax}
301f567e2a8e add document
chunhan
parents:
diff changeset
    55
{\end{isabellebody}\end{trivlist}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    56
301f567e2a8e add document
chunhan
parents:
diff changeset
    57
\newcommand{\isa}[1]{\emph{\isaspacing\isastyleminor #1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    58
301f567e2a8e add document
chunhan
parents:
diff changeset
    59
\newcommand{\isaindent}[1]{\hphantom{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    60
\newcommand{\isanewline}{\mbox{}\par\mbox{}}
301f567e2a8e add document
chunhan
parents:
diff changeset
    61
\newcommand{\isasep}{}
301f567e2a8e add document
chunhan
parents:
diff changeset
    62
\newcommand{\isadigit}[1]{#1}
301f567e2a8e add document
chunhan
parents:
diff changeset
    63
301f567e2a8e add document
chunhan
parents:
diff changeset
    64
\newcommand{\isachardefaults}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
    65
\chardef\isacharbang=`\!%
301f567e2a8e add document
chunhan
parents:
diff changeset
    66
\chardef\isachardoublequote=`\"%
301f567e2a8e add document
chunhan
parents:
diff changeset
    67
\chardef\isachardoublequoteopen=`\"%
301f567e2a8e add document
chunhan
parents:
diff changeset
    68
\chardef\isachardoublequoteclose=`\"%
301f567e2a8e add document
chunhan
parents:
diff changeset
    69
\chardef\isacharhash=`\#%
301f567e2a8e add document
chunhan
parents:
diff changeset
    70
\chardef\isachardollar=`\$%
301f567e2a8e add document
chunhan
parents:
diff changeset
    71
\chardef\isacharpercent=`\%%
301f567e2a8e add document
chunhan
parents:
diff changeset
    72
\chardef\isacharampersand=`\&%
301f567e2a8e add document
chunhan
parents:
diff changeset
    73
\chardef\isacharprime=`\'%
301f567e2a8e add document
chunhan
parents:
diff changeset
    74
\chardef\isacharparenleft=`\(%
301f567e2a8e add document
chunhan
parents:
diff changeset
    75
\chardef\isacharparenright=`\)%
301f567e2a8e add document
chunhan
parents:
diff changeset
    76
\chardef\isacharasterisk=`\*%
301f567e2a8e add document
chunhan
parents:
diff changeset
    77
\chardef\isacharplus=`\+%
301f567e2a8e add document
chunhan
parents:
diff changeset
    78
\chardef\isacharcomma=`\,%
301f567e2a8e add document
chunhan
parents:
diff changeset
    79
\chardef\isacharminus=`\-%
301f567e2a8e add document
chunhan
parents:
diff changeset
    80
\chardef\isachardot=`\.%
301f567e2a8e add document
chunhan
parents:
diff changeset
    81
\chardef\isacharslash=`\/%
301f567e2a8e add document
chunhan
parents:
diff changeset
    82
\chardef\isacharcolon=`\:%
301f567e2a8e add document
chunhan
parents:
diff changeset
    83
\chardef\isacharsemicolon=`\;%
301f567e2a8e add document
chunhan
parents:
diff changeset
    84
\chardef\isacharless=`\<%
301f567e2a8e add document
chunhan
parents:
diff changeset
    85
\chardef\isacharequal=`\=%
301f567e2a8e add document
chunhan
parents:
diff changeset
    86
\chardef\isachargreater=`\>%
301f567e2a8e add document
chunhan
parents:
diff changeset
    87
\chardef\isacharquery=`\?%
301f567e2a8e add document
chunhan
parents:
diff changeset
    88
\chardef\isacharat=`\@%
301f567e2a8e add document
chunhan
parents:
diff changeset
    89
\chardef\isacharbrackleft=`\[%
301f567e2a8e add document
chunhan
parents:
diff changeset
    90
\chardef\isacharbackslash=`\\%
301f567e2a8e add document
chunhan
parents:
diff changeset
    91
\chardef\isacharbrackright=`\]%
301f567e2a8e add document
chunhan
parents:
diff changeset
    92
\chardef\isacharcircum=`\^%
301f567e2a8e add document
chunhan
parents:
diff changeset
    93
\chardef\isacharunderscore=`\_%
301f567e2a8e add document
chunhan
parents:
diff changeset
    94
\def\isacharunderscorekeyword{\_}%
301f567e2a8e add document
chunhan
parents:
diff changeset
    95
\chardef\isacharbackquote=`\`%
301f567e2a8e add document
chunhan
parents:
diff changeset
    96
\chardef\isacharbackquoteopen=`\`%
301f567e2a8e add document
chunhan
parents:
diff changeset
    97
\chardef\isacharbackquoteclose=`\`%
301f567e2a8e add document
chunhan
parents:
diff changeset
    98
\chardef\isacharbraceleft=`\{%
301f567e2a8e add document
chunhan
parents:
diff changeset
    99
\chardef\isacharbar=`\|%
301f567e2a8e add document
chunhan
parents:
diff changeset
   100
\chardef\isacharbraceright=`\}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   101
\chardef\isachartilde=`\~%
301f567e2a8e add document
chunhan
parents:
diff changeset
   102
\def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   103
\def\isacharverbatimclose{\isacharasterisk\isacharbraceright}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   104
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   105
301f567e2a8e add document
chunhan
parents:
diff changeset
   106
301f567e2a8e add document
chunhan
parents:
diff changeset
   107
% keyword and section markup
301f567e2a8e add document
chunhan
parents:
diff changeset
   108
301f567e2a8e add document
chunhan
parents:
diff changeset
   109
\newcommand{\isakeyword}[1]
301f567e2a8e add document
chunhan
parents:
diff changeset
   110
{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   111
\def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   112
\newcommand{\isacommand}[1]{\isakeyword{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   113
301f567e2a8e add document
chunhan
parents:
diff changeset
   114
\newcommand{\isamarkupheader}[1]{\section{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   115
\newcommand{\isamarkupchapter}[1]{\chapter{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   116
\newcommand{\isamarkupsection}[1]{\section{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   117
\newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   118
\newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   119
\newcommand{\isamarkupsect}[1]{\section{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   120
\newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   121
\newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   122
301f567e2a8e add document
chunhan
parents:
diff changeset
   123
\newif\ifisamarkup
301f567e2a8e add document
chunhan
parents:
diff changeset
   124
\newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
301f567e2a8e add document
chunhan
parents:
diff changeset
   125
\newcommand{\isaendpar}{\par\medskip}
301f567e2a8e add document
chunhan
parents:
diff changeset
   126
\newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
301f567e2a8e add document
chunhan
parents:
diff changeset
   127
\newenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}}{\end{isapar}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   128
\newenvironment{isamarkuptxt}{\par\isastyletxt\begin{isapar}}{\end{isapar}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   129
\newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   130
301f567e2a8e add document
chunhan
parents:
diff changeset
   131
301f567e2a8e add document
chunhan
parents:
diff changeset
   132
% styles
301f567e2a8e add document
chunhan
parents:
diff changeset
   133
301f567e2a8e add document
chunhan
parents:
diff changeset
   134
\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
301f567e2a8e add document
chunhan
parents:
diff changeset
   135
301f567e2a8e add document
chunhan
parents:
diff changeset
   136
\newcommand{\isabellestyledefault}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
   137
\def\isastyle{\small\tt\slshape}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   138
\def\isastyleminor{\small\tt\slshape}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   139
\def\isastylescript{\footnotesize\tt\slshape}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   140
\isachardefaults%
301f567e2a8e add document
chunhan
parents:
diff changeset
   141
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   142
\isabellestyledefault
301f567e2a8e add document
chunhan
parents:
diff changeset
   143
301f567e2a8e add document
chunhan
parents:
diff changeset
   144
\newcommand{\isabellestylett}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
   145
\def\isastyle{\small\tt}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   146
\def\isastyleminor{\small\tt}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   147
\def\isastylescript{\footnotesize\tt}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   148
\isachardefaults%
301f567e2a8e add document
chunhan
parents:
diff changeset
   149
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   150
301f567e2a8e add document
chunhan
parents:
diff changeset
   151
\newcommand{\isabellestyleit}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
   152
\def\isastyle{\small\it}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   153
\def\isastyleminor{\it}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   154
\def\isastylescript{\footnotesize\it}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   155
\isachardefaults%
301f567e2a8e add document
chunhan
parents:
diff changeset
   156
\def\isacharunderscorekeyword{\mbox{-}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   157
\def\isacharbang{\isamath{!}}%
10
569222a42cf5 updated the paper for submission
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 2
diff changeset
   158
\def\isachardoublequote{}%
569222a42cf5 updated the paper for submission
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 2
diff changeset
   159
\def\isachardoublequoteopen{}%
569222a42cf5 updated the paper for submission
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 2
diff changeset
   160
\def\isachardoublequoteclose{}%
2
301f567e2a8e add document
chunhan
parents:
diff changeset
   161
\def\isacharhash{\isamath{\#}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   162
\def\isachardollar{\isamath{\$}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   163
\def\isacharpercent{\isamath{\%}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   164
\def\isacharampersand{\isamath{\&}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   165
\def\isacharprime{\isamath{\mskip2mu{'}\mskip-2mu}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   166
\def\isacharparenleft{\isamath{(}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   167
\def\isacharparenright{\isamath{)}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   168
\def\isacharasterisk{\isamath{*}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   169
\def\isacharplus{\isamath{+}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   170
\def\isacharcomma{\isamath{\mathord,}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   171
\def\isacharminus{\isamath{-}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   172
\def\isachardot{\isamath{\mathord.}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   173
\def\isacharslash{\isamath{/}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   174
\def\isacharcolon{\isamath{\mathord:}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   175
\def\isacharsemicolon{\isamath{\mathord;}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   176
\def\isacharless{\isamath{<}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   177
\def\isacharequal{\isamath{=}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   178
\def\isachargreater{\isamath{>}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   179
\def\isacharat{\isamath{@}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   180
\def\isacharbrackleft{\isamath{[}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   181
\def\isacharbackslash{\isamath{\backslash}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   182
\def\isacharbrackright{\isamath{]}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   183
\def\isacharunderscore{\mbox{-}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   184
\def\isacharbraceleft{\isamath{\{}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   185
\def\isacharbar{\isamath{\mid}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   186
\def\isacharbraceright{\isamath{\}}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   187
\def\isachartilde{\isamath{{}\sp{\sim}}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   188
\def\isacharbackquoteopen{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   189
\def\isacharbackquoteclose{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   190
\def\isacharverbatimopen{\isamath{\langle\!\langle}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   191
\def\isacharverbatimclose{\isamath{\rangle\!\rangle}}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   192
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   193
301f567e2a8e add document
chunhan
parents:
diff changeset
   194
\newcommand{\isabellestyleliteral}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
   195
\isabellestyleit%
301f567e2a8e add document
chunhan
parents:
diff changeset
   196
\def\isacharunderscore{\_}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   197
\def\isacharunderscorekeyword{\_}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   198
\chardef\isacharbackquoteopen=`\`%
301f567e2a8e add document
chunhan
parents:
diff changeset
   199
\chardef\isacharbackquoteclose=`\`%
301f567e2a8e add document
chunhan
parents:
diff changeset
   200
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   201
301f567e2a8e add document
chunhan
parents:
diff changeset
   202
\newcommand{\isabellestylesl}{%
301f567e2a8e add document
chunhan
parents:
diff changeset
   203
\isabellestyleit%
301f567e2a8e add document
chunhan
parents:
diff changeset
   204
\def\isastyle{\small\sl}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   205
\def\isastyleminor{\sl}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   206
\def\isastylescript{\footnotesize\sl}%
301f567e2a8e add document
chunhan
parents:
diff changeset
   207
}
301f567e2a8e add document
chunhan
parents:
diff changeset
   208
301f567e2a8e add document
chunhan
parents:
diff changeset
   209
301f567e2a8e add document
chunhan
parents:
diff changeset
   210
% tagged regions
301f567e2a8e add document
chunhan
parents:
diff changeset
   211
301f567e2a8e add document
chunhan
parents:
diff changeset
   212
%plain TeX version of comment package -- much faster!
301f567e2a8e add document
chunhan
parents:
diff changeset
   213
\let\isafmtname\fmtname\def\fmtname{plain}
301f567e2a8e add document
chunhan
parents:
diff changeset
   214
\usepackage{comment}
301f567e2a8e add document
chunhan
parents:
diff changeset
   215
\let\fmtname\isafmtname
301f567e2a8e add document
chunhan
parents:
diff changeset
   216
301f567e2a8e add document
chunhan
parents:
diff changeset
   217
\newcommand{\isafold}[1]{\emph{$\langle\mathord{\mathit{#1}}\rangle$}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   218
301f567e2a8e add document
chunhan
parents:
diff changeset
   219
\newcommand{\isakeeptag}[1]%
301f567e2a8e add document
chunhan
parents:
diff changeset
   220
{\includecomment{isadelim#1}\includecomment{isatag#1}\csarg\def{isafold#1}{}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   221
\newcommand{\isadroptag}[1]%
301f567e2a8e add document
chunhan
parents:
diff changeset
   222
{\excludecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   223
\newcommand{\isafoldtag}[1]%
301f567e2a8e add document
chunhan
parents:
diff changeset
   224
{\includecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{\isafold{#1}}}
301f567e2a8e add document
chunhan
parents:
diff changeset
   225
301f567e2a8e add document
chunhan
parents:
diff changeset
   226
\isakeeptag{theory}
301f567e2a8e add document
chunhan
parents:
diff changeset
   227
\isakeeptag{proof}
301f567e2a8e add document
chunhan
parents:
diff changeset
   228
\isakeeptag{ML}
301f567e2a8e add document
chunhan
parents:
diff changeset
   229
\isakeeptag{visible}
301f567e2a8e add document
chunhan
parents:
diff changeset
   230
\isadroptag{invisible}
301f567e2a8e add document
chunhan
parents:
diff changeset
   231
301f567e2a8e add document
chunhan
parents:
diff changeset
   232
\IfFileExists{isabelletags.sty}{\usepackage{isabelletags}}{}