some attempts at robust \isaspacing so that \isa{...} can be used in section headings etc. (need to avoid `\? for some reason);
authorwenzelm
Thu Jun 09 17:46:25 2011 +0200 (2011-06-09)
changeset 433254384f4ae0574
parent 43324 2b47822868e4
child 43326 47cf4bc789aa
some attempts at robust \isaspacing so that \isa{...} can be used in section headings etc. (need to avoid `\? for some reason);
lib/texinputs/isabelle.sty
     1.1 --- a/lib/texinputs/isabelle.sty	Thu Jun 09 16:34:49 2011 +0200
     1.2 +++ b/lib/texinputs/isabelle.sty	Thu Jun 09 17:46:25 2011 +0200
     1.3 @@ -15,17 +15,20 @@
     1.4  \newcommand{\isastyletxt}{\rm}
     1.5  \newcommand{\isastylecmt}{\rm}
     1.6  
     1.7 +\newcommand{\isaspacing}{\sfcode`\.1000 \sfcode 63 1000 \sfcode`\!1000
     1.8 +  \sfcode`\:1000 \sfcode`\;1000 \sfcode`\,1000}
     1.9 +
    1.10  %symbol markup -- \emph achieves decent spacing via italic corrections
    1.11  \newcommand{\isamath}[1]{\emph{$#1$}}
    1.12  \newcommand{\isatext}[1]{\emph{#1}}
    1.13 -\DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\frenchspacing\isastylescript##1}}}
    1.14 +\DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isaspacing\isastylescript##1}}}
    1.15  \newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
    1.16  \newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
    1.17  \newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
    1.18  \newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
    1.19 -\DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\frenchspacing\isastylescript}
    1.20 +\DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\isaspacing\isastylescript}
    1.21  \DeclareRobustCommand{\isactrlesub}{\egroup\egroup\endmath\egroup}
    1.22 -\DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\frenchspacing\isastylescript}
    1.23 +\DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\isaspacing\isastylescript}
    1.24  \DeclareRobustCommand{\isactrlesup}{\egroup\egroup\endmath\egroup}
    1.25  \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
    1.26  \newcommand{\isactrlloc}[1]{{\bfseries\upshape\boldmath#1}}
    1.27 @@ -40,13 +43,13 @@
    1.28  \isamarkuptrue\par%
    1.29  \isa@parindent\parindent\parindent0pt%
    1.30  \isa@parskip\parskip\parskip0pt%
    1.31 -\frenchspacing\isastyle}{\par}
    1.32 +\isaspacing\isastyle}{\par}
    1.33  
    1.34  \newenvironment{isabelle}
    1.35  {\begin{trivlist}\begin{isabellebody}\item\relax}
    1.36  {\end{isabellebody}\end{trivlist}}
    1.37  
    1.38 -\newcommand{\isa}[1]{\emph{\frenchspacing\isastyleminor #1}}
    1.39 +\newcommand{\isa}[1]{\emph{\isaspacing\isastyleminor #1}}
    1.40  
    1.41  \newcommand{\isaindent}[1]{\hphantom{#1}}
    1.42  \newcommand{\isanewline}{\mbox{}\par\mbox{}}