lhs2TeX.sty 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. \makeatletter
  2. %if latex209
  3. \input{amstext.sty}
  4. \input{amssymb.sty}
  5. \input{stmaryrd.sty}
  6. \newcommand\ensuremath[1]{\ifmmode#1\else\mbox{$#1$}\fi}
  7. %if euler
  8. \input{euler.sty}
  9. %endif
  10. %else
  11. \usepackage{amstext}
  12. \usepackage{amssymb}
  13. \usepackage{stmaryrd}
  14. %if euler
  15. \usepackage{euler}
  16. %endif
  17. %endif
  18. %if not latex209
  19. \DeclareFontFamily{OT1}{cmtex}{}
  20. \DeclareFontShape{OT1}{cmtex}{m}{n}
  21. {<5><6><7><8>cmtex8
  22. <9>cmtex9
  23. <10><10.95><12><14.4><17.28><20.74><24.88>cmtex10}{}
  24. \DeclareFontShape{OT1}{cmtex}{m}{it}
  25. {<-> ssub * cmtt/m/it}{}
  26. \newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
  27. %if underlineKeywords
  28. \usepackage{ulem}\normalem
  29. %else
  30. \DeclareFontShape{OT1}{cmtt}{bx}{n}
  31. {<5><6><7><8>cmtt8
  32. <9>cmbtt9
  33. <10><10.95><12><14.4><17.28><20.74><24.88>cmbtt10}{}
  34. \DeclareFontShape{OT1}{cmtex}{bx}{n}
  35. {<-> ssub * cmtt/bx/n}{}
  36. \newcommand{\tex}[1]{\text{\texfamily#1}} % NEU
  37. %endif
  38. %endif
  39. \newcommand{\Sp}{\hskip.33334em\relax}
  40. %if (style == math) || (style == poly)
  41. %if times
  42. \usepackage{times}\renewcommand{\ttdefault}{cmtt}
  43. \SetMathAlphabet{\mathrm}{normal}{OT1}{ptm}{m}{n}
  44. \SetMathAlphabet{\mathbf}{normal}{OT1}{ptm}{bx}{n}
  45. \SetMathAlphabet{\mathit}{normal}{OT1}{ptm}{m}{it}
  46. %endif
  47. %if style == math
  48. \newlength{\lwidth}\setlength{\lwidth}{4.5cm}
  49. \newlength{\cwidth}\setlength{\cwidth}{8mm} % 3mm
  50. %endif
  51. %if latex209
  52. \newcommand{\Conid}[1]{{\mathit #1}}
  53. \newcommand{\Varid}[1]{{\mathit #1}}
  54. \newcommand{\anonymous}{\_}
  55. %else
  56. \newcommand{\Conid}[1]{\mathit{#1}}
  57. \newcommand{\Varid}[1]{\mathit{#1}}
  58. \newcommand{\anonymous}{\kern0.06em \vbox{\hrule\@@width.5em}}
  59. %endif
  60. \newcommand{\plus}{\mathbin{+\!\!\!+}}
  61. \newcommand{\bind}{\mathbin{>\!\!\!>\mkern-6.7mu=}}
  62. \newcommand{\sequ}{\mathbin{>\!\!\!>}}
  63. %if not standardsymbols
  64. \renewcommand{\leq}{\leqslant}
  65. \renewcommand{\geq}{\geqslant}
  66. %endif
  67. %endif
  68. %if style == poly
  69. \usepackage{polytable}
  70. %mathindent has to be defined
  71. \@@ifundefined{mathindent}%
  72. {\newdimen\mathindent\mathindent\leftmargini}%
  73. {}%
  74. \def\resethooks{%
  75. \global\let\SaveRestoreHook\empty
  76. \global\let\ColumnHook\empty}
  77. \newcommand*{\savecolumns}[1][default]%
  78. {\g@@addto@@macro\SaveRestoreHook{\savecolumns[#1]}}
  79. \newcommand*{\restorecolumns}[1][default]%
  80. {\g@@addto@@macro\SaveRestoreHook{\restorecolumns[#1]}}
  81. \newcommand*{\aligncolumn}[2]%
  82. {\g@@addto@@macro\ColumnHook{\column{#1}{#2}}}
  83. \resethooks
  84. %if standardsymbols
  85. \newcommand{\onelinecommentchars}{\quad--- }
  86. %else
  87. \newcommand{\onelinecommentchars}{\quad-{}- }
  88. %endif
  89. \newcommand{\commentbeginchars}{\enskip\{-}
  90. \newcommand{\commentendchars}{-\}\enskip}
  91. \newcommand{\visiblecomments}{%
  92. \let\onelinecomment=\onelinecommentchars
  93. \let\commentbegin=\commentbeginchars
  94. \let\commentend=\commentendchars}
  95. \newcommand{\invisiblecomments}{%
  96. \let\onelinecomment=\empty
  97. \let\commentbegin=\empty
  98. \let\commentend=\empty}
  99. \visiblecomments
  100. \newlength{\blanklineskip}
  101. \setlength{\blanklineskip}{1mm}
  102. \newcommand{\hsindent}[1]{\quad}% default is fixed indentation
  103. %endif
  104. \newcommand{\NB}{\textbf{NB}}
  105. \newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}
  106. \makeatother