ProgTutorial/document/root.tex
changeset 488 780100cd4060
parent 478 dfbd535cd1fd
child 517 d8c376662bb4
equal deleted inserted replaced
487:1c4250bc6258 488:780100cd4060
    86 % this is to draw a gray box around code
    86 % this is to draw a gray box around code
    87 %(FIXME redefine pagebreak so that it includes a \smallskip)
    87 %(FIXME redefine pagebreak so that it includes a \smallskip)
    88 \newenvironment{graybox}
    88 \newenvironment{graybox}
    89 {\def\FrameCommand{\fboxsep=1pt\colorbox{gray!20}}\MakeFramed{\smallskip\FrameRestore}}
    89 {\def\FrameCommand{\fboxsep=1pt\colorbox{gray!20}}\MakeFramed{\smallskip\FrameRestore}}
    90 {\smallskip\endMakeFramed}
    90 {\smallskip\endMakeFramed}
       
    91 \newenvironment{grayboxwithoutsep}
       
    92 {\def\FrameCommand{\fboxsep=1pt\colorbox{gray!20}}\MakeFramed{\FrameRestore}}
       
    93 {\endMakeFramed}
    91 
    94 
    92 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    95 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    93 % this hack is for getting rid of the ML {* ... *} 
    96 % this hack is for getting rid of the ML {* ... *} 
    94 % scaffolding around function definitions
    97 % scaffolding around function definitions
    95 \newenvironment{vanishML}{%
    98 \newenvironment{vanishML}{%
    98 \renewcommand{\isacharverbatimclose}{}}{}
   101 \renewcommand{\isacharverbatimclose}{}}{}
    99 
   102 
   100 \isakeeptag{TutorialML}
   103 \isakeeptag{TutorialML}
   101 \renewcommand{\isatagTutorialML}{\begin{vanishML}\begin{graybox}}
   104 \renewcommand{\isatagTutorialML}{\begin{vanishML}\begin{graybox}}
   102 \renewcommand{\endisatagTutorialML}{\end{graybox}\end{vanishML}}
   105 \renewcommand{\endisatagTutorialML}{\end{graybox}\end{vanishML}}
       
   106 
       
   107 \isakeeptag{TutorialMLprf}
       
   108 \renewcommand{\isatagTutorialMLprf}{\begin{grayboxwithoutsep}}
       
   109 \renewcommand{\endisatagTutorialMLprf}{\end{grayboxwithoutsep}}
   103 
   110 
   104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   105 % for code that has line numbers
   112 % for code that has line numbers
   106 \newenvironment{linenos}{\resetlinenumber\internallinenumbers}{\par\nolinenumbers}
   113 \newenvironment{linenos}{\resetlinenumber\internallinenumbers}{\par\nolinenumbers}
   107 
   114