-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcila.sty
586 lines (531 loc) · 17.1 KB
/
cila.sty
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
%%% Copyright Miguel Ángel Vilela
%%% Facultad de Matemáticas
%%% Universidad de La Laguna
%%% C/ Astrofísico Francisco Sánchez
%%% E-mail miguev@fmat.ull.es
%%%
%%% With code from: fncychap.sty, written by Ulf A. Lindgren <lindgren@ae.chalmers.se>
%%% ull.sty, written by Manolo G. Román <mroman@ull.es>
%%%
%%%
%%% Note Premission is granted to modify this file under
%%% the condition that it is saved using another
%%% file and package name.
%%%
%%% Revision 0.1
%%%
%%% Feb. 22th Started package.
%%%
%%% Last modified February 22th 2002
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{cila}
[2002/02/22 v0.1
LaTeX package (Estilo para los apuntes del CILA)]
%%%
%%% Definiciones de los márgenes y otras longitudes
%%%
% Márgenes para la publicación de Octubre de 2003
\setlength{\paperwidth}{200mm}
\setlength{\paperheight}{250mm}
\setlength{\textwidth}{150mm}
\setlength{\textheight}{200mm}
\setlength{\hoffset}{0mm}
\setlength{\voffset}{0mm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
% Márgenes para aprovechar un A4 completo
% \setlength{\paperwidth}{210mm}
% \setlength{\paperheight}{290mm}
% \setlength{\textwidth}{190mm}
% \setlength{\textheight}{245mm}
% \setlength{\hoffset}{-15mm}
% \setlength{\voffset}{-20mm}
% \setlength{\oddsidemargin}{0mm}
% \setlength{\evensidemargin}{0mm}
% Márgenes para 18x24
% \setlength{\paperwidth}{18cm}
% \setlength{\paperheight}{24cm}
% \setlength{\textwidth}{13cm}
% \setlength{\textheight}{19cm}
% \setlength{\hoffset}{0cm}
% \setlength{\voffset}{-2mm}
% \setlength{\oddsidemargin}{17mm}
% \setlength{\evensidemargin}{12mm}
%\setlength{\parindent}{0cm}
\setlength{\parskip}{1.1ex plus 0.5ex minus 0.5ex}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1}
%%%
%%% Comando para crear el nombre de LyX tal como lo hace el propio LyX
%%% esta línea (con \providedcommand) es incluida por LyX al exportar a LaTeX
%%%
\newcommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
\newcommand{\lyxarrow}{\leavevmode\,$\triangleright$\,\allowbreak}
\newenvironment{lyxlist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}[1]{##1\hfil}}}
{\end{list}}
\newenvironment{lyxcode}
{\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}}
%% Bold symbol macro for standard LaTeX users
\renewcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}
\newcommand{\noun}[1]{\textsc{#1}}
\providecommand{\tabularnewline}{\\}
%%%
%%% Comandos para siglas
%%%
\newcommand{\FMAT}{{\sc Facultad de Matemáticas}}
\newcommand{\ULL}{{\sc Universidad de La Laguna}}
\newcommand{\SPULL}{{\sc Servicio de Publicaciones Universidad de La Laguna}}
\newcommand{\GULiC}{{\sc Grupo de Usuarios de Linux de Canarias}}
\newcommand{\CILA}{Curso de Introdución a Linux para Alumnos}
\newcommand{\PILA}{Party de Instalación de Linux para Alumnos}
\newcommand{\TIL}{Taller de Iniciación a Linux}
%\newcommand{\titulo}{Introducción a Linux y al Software Libre}
\newcommand{\titulo}{\CILA}
%%%
%%% Anula la conversión a mayúsculas
%%%
\renewcommand{\MakeUppercase}{}
%%%
%%% Estilo de pies de páginas, con fancyhdr
%%% requiere \usepackage{fancyhdr}
%%%
\pagestyle{fancy}
\fancyhead[RE]{\sf \leftmark}
\fancyhead[LO]{\sf \rightmark}
\fancyhead[LE,RO]{\sf \thepage}
\fancyfoot[LO,LE,RE,RO]{}
%\fancyfoot[CE]{\rule{\headwidth}{0.5pt}\hskip \headwidth \sf\sc\CILA}
\fancyfoot[CE]{\rule{\headwidth}{0.5pt}\hskip \headwidth \sf\sc\titulo}
\fancyfoot[CO]{\rule{\headwidth}{0.5pt}\hskip \headwidth \sf\copyright~\GULiC}
%%%
%%% Implementación en TeX del "Índice de ejemplos" Crea el entorno
%%% "ejemplo" y el contador "nejemplo" Su uso es:
%%%
%%% En el lugar donde se desee poner el "Índice de ejemplos" utilizar
%%% el comando \listadeejemplos
%%%
%%% Para poner un ejemplo en el documento: (Los dos argumentos son
%%% obligatorios)
%%%
%%% \begin{ejemplo}{Nombre del fichero de ejemplo}{Descripción corta del ejemplo}
%%% Descripción y comentarios del ejemplo.
%%% \end{ejemplo}
%%%
%%% El nombre del fichero titulará el ejemplo en la parte superior,
%%% con una etiqueta de "Fichero <nombrefichero>"
%%%
%%% La descripcion corta será la referencia que aparecerá en el Índice
%%% de ejemplos.
%%%
%%% La descripción (mas larga) del ejemplo aparecera recuadrada debajo
%%% del mismo.
%%%
%%% Ejemplo de uso:
%%%
%%% \begin{ejemplo}{hola.c}{HolaMundo en ANSI C}
%%% Este codigo en ANSI C muestra un programa basico de HolaMundo,
%%% que se limita a imprimir la cadena "Hola Mundo" en la salida estandar.
%%% \end{ejemplo}
%%%
\usepackage{moreverb}
\newcommand{\listadeejemplos}{%
\cleardoublepage\chapter*{Índice de ejemplos}% Creamos el índice de ejemplos
\label{IndiceDeEjemplos}\@starttoc{lde}}% y lo etiquetamos
\newcounter{nejemplo}[chapter]% Contador subordinado al chapter
\newcommand{\ejemploname}{Ejemplo }% Nombre de la etiqueta
\newcommand{\ejemplopath}{ejemplos/}% Directorio de ejemplos
\newenvironment{ejemplo}[2]{% Entorno "ejemplo", 2 argumentos
\newcommand{\source}{#1} % Descripción corta del ejemplo
\newcommand{\descripcion}{{\tt[#1]} #2} % Descripción larga del ejemplo
\vspace*{2mm}% Pequeño margen superior
\noindent\fbox{\sf Fichero \tt \source}% Nombre del fichero del ejemplo
\newline\rule[5mm]{\textwidth}{1pt} % Regla separadora al principio
\stepcounter{nejemplo}% Se incremente el contador y
\addcontentsline{lde}{section}{% se añade una línea al índice
\protect\numberline{\thechapter.\thenejemplo}\descripcion}% de ejemplos
\vspace{-14mm}% Se ajustan espacios
\verbatimtabinput[8]{\ejemplopath\source}% Se incluye el fichero fuente
\vspace{-5mm}% Se ajustan espacios
\rule[1mm]{\textwidth}{1pt}\newline % Se inserta un \n y otra regla
\begin{tabular}{|p{0.97\textwidth}|}% Se abre una tabla para la
\hline%\rowcolor[gray]{0.9}% descripción del ejemplo, con
\sf\ejemploname\thechapter.\thenejemplo:}{\\ % color gris claro de fondo
\hline\end{tabular}\vspace{4mm}}% Se deja un espacio vertical
%%%
%%% Comando para incluir una página (par) vacía tras cada tema incluido.
%%% Así se evita que salgan páginas pares vacías con las cabeceras al
%%% final de los temas.
%%%
\newcommand{\incluye}[1]{\include{#1}\newpage\thispagestyle{empty}}
%%%
%%% Entorno para incluir gráficos (png -> eps)
%%%
\newenvironment{figura}[2]{% Entorno "figura", 2 argumentos
\newcommand{\source}{#1} % Fichero del gráfico (sin .eps)
\newcommand{\factor}{#2} % Ancho relativo \in (0,1]
\begin{figure}[hbtp]
\centering\includegraphics[width=\factor\textwidth]{imagenes/\source.eps}
}{
\label{\source}
\end{figure}}
%%%
%%% Definicion de \part, modificación de la definición de \part de ull.sty
%%%
%\def\thepart{\Roman{part}}
%\def\part#1{\cleardoublepage
%\thispagestyle{empty}
%\framebox[\textwidth][c]{{\centering \Large \partname \thepart} \\ {\Huge #1}}
%}
%\def\thepart{\Roman{part}}
%\def\part#1{\cleardoublepage
%\thispagestyle{empty}
%\begin{center}
%\rule{0.3\textwidth}{2pt}
%%\hskip 10pt
%\raisebox{-0.5mm}{\parbox{0.3\textwidth}{\centering \Large \partname \thepart}}
%%\hskip 10pt
%\rule{0.3\textwidth}{2pt}
%{\vrule width 2pt}\parbox{0.9\textwidth}{%
%\vskip 20pt
%\centering \Huge #1}{\vrule width 2pt
%\vskip 20pt}
%\end{center}
%\stepcounter{part}
%\pagebreak
%\thispagestyle{empty}
%}
%%%
%%% Definición de \chapter, modificación de una opción del paquete fncychap.sty
%%%
%%%% DEFINITION OF Chapapp variables
\newcommand{\CNV}{\huge\bfseries}
\newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}}
%%%% DEFINITION OF TheChapter variables
\newcommand{\CNoV}{\huge\bfseries}
\newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}}
\newif\ifUCN
\UCNfalse
\newif\ifLCN
\LCNfalse
\def\ChNameLowerCase{\LCNtrue\UCNfalse}
\def\ChNameUpperCase{\UCNtrue\LCNfalse}
\def\ChNameAsIs{\UCNfalse\LCNfalse}
\newcommand{\FmN}[1]{%
\ifUCN
{\MakeUppercase#1}\LCNfalse
\else
\ifLCN
{\MakeLowercase#1}\UCNfalse
\else #1
\fi
\fi}
%%%% DEFINITION OF Title variables
\newcommand{\CTV}{\Huge\bfseries}
\newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}}
%%%% DEFINITION OF the basic rule width
\newlength{\RW}
\setlength{\RW}{1pt}
\newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}}
\newif\ifUCT
\UCTfalse
\newif\ifLCT
\LCTfalse
\def\ChTitleLowerCase{\LCTtrue\UCTfalse}
\def\ChTitleUpperCase{\UCTtrue\LCTfalse}
\def\ChTitleAsIs{\UCTfalse\LCTfalse}
\newcommand{\FmTi}[1]{%
\ifUCT
{\MakeUppercase#1}\LCTfalse
\else
\ifLCT
{\MakeLowercase#1}\UCTfalse
\else #1
\fi
\fi}
\newlength{\mylen}
\newlength{\myhi}
\newlength{\px}
\newlength{\py}
\newlength{\pyy}
\newlength{\pxx}
\def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@}
\newcommand{\DOCH}{%
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip 20\p@
}
\newcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\newcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\ChNameUpperCase
\ChNameVar{\centering\large\rm}
\ChNumVar{\Large}
\ChTitleVar{\centering\Huge\rm}
\ChRuleWidth{2pt}
\renewcommand{\DOCH}{%
\settoheight{\py}{\CNoV\thechapter}
\addtolength{\py}{-1pt}
%\CNV\FmN{\@chapapp}\par\nobreak
\vskip 20\p@
\setlength{\myhi}{2.5\baselineskip}
\setlength{\px}{\myhi}
\addtolength{\px}{-1\RW}
\rule[-1.003\px]{\RW}{\myhi}\mghrulefill{\RW}
\hskip 10pt
\raisebox{-0.5\py}{\CNV\FmN{\@chapapp} \CNoV\thechapter}
\hskip 10pt
\mghrulefill{\RW}\rule[-1.003\px]{\RW}{\myhi}
\par\nobreak
\vskip -15\p@
}
\renewcommand{\DOTI}[1]{%
\setlength{\mylen}{\textwidth}
\addtolength{\mylen}{-2\RW}
{\vrule width\RW}\parbox{\mylen}{\CTV\FmTi{#1}}{\vrule width\RW}
\par\nobreak
\vskip -10pt
\rule{\RW}{2\baselineskip}\mghrulefill{\RW}\rule{\RW}{2\baselineskip}
\vskip 40\p@
}
\renewcommand{\DOTIS}[1]{%
\setlength{\py}{\fboxrule}
\setlength{\fboxrule}{\RW}
\setlength{\mylen}{\textwidth}
\addtolength{\mylen}{-2\RW}
\fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}
\par\nobreak\vskip \baselineskip}}
\setlength{\fboxrule}{\py}
\vskip 40\p@
}
\ProcessOptions* \relax
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\DOCH
\fi
\interlinepenalty\@M
\DOTI{#1}
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\DOTIS{#1}
\vskip 40\p@
}}
%\endinput
%%%
%%% Extraido de cila-latex.sty (de Tomás Bautista)
%%%
\newcommand{\manual}{Manual de \emph{\LaTeX{}}~\cite{manual}}
\newcommand{\companion}{\emph{The \LaTeX{} Companion}~\cite{companion}}
\newcommand{\guialatex}{\emph{Gu\'{\i}a Local}~\cite{local}}
\newcommand{\contrib}[3]{#1\quad$<$\texttt{#2}$>$%
{\small\\\quad\textit{#3}}\\[1ex]}
%
% Algunas instrucciones para ayudar a la creación del índice de
% materias.
%
%\newcommand{\bs}{\symbol{'134}}%Print backslash
\ifx\bs\undefined
\newcommand{\bs}{\symbol{92}}%Print backslash
\else
\renewcommand{\bs}{\symbol{92}}%Print backslash
\fi
%\newcommand{\bs}{\ensuremath{\mathtt{\backslash}}}%Imprime barra invertida
% Entrada en el índice para una orden
\newcommand{\cih}[1]{%
\index{\LaTeX!instrucciones!#1@\texttt{\bs#1}}%
\index{\LaTeX!#1@\texttt{\hspace*{-1.2ex}\bs #1}}}
\newcommand{\ci}[1]{\cih{#1}\texttt{\bs#1}}
%Package
\newcommand{\pai}[1]{%
\index{\LaTeX!paquetes!#1@\textsf{#1}}%
\index{\LaTeX!#1@\textsf{#1}}%
\textsf{#1}}
% Entrada en el índice de entorno
\newcommand{\ei}[1]{%
\index{\LaTeX!entornos!\texttt{#1}}%
\index{\LaTeX!#1@\texttt{#1}}%
\texttt{#1}}
% Entrada en el índice para mensajes
\newcommand{\wni}[1]{%
\index{\LaTeX!mensaje!\texttt{#1}}%
\texttt{#1}}
% Entrada en el índice de una palabra
\newcommand{\wi}[1]{#1\index{\LaTeX!#1}}
%
% Instrucciones de composición
%
\newenvironment{command}%
{\nopagebreak\par\small\addvspace{3.2ex plus 0.8ex minus 0.2ex}%
\vskip -\parskip
\noindent%
\begin{tabular}{|l|}\hline\rule{0pt}{1em}\ignorespaces}%
{\\\hline\end{tabular}\par\nopagebreak\addvspace{3.2ex plus 0.8ex
minus 0.2ex}%
\vskip -\parskip}
%
% Composición de fragmentos de código
%
\newenvironment{code}{\begin{quote}}{\end{quote}}
%
% Entorno Intro
\newenvironment{intro}{\sffamily}{\vspace*{2ex minus 1.5ex}}
%
%
% Entrada de símbolo para la tabla de símbolos matemáticos
%
\newcommand{\X}[1]{$#1$&\texttt{\string#1}\hspace*{1ex}}
% Text normal....
\newcommand{\SC}[1]{#1&\texttt{\string#1}\hspace*{1ex}}
% para los acentos en modo texto
\newcommand{\A}[1]{#1&\texttt{\string#1}\hspace*{1ex}}
\newcommand{\B}[2]{#1#2&\texttt{\string#1{} #2}\hspace*{1ex}}
\newcommand{\W}[2]{$#1{#2}$&
\texttt{\string#1}\texttt{\string{\string#2\string}}\hspace*{1ex}}
\newcommand{\Y}[1]{$\big#1$ &\texttt{\string#1}} %
% Tabla de símbolos matemáticos
\newsavebox{\symbbox}
\newenvironment{symbols}[1]%
{\par\vspace*{2ex}
\renewcommand{\arraystretch}{1.1}
\begin{lrbox}{\symbbox}
\hspace*{4ex}\begin{tabular}{@{}#1@{}}}%
{\end{tabular}\end{lrbox}\makebox[\textwidth]{\usebox{\symbbox}}\par\medskip}
%
% Imprimir |--| para mostrar distancia
%
\newcommand{\demowidth}[1]{\rule{0.3pt}{1.3ex}%
\rule{#1}{0.3pt}\rule{0.3pt}{1.3ex}}
%
%
% --- ejemplo ----
% Este es un entorno para mostrar ejemplso en LaTeX.
% En la parte izquierda se muestra el texto fuente
% y en la derecha la composición.
%
% \begin{example}
% \Large Esto es grande
% \end{example}
%
% Esta parte procede de verbaim.sty de FMi
%
\newwrite\example@out
\newenvironment{example}%
{\begingroup% Lets Keep the Changes Local
\@bsphack
\immediate\openout \example@out \jobname.exa
\let\do\@makeother\dospecials\catcode`\^^M\active
\def\verbatim@processline{%
\immediate\write\example@out{\the\verbatim@line}}%
\verbatim@start}%
{\immediate\closeout\example@out\@esphack\endgroup%
%
% Y aquí lo que se ha añadido
%
\par\small\addvspace{3ex plus 1ex}\vskip -\parskip
\noindent
\makebox[0.45\linewidth][l]{%
\begin{minipage}[t]{0.45\linewidth}
\vspace*{-2ex}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.4ex minus 0.2ex}
\begin{trivlist}
\item\input{\jobname.exa}
\end{trivlist}
\end{minipage}}%
\hfill%
\makebox[0.5\linewidth][l]{%
\begin{minipage}[t]{0.50\linewidth}
\vspace*{-1ex}
\verbatiminput{\jobname.exa}
\end{minipage}}
\par\addvspace{3ex plus 1ex}\vskip -\parskip
}
\newenvironment{lined}[1]%
{\begin{center}\begin{minipage}{#1}\hrule\medskip}
{\vspace{-1ex}\hrule \end{minipage}\end{center}}
%%%
%%% Añadidos para poder compilar el tema de LaTeX
%%%
\newcommand{\guia}{Guía local}
% No se tienen versiones PS de los tipos rsfs.
% Por ello, esto no no se puede hacer para pdf
\ifx\pdfoutput\undefined % No estamos corriendo pdftex
\IfFileExists{mathrsfs.sty}
{\RequirePackage{mathrsfs}\let\MathRSFS\mathscr\let\mathscr\relax}{}
\fi
\IfFileExists{amssymb.sty}
{\let\noAMS\relax \RequirePackage{amssymb}}
{\def\noAMS{\endinput}\RequirePackage{latexsym}}
\IfFileExists{euscript.sty}
{\RequirePackage{euscript}}{}
%\IfFileExists{eufrak.sty}
% {\RequirePackage{eufrak}}{}
%%
%% Añadido para el tema de OpenOffice, basado en el curso
%% de StarOffice escrito por Carlos Pérez Pérez para LuCAS
%%
% Comando para incluir figuras con su comentario
% Primer argumento: Comentario
% Segundo argumento: Nombre del archivo eps (sin la extensión), debe estar
% en el directorio ./imagenes/eps/
%
% Sintaxis: \figura{arg1}{arg2}
%
% Para hacer referencia a una imágen se utiliza el comando:
% \ref{fig:<arg2>}
% donde <arg2> es el segundo argumento que se le pasó a la imagen (es decir,
% el nombre de la imágen sin su extensión)
%
%\newcommand{\figura}[2]{
% \begin{figure}
% \begin{center}
% \includegraphics[scale=0.5]{imagenes/#2.eps}
% \caption{#1}\label{fig:#2}
% \end{center}
% \end{figure}
%}
%% Comandos generales de formateo de diferentes expresiones
% Comando para referirse a nombres de usuario
\newcommand{\usuario}[1]{{\tt #1}}
% Comando para referirse a comandos (viva la recursión!)
\newcommand{\comando}[1]{{\tt #1}}
% Comando para referirse a sitios web
\newcommand{\sitio}[1]{{\tt #1}}
% Comando para referirse a botones
\newcommand{\boton}[1]{\fbox{\tt #1}}
% Comando para referirse a menúes y sus opciones (gracias Sara!)
\newcommand{\menu}[1]{{[}{\tt #1}{]}}
% Comando para referirse a...árboles? (por favor chequear con Nicolás)
\newcommand{\rama}[1]{\emph{#1}}
% Entorno para hacer notas MUY visibles en el libro
\newenvironment{nota}%
{\noindent\rule{\linewidth}{.75pt} {\bf NOTA:}}%
{\\\rule{\linewidth}{.75pt} \vspace{1pt}}%