-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.tex
More file actions
187 lines (165 loc) · 3.51 KB
/
sample.tex
File metadata and controls
187 lines (165 loc) · 3.51 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
%%
%% This is file `sample.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% alttex.dtx (with options: `sample')
%% EXPERIMENTAL CODE
%%
%% Do not distribute this file without also distributing the
%% source files specified above.
%%
%% Do not distribute a modified version of this file under the same name.
%%
%% File: alttex.dtx by Arno Trautmann, mail: arno dot trautmann at gmx dot de
\documentclass{article}
\usepackage[english]{babel}
\usepackage{geometry}
\usepackage{
alttex,
blindtext,
dtklogos,
fancyhdr,
multicol,
lmodern,
shortvrb,
xltxtra
}
\MakeShortVerb|
\newenvironment{sample}[1]{
\subsection*{#1}
\hrule
\label{#1}
\begin{minipage}{\textwidth}
\begin{multicols}{3}}
{\end{multicols}
\end{minipage}\vspace{2cm}}
\fancyhead{\normalfont\qquad alttex\hfill normal \hfill result\qquad}
\pagestyle{fancy}
\setmonofont[Scale=0.8]{DejaVu Sans} % the standard fonts don’t have the nice symbols!
\title{A short sample document for the |alttex| package}
\author{Arno L. Trautmann\thanks{arno.trautmann@gmx.de}}
\date{\today}
\begin{document}
\maketitle
This document shows applications of the possibilities the |alttex| packages offers for writing code in \XeLaTeX.
There are three columns: The left one shows the input code using |alttex|, the middle one shows the corresponding ”normal“ input, and on the right-hand side there is the output of that code. The output is written in the code on the left-hand side, so I am not cheating here…\vspace{2cm}
\sample{noescape}
\noescape
\begin{verbatim}
This is a short text including
some characters like an @,
a §, 100% unescaped, even {}
and ~ or a &
without a backslash.
\end{verbaatim}
\vfill
\oldescape
\begin{verbatim}
This is a short text including
some characters like an @,
a §, 100\% unescaped, even \{\}
and \textasciitilde\ or a
\& without a backslash.
\end{verbatim}
\vfill
\noescape
This is a short text including
some characters like an @,
a §, 100% unescaped, even {}
and ~ or a &
without a backslash.
\oldescape
\endsample
\makealtmath
\sample{general math}
|\[∫_-∞ ^∞ ∀\]|
\ \vfill
|\[\int_{-\infty}^{\infty}\]|
\ \vfill
\[∫_-∞ \ \]% ^∞ ∀\]
\endsample
\sample{itemize}
\begin{verbatim}
A short sample text
• first item
• second item
‣ deeper item
‣ second deeper item
\end{itemize}
\end{itemize}
\end{verbatim}
\ \vfill
\begin{verbatim}
A short sample text
\begin{itemize}
\item first item
\item second item
\begin{itemize}
\item deeper item
\item second deeper item
\end{itemize}
\end{itemize}
\end{verbatim}
\ \vfill
A short sample text
\def\‣{\end{itemize}}
• first item
• second item
‣ deeper item
‣ second deeper item
\‣
\endsample
\sample{enumerate}
\begin{verbatim}
A short sample text
¹ first item
¹ second item
² deeper item
² second deeper item
\end{enumerate}
\end{enumerate}
\end{verbatim}
\vfill
\begin{verbatim}
A short sample text
\begin{enumerate}
\item first item
\item second item
\begin{enumerate}
\item deeper item
\item second deeper item
\end{enumerate}
\end{enumerate}
\end{verbatim}
\vfill
A short sample text
¹ first item
¹ second item
² deeper item
² second deeper item
\end{enumerate}
\end{enumerate}
\endsample
\sample{huge display math}
\begin{verbatim}
\begin{hugedisplaymath}
E = mc^2
\end{hugedisplaymath}
\[E = mc^2\]
\end{verbatim}
\vfill
\begin{verbatim}
\Huge
\[ E = mc^2\]
\normalsize
\[E = mc^2\]
\end{verbatim}
\vfill
\begin{hugedisplaymath}
E = mc^2
\end{hugedisplaymath}
\[E = mc^2\]
\endsample
\end{document}