all styles now reset to defaults first, i.e. the document may switch styles back and forth;
authorwenzelm
Tue Jan 31 00:39:44 2006 +0100 (2006-01-31)
changeset 188609089cdb4c5fd
parent 18859 75248f8badc9
child 18861 38269ef5175a
all styles now reset to defaults first, i.e. the document may switch styles back and forth;
added macro \isachardefaults for \chardef defaults;
renamed \isakeywordcharunderscore to \isacharunderscorekeyword;
added isabellestyle{default};
lib/texinputs/isabelle.sty
     1.1 --- a/lib/texinputs/isabelle.sty	Tue Jan 31 00:39:43 2006 +0100
     1.2 +++ b/lib/texinputs/isabelle.sty	Tue Jan 31 00:39:44 2006 +0100
     1.3 @@ -10,9 +10,9 @@
     1.4  
     1.5  \newcommand{\isabellecontext}{UNKNOWN}
     1.6  
     1.7 -\newcommand{\isastyle}{\small\tt\slshape}
     1.8 -\newcommand{\isastyleminor}{\small\tt\slshape}
     1.9 -\newcommand{\isastylescript}{\footnotesize\tt\slshape}
    1.10 +\newcommand{\isastyle}{\UNDEF}
    1.11 +\newcommand{\isastyleminor}{\UNDEF}
    1.12 +\newcommand{\isastylescript}{\UNDEF}
    1.13  \newcommand{\isastyletext}{\normalsize\rm}
    1.14  \newcommand{\isastyletxt}{\rm}
    1.15  \newcommand{\isastylecmt}{\rm}
    1.16 @@ -52,51 +52,53 @@
    1.17  \newcommand{\isasep}{}
    1.18  \newcommand{\isadigit}[1]{#1}
    1.19  
    1.20 -\chardef\isacharbang=`\!
    1.21 -\chardef\isachardoublequote=`\"
    1.22 -\chardef\isachardoublequoteopen=`\"
    1.23 -\chardef\isachardoublequoteclose=`\"
    1.24 -\chardef\isacharhash=`\#
    1.25 -\chardef\isachardollar=`\$
    1.26 -\chardef\isacharpercent=`\%
    1.27 -\chardef\isacharampersand=`\&
    1.28 -\chardef\isacharprime=`\'
    1.29 -\chardef\isacharparenleft=`\(
    1.30 -\chardef\isacharparenright=`\)
    1.31 -\chardef\isacharasterisk=`\*
    1.32 -\chardef\isacharplus=`\+
    1.33 -\chardef\isacharcomma=`\,
    1.34 -\chardef\isacharminus=`\-
    1.35 -\chardef\isachardot=`\.
    1.36 -\chardef\isacharslash=`\/
    1.37 -\chardef\isacharcolon=`\:
    1.38 -\chardef\isacharsemicolon=`\;
    1.39 -\chardef\isacharless=`\<
    1.40 -\chardef\isacharequal=`\=
    1.41 -\chardef\isachargreater=`\>
    1.42 -\chardef\isacharquery=`\?
    1.43 -\chardef\isacharat=`\@
    1.44 -\chardef\isacharbrackleft=`\[
    1.45 -\chardef\isacharbackslash=`\\
    1.46 -\chardef\isacharbrackright=`\]
    1.47 -\chardef\isacharcircum=`\^
    1.48 -\chardef\isacharunderscore=`\_
    1.49 -\chardef\isacharbackquote=`\`
    1.50 -\chardef\isacharbackquoteopen=`\`
    1.51 -\chardef\isacharbackquoteclose=`\`
    1.52 -\chardef\isacharbraceleft=`\{
    1.53 -\chardef\isacharbar=`\|
    1.54 -\chardef\isacharbraceright=`\}
    1.55 -\chardef\isachartilde=`\~
    1.56 -\def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}
    1.57 -\def\isacharverbatimclose{\isacharasterisk\isacharbraceright}
    1.58 +\newcommand{\isachardefaults}{%
    1.59 +\chardef\isacharbang=`\!%
    1.60 +\chardef\isachardoublequote=`\"%
    1.61 +\chardef\isachardoublequoteopen=`\"%
    1.62 +\chardef\isachardoublequoteclose=`\"%
    1.63 +\chardef\isacharhash=`\#%
    1.64 +\chardef\isachardollar=`\$%
    1.65 +\chardef\isacharpercent=`\%%
    1.66 +\chardef\isacharampersand=`\&%
    1.67 +\chardef\isacharprime=`\'%
    1.68 +\chardef\isacharparenleft=`\(%
    1.69 +\chardef\isacharparenright=`\)%
    1.70 +\chardef\isacharasterisk=`\*%
    1.71 +\chardef\isacharplus=`\+%
    1.72 +\chardef\isacharcomma=`\,%
    1.73 +\chardef\isacharminus=`\-%
    1.74 +\chardef\isachardot=`\.%
    1.75 +\chardef\isacharslash=`\/%
    1.76 +\chardef\isacharcolon=`\:%
    1.77 +\chardef\isacharsemicolon=`\;%
    1.78 +\chardef\isacharless=`\<%
    1.79 +\chardef\isacharequal=`\=%
    1.80 +\chardef\isachargreater=`\>%
    1.81 +\chardef\isacharquery=`\?%
    1.82 +\chardef\isacharat=`\@%
    1.83 +\chardef\isacharbrackleft=`\[%
    1.84 +\chardef\isacharbackslash=`\\%
    1.85 +\chardef\isacharbrackright=`\]%
    1.86 +\chardef\isacharcircum=`\^%
    1.87 +\chardef\isacharunderscore=`\_%
    1.88 +\def\isacharunderscorekeyword{\_}%
    1.89 +\chardef\isacharbackquote=`\`%
    1.90 +\chardef\isacharbackquoteopen=`\`%
    1.91 +\chardef\isacharbackquoteclose=`\`%
    1.92 +\chardef\isacharbraceleft=`\{%
    1.93 +\chardef\isacharbar=`\|%
    1.94 +\chardef\isacharbraceright=`\}%
    1.95 +\chardef\isachartilde=`\~%
    1.96 +\def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}%
    1.97 +\def\isacharverbatimclose{\isacharasterisk\isacharbraceright}%
    1.98 +}
    1.99  
   1.100  
   1.101  % keyword and section markup
   1.102  
   1.103 -\newcommand{\isakeywordcharunderscore}{\_}
   1.104  \newcommand{\isakeyword}[1]
   1.105 -{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isakeywordcharunderscore}%
   1.106 +{\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}%
   1.107  \def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
   1.108  \newcommand{\isacommand}[1]{\isakeyword{#1}}
   1.109  
   1.110 @@ -118,21 +120,30 @@
   1.111  \newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
   1.112  
   1.113  
   1.114 -% alternative styles
   1.115 +% styles
   1.116 +
   1.117 +\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
   1.118  
   1.119 -\newcommand{\isabellestyle}{}
   1.120 -\def\isabellestyle#1{\csname isabellestyle#1\endcsname}
   1.121 +\newcommand{\isabellestyledefault}{%
   1.122 +\renewcommand{\isastyle}{\small\tt\slshape}%
   1.123 +\renewcommand{\isastyleminor}{\small\tt\slshape}%
   1.124 +\renewcommand{\isastylescript}{\footnotesize\tt\slshape}%
   1.125 +\isachardefaults%
   1.126 +}
   1.127 +\isabellestyledefault
   1.128  
   1.129  \newcommand{\isabellestylett}{%
   1.130  \renewcommand{\isastyle}{\small\tt}%
   1.131  \renewcommand{\isastyleminor}{\small\tt}%
   1.132  \renewcommand{\isastylescript}{\footnotesize\tt}%
   1.133 +\isachardefaults%
   1.134  }
   1.135 +
   1.136  \newcommand{\isabellestyleit}{%
   1.137  \renewcommand{\isastyle}{\small\it}%
   1.138  \renewcommand{\isastyleminor}{\it}%
   1.139  \renewcommand{\isastylescript}{\footnotesize\it}%
   1.140 -\renewcommand{\isakeywordcharunderscore}{\mbox{-}}%
   1.141 +\renewcommand{\isacharunderscorekeyword}{\mbox{-}}%
   1.142  \renewcommand{\isacharbang}{\isamath{!}}%
   1.143  \renewcommand{\isachardoublequote}{}%
   1.144  \renewcommand{\isachardoublequoteopen}{}%