File: env.tex

package info (click to toggle)
hevea 2.36-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,780 kB
  • sloc: ml: 19,453; sh: 503; makefile: 311; ansic: 132
file content (98 lines) | stat: -rw-r--r-- 2,138 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
\documentclass{article}
\usepackage{epsf}
\usepackage[latin1]{inputenc}
\usepackage{../hevea}


\title{Test de des environnements d'\hevea}

\begin{document}

\section{Du \LaTeX, sinon rien}

\newcommand{\essai}[1]{%
\begin{answer}%
#1%
\end{answer}}

\newenvironment{answer}{\begin{latexonly}}{\end{latexonly}}
\essai{Visible en \LaTeX.}

\begin{htmlonly}
\renewenvironment{answer}{\begin{htmlonly}}{\end{htmlonly}}
\essai{\red Doit apparatre (en rouge) en \hevea.}
\essai{Visible et noir et en \hevea.}
\end{htmlonly}

\section{Image d'une citation en \LaTeX}
\newenvironment{quoteimage}
  {\begin{toimage}\begin{quote}}
  {\end{quote}\end{toimage}\imageflush}%
\newenvironment{showlatex}
  {\begin{center}\rule{\linewidth}{.1ex}\begin{quoteimage}}
  {\end{quoteimage}\end{center}}%
\begin{showlatex}
\begin{flushright}
Ceci est une citation de  deux lignes,\\
avec fer \begin{em} droite\end{em}.
\end{flushright}
\end{showlatex}

La mme dans une macro:
\newcommand{\essaibis}[1]{\begin{showlatex}#1\end{showlatex}}
\essaibis{\begin{flushleft}
Ceci est une citation de  deux lignes,\\
avec fer \begin{em} gauche\end{em}.
\end{flushleft}}

\section{Commentaires \texttt{latexonly}}
Ici on ne doit plus rien voir en \html{}

%BEGIN LATEX
En \LaTeX seulement
%END LATEX

\newenvironment{foo}{%
%HEVEA\begin{latexonly}
\begin{center}}{%
\end{center}
%HEVEA\end{latexonly}%
}
\begin{foo}
Centr en \LaTeX.
\end{foo}

\section{Les environments \texttt{verblatex} et \texttt{verbimage}}
\begin{verblatex}
En \LaTeX{} seulement
\end{verblatex}
\begin{verbimage}
Dans l'image et dans elle sans problmes. %#
\end{verbimage}
\imageflush

\section{Une image Postscript plus ou moins automatique}

Voici l'image, directe~:
\begin{center}
\epsfbox{colorcir.eps}
\end{center}

Voici l'image avec changement de taille~:
\begin{center}
%HEVEA\begin{toimage}
\def\epsfsize#1#2{.5#1}
\epsfbox{colorcir.eps}
%HEVEA\end{toimage}
%HEVEA\imageflush
\end{center}

\section{Plus sur \texttt{gpic}}
\newenvironment{centergpic}{}{\begin{center}~\box\graph~\end{center}}
\begin{centergpic}
.PS
ellipse "{\Large\bf Smile!}"
.PE
\end{centergpic}

\end{document}