hevea.sty 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. % hevea : hevea.sty
  2. % This is a very basic style file for latex document to be processed
  3. % with hevea. It contains definitions of LaTeX environment which are
  4. % processed in a special way by the translator.
  5. % Mostly :
  6. % - latexonly, not processed by hevea, processed by latex.
  7. % - htmlonly , the reverse.
  8. % - rawhtml, to include raw HTML in hevea output.
  9. % - toimage, to send text to the image file.
  10. % The package also provides hevea logos, html related commands (ahref
  11. % etc.), void cutting and image commands.
  12. \NeedsTeXFormat{LaTeX2e}
  13. \ProvidesPackage{hevea}[2002/01/11]
  14. \RequirePackage{comment}
  15. \newif\ifhevea\heveafalse
  16. \@ifundefined{ifimagen}{\newif\ifimagen\imagenfalse}
  17. \makeatletter%
  18. \newcommand{\heveasmup}[2]{%
  19. \raise #1\hbox{$\m@th$%
  20. \csname S@\f@size\endcsname
  21. \fontsize\sf@size 0%
  22. \math@fontsfalse\selectfont
  23. #2%
  24. }}%
  25. \DeclareRobustCommand{\hevea}{H\kern-.15em\heveasmup{.2ex}{E}\kern-.15emV\kern-.15em\heveasmup{.2ex}{E}\kern-.15emA}%
  26. \DeclareRobustCommand{\hacha}{H\kern-.15em\heveasmup{.2ex}{A}\kern-.15emC\kern-.1em\heveasmup{.2ex}{H}\kern-.15emA}%
  27. \DeclareRobustCommand{\html}{\protect\heveasmup{0.ex}{HTML}}
  28. %%%%%%%%% Hyperlinks hevea style
  29. \newcommand{\ahref}[2]{{#2}}
  30. \newcommand{\ahrefloc}[2]{{#2}}
  31. \newcommand{\aname}[2]{{#2}}
  32. \newcommand{\ahrefurl}[1]{\texttt{#1}}
  33. \newcommand{\footahref}[2]{#2\footnote{\texttt{#1}}}
  34. \newcommand{\mailto}[1]{\texttt{#1}}
  35. \newcommand{\imgsrc}[2][]{}
  36. \newcommand{\home}[1]{\protect\raisebox{-.75ex}{\char126}#1}
  37. \AtBeginDocument
  38. {\@ifundefined{url}
  39. {%url package is not loaded
  40. \let\url\ahref\let\oneurl\ahrefurl\let\footurl\footahref}
  41. {}}
  42. %% Void cutting instructions
  43. \newcounter{cuttingdepth}
  44. \newcommand{\tocnumber}{}
  45. \newcommand{\notocnumber}{}
  46. \newcommand{\cuttingunit}{}
  47. \newcommand{\cutdef}[2][]{}
  48. \newcommand{\cuthere}[2]{}
  49. \newcommand{\cutend}{}
  50. \newcommand{\htmlhead}[1]{}
  51. \newcommand{\htmlfoot}[1]{}
  52. \newcommand{\htmlprefix}[1]{}
  53. \newenvironment{cutflow}[1]{}{}
  54. \newcommand{\cutname}[1]{}
  55. \newcommand{\toplinks}[3]{}
  56. \newcommand{\setlinkstext}[3]{}
  57. \newcommand{\flushdef}[1]{}
  58. \newcommand{\footnoteflush}[1]{}
  59. %%%% Html only
  60. \excludecomment{rawhtml}
  61. \newcommand{\rawhtmlinput}[1]{}
  62. \excludecomment{htmlonly}
  63. %%%% Latex only
  64. \newenvironment{latexonly}{}{}
  65. \newenvironment{verblatex}{}{}
  66. %%%% Image file stuff
  67. \def\toimage{\endgroup}
  68. \def\endtoimage{\begingroup\def\@currenvir{toimage}}
  69. \def\verbimage{\endgroup}
  70. \def\endverbimage{\begingroup\def\@currenvir{verbimage}}
  71. \newcommand{\imageflush}[1][]{}
  72. %%% Bgcolor definition
  73. \newsavebox{\@bgcolorbin}
  74. \newenvironment{bgcolor}[2][]
  75. {\newcommand{\@mycolor}{#2}\begin{lrbox}{\@bgcolorbin}\vbox\bgroup}
  76. {\egroup\end{lrbox}%
  77. \begin{flushleft}%
  78. \colorbox{\@mycolor}{\usebox{\@bgcolorbin}}%
  79. \end{flushleft}}
  80. %%% Style sheets macros, defined as no-ops
  81. \newcommand{\newstyle}[2]{}
  82. \newcommand{\addstyle}[1]{}
  83. \newcommand{\setenvclass}[2]{}
  84. \newcommand{\getenvclass}[1]{}
  85. \newcommand{\loadcssfile}[1]{}
  86. \newenvironment{divstyle}[1]{}{}
  87. \newenvironment{cellstyle}[2]{}{}
  88. \newif\ifexternalcss
  89. %%% Postlude
  90. \makeatother