doc-src/LaTeXsugar/Sugar/document/isabelle.sty
changeset 17214 af174eeafba1
parent 17175 1eced27ee0e1
child 17536 1b7c2f7df2e6
equal deleted inserted replaced
17213:ba65f3e5653c 17214:af174eeafba1
    20 
    20 
    21 %symbol markup -- \emph achieves decent spacing via italic corrections
    21 %symbol markup -- \emph achieves decent spacing via italic corrections
    22 \newcommand{\isamath}[1]{\emph{$#1$}}
    22 \newcommand{\isamath}[1]{\emph{$#1$}}
    23 \newcommand{\isatext}[1]{\emph{#1}}
    23 \newcommand{\isatext}[1]{\emph{#1}}
    24 \newcommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}}
    24 \newcommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}}
    25 \newcommand{\isactrlsub}[1]{\emph{${}\sb{\mbox{\isastylescript{#1}}}$}}
    25 \newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
    26 \newcommand{\isactrlsup}[1]{\emph{${}\sp{\mbox{\isastylescript{#1}}}$}}
    26 \newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
    27 \newcommand{\isactrlisub}[1]{\emph{${}\sb{\mbox{\isastylescript{#1}}}$}}
    27 \newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
    28 \newcommand{\isactrlisup}[1]{\emph{${}\sp{\mbox{\isastylescript{#1}}}$}}
    28 \newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
    29 \newcommand{\isactrlbsub}{\emph\bgroup\begin{math}{}\sb\bgroup\mbox\bgroup\isastylescript}
    29 \newcommand{\isactrlbsub}{\emph\bgroup\begin{math}{}\sb\bgroup\mbox\bgroup\isastylescript}
    30 \newcommand{\isactrlesub}{\egroup\egroup\end{math}\egroup}
    30 \newcommand{\isactrlesub}{\egroup\egroup\end{math}\egroup}
    31 \newcommand{\isactrlbsup}{\emph\bgroup\begin{math}{}\sp\bgroup\mbox\bgroup\isastylescript}
    31 \newcommand{\isactrlbsup}{\emph\bgroup\begin{math}{}\sp\bgroup\mbox\bgroup\isastylescript}
    32 \newcommand{\isactrlesup}{\egroup\egroup\end{math}\egroup}
    32 \newcommand{\isactrlesup}{\egroup\egroup\end{math}\egroup}
    33 \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
    33 \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
    87 \chardef\isacharbackquoteclose=`\`
    87 \chardef\isacharbackquoteclose=`\`
    88 \chardef\isacharbraceleft=`\{
    88 \chardef\isacharbraceleft=`\{
    89 \chardef\isacharbar=`\|
    89 \chardef\isacharbar=`\|
    90 \chardef\isacharbraceright=`\}
    90 \chardef\isacharbraceright=`\}
    91 \chardef\isachartilde=`\~
    91 \chardef\isachartilde=`\~
       
    92 \def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}
       
    93 \def\isacharverbatimclose{\isacharasterisk\isacharbraceright}
    92 
    94 
    93 
    95 
    94 % keyword and section markup
    96 % keyword and section markup
    95 
    97 
    96 \newcommand{\isakeywordcharunderscore}{\_}
    98 \newcommand{\isakeywordcharunderscore}{\_}
   110 
   112 
   111 \newif\ifisamarkup
   113 \newif\ifisamarkup
   112 \newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
   114 \newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
   113 \newcommand{\isaendpar}{\par\medskip}
   115 \newcommand{\isaendpar}{\par\medskip}
   114 \newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
   116 \newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
   115 \newenvironment{isamarkuptext}{\isastyletext\begin{isapar}}{\end{isapar}}
   117 \newenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}}{\end{isapar}}
   116 \newenvironment{isamarkuptxt}{\isastyletxt\begin{isapar}}{\end{isapar}}
   118 \newenvironment{isamarkuptxt}{\par\isastyletxt\begin{isapar}}{\end{isapar}}
   117 \newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
   119 \newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
   118 
   120 
   119 
   121 
   120 % alternative styles
   122 % alternative styles
   121 
   123 
   163 \renewcommand{\isacharbar}{\isamath{\mid}}%
   165 \renewcommand{\isacharbar}{\isamath{\mid}}%
   164 \renewcommand{\isacharbraceright}{\isamath{\}}}%
   166 \renewcommand{\isacharbraceright}{\isamath{\}}}%
   165 \renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}%
   167 \renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}%
   166 \renewcommand{\isacharbackquoteopen}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}}%
   168 \renewcommand{\isacharbackquoteopen}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}}%
   167 \renewcommand{\isacharbackquoteclose}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}}%
   169 \renewcommand{\isacharbackquoteclose}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}}%
       
   170 \renewcommand{\isacharverbatimopen}{\isamath{\langle\!\langle}}%
       
   171 \renewcommand{\isacharverbatimclose}{\isamath{\rangle\!\rangle}}%
   168 }
   172 }
   169 
   173 
   170 \newcommand{\isabellestylesl}{%
   174 \newcommand{\isabellestylesl}{%
   171 \isabellestyleit%
   175 \isabellestyleit%
   172 \renewcommand{\isastyle}{\small\sl}%
   176 \renewcommand{\isastyle}{\small\sl}%