| 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 | %%%% Html only |
| 57 | \excludecomment{rawhtml} |
| 58 | \newcommand{\rawhtmlinput}[1]{} |
| 59 | \excludecomment{htmlonly} |
| 60 | %%%% Latex only |
| 61 | \newenvironment{latexonly}{}{} |
| 62 | \newenvironment{verblatex}{}{} |
| 63 | %%%% Image file stuff |
| 64 | \def\toimage{\endgroup} |
| 65 | \def\endtoimage{\begingroup\def\@currenvir{toimage}} |
| 66 | \def\verbimage{\endgroup} |
| 67 | \def\endverbimage{\begingroup\def\@currenvir{verbimage}} |
| 68 | \newcommand{\imageflush}[1][]{} |
| 69 | %%% Bgcolor definition |
| 70 | \newsavebox{\@bgcolorbin} |
| 71 | \newenvironment{bgcolor}[2][] |
| 72 | {\newcommand{\@mycolor}{#2}\begin{lrbox}{\@bgcolorbin}\vbox\bgroup} |
| 73 | {\egroup\end{lrbox}% |
| 74 | \begin{flushleft}% |
| 75 | \colorbox{\@mycolor}{\usebox{\@bgcolorbin}}% |
| 76 | \end{flushleft}} |
| 77 | %%% Postlude |
| 78 | \makeatother |