# HG changeset patch # User wenzelm # Date 1307634385 -7200 # Node ID 4384f4ae0574a9ed6ca962786dff6adcb3dc4c5b # Parent 2b47822868e41f9e78c5ae81aced61259d176e0b some attempts at robust \isaspacing so that \isa{...} can be used in section headings etc. (need to avoid `\? for some reason); diff -r 2b47822868e4 -r 4384f4ae0574 lib/texinputs/isabelle.sty --- a/lib/texinputs/isabelle.sty Thu Jun 09 16:34:49 2011 +0200 +++ b/lib/texinputs/isabelle.sty Thu Jun 09 17:46:25 2011 +0200 @@ -15,17 +15,20 @@ \newcommand{\isastyletxt}{\rm} \newcommand{\isastylecmt}{\rm} +\newcommand{\isaspacing}{\sfcode`\.1000 \sfcode 63 1000 \sfcode`\!1000 + \sfcode`\:1000 \sfcode`\;1000 \sfcode`\,1000} + %symbol markup -- \emph achieves decent spacing via italic corrections \newcommand{\isamath}[1]{\emph{$#1$}} \newcommand{\isatext}[1]{\emph{#1}} -\DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\frenchspacing\isastylescript##1}}} +\DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isaspacing\isastylescript##1}}} \newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} \newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} \newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}} \newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}} -\DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\frenchspacing\isastylescript} +\DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\isaspacing\isastylescript} \DeclareRobustCommand{\isactrlesub}{\egroup\egroup\endmath\egroup} -\DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\frenchspacing\isastylescript} +\DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\isaspacing\isastylescript} \DeclareRobustCommand{\isactrlesup}{\egroup\egroup\endmath\egroup} \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}} \newcommand{\isactrlloc}[1]{{\bfseries\upshape\boldmath#1}} @@ -40,13 +43,13 @@ \isamarkuptrue\par% \isa@parindent\parindent\parindent0pt% \isa@parskip\parskip\parskip0pt% -\frenchspacing\isastyle}{\par} +\isaspacing\isastyle}{\par} \newenvironment{isabelle} {\begin{trivlist}\begin{isabellebody}\item\relax} {\end{isabellebody}\end{trivlist}} -\newcommand{\isa}[1]{\emph{\frenchspacing\isastyleminor #1}} +\newcommand{\isa}[1]{\emph{\isaspacing\isastyleminor #1}} \newcommand{\isaindent}[1]{\hphantom{#1}} \newcommand{\isanewline}{\mbox{}\par\mbox{}}