You are on page 1of 60

%------------------------------------------------------------------------% ARCHIVO .

TEX DE DISEO
% PAQUETES Y ESTILO DEL LIBRO
%------------------------------------------------------------------------% Paquetes
\usepackage[english,spanish]{babel}
\usepackage[latin1]{inputenc}
% Entrada de
acentos
\usepackage[T1]{fontenc}
\usepackage[autostyle, spanish = mexican]{csquotes}% manejo de
comillas: " "
\MakeOuterQuote{"}
\usepackage{pslatex}
% Fuentes finas
postscript
%\usepackage[sc]{mathpazo}
% Fuentes mathpazo
\usepackage{helvet}
\linespread{1.05}
% Fuente Palatino
necesita espaciado
\usepackage[full]{textcomp}
% Caracteres
especiales como ' (recto)
\usepackage{xcolor}
% Color: X11names
(en el documentclass)
% COLORES personales-------------------------------------------------\definecolor{colortitulo}{RGB}{11,17,79} %
\definecolor{colordominante}{RGB}{11,17,79}
\definecolor{colordominanteF}{RGB}{219,68,14}
\definecolor{colordominanteD}{RGB}{137,46,55}
\definecolor{mostaza}{RGB}{231,196,25}
\definecolor{amarilloM}{RGB}{248,199,90}
\definecolor{amarilloD}{RGB}{251,237,121}
\definecolor{azulF}{rgb}{.0,.0,.3}
\definecolor{grisD}{rgb}{.3,.3,.3}
\definecolor{grisF}{rgb}{.6,.6,.6}
\definecolor{grisamarillo}{RGB}{248,248,245}
\definecolor{miverde}{RGB}{44,162,67}
\definecolor{verdep}{RGB}{166,206,58}
\definecolor{verdencabezado}{RGB}{166,206,58}
\definecolor{verdeF}{RGB}{5,92,8}
\colorlet{mygray}{black!20}
\newcommand{\verde}{\color{miverde}}
% Fin COLORES personales-----------------------------------------------\usepackage{psboxit}
\usepackage{pstricks}
\usepackage{xparse}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
% Libreras
tcolorbox
\usepackage{tikz,tkz-tab}% Cajas de Teoremas, ejemplos, etc.
\usetikzlibrary{positioning,shadows,backgrounds,calc}%
\usepackage{tikzpagenodes}
\usepackage{xargs}
% Comandos con
opciones
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\usepackage{multicol}
% %\usepackage{epstopdf}% Conversin - Miktes 2.9 o inferior, TexLive
2009. o inferior
\usepackage[small,bf]{caption}

\usepackage[breaklinks,colorlinks=true, pdfstartview=FitV,
linkcolor=azulF, citecolor=azulF, urlcolor=azulF]{hyperref}
\usepackage{amsmath,amssymb,amsfonts,latexsym,cancel,stmaryrd}%
\usepackage[ruled,,vlined,lined,linesnumbered,algochapter]{algorithm2e
}
\usepackage{framed}
\usepackage{titletoc}
\usepackage{calc}
\usepackage{colortbl}
\usepackage{tabularx}
\usepackage{fancyvrb}
%\usepackage{minted}
%habilitar solo en Ubuntu (Linux)
\usepackage{array}
\usepackage{wasysym}
\usepackage{supertabular}
\usepackage{booktabs}
%--------------------------------------------------------------------------------------% Fuentes
%--------------------------------------------------------------------------------------% Comandos para fuentes especiales
\newcommandx*{\fnte}[4][1=pag,2=9,3=n]{{\color{azulF}\fontfamily{#1}
\fontsize{#2}{1}\fontshape{#3}\selectfont{#4}}}
\newcommandx*{\fntb}[4][1=pag,2=9,3=n]{{\color{azulF}\fontfamily{#1}\f
ontsize{#2}{1}\fontseries{b}\fontshape{#3}\selectfont{#4}}}
\newcommandx*{\fntg}[4][1=pag,2=9,3=n]{{\color{grisF}\fontfamily{#1}\f
ontsize{#2}{1}\fontshape{#3}\selectfont{#4}}}
\newcommand{\fhv}[2]{{\fontfamily{pag}\fontsize{#1}{1}\selectfont{#2}}
}
\newcommand{\fhvb}[2]{{\fontfamily{pag}\fontseries{b}\fontsize{#1}{1}\
selectfont{#2}}}
% Fin fuentes--------------------------------------------------------%********************************** DISENO
*************************************
%--------------------------------------------------------------------------------------% Cabeceras
%--------------------------------------------------------------------------------------\usepackage{fancyhdr}
% Nmeros de pgina en rectngulos y captulo. Necesitamos posicionar
los nodos
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{10mm}% 1 generic horizontal unit is
equivalent to 10mm
\setlength{\TPVertModule}{10mm}% 1 generic vertical unit is equivalent
to 10mm
\textblockorigin{0mm}{0mm}% top left corner set as origin
%-----------------------------------------------------------------------------

% Decoracin de cabeceras
% Texto en secciones
\newcommand{\helvb}{%
\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
\newcommand{\helv}{%
\fontfamily{phv}\fontsize{9}{11}\selectfont}
\renewcommand{\sectionmark}[1]{\markright{\thesection\hspace{5pt}#1}{}
}
% Configuracin de fuentes para el nmero de pgina en el encabezado
\fancyhf{}
%OP 1: Todas las pginas con la seccin a la izquierda
%\fancyhead[LO,LE]{\rightmark} % L=Left, O=Odd y E=Even pages
%OP 2: Todas las pginas con la seccin a la izquierda en un
rectngulo (todo el header)
\fancyhead[LO,LE]{\helv\rightmark
\begin{textblock}{1}(0,0)
\begin{tikzpicture}[remember picture,overlay]
%\fill[grisamarillo] (current page.north west)
\fill[verdencabezado,opacity=0.7] (current page.north west)
rectangle
([xshift=2pt,yshift=-3pt]current page.east|-current page header
area.south east);
\end{tikzpicture}
\end{textblock}
}
% Fin decoracin cabeceras
\renewcommand{\headrulewidth}{0pt}
% Ancho de la lnea bajo el
encabezado
\addtolength{\headheight}{2.5pt}
% Aumente el espacio alrededor de
la cabecera
\renewcommand{\footrulewidth}{0pt}
% Elimina la lnea en el pie de
pgina
% Estilo para cuando se especifica "pagestyle plain"
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}
% Elimina el encabezado de las pginas impares vacas al final de los
captulos
\makeatletter
\renewcommand{\cleardoublepage}{
\clearpage\ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\fi}
\makeatother
% Nmeros de pgina en el borde
\fancyfoot[LO]{
\begin{textblock}{3}(21,1) % y=1 inch = margen
\begin{tikzpicture}[overlay]
\node[draw=colordominante,
rectangle,minimum width=2cm, minimum height=2cm,
anchor=west,
fill=colordominante,font=\fontsize{25}{1}\sffamily\bfseries,inner
sep=2pt,outer sep=2pt]
at (-1.5cm,0pt){\textcolor{gray!10}{\thepage}};
\end{tikzpicture}
\end{textblock}

}
\fancyfoot[RE]{
\begin{textblock}{3}(18,1)% y=1 inch = margen
\begin{tikzpicture}[overlay]
\node[draw=colordominante,
rectangle,minimum width=2cm, minimum height=2cm,
anchor=west,
fill=colordominante,font=\fontsize{25}{1}\sffamily\bfseries,inner
sep=2pt,outer sep=2pt]
at (-1.5cm,0pt){\textcolor{gray!10}{\thepage}};
\end{tikzpicture}
\end{textblock}
}
%-- Fin cabeceras
%--------------------------------------------------------------------------------------% Color en los mrgenes
%--------------------------------------------------------------------------------------% \pagecolor{grisamarillo}
% \usepackage{eso-pic}
% \pagecolor{grisamarillo}
% \AddToShipoutPictureBG{%
% \AtTextLowerLeft{\color{grisamarillo}%
%
\rule[-\footskip]{\textwidth}{\dimexpr\textheight+\footskip}}}
% Fin color mrgenes

%--------------------------------------------------------------------------------------% Prlogo
%--------------------------------------------------------------------------------------\NewDocumentEnvironment{prologo}{O{}}{%
\addcontentsline{toc}{schapter}{%
\hspace{6em}{\color{azulF}{\fontfamily{phv}\fontsize{9}{10}\selectfont
Prol\'ogo}} \qquad}
\chapter*{Prlogo}
\smallskip\smallskip
\begin{minipage}{0.9\textwidth}
#1}{\end{minipage}}
%--------------------------------------------------------------------------------------% Ttulo
%--------------------------------------------------------------------------------------\newcommand*{\titulo}[4]{\begingroup%
\raggedleft
\vspace*{\baselineskip} % Espacio en blanco en la parte superior de la
pgina
{\Large#1}\\[0.167\textheight] % Autor
{\LARGE\bfseries#2}\\[\baselineskip] % pre-ttulo
{\textcolor{colortitulo}{\Huge#3}}\\[\baselineskip] % Ttulo
{\Large\textit{#4}}\par% Descripcin adicional

\vfill% Espacio en blanco entre el bloque de ttulo y "la editorial"


{\raggedright
\begin{minipage}[c]{0.08\textwidth}
\raisebox{-2.0cm}{\includegraphics[width=1.4cm]{images/logo}}
\end{minipage}
\\\hfill\begin{minipage}[t]{0.9\textwidth}
{\color{gray}
\fhv{9}{Revista digital}\\
\fhvb{9}{\color{azulF}Matemtica, Educacin e Internet.}
\fntg[pag][8]{\color{grisF}
\href{http://www.tecdigital.itcr.ac.cr/revistamatematica/}{(http://www.tecdigital.itcr.ac.cr/revistamatematica/).}}}
\end{minipage}
}%raggedright
\vspace*{3\baselineskip} % Espacio en blanco antes del final de pgina
\endgroup}
% Fin Titulo-------------------------------------------------------%--------------------------------------------------------------------------------------% Copypright, ISBN, ...
%--------------------------------------------------------------------------------------\def\copyrightpage{\thispagestyle{empty}%
\vbox to\textheight\bgroup\vfill\obeylines\obeyspaces\xcopyrightpage}
\def\xcopyrightpage#1#2\end#3{\scriptsize\parindent=0pt
Copyright\copyright{#1}
\vskip40pt
#2\vskip200pt\egroup\endgroup}
\let\endcopyrightpage\relax
% Fin Copyright

%-------------------CONTENIDO ---------------------------------------------------\definecolor{mycolorA}{RGB}{0,133,202} %
\definecolor{mycolorB}{RGB}{166,206,58} %
% patching of \tableofcontents to use sans serif font for the tile
\patchcmd{\tableofcontents}{\contentsname}{\contentsname}{}{}
% patching of \@part to typeset the part number inside a framed box in
its own line
% and to add color
\makeatletter
\patchcmd{\@part}
{\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}}
{\addtocontents{toc}{\protect\addvspace{20pt}}
\addcontentsline{toc}{part}{\huge{\protect\color{colordominante}%
\setlength\fboxrule{2pt}\protect\Circle{%
\hfil\thepart\hfil%
}%
}\\[2ex]\color{colordominante}\sffamily\large#1}}{}{}
\makeatother
% this is the environment used to typeset the chapter entries in the
ToC

% it is a modification of the leftbar environment of the framed


package
\renewenvironment{leftbar}
{\def\FrameCommand{\hspace{6em}%
{\color{mycolorB}\vrule width 2pt depth 6pt}\hspace{1em}}%
\MakeFramed{\parshape 1 0cm\dimexpr\textwidth6em\relax\FrameRestore}\vskip2pt%
}
{\endMakeFramed}
% using titletoc we redefine the ToC entries for parts, chapters,
sections, and subsections
\titlecontents{part}
[0em]{\centering}
{\contentslabel}
{}{}
\titlecontents{chapter}
[0em]{\vspace*{2\baselineskip}}
{\parbox{4.5em}{%
\hfill\Huge\bfseries\color{mycolorA}\thecontentspage}%
\vspace*{2.3\baselineskip}\leftbar{\fhvb{12}{\chaptername~\thecontentslabel}}\\
}
{}{\endleftbar}
\titlecontents{section}
[8.4em]
{\sffamily\contentslabel{3em}}{}{}
{\hspace{0.5em}\nobreak\itshape\color{mycolorA}\contentspage}
\titlecontents{subsection}
[8.4em]
{\sffamily\contentslabel{3em}}{}{}
{\hspace{0.5em}\nobreak\itshape\color{mycolorA}\contentspage}
% Fin Contenido
%--------------------------------------------------------------------------------------% CAPITULO Estilo simple
%--------------------------------------------------------------------------------------\usepackage{titlesec, blindtext, color}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\huge\bfseries}{{
\fontsize{6em}{6em}\selectfont\black
\thechapter}\hsp\textcolor{verdep}{\vrule height 4em width
1pt}\hsp}{0pt}{\huge\bfseries}
%--------------------------------------------------------------------------------------%
Numeracin de las secciones -- en el margen
%--------------------------------------------------------------------------------------\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\textcolor{verdeF}{\csnamethe#1
\endcsname}\hspace{1em}}}
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{-4ex\@plus -1ex\@minus -.4ex}
{1ex\@plus.2ex }
{\normalfont\large\sffamily\bfseries}}

\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
{-3ex\@plus -0.1ex\@minus -.4ex}
{0.5ex\@plus.2ex }
{\normalfont\sffamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
{-2ex\@plus -0.1ex\@minus -.2ex}
{0.2ex\@plus.2ex }
{\normalfont\small\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
{-2ex\@plus-.2ex\@minus .2ex}
{0.1ex}
{\normalfont\small\sffamily\bfseries}}
\makeatother
% Fin numeracin secciones

%-------------------------------------------------------------------------------% Entornos: Ejemplo, teorema, proposicin, lema, lista de


ejercicios,
%
caja interludio, caja simple
%-------------------------------------------------------------------------------% Cajas con el paquete tcbcolor
% CONTADORES: ejemplo, definicion, lema, teorema, corolario,
proposicion,ejercicio
\newcounter{tcbteo}[chapter]
\renewcommand{\thetcbteo}{\thechapter.\arabic{tcbteo}}
\newcounter{tcbdefi}[chapter]
\renewcommand{\thetcbdefi}{\thechapter.\arabic{tcbdefi}}
\newcounter{tcblema}[chapter]
\renewcommand{\thetcblema}{\thechapter.\arabic{tcblema}}
\newcounter{tcbcoro}[chapter]
\renewcommand{\thetcbcoro}{\thechapter.\arabic{tcbcoro}}
\newcounter{tcbvoca}[chapter]
\renewcommand{\thetcbvoca}{\thechapter.\arabic{tcbvoca}}
% \newcounter{tcbListaEjercicios}[chapter]
%
\renewcommand{\thetcbListaEjercicios}{\thechapter.\arabic{tcbListaEjer
cicios}}
\newcounter{tcbpropo}[chapter]
\renewcommand{\thetcbpropo}{\thechapter.\arabic{tcbpropo}}
\newlength{\examlen}
\tikzset{
wnodeTeorema/.style={%
rectangle, top color=gray!5, bottom color=gray!5,
inner sep=1mm,anchor=west,font=\small\bf\sffamily},
wnodeminimo/.style={%
rectangle, top color=white, bottom color=white,
text=azulF,inner sep=1mm,anchor=west,font=\small\bf\sffamily}
}

%\begin{teorema} o \begin{teorema}[de tal] o \begin{teorema}[][ref]


% Teorema ----------------------------------------------------\newtcolorbox{wwteorema}[3][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,top=7mm,
fontupper=\normalsize,step and label={tcbteo}{#3},
overlay ={%
overlay first = {\draw[color=colordominante,line width=0.2pt]
(frame.north west)--([xshift=0pt]frame.north east);
},
%Caja de Ttulo: teo -\node[wnodeTeorema](tituloteo) at ([xshift=0pt, yshift=4mm]frame.north west)
{\textbf{\color{colordominante} Teorema\thetcbteo\;#2}};
%Borde superior -\draw[colordominante,line width=2.5cm] ([xshift=1.25cm,
yshift=0cm]frame.north west)-- +(\examlen,3pt);
},%
% Mantener borde en cambio de pgina
overlay last = {\draw[color=colordominante,line width=0.2pt]
(frame.north west)--([xshift=0pt]frame.north east);
}
#1}
%\NewDocumentEnvironment{teorema}{O{} O{}
O{}}{\smallskip\begin{wwteorema}{#1}{#2}%
#3}{\end{wwteorema}\smallskip }
% TEOREMA---------------------------------------------------------

%\begin{proposicion} o \begin{proposicion}[de tal] o


\begin{proposicion}[][ref]
% Proposicin----------------------------------------------------\newtcolorbox{wwpropo}[3][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,top=7mm,
fontupper=\normalsize,step and label={tcbpropo}{#3},
overlay ={%
overlay first ={\draw[color=colordominante,line width=0.2pt]
(frame.north west)--([xshift=0pt]frame.north east);
},
%Caja de Ttulo: propo -\node[wnodeTeorema](tituloteo) at ([xshift=0pt, yshift=4mm]frame.north west)
{\textbf{\color{colordominante} Proposicin\thetcbpropo\;#2}};
%Borde superior -\draw[colordominante,line width=2.5cm] ([xshift=1.25cm,
yshift=0cm]frame.north west)-- +(\examlen,3pt);
}, %
% Mantener borde en cambio de pgina
overlay last ={\draw[color=colordominante,line width=0.2pt]
(frame.north west)--([xshift=0pt]frame.north east);
},
#1}
%\NewDocumentEnvironment{proposicion}{O{} O{}
O{}}{\smallskip\begin{wwpropo}{#1}{#2}%
#3}{\end{wwpropo}\smallskip }
% ---------------------------------------------------------

% LEMA ----------------------------------------------------------\newtcolorbox{wwlema}[3][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,
top=1mm, left=3pt,
step and label={tcblema}{#3},
fontupper={\small\bf\sffamily
{\color{azulF}Lema\thetcblema\;#2}}~\normalfont,%"Lema..."+texto del
cuerpo
overlay ={%
overlay first = {%barra vertical
\draw[color=gray,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west);
}
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=gray,line width=3pt] ([xshift=2pt]
frame.north west)--([xshift=2pt] frame.south west);
},
#1}
%\NewDocumentEnvironment{lema}{O{} O{}
O{}}{\smallskip\begin{wwlema}{#1}{#2}%
#3}{\end{wwlema}\smallskip }
%LEMA-------------------------------------------------------------% % Corolario ------------------------------------------------------\newtcolorbox{wwcoro}[2][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,
top=1mm,left=3pt,
fontupper={\small\bf\sffamily
{\color{azulF}Corolario\thetcbcoro}\;}~\normalfont,
step and label={tcbcoro}{#2},
overlay ={%
overlay first = {%barra vertical
\draw[color=gray,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west);
}
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=gray,line width=3pt]
([xshift=2pt] frame.north west)--([xshift=2pt]
frame.south west);
}
#1}
%\NewDocumentEnvironment{corolario}{O{}
O{}}{\smallskip\begin{wwcoro}{#1}%
}{\end{wwcoro}\smallskip }
% Corolario-----------------------------------------------------% % Definicin--------------------------------------------------\newtcolorbox{wwdefinicion}[3][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,
top=6mm,fontupper=\normalsize,step and label={tcbdefi}{#3},
overlay ={%
overlay first = {
%barra vertical
\draw[color=colordominante,line width=3pt] ([xshift=2pt] frame.north
west)--([xshift=2pt] frame.south west);
}, %overlay first

%Caja de Ttulo: defi -\node[wnodeTeorema](titulodefi) at ([xshift=4.5pt, yshift=3mm]frame.north west)


{\textbf{Definicin\thetcbdefi\;#2}};
}, %overlay
% Mantener borde en cambio de pgina
overlay last
= {%barra vertical
\draw[color=colordominante,line width=3pt] ([xshift=2pt] frame.north
west)--([xshift=2pt] frame.south west);}
#1}
%\NewDocumentEnvironment{definicion}{O{} O{}
O{}}{\smallskip\begin{wwdefinicion}{#1}{#2}%
#3}{\end{wwdefinicion}\smallskip }
% %DEFINICION--------------------------------------------------------% Caja para Ejemplo -------------------------------------------------\newcounter{tcbejem}[chapter]
\renewcommand{\thetcbejem}{\thechapter.\arabic{tcbejem}}
\colorlet{colorfondoejemplo}{gray!5}
\definecolor{colorejemplo}{rgb}{.0,.0,.3}
% Ejemplo
\newtcolorbox{wwejemplo}[3][]{%
arc=0mm,
breakable,drop fuzzy shadow,
enhanced,
colback=grisamarillo,
boxrule=0pt,
top=8mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcbejem}{#3},
overlay={
overlay first = {%
%barra vertical
\draw[color=verdep,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west);
},%overlay first
% Caja de imagen Ejemplo
\node[rectangle,
text=black,
inner sep=1mm,anchor=west,font=\small\bf\sffamily] at
([xshift=-14.3pt,yshift=-4.1mm]frame.north west)%
{\includegraphics{images/nodoejemplo}\raisebox{0.5cm}{}};
% Caja numeracin y descripcin
\node[rectangle,
text=black,
inner sep=1mm,
anchor=west,
font=\normalsize] at ([xshift=1.1cm,yshift=-2.9mm]frame.north west)%
{\fhvb{10}{\;\thetcbejem\;\;\;#2}};
}, % overlay
%Borde cambio de pginas
overlay middle={\draw[color=grisamarillo,line width=3pt] ([xshift=3pt]
frame.north west)--([xshift=2pt] frame.south west);},
overlay last={\draw[color=grisamarillo,line width=3pt] ([xshift=3pt]
frame.north west)--([xshift=2pt] frame.south west);}
#1}
%-

\NewDocumentEnvironment{ejemplo}{O{} O{}
O{}}{\smallskip\begin{wwejemplo}{#1}{#2}%
#3}{\end{wwejemplo}\smallskip }
%EJEMPLO----------------------------------------------------------------

% CAJA (interludio, comentario...)-------------------------------------\definecolor{colrnodocaja}{RGB}{44,91,144}


\definecolor{colrfondocaja}{RGB}{241,241,227}
\newtcolorbox{wwcaja}[2][]{%
arc=0mm,breakable,%drop fuzzy shadow,
enhanced,colback=gray!4,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
%step and label={tcbca}{#3},
overlay ={%
%Borde
overlay first={\draw[color=gray!2,line width=0.2pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);},
% Caja de Ttulo CAJA
\node[ rectangle, %minimum width=0cm, minimum height=0.0cm,
top color=amarilloD, bottom color=amarilloD,
inner sep=0.5mm,anchor=west,font=\normalsize]at ([xshift=0.5pt, yshift=2.30mm]frame.north west){\fhvb{10}{ #2}};},
%Borde cambio de pgina
overlay last={\draw[color=gray!2,line width=0.2pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
%\NewDocumentEnvironment{caja}{O{} O{}}{\smallskip\begin{wwcaja}{#1}%
#2}{\end{wwcaja}\smallskip }
% CAJA de comentario
%CAJA simple-------------------------------------------------------------------\newtcolorbox{wwbox}[1][]{%
arc=0mm,breakable,drop fuzzy shadow,
enhanced,colback=grisamarillo,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
%step and label={tcbca}{#3},
overlay ={%
%Borde
overlay first={\draw[color=amarilloD,line width=0.5pt] (frame.north
west)
--([xshift=0pt]frame.north east)

--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
},
%Borde cambio de pgina
overlay last={\draw[color=amarilloD,line width=0.5pt] (frame.north
west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
\newenvironment{scaja}[1][]{\bigskip\begin{wwbox}%
#1}{\end{wwbox}}
% Fin CAJA simple
%CAJA vocabulario-----------------------------------------------------\newtcolorbox{vocabox}[3][]{%
arc=0mm,breakable,enhanced,colback=white,boxrule=0pt,
top=1mm, left=3pt,
step and label={tcbvoca}{#3},
fontupper={\small\bf\sffamily
{\color{azulF}Vocabulario\thetcbvoca\;#2}}~\normalfont,%"Vocabulario..
."+texto del cuerpo
overlay ={%
overlay first = {%barra vertical
\draw[color=white,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west);
}
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=white,line width=3pt] ([xshift=2pt]
frame.north west)--([xshift=2pt] frame.south west);
},
#1}
%\NewDocumentEnvironment{vocabulario}{O{} O{}
O{}}{\smallskip\begin{vocabox}{#1}{#2}%
#3}{\end{vocabox}\smallskip }
% Fin vocabulario
%CAJA nota------------------------------------------------------\newtcolorbox{notabox}[1][]{%
arc=0mm,breakable,
enhanced,colback=white,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
left=25pt,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper={\begin{tikzpicture}[overlay]
\node[draw=colordominanteF,line
width=1pt,circle,fill=white,font=\sffamily\bfseries,inner
sep=2pt,outer sep=0pt] at (15pt,3pt){\textcolor{colordominanteF}{N}};\end{tikzpicture}}~\normalfo
nt,%"NOTA..."+texto del cuerpo
overlay ={%
%Borde y crculo
overlay first={
\draw[color=white,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);

}
},
%Borde cambio de pgina
overlay last={\draw[color=white,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
%\newenvironment{nota}[1][]{\bigskip\begin{notabox}%
#1}{\end{notabox}}
% Fin nota
%------------------------------------------------------------------------------% LISTAS DE EJERCICIOS
%------------------------------------------------------------------------------\usepackage{answers}
\newtheorem{exer}{}[chapter]
\newenvironment{ejer}{\begin{exer}\normalfont}{\end{exer}}
\Newassociation{solu}{Soln}{ans}
% USO del entorno personalizado-------------------------------------------------%\begin{ejercicios} --- \end{ejercicios} para listas simples
%\begin{cejercicios} --- \end{cejercicios} para listas en cajas
\NewDocumentEnvironment{ejercicios}{O{}}{%
\bigskip\begin{minipage}{\textwidth}{\bf\verdeEjercicios}
#1}{\end{minipage}\bigskip}

\colorlet{color1}{gray!5!white}
% color fondo
\definecolor{color2}{RGB}{117,184,68} % color del nodo
% Caja -- ejercicios
\newtcolorbox{wwlistaejercicios}[1][]{%
arc=0mm,breakable,enhanced,colback=color1,boxrule=0pt,top=8mm,
enlarge top by=\baselineskip/2+1mm, enlarge top at break by=0mm,
pad at break=2mm,fontupper=\normalsize,
overlay ={ % nodo rectangular para "Ejercicios"
\node[rectangle, minimum width=4cm,
top color=color2, bottom color=color2,
inner sep=1mm,anchor=west,font=\normalsize]
at ([xshift=0pt,yshift=-3mm]frame.north west)%
{\textbf{Ejercicios}};},
overlay last ={ } % cambio de pgina, solo caja gris
#1}
% Nuevo entorno personalizado---------------------------------------\NewDocumentEnvironment{cejercicios}{O{}}{%
\bigskip\begin{wwlistaejercicios}%
#1}{\end{wwlistaejercicios}\bigskip } %
% ------------------------------------------------------------------% Ejercicio - Caja para ejercicio solitario
\newtcolorbox{wwejercicio}[1][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,

top=1mm,left=3pt,
fontupper={\bf\sffamily {\color{miverde}Ejercicio.}\;}~\normalfont,
overlay ={%
overlay first = {%barra vertical
\draw[color=gray,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west);
}
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=gray,line width=3pt]
([xshift=2pt] frame.north west)--([xshift=2pt]
frame.south west);
}
#1}
% Entorno con Caja para ejercicios---------------------------------------%\begin{cajaejercicios} o \begin{cajaejercicios}[de tal]
%
o \begin{cajaejercicios}[][ref]
% Entorno personalizado-------------------------------------------------\definecolor{colorejercicios}{RGB}{99,42,134}
\newcounter{tcbejer}[chapter]
\renewcommand{\thetcbejer}{\thechapter.\arabic{tcbejer}}
\newtcolorbox{wwejercicios}[3][]{%
arc=0mm,breakable,%drop fuzzy shadow,
enhanced,colback=gray!5,boxrule=0pt,top=7mm,
fontupper=\normalsize,step and label={tcbejer}{#3},
overlay ={%
overlay first = {
%Borde grueso superior
\draw[color=colorejercicios,line width=3pt] (frame.north west)-([xshift=0pt]frame.north east);
%Caja de Ttulo: Ejer -\node[rounded corners=3pt, draw=colorejercicios, top color=white,
bottom color=white, thick,inner sep=1mm,anchor=west,
font=\small\bf\sffamily](tituloejer) at ([xshift=5mm,
yshift=0mm]frame.north west)
{\textbf{\color{miverde} Ejercicios\thetcbejer\;#2}};
%borde lnea inferior
\draw[color=colorejercicios,line width=0.2pt] (frame.south west)-([xshift=0pt]frame.south east);
} % overlay first
},%overlay
% % Mantener borde en cambio de pgina
% overlay middle = {\draw[color=colordominante,line width=0.2pt]
(frame.north west)--([xshift=0pt]frame.north east);
%
}
overlay middle ={},
overlay last = { %borde lnea inferior
\draw[color=colorejercicios,line width=0.2pt] (frame.south west)-([xshift=0pt]frame.south east);
}
#1}
%\NewDocumentEnvironment{cajaejercicios}{O{} O{}
O{}}{\smallskip\begin{wwejercicios}{#1}{#2}%
#3}{\end{wwejercicios}\smallskip }
% ejercicios---------------------------------------------------------

% Comandos para paquete answers


% pregunta-solucin
\newcommand{\exersol}[2]{
\begin{ejer}
#1\scantokens{\begin{solu}#2\end{solu}}
\end{ejer}}
% listas \item pregunta-solucin
\newcommand{\itemps}[2]{\item#1\scantokens{\begin{solu}#2\end{solu}}}
\usepackage{enumitem}
\newcommand{\bex}{\scantokens{\begin{solu}
\end{solu}}\begin{enumerate}[label=\alph*.)]}
\newcommand{\eex}{\end{enumerate}}
%\begin{sol} \end{sol}
%\NewDocumentEnvironment{ejercicio}{O{}
O{}}{\smallskip\begin{wwejercicio}{#1}%
}{\end{wwejercicio}\smallskip }
% Ejercicio------------------------------------------------------

% -- Soluciones al final del documento---------------------------\def\soluciones{


\expandafter\ifx\csnameClosesolutionfile\endcsname\relax\else
\Closesolutionfile{ans}\fi
}
\def\solucionesCap#1{\section*{Solucionesdel
Cap\'{\i}tulo#1}\input{ans#1}}
% Fin Listas de Ejercicios------------------------------------------% Fin mis entornos-------------------------------------------------------------%-------------------------------------------------------------------------------% Cdigo de programas (LaTeX en ese caso)
%-------------------------------------------------------------------------------% Listings
\usepackage{listings}% uso: \lstinline|section|
\lstset{ %
language={[LaTeX]TeX}, % lenguaje
basicstyle=\bfseries\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color{brown},
backgroundcolor=\color{grisamarillo},
showstringspaces=false,
flexiblecolumns=true,
stringstyle=\ttfamily\color{blue},
extendedchars=true,
emph={rm,bf,it,sf,sl,sc,tt,gtrdot,lesseqqgtr,Supset,mathbb,gtrless,dot
eqdot,sqsubset,mathbb,eqslantless,risingdotseq,sqsupset,mathbb,lesssim
,fallingdotseq,succcurlyeq,therefore,lessapprox,circeq,preccurlyeq,bec
ause,approxeq,triangleq,curlyeqprec,leqq,lessdot,thicksim,curlyeqsucc,
geqq,gtreqless,thickapox,precsim,leqslant,gtreqqless,backsim,succsim,g

eqslant,lll,backsimeq,precapprox,eqslantgtr,ggg,subseteqq,succapprox,g
trsim,lessgtr,supseteqq,vartriangleright,gtrapprox,lesseqgtr,Subset,tr
ianglerighteq,maxint,for,to,do
},
emphstyle={\color{blue}\textbf}
}
\newcommand{\wlatex}{\lstinline}
%-------------------------------------------------------------------------------% Listas con Tikz
%-------------------------------------------------------------------------------% PuntosTikz y Enumerate con Tikz
\newcommand{\tpto}{\tikz \shadedraw [shading=ball] (0,0) circle
(.1cm);}
\newcommand{\ttpto}[1]{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=blue]
{\color{white}\Large\textbf#1};
\end{tikzpicture}}
\newcommand{\ttptov}{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=green]
{\color{white}\Large\textbf.};
\end{tikzpicture}}
\newcommand{\ttptor}{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=red]
{\color{white}\Large\textbf.};
\end{tikzpicture}}
\newcommand{\ptoazul}[1]{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=blue]
{\color{white}\Large\textbf#1};
\end{tikzpicture}}
\newcommand{\ptomb}{\ptoazul$\;$}
\newcommand{\itempto}{\item[\tpto]}
\newcommand{\pto}{\tpto}
\newcommand{\ptom}{\tpto$\;$}
\newcommand{\ptomv}{\ttptov$\;$}
\newcommand{\ptomr}{\ttptor$\;$}
% Listas -- con puntos
\usepackage{enumitem}
%\usepackage{enumerate}
\newcommand{\witem}[1]{\item[{\bf #1)}]}
\newcommand*{\itembolasgrises}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[fill=gray!50,shape=circle,draw,inner sep=1.2pt,line
width=0.2mm](n1){#1};}
\newcommand*{\itembolasazules}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=blue]
{\color{white}\Large\bf#1};}
\newcommand*{\itembolasverdes}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=green]
{\color{white}\Large\bf#1};}
\newcommand*{\itembolasrojas}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=red]
{\color{white}\Large\bf#1};}

%Comando para listas con bolas


\newcommand{\beaz}{\begin{enumerate}[label=\itembolasazules{\arabic*}]
}
\newcommand{\eeaz}{\end{enumerate}}
% Fin de cosasadicionales %---------------------------------------------------------------------------% TABLAS CON Tikz
%---------------------------------------------------------------------------\usepackage{array}
\usetikzlibrary{calc,fit,shadows,arrows,positioning}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
%-%----------------------------------------------------------------------------% Data Table
%----------------------------------------------------------------------------\newsavebox{\dataTableContent} % Box
\newenvironment{dataTable}[1] % \new environment
{%
\begin{lrbox}{\dataTableContent}%
\begin{tabular}{#1}}%
%
{%
\end{tabular}
\end{lrbox}
\begin{tikzpicture}
\node [inner xsep=0pt] (tbl){\usebox{\dataTableContent}};
\begin{pgfonlayer}{background}
% table
\draw[rounded corners=1pt,top color=gray!1,bottom
color=gray!30,draw=black]
(tbl.north east) rectangle (tbl.south west);
% top line
\draw[rounded corners=1pt,top color=gray!10!black,bottom
color=gray!50!black,draw=black]%
($(tbl.north west)$) rectangle ($(tbl.north east)(0,1.5\baselineskip)$);
% bottom rule
\draw[rounded corners=0.25pt,fill=gray,draw=black]%
(tbl.south west) rectangle ($(tbl.south east)+(0,0.05)$);
\end{pgfonlayer}
\end{tikzpicture}}
% --

%---------------------------------------------------------------------------%- Modoficacin de chapter para queabra y cierrearchivos ans--------------%----------------------------------------------------------------------------

%-----------------------------------------------------------------------------%- Modoficacin de chapter para queabra y cierrearchivos ans


delpaquete answers
\newcount\ansj % contador de listas ans i
\ansj=\thechapter
%
% -- Infiltrar \chapter ------------------------------------------\makeatletter
\let\stdchapter\chapter % \stdchapter guarda la def original de
\chapter
\renewcommand*\chapter{ % -- Infiltrar: abrir y cerrararchivos ans j-\expandafter\ifx\csname Closesolutionfile\endcsname \relax\else
\Closesolutionfile{ans}\fi
\expandafter\ifx\csnameOpensolutionfile\endcsname \relax\else
\Opensolutionfile{ans}[ans\number\ansj]\advance\ansj by 1\fi
%-----------------------------------------------------% Volver a la def original de \chapter
\@ifstar{\starchapter}{\@dblarg\nostarchapter}}
\newcommand*\starchapter[1]{\stdchapter*{#1}}
\def\nostarchapter[#1]#2{\stdchapter[{#1}]{#2}}
\makeatother
% -- ------------------------------------------------------------------------

%--------------------------------------------------------------------------------------% Comandosdellibro
%--------------------------------------------------------------------------------------%---------------------------------------------------------------------------------------

\documentclass[11pt,fleqn,x11names,table]{book}
% Dimensiones y mrgenes=1 pulgada alrededor del texto
\usepackage[margin=1in]{geometry}
%--------------------------------------------------------------------\input{RevistaMatematica_ITCR_Estilo_Libro_LaTeX_B}% = Paquetes y
cdigo de diseo "B"
%--------------------------------------------------------------------%---------------------------------------------------------------------% COMANDOS PERSONALES
%---------------------------------------------------------------------\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\I}{\mathbb{I}}
\newcommand{\raya}{\rule{2cm}{0.01cm}\\}
\newcommand{\ds}{\displaystyle}
\newcommand{\sen}{\mathop{\rmsen}\nolimits}
\newcommand{\senh}{\mathop{\rmsenh}\nolimits}
\newcommand{\arcsen}{\mathop{\rmarcsen}\nolimits}
\newcommand{\arcsec}{\mathop{\rmarcsec}\nolimits}
\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\be}{\begin{enumerate}}
\newcommand{\ee}{\end{enumerate}}
%-% Insertar portada
\usepackage{pdfpages}
\begin{document}
% Insertar portada
\includepdf[pages=-]{images/Portada}
\parindent=0mm% Sangra
\pagestyle{empty}
\titulo{% Autor(es)
\fnte[pag][20]{Walter Mora F.}
}{% pre-ttulo
\fntb[ppl][14]{\verdePlantilla "B"}
}{% Ttulo principal
\fntb[ppl][28]{Edicin de libros con LaTeX}
}{% Adicional
\fntb[ppl][14]{Versin 1.0 -- Octubre 4, 2013}
}
% %--------------------------------------------------------------------------------------% % Pgina para "derechos reservados", ISBN, licencia creative
commons, etc.
% %--------------------------------------------------------------------------------------\clearpage

\begin{copyrightpage}{%
Revista digital Matem\'aticaEducaci\'on e Internet (www.tecdigital.itcr.ac.cr/revistamatematica/).
CorreoElectr\'onico:\url{mora2@itcr.ac.cr}
Escuela de Matem\'atica
InstitutoTecnol\'ogico de Costa Rica
Apdo. 159-7050, Cartago
Tel\'efono (506)25502225
Fax (506)25502493}%
Mora Flores, Walter.
\Edicin de TextosCientficos con \LaTeX.Composicin, Grficos,
Inkscape y Presentaciones Beamer/Walter Mora F.
\AlexnderBorbn A. -- 3raed.
\ -- Escuela de Matemtica,InstitutoTecnolgico de Costa Rica. 2010.
\xxx p.
\ ISBN 978-9977-66-227-5
\
1. TeX. 2. Composicintipogrfica-automatizada 3. Tipos smbolosmatemticos.\\
\end{copyrightpage}
~\vfill
%\thispagestyle{empty}
\noindent
\parbox[s]{0.35\textwidth}{Licencia.}\parbox[c]{0.65\textwidth}{
\color{gray}
\fhv{9}{Revista digital}\\
\fhvb{10}{Matemtica, Educacin e Internet.}\\
\fntg[pag][9]{%
\href{http://www.tecdigital.itcr.ac.cr/revistamatematica/}{http://www.tecdigital.itcr.ac.cr/revistamatematica/.}}
}\\\\%
%\noindent {\color{colordominante} Photos by}: Viviana Loaiza. Parque
Nacional Chirrip, Costa Rica.\\
\includegraphics[scale=0.7]{images/logocc}
\noindent {{\fontsize{9}{1} \selectfontEstelibrosedistribuyebajo la
licencia Creative Commons: Atribucin-NoComercial-SinDerivadas CC BYNC-ND (la "Licencia"). Ustedpuedeutilizarestearchivo de conformidad
con la Licencia. Ustedpuedeobtenerunacopia de la Licencia en
\url{http://creativecommons.org/licenses/by-nc-nd/3.0/}.
En
particular, estalicenciapermitecopiado y distribucingratuita, pero no
permiteventanimodificaciones de este material.\\
Lmite de responsabilidad y exencin de garanta: El autor o
losautoreshanhechosumejoresfuerzo en la preparacin de este material.
Estaedicinseproporciona``talcual''. Se distribuyegratuitamente con la
esperanza de que sea til, pero sin ningunagarantaexpresa o
implcitarespecto a la exactitud o completituddelcontenido.\\
La Revista digital Matemticas, Educacin e Internet
esunapublicacinelectrnica. El material publicado en ellaexpresa la
opinin de susautores y no necesariamente la opinin de la revistani
la delInstitutoTecnolgico de Costa Rica.}\\
% %-------------------------------------------------------------------------------% %
Tabla de contenidos
% %--------------------------------------------------------------------------------

%
\tableofcontents
\thispagestyle{empty}

% %-------------------------------------------------------------------------------% % Cosas Opcionales


% %-------------------------------------------------------------------------------% \begin{prologo}
% % Prefacio o Prlogo --------------------------%
%
Bueno, aqu viene el prlogo de este libro...\\\\
%
%
\textit{Cartago, 2013.} \hfill{\sc El autor}
%
% %------ Fin Prlogo---------------------------%
% \end{prologo}
% %--FIN COSAS OPCIONALES
%---------------------------------------------------------------------% Inicio
%---------------------------------------------------------------------\cleardoublepage
\pagestyle{fancy}
% Habilitar encabezados
\pagenumbering{arabic}
% Numeracin arabiga
\ansj=1% Cap 1 inicializa listas
%-%----------------------------------------------------------------------------------%
Captulo 1
%----------------------------------------------------------------------------------\chapter{Cmousarestaplantilla "B"}
Lasplantillas para libros de la "revista digital
Matemtica,
Educacin e Internet"
son implementadas con ideas propias y tambin con ideas tomadas
y modificadas de la documentacin de lospaquetes\LaTeX{} y
de variossitiospblicos en Internet:
\href{http://tex.stackexchange.com/}{http://tex.stackexchange.com/}
y
delsitio\href{http://www.latextemplates.com/}{http://www.latextemplate
s.com/},
entreotros. Este material es de libredistribucin.\\
Para editarlibros en esteformato, uno de losformatos de la "revista
digital
Matemtica, Educacin e Internet", sedebenusar

losarchivos {\tt book.cls} y


\verb+RevistaMatematica_ITCR_Estilo_Libro_B.tex+\\\\
\begin{lstlisting}
\documentclass{book}
% Paquete de estilo (puedeabrirlosinecesitamodificaralgo)
\usepackage{RevistaMatematica_ITCR_Estilo_Libro_B}
...
\end{lstlisting}
Con
elestilo\lstinline+RevistaMatematica_ITCR_Estilo_Libro_B.tex+sepuedeus
arcdigo\LaTeX\;estndarperosedebecompilar con {\bf\color{red}
PDF\LaTeX}.\\
Lospaquetesqueusaesteestilo son losmismosquesemencionan en
ellibro\href{http://www.tecdigital.itcr.ac.cr/revistamatematica/Libros/index.htm}{\itEdicin de
TextosCientficos con LATEX. Composicin, Grficos, Inkscape y
Presentaciones Beamer}\\
\section{Requisitos}
{\color{azulF} El
archivo\lstinline|RevistaMatematica_ITCR_Estilo_Libro_B.tex|
requiereunainstalacin\TeX\;completa y {\itactualizada} (MikTeX 2.9 o
TeXLive 2012 porejemplo)
Si tienealgn error de compilacin, puedeconsultar con Walter Mora,
\href{mora2@gmail.com}{mora2@gmail.com}}
\begin{scaja}
Necesitaqueel
archivo\verb+RevistaMatematica_ITCR_Estilo_Libro_B.tex+
adjunto, {\itest en la mismacarpetaqueelarchivo} {\tt
queesteditando.
Luegopuedecompilar.
\end{scaja}

.tex}

\section{Dimensiones}Lasdimensionessepuedencambiar en elprembulo. Si
necesitamsinformacin, puede leer la documentacindelpaquete "{\tt
geometry}". La instruccinquesigue,
indicaqueeltextodellibrovienecentrado y con 18cm de ancho y 22cm de
largo.\\
\begin{lstlisting}
\usepackage[centering,text={18cm,22cm},showframe=false]{geometry}
\end{lstlisting}
\section{Plantilla general}
El cdigo {\tt .tex} de estedocumento,
\verb+Manual_Como_Usar_EstePaqueteDeEstilo.tex+,
sepuedeusarcomoplantilla para estelibro.
Loscoloreslospuedemodificartal y comoseindica en la
seccin\ref{cambiarcolores}\\

\section{Entornos}
Esteestilo define losentornos con cajas
(verseccin\ref{cambiarcolores}). Porejemplo,\\
\begin{definicion}
$A_\delta=\{\delta_1,...,\delta_n\}$
\end{definicion}
\bigskip
\begin{teorema}
$\forall n \in \N,\; 2^n > n$
\end{teorema}
\bigskip
\begin{ejemplo}
$A_s=\{s_1,...,s_n\}$
\end{ejemplo}

\section{Paqueteshabilitados en estaplantilla. Compilacin}


%Esta tabla usa paquete booktabs
\begin{tabular}{lcp{0.7\textwidth}}\toprule
Editor usado:
&&Kile 2.1 y Texmaker 4.0.3\\
Probado con:
&&MikTeX 2.9 (con cargaautomtica de paquetes) y
TeXLive 2013 (versin full).\\
Paquetesincluidos: &&\\\bottomrule
\end{tabular}
\begin{lstlisting}
\usepackage[english,spanish]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[autostyle, spanish = mexican]{csquotes}
\MakeOuterQuote{"}
\usepackage{pslatex}
%\usepackage[sc]{mathpazo}
\usepackage{helvet}
\linespread{1.05}
\usepackage[full]{textcomp}
\usepackage{xcolor}% Color: X11names
\usepackage{psboxit}
\usepackage{pstricks}
\usepackage{xparse}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
\usepackage{tikz,tkz-tab}% Cajas de Teoremas, ejemplos, etc.
\usetikzlibrary{positioning,shadows,backgrounds,calc}
\usepackage{xargs}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}
\usepackage{multicol}
% %\usepackage{epstopdf}% Conversin en versionesviejas
\usepackage[small,bf]{caption}
\usepackage[breaklinks,colorlinks=true, pdfstartview=FitV,
linkcolor=azulF, citecolor=azulF, urlcolor=azulF]{hyperref}
\usepackage{amsmath,amssymb,amsfonts,latexsym,cancel,stmaryrd}%
\usepackage[ruled,,vlined,lined,linesnumbered,
algochapter]{algorithm2e}
\usepackage{framed}

\usepackage{titletoc}
\usepackage{calc}
\usepackage{colortbl}
\usepackage{tabularx}
\usepackage{fancyvrb}
\usepackage{array}
\usepackage{asysym}
\usepackage{supertabular}
\usepackage{booktabs}
\usepackage{answers}
\end{lstlisting}
%---------------------------------------------------------------------% Captulo 2
%---------------------------------------------------------------------\chapter{Entornos}
En elpaquete de estilovienendefinidoslosentornos "ejemplo",
"definicion", "lema", "teorema", "corolario", "proposicion",
"ejercicio", "caja" y "scaja" (caja simple)\\
El color de lascajassepuedecambiar, ver la
seccin\ref{cambiarcolores}.\\
Losentornospuedentenerdescripcin y tambinreferencia. En general, la
sintaxissera,\\\\
\begin{lstlisting}
\begin{entorno}
...
\end{entorno}
%Descripcin
\begin{entorno}[(Descripcin)]
...
\end{entorno}
%Descripcin + referencia
\begin{entorno}[(Descripcin)][referencia]
...
\end{entorno}
%Referencia
\begin{entorno}[][referencia] %[] esmanadatorio
..
\end{entorno}
\end{lstlisting}

\subsection{Definiciones}
\fntb{Definicin SIN descripcin NI referencias},\\
\begin{lstlisting}
\begin{definicion} ... \end{definicion}

\end{lstlisting}
\begin{definicion}
Sean $a,b$enteros con $b \not = 0.$\\
\be
\itemDecimosque$b$ divide a $a$siexisteunentero$c$talque$a=bc.$
\item Si $b$ divide a $a$escribimos$b|a$
\item Si $b$ no divide a $a$escribimos$b\not|a$
\ee
\end{definicion}

\bigskip
\fntb{Definicin CON descripcin y SIN referencia},\\
\begin{lstlisting}
\begin{definicion}[(Divisibilidad)] ... \end{definicion}
\end{lstlisting}
\begin{definicion}[(Divisibilidad)]
Sean $a,b$enteros con $b \not = 0.$\\
\be
\itemDecimosque$b$ divide a $a$siexisteunentero$c$talque$a=bc.$\\
\item Si $b$ divide a $a$escribimos$b|a$
\ee
\end{definicion}

\bigskip
\fntb{Definicin CON descripcin Y referencia},\\
\begin{lstlisting}
\begin{definicion}[(Divisibilidad)][ref:defdivisibilidad]
... \end{definicion}
\end{lstlisting}
\begin{definicion}[(Divisibilidad)][ref:defdivisibilidad]%no dejar
lneas blancas al inicio
Sean $a,b$enteros con $b \not = 0.$\\
\be
\itemDecimosque$b$ divide a $a$siexisteunentero$c$talque$a=bc.$\\
\item Si $b$ divide a $a$escribimos$b|a$
\ee
\end{definicion}
Referencia a la definicin\ref{ref:defdivisibilidad}\\
\bigskip
\fntb{Definicin

solo referencia},\\

\begin{lstlisting}
\begin{definicion}[][ref:defdivisibilidad] ... \end{definicion}
\end{lstlisting}
\begin{definicion}[][ref:defdivisibilidad]%no dejar lneas blancas al
inicio

Sean $a,b$enteros con $b \not = 0.$\\


\be
\itemDecimosque$b$ divide a $a$siexisteunentero$c$talque$a=bc.$\\
\item Si $b$ divide a $a$escribimos$b|a$
\ee
\end{definicion}
Referencia a la definicin\ref{ref:defdivisibilidad}\\

\subsection{Ejemplos}
\bigskip
\fntb{Ejemplo sin descripcinnireferencia},\\
\begin{lstlisting}
\begin{ejemplo} ... \end{ejemplo}
\end{lstlisting}
\begin{ejemplo}
Sean $a,b,d \in \Z.$Muestrequesi$a|d$ y $d|b$entonces$a|b$\\
{\bfSolucin:} Si $a|d\;\wedge\; d|b\; \Longrightarrow\;
d=k_1a \; \wedge \;
b=k_2d, \;\;\mbox{con}\;\;
k_1,k_2 \in \Z.$\\
Luego$b=k_2d=k_2(k_1a)\;\Longrightarrow\; a|b$
\end{ejemplo}

\bigskip
\fntb{Ejemplo CON descripcin y sin

referencia},\\

\begin{lstlisting}
\begin{ejemplo}[ (De la igualdad)] ... \end{ejemplo}
\end{lstlisting}
\begin{ejemplo}[ (De la igualdad)]
Sean $a,b,d \in \Z.$Muestrequesi$a|d$ y $d|b$entonces$a|b$\\
{\bfSolucin:} Si $a|d\;\wedge\; d|b\; \Longrightarrow\; d=k_1a \;
\wedge \;
b=k_2d, \;\;\mbox{con}\;\; k_1,k_2 \in \Z.$\\
Luego$b=k_2d=k_2(k_1a)\;\Longrightarrow\; a|b$
\end{ejemplo}
\bigskip
\fntb{Ejemplo SIN descripcin y CON

referencia},\\

\begin{lstlisting}
\begin{ejemplo}[][ejemplo1] ... \end{ejemplo}
\end{lstlisting}
\begin{ejemplo}[][ejemplo1]
Sean $a,b,d \in \Z.$Muestrequesi$a|d$ y $d|b$entonces$a|b$\\

{\bfSolucin:} Si $a|d\;\wedge\; d|b\; \Longrightarrow\; d=k_1a \;


\wedge \;
b=k_2d, \;\;\mbox{con}\;\; k_1,k_2 \in \Z.$\\
Luego$b=k_2d=k_2(k_1a)\;\Longrightarrow\; a|b$
\end{ejemplo}
De acuerdo al ejemplo\ref{ejemplo1}, ....\\\\
\subsection{Teoremas}
\bigskip
\fntb{Teorema SIN descripcin NI referencias},\\
\begin{lstlisting}
\begin{teorema} ... \end{teorema}
\end{lstlisting}
\begin{teorema}
Sean $a,b,d,p,q \in \Z.$
\be
\item Si $d|a$ y $d|b$entonces$d|(ax+by)$ para cualquier$x,y \in \Z$
\item Si $d|(p+q)$ y $d|p \;\; \Longrightarrow \;\;d|q.$
\item Si $a,b \in \Z^+$ y $b|a\;\Longrightarrow\;a \geq b$
\item Si $a|b,$entonces$a|mb,$ con $m \in \Z.$
\item Si $a,b \in \Z,$$a|b$ y $b|a\;\Longrightarrow\;|a|=|b|$
\ee
\end{teorema}

\bigskip
\fntb{Teorema CON descripcin y SIN referencias},\\
\begin{lstlisting}
\begin{teorema}[(Divisibildad)]... \end{teorema}
\end{lstlisting}
\begin{teorema}[(Divisibildad)]
Sean $a,b,d,p,q \in \Z.$
\be
\item Si $d|a$ y $d|b$entonces$d|(ax+by)$ para cualquier$x,y \in \Z$
\item Si $d|(p+q)$ y $d|p \;\; \Longrightarrow \;\;d|q.$
\item Si $a,b \in \Z^+$ y $b|a\;\Longrightarrow\;a \geq b$
\item Si $a|b,$entonces$a|mb,$ con $m \in \Z.$
\item Si $a,b \in \Z,$$a|b$ y $b|a\;\Longrightarrow\;|a|=|b|$
\ee
\end{teorema}
\bigskip

\fntb{Teorema CON descripcin Y referencias},\\


\begin{lstlisting}
\begin{teorema}[(Divisibildad)][teo1]... \end{teorema}
\end{lstlisting}
\begin{teorema}[(Divisibildad)][teo1]
Sean $a,b,d,p,q \in \Z.$
\be
\item Si $d|a$ y $d|b$entonces$d|(ax+by)$ para cualquier$x,y \in \Z$
\item Si $d|(p+q)$ y $d|p \;\; \Longrightarrow \;\;d|q.$
\item Si $a,b \in \Z^+$ y $b|a\;\Longrightarrow\;a \geq b$
\item Si $a|b,$entonces$a|mb,$ con $m \in \Z.$
\item Si $a,b \in \Z,$$a|b$ y $b|a\;\Longrightarrow\;|a|=|b|$
\ee
\end{teorema}
Segn\ref{teo1} setiene....\\

\subsection{Corolarios}
Loscorolarios solo tienen la opcin de referencia (no de
descripcin).\\
\fntb{Corolario CON referencia}, \\
\begin{lstlisting}
\begin{corolario}[corolario1]... \end{corolario}
\end{lstlisting}
\begin{corolario}[corolario1]
Sea $n\in \Z,\;n>1.$ El mspequeo divisor positivo$d > 1$ de
$n$esprimo.
\end{corolario}
Referencia: Segnelcorolario\ref{corolario1}...\\
\subsection{Lemas}
Loslemasadmitendescripcin y referencias, comoantes.\\
\fntb{Lema CON descripcin y referencia}, \\
\begin{lstlisting}
\begin{lema}[--- (El divisor mspequeo).][lema1]... \end{lema}
\end{lstlisting}
\begin{lema}[--- (El divisor mspequeo).][lema1]
Sea $n\in \Z,\;n>1.$ El mspequeo divisor positivo$d > 1$ de
$n$esprimo.
\end{lema}
Referencia al lema\ref{lema1}.\\
\subsection{Proposicin}

Lasproposicionesadmitendescripcin y referencias, comoantes.\\


\fntb{Proposicin CON referencia}, \\
\begin{lstlisting}
\begin{proposicion}[][propo1]... \end{proposicion}
\end{lstlisting}
\begin{proposicion}[][propo1]
Sea $n\in \Z,\;n>1.$ El mspequeo divisor positivo$d > 1$ de
$n$esprimo.
\end{proposicion}
Referencia a la proposicin\ref{propo1}.\\
\section{Cambiar los colores en el prembulo}\label{cambiarcolores}
Puederedefinirloscolores
de lasdefiniciones, teoremas, ejemplos, etc.,
agregando en el {\itprembulo} suscolorespersonales... porejemplo, en
estedocumentosehizounavariacin de coloresagregando en el
{\itprembulo}\\
\begin{lstlisting}
% Podracambiarel color de losentornos (prembulo).
% Losvalores de losformatosRGB y rgb lo
% puedetomar de Inkscape.
\definecolor{colortitulo}{RGB}{219,68,14} %
\definecolor{colordominante}{RGB}{243,102,25}
\definecolor{colordominanteF}{RGB}{219,68,14}
\definecolor{colordominanteD}{RGB}{137,46,55}
\definecolor{mostaza}{RGB}{231,196,25}
\definecolor{amarilloM}{RGB}{248,199,90}
\definecolor{amarilloD}{RGB}{251,237,121}
\definecolor{grisamarillo}{RGB}{248,248,245}
\definecolor{azulF}{rgb}{.0,.0,.3}
\definecolor{grisD}{rgb}{.3,.3,.3}
\definecolor{grisF}{rgb}{.6,.6,.6}
\definecolor{miverde}{RGB}{44,162,67}
\renewcommand{\verde}{\color{miverde}}
\end{lstlisting}

%---------------------------------------------------------------------% Captulo 3
%---------------------------------------------------------------------\chapter{Otrosentornos}
\section{Cajas y cajassimples}Lascajas solo tienenopcin de
descripcinpero no de referencia.\\
\bigskip
\fntb{Caja con descripcin}.\\

\begin{lstlisting}
\begin{caja}[ Interludio: Particiones y restos ]... \end{caja}
\end{lstlisting}
\begin{caja}[ Interludio: Particiones y restos ]
El resto de la divisinpor$p>1 \in \Z$identifica a $p$grupos de
nmerosque ...\\
\end{caja}
Lascajassimples son solo cajas\verb+\begin{scaja}...\end{scaja}+\\
\begin{lstlisting}
\begin{scaja} ... \end{scaja}
\end{lstlisting}
\begin{scaja}
Estaesunacaja simple
\end{scaja}
\section{Notas y vocabulario}
Lasnotasvienen con uncrculo y unsmbolo,\\
\begin{lstlisting}
\begin{nota} ... \end{nota}
\end{lstlisting}
\begin{nota}
$0^0$ no estdefinido, aunque a vecesseconviene en que$0^0=1$, como en
$\ds e^x=\sum_{n=0}^{\infty}\frac{x^n}{n!}$.
\end{nota}
El entorno para elvocabularioes simple (aunque en elcdigodelarchivo
de diseoestapreparado para tenercaja).\\
\begin{lstlisting}
\begin{vocabulario} ... \end{vocabulario}
\end{lstlisting}
\begin{vocabulario}[(Funcin suave).]
Se dice queunafuncin ...
\end{vocabulario}

%---------------------------------------------------------------------% Captulo 4
%---------------------------------------------------------------------\chapter{Cosas de edicinhabilitadas}
\section{Listas de enumeracinadicionales}
Adicionalmente al cdigoestndar, sepuedecrearotrosestilos de listas.
El paquete de estilousacomandosTiKz con
losquesepuedencrearnuevosambientes {\tt enumerate}, porejemplo

\begin{minipage}{.25\textwidth}
\begin{enumerate}[label=\itembolasgrises{\arabic*}]
\itempaso
\itempaso
\itempaso
\itempaso
\end{enumerate}
\end{minipage}\\\hfill\begin{minipage}{.75\textwidth}
\begin{lstlisting}
\begin{enumerate}[label=\itembolasgrises{\arabic*}]
\item paso
\item paso
\item paso
\item paso
\end{enumerate}
\end{lstlisting}
\end{minipage}
\vspace{0.3cm}
\begin{minipage}{.25\textwidth}
\begin{enumerate}[label=\itembolasazules{\arabic*}]
\itempaso
\itempaso
\itempaso
\itempaso
\end{enumerate}
\end{minipage}\\\hfill\begin{minipage}{.75\textwidth}
\begin{lstlisting}
\begin{enumerate}[label=\itembolasazules{\arabic*}]
\item paso \\
\item paso\\
\item paso \\
\item paso\\
\end{enumerate}
\end{lstlisting}
\end{minipage}
\bigskip
Observe quepuededefiniruncomando para abreviaresteentorno,
porejemplo\\\\
% Usando el comando '\lstinline' del paquete listings
\lstinline|\newcommand{\beaz}{\begin{enumerate}[label=\itembolasazules
{\arabic*}]}|\\
\lstinline|\newcommand{\eeaz}{\end{enumerate}}|\\
As, podramosescribir\\
\begin{lstlisting}
\beaz
\item paso \\
\item paso\\
\item paso \\
\item paso\\
\eeaz
\end{lstlisting}

\bigskip
Tambinsepuedeusar\lstinline+\itembolasverdes+ y puntosindividuales
con \lstinline+\ptom+ (\ptom) y \lstinline+\ptomv+ (\ptomv) y
\lstinline+\ptomr+ (\ptomr), porejemplo.
%--------------

\section{Cambiar los colores en el prembulo}\label{cambiarcolores}


Puederedefinirloscolores
de lasdefiniciones, teoremas, ejemplos, etc.,
agregando en el {\itprembulo} suscolorespersonales... porejemplo, en
estedocumentosehizounavariacin de coloresagregando en el
{\itprembulo}\\
\begin{lstlisting}
% Aqupodracambiarel color de losentornos
% Losvalores de losformatosRGB y rgb lo puedetomar de Inkscape.
\definecolor{colortitulo}{RGB}{11,17,79} %
\definecolor{colordominante}{RGB}{11,17,79}
\definecolor{colordominanteF}{RGB}{219,68,14}
\definecolor{colordominanteD}{RGB}{137,46,55}
\definecolor{mostaza}{RGB}{231,196,25}
\definecolor{amarilloM}{RGB}{248,199,90}
\definecolor{amarilloD}{RGB}{251,237,121}
\definecolor{azulF}{rgb}{.0,.0,.3}
\definecolor{grisD}{rgb}{.3,.3,.3}
\definecolor{grisF}{rgb}{.6,.6,.6}
\definecolor{grisamarillo}{RGB}{248,248,245}
\definecolor{miverde}{RGB}{44,162,67}
\definecolor{verdep}{RGB}{166,206,58}
\definecolor{verdencabezado}{RGB}{166,206,58}
\definecolor{verdeF}{RGB}{5,92,8}
\end{lstlisting}

\section{Cdigo de programas en color} El cdigo en


estefolletoestiluminado con elpaquete {\tt listings}. Para
verejemplosvaya al archivo {\red .tex} de este manual. Hay
otrospaquetesquehacenlosmismo con otrasvariaciones: Lospaquetes {\tt
minted} y {\ttverbments}, perorequiereinstalarprogramasadicionales.
Verseccin 9.8 dellibro.
\section{El entorno tabular}
Es elentorno usual,
\begin{lstlisting}
\rowcolors{1}{}{gray!20}

\begin{tabular}{lcl}
\rowcolor{LightBlue2}$x_i$
$x_0=0$
$x_1=0.75$
$x_2=1.5$
\end{tabular}

&&
&&
&&
&&

$y_i=f(x_i)$\\
$0$\\
$-0.0409838$\\
$1.31799$\\

\hline
\hline

\end{lstlisting}

\begin{center}
\rowcolors{1}{}{gray!20}
\begin{tabular}{lcl}
\rowcolor{LightBlue2}$x_i$&&$y_i=f(x_i)$\\\hline
$x_0=0$&&$0$\\
$x_1=0.75$&&$-0.0409838$\\
$x_2=1.5$&&$1.31799$\\\hline
\end{tabular}
\end{center}
\medskip
Note queseusel color {\ttLightBlue2} delmodelo {\ttx11names}
delpaquete {\tt xcolor}\\
\section{Tablas con elpaqueteTIKZ}
En elarchivo de estiloestdefinidoelentorno {\ttdataTable} para
generar tablas usandoTikz (idea original de O. Lemaire,
\url{http://olivierlemaire.wordpress.com/2010/03/08/tableaux-tikz/?})
\begin{center}
\begin{dataTable}{cll}%
{\white$i$} & {\white$x_i$} & {\white$y_i=f(x_i)$} \\\midrule[0pt]
1 &$x_0=0$&$0$\\\midrule
2 &$x_1=0.75$&$-0.0409838$\\\midrule
3 &$x_2=1.5$&$1.31799$\\
\end{dataTable}
\captionof{table}{Tabla usandoTikz}
\end{center}
El cdigoes
\begin{lstlisting}
% El entornoestdefinido en elarchivo de estilo.
\begin{center}
\begin{dataTable}{cll}%
{\white $i$} & {\white $x_i$} & {\white $y_i=f(x_i)$} \\
\midrule[0pt]
1 & $x_0=0$
& $0$\\
\midrule
2 & $x_1=0.75$
& $-0.0409838$\\ \midrule
3 & $x_2=1.5$
& $1.31799$\\
\end{dataTable}
\captionof{table}{Tabla usandoTikz}
\end{center}
\end{lstlisting}

\section{Grficos}RecordamosqueestamoscompilandoPDF\LaTeX.
\be
\itempto Si instal la distribucin {\red\ttTeXLive 2012 o 2013},
puedeusarlosformatos
{\tt pdf, .jpg, .png} y {\tt .eps} sin problemas.\\
\itempto Si instal la distribucin {\red\ttTeXLive 2009} o
{\red{\ttMikTeX 2.9}}, puedeusarlosformatos
{\tt pdf, .jpg, .png} sin problemas. Si deseausartambinelformato
{\tt .eps}, debeusarelpaquete {\ttepstopdf} y habilitar {\tt shell
escape} (vercaptulo 6 dellibro).
\ee
En esteformato de librosepuedeusarentornos de figurasflotantes.
En general, para insertarunafigurasepuedeusarelentorno {\tt figure}
(figurasflotantes)
y tambinpuedeusarelpaquete {\tt caption} para insertarfiguras (no
flotantes).\\
El cdigoquesiguenosmuestralas dos posibilidades.\\
\begin{figure}[ht]
\begin{minipage}{12cm}
\begin{lstlisting}
\begin{figure}[ht]
\centering
\includegraphics{images/logocc}
\caption{Figura {\tt logocc.png}}
\end{figure}
\end{lstlisting}
\end{minipage}\hfill\begin{minipage}{8cm}
\centering
\includegraphics{images/logocc}
\caption{Figura {\ttlogocc.png}}
\end{minipage}
\end{figure}
\bigskip
El logo de la revista digital ({\ttRevistaLogo.pdf}) y el logo de
CreativeCommons ({\ttlogocc.png}) sepuedencambiarporotraspero
{\itconservandoelnombre}. Se suponequeestn en la
mismacarpetadelarchivo {\tt .tex} o unasubcarpetallamada '{\tt
images}'. En todocaso, si no estn no pasanada.\\\\
{\bf\color{colordominante} Paquete "caption".} Si quiereel control,
puedeusarelpaquete "caption". Losobjetos (figuras, tablas) con losque
use estepaqueteya no sernflotantes. Anaspuedeusarestepaquete en
conjunto con \verb+\begin{figure} . . . \end{figure}+ y la
numeracinseconserva.\\\\
El usomnimodelpaqueteesusar\verb+\captionof{figure}{...}+ o
\verb+\captionof{table}{...}+despus de estosentornos.\\\\

\begin{minipage}{10cm}
\begin{lstlisting}
\begin{center}
\includegraphics{images/logocc}
\captionof{figure}{Figura {\tt logocc.png}}
\end{center}
\end{lstlisting}
\end{minipage}\hfill\begin{minipage}{8cm}
\centering
\includegraphics{images/logocc}
\captionof{figure}{Figura {\ttlogocc.png}}
\end{minipage}

\section{Listas de ejercicios} Se usaelpaquete {\tt


unentornopersonalizado.
El entornoestepaquete de estilo.

answers} con

Puedeusartresentornos
\begin{lstlisting}
\begin{ejercicios} --- \end{ejercicios}
% para listassimples
\begin{cejercicios} --- \end{cejercicios} % para listas en cajas
\begin{ejercicio}
--- \end{ejercicio}
% un solo ejercicio en
unacaja
\end{lstlisting}
\bigskip
Se puedenagregartodaslaslistas de ejerciciosquesequiera. El
formatoes\\
\begin{lstlisting}
\section*{Ejercicios}
\begin{ejercicios}
\begin{ejer}
Resolver ... # 1
...
\begin{solu}
solucinejercicio#1 (sihubiera, sale al final delPDF)
\end{solu}
\end{ejer}
%----------------------\begin{ejercicios}
\begin{ejer}
Resolver ... # 2
...
\begin{solu}
solucinejercicio#2 (sihubiera)
\end{solu}
\end{ejer}
\end{ejercicios}
\end{lstlisting}
\bigskip
Al final sedebeagregarlassolucionesporcaptulo (no importaelnmero de
listas de ejercicios en cadacaptulo).\\
\begin{lstlisting}

%Imprimirlassoluciones------------------\soluciones
% Obligatorio
\solucionesCap{1}
\solucionesCap{2}
...
\solucionesCap{N}
\end{lstlisting}
Porejemplo: \\
\begin{lstlisting}
\begin{cejercicios}
\begin{ejer}
Resolver $|\cos(\theta)|=1$ con $\theta \in\, \R.$
\begin{solu}
$|\cos(\theta)|=1 \Longrightarrow \theta=k\pi, \; k \in\, \Z$
\end{solu}
\end{ejer}
%----------------------\begin{ejer} Resolver $|\sen(\theta)|=1$ con $\theta \in\, \R^+$
\begin{solu}
$|\sen(\theta)|=1 \Longrightarrow \theta=(2k+1)
\displaystyle\frac{\pi}{2}, \; k \in\, \Z^+$
\end{solu}
\end{ejer}
%----------------------- Sin solucin----\begin{ejer} Resolver
\begin{enumerate}
\item[a.)] $|2\sen(\theta)\cos(\theta)|=1$ con $\theta \in\,
\R^+$
\item[b.)] $|2\sen(\theta)\cos(\theta)|=1$ con $\theta \in\,
\R$
\end{enumerate}
\begin{solu}
Mmmmmm
\end{solu}
\end{ejer}
\end{cejercicios}
\end{lstlisting}
\begin{cejercicios}
\begin{ejer}
Resolver $|\cos(\theta)|=1$ con $\theta \in\, \R.$
\begin{solu}
$|\cos(\theta)|=1 \Longrightarrow \theta=k\pi, \; k \in\, \Z$
\end{solu}
\end{ejer}
%----------------------\begin{ejer} Resolver $|\sen(\theta)|=1$ con $\theta \in\, \R^+$
\begin{solu}
$|\sen(\theta)|=1 \Longrightarrow \theta=(2k+1)
\displaystyle\frac{\pi}{2}, \; k \in\, \Z^+$
\end{solu}
\end{ejer}
%----------------------- Sin solucin----\begin{ejer} Resolver
\begin{enumerate}
\item[a.)] $|2\sen(\theta)\cos(\theta)|=1$ con $\theta \in\,
\R^+$
\item[b.)] $|2\sen(\theta)\cos(\theta)|=1$ con $\theta \in\,
\R$

\end{enumerate}
\begin{solu}
Mmmmmm
\end{solu}
\end{ejer}
\end{cejercicios}
Recuerdeque al final deldocumento {\tt .tex} sedebeponer\\
\begin{lstlisting}
%Imprimirlassoluciones-------------------------------------------------------\soluciones
% Obligatorio (seasumequesetiene
\tableofcontents)
\solucionesCap{1}
...
\end{lstlisting}

\section{Caja para listas de ejercicios}


El archivo de diseoviene con comandossimplificados para hacerlistas
de problemas y subproblemas en unacaja. Se
debeusarelentorno\verb+\begin{cajaejercicios}...+. Porejemplo,\\
\bigskip
\begin{cajaejercicios}
\exersol{Pregunta 1.}{Solucin 1.}
\exersol{Pregunta 2.}{Solucin 2.}
%Subproblemas
\begin{ejer}
Problema 3.\\
\bex%Inicio lista de subproblemas
\itemps{Subproblema 3.1 }{ Solucin 3.1}
\itemps{Subproblema 3.2 }{ Solucin 3.2}
\itemps{Subproblema 3.3 }{ Solucin 3.3}
\eex% Fin lista subproblemas
\end{ejer}
\end{cajaejercicios}
\medskip
El cdigoes,\\
\begin{lstlisting}
\bigskip
\begin{cajaejercicios}
\exersol{Pregunta 1.\\}{Solucin 1.}
\exersol{Pregunta 2.\\}{Solucin 2.}
%Subproblemas
\begin{ejer}
Problema 3.\\
\bex %Iniciolista de subproblemas

\itemps{Subproblema 3.1 \\}{ Solucin 3.1}


\itemps{Subproblema 3.2 \\}{ Solucin 3.2}
\itemps{Subproblema 3.3 \\}{ Solucin 3.3}
\eex % Fin listasubproblemas
\end{ejer}
\end{cajaejercicios}
\end{lstlisting}

\subsection{Un solo ejercicio}


\begin{lstlisting}
\begin{ejercicio}
Resolver $|\cos(\theta)|=1$
\end{ejercicio}
\end{lstlisting}
\begin{ejercicio}
Resolver $|\cos(\theta)|=1$
\end{ejercicio}

con $\theta \in\, \R.$

con $\theta \in\, \R.$

\section{Entornobibliografa}Ademsdelentornoestndar para la
bibliografa, en esteestilosepuedeusarunentornopredefinido\\
\lstinline+\begin{thebibliography}...\end{thebibliography}+
\bigskip
{\small
\begin{lstlisting}
\thispagestyle{empty}
\addcontentsline{toc}{section}{\color{azulF} Bibliografa}
\begin{thebibliography}{AAAAAA}% define eltamano de la
columnaizquierda
\bibitem{Gautschi} W. Gautschi. {\em Numerical Analysis. An
Introduction.}
Birkh\"{a}user, 1997.
\bibitem{Henrici} P. Henrici.{\it Essentials of Numerical
Analysis.}
Wiley, New York, 1982.
\end{thebibliography}
\end{lstlisting}
\thispagestyle{empty}
\addcontentsline{toc}{section}{\color{azulF} Bibliografa}
\begin{thebibliography}{AAAAAA}% define el tamano de la columna
izquierda
\bibitem{Gautschi} W. Gautschi. {\em Numerical Analysis. An
Introduction.}
Birkh\"{a}user, 1997.
\bibitem{Henrici} P. Henrici.{\it Essentials of Numerical Analysis.}
Wiley, New York, 1982.

\end{thebibliography}
%-----------------------------------------------------------------------------------%Imprimir las soluciones
%\chapter*{Soluciones}
\soluciones%Obligatorio
%\solucionesCap{1}
\solucionesCap{4}
%\solucionesCap{3}
% ...

\end{document}

%-------------------------------------------------------------------------% ARCHIVO .sty DE DISEO


% PAQUETES Y ESTILO DEL LIBRO
%-------------------------------------------------------------------------\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{RevistaMatematica_ITCR_Estilo_Libro_A}[2013/08/18]
\RequirePackage[spanish]{babel}
\RequirePackage[latin1]{inputenc} % Entrada de acentos
\RequirePackage[T1]{fontenc}
\RequirePackage[autostyle, spanish = mexican]{csquotes} % manejo de comillas: " "
\MakeOuterQuote{"}
%\RequirePackage{pslatex} % Fuentes finas postscript
%\RequirePackage[sc]{mathpazo} % Fuentes mathpazo
\RequirePackage{helvet}
\RequirePackage{palatino} % Fuente palatino
\linespread{1.05} % Fuente Palatino necesita espaciado
%\RequirePackage[full]{textcomp} % Caracteres especiales como ' (recto)
\RequirePackage{xcolor} % Color: usando X11names
\RequirePackage{psboxit}
\RequirePackage{pstricks}
\RequirePackage{xparse}
\RequirePackage{tcolorbox} % Paquete para cajas de Teoremas, ejemplos, etc.
\tcbuselibrary{skins,breakable} % Librerias tcolorbox
\RequirePackage{xargs} % Comandos con opciones
\usetikzlibrary{positioning,shadows,backgrounds,calc}%
\DeclareGraphicsExtensions{.pdf,.png,.jpg, .eps} %priorizacin de formatos
\RequirePackage{multicol}
\RequirePackage{amsmath,amssymb,amsfonts,latexsym,cancel,stmaryrd} %Soporte
math smbolos-fonts.
\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
\RequirePackage[ruled,,vlined,lined,linesnumbered,algochapter]{algorithm2e}
\RequirePackage{framed}
\RequirePackage{titletoc}
\RequirePackage{etoolbox}
\RequirePackage{fancyvrb}
%\RequirePackage{minted} %iluminar cdigo. Habilitar mejor en Ubuntu (Linux)
\renewcommand{\theFancyVerbLine}{\sffamily
\textcolor[rgb]{0,0,0.5}{\scriptsize
\oldstylenums{\arabic{FancyVerbLine}}}}
\RequirePackage{colortbl}
\RequirePackage{tabularx}
\RequirePackage{booktabs}
%\RequirePackage{epstopdf} % Conversin - Miktes 2.9 o inferior, TexLive 2009. o
inferior
\RequirePackage[small,bf]{caption}
\RequirePackage{titlesec}
\renewcommand{\baselinestretch}{1.1}
\frenchspacing
%\thispagestyle{empty}
\parindent=0mm

%-------------------------------------------------------------------------------% COLORES personales


%-------------------------------------------------------------------------------\definecolor{colordominante}{RGB}{11,17,79}
\definecolor{colordominanteF}{RGB}{219,68,14}
\definecolor{colorejemplo}{RGB}{77,190,208}
\definecolor{colordefinicion}{RGB}{97,196,161}
\definecolor{colorteorema}{RGB}{0,133,202}
\definecolor{colortitulo}{RGB}{0,133,202}
\definecolor{colorcaja}{RGB}{244,227,200}
\definecolor{grisamarillo}{RGB}{248,248,245}
\definecolor{amarilloD}{RGB}{251,237,121}
\colorlet{colorfondoejemplo}{gray!10}
\colorlet{colorfondodefinicion}{gray!10}
\colorlet{colorfondoteorema}{gray!10}
\definecolor{colorfondocaja}{RGB}{252,252,244}
\definecolor{rosado}{RGB}{201,148,199}
\definecolor{violeta}{RGB}{117,107,177}
\definecolor{amarilloS}{RGB}{252,252,244}
\definecolor{azulF}{rgb}{.0,.0,.3}
\definecolor{grisD}{rgb}{.3,.3,.3}
\definecolor{grisF}{rgb}{.6,.6,.6}
\definecolor{miverde}{RGB}{44,162,67}
\newcommand{\verde}{\color{miverde}}
%------------------------------------------------------------------------------% Comandos para fuentes especiales
%------------------------------------------------------------------------------\newcommandx*{\fnte}[4][1=pag,2=9,3=n]{{\color{azulF}\fontfamily{#1}\fontsize{#
2}{1}\fontshape{#3}\selectfont{#4}}}
\newcommandx*{\fntb}[4][1=pag,2=11,3=n]{{\color{azulF}\fontfamily{#1}\fontsize{
#2}{1}\fontseries{b}\fontshape{#3}\selectfont{#4}}}
\newcommandx*{\fntg}[4][1=pag,2=9,3=n]{{\color{grisF}\fontfamily{#1}\fontsize{#2
}{1}\fontshape{#3}\selectfont{#4}}}
\newcommand{\fhv}[2]{{\fontfamily{phv}\fontsize{#1}{1}\selectfont{#2}}}
\newcommand{\fhvb}[2]{{\fontfamily{phv}\fontseries{b}\fontsize{#1}{1}\selectfont{
#2}}}
%------------------------------------------------------------------------------%********************************** DISENO
*************************************
%-------------------Diseo de CAPITULO (estilo simple) ------------------------\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\huge\bfseries}{{
\fontsize{6em}{6em}\selectfont\black
\thechapter}\hsp\textcolor{colorteorema}{\vrule height 4em width
1pt}\hsp}{0pt}{\huge\bfseries}
%------------------------------ Diseo de PARTE------------------------------\renewcommand\part{%
\if@openright
\cleardoublepage
\else

\clearpage
\fi
\thispagestyle{plain}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
%\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\Huge \bfseries #2\par}%
\@endpart}
\def\@spart#1{%
{\centering
\interlinepenalty \@M
\normalfont
\Huge \bfseries #1\par}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
% Fin PARTE
% Diseo de SECCIONES SUBSECCIONES - SUBSUB...--------------------------------------\newcommand{\mcaja}[1]{%

{{\fboxsep 12pt \fboxrule 0pt%


\fcolorbox{white}{white}{%
\color{grisD} \huge #1}}} %color numeracin secciones
}
%
\def\section{\@ifstar\unnumberedsection\numberedsection}
\def\numberedsection{\@ifnextchar[%]
\numberedsectionwithtwoarguments\numberedsectionwithoneargument}
\def\unnumberedsection{\@ifnextchar[%]
\unnumberedsectionwithtwoarguments\unnumberedsectionwithoneargument}
\def\numberedsectionwithoneargument#1{\numberedsectionwithtwoarguments[#1]{#1}
}
\def\unnumberedsectionwithoneargument#1{\unnumberedsectionwithtwoarguments[#1]
{#1}}
\def\numberedsectionwithtwoarguments[#1]#2{%
\ifhmode\par\fi
\removelastskip
\vskip 3ex\goodbreak
\refstepcounter{section}%
\begingroup
%\noindent
\leavevmode\large\bfseries\raggedright\mcaja%caja aplica a number section
\thesection\color{azulF} #2\par\nobreak %Color del texto de \section{texto}
\endgroup
\noindent\hrulefill\nobreak
\vskip 2ex\nobreak
\addcontentsline{toc}{section}{%
\protect\numberline{\thesection}%
#1}%
}
\def\unnumberedsectionwithtwoarguments[#1]#2{%
\ifhmode\par\fi
\removelastskip
\vskip 3ex\goodbreak
% \refstepcounter{section}%
\begingroup
\noindent
\leavevmode\Large\bfseries\raggedright
% \thesection\
#2\par\nobreak
\endgroup
\noindent\hrulefill\nobreak
\vskip 0ex\nobreak
\addcontentsline{toc}{section}{%
% \protect\numberline{\thesection}%
#1}%
}
%--Subsecciones-subsubsecciones-paragraph...apndice-----------------------------------% TEORIA

% \@startsection
{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
% optional * [ALTHEADING]{HEADING}
% Generic command to start a section.
% NAME : e.g., 'subsection'
% LEVEL : a number, denoting depth of section -- e.g., chapter=1,
% section = 2, etc. A section number will be printed if
% and only if LEVEL < or = the value of the secnumdepth
% counter.
% INDENT : Indentation of heading from left margin
% BEFORESKIP : Absolute value = skip to leave above the heading.
% If negative, then paragraph indent of text following
% heading is suppressed.
% AFTERSKIP : if positive, then skip to leave below heading,
% else - skip to leave to right of run-in heading.
% STYLE : commands to set style
% If '*' missing, then increments the counter. If it is present, then
% there should be no [ALTHEADING] argument. A sectioning command
% is normally defined to \@startsection + its first six arguments.
%
%\RequirePackage{appendix}
%
% \renewcommand\section{\@startsection {section}{1}{\z@}%
% {-3.5ex \@plus -1ex \@minus -.2ex}%
% {2.3ex \@plus.2ex}%
% {\sectionfont\Large\bfseries\color{azulF}}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\large\bfseries\color{azulF}}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalsize\bfseries\color{azulF}}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalsize\bfseries\color{azulF}}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalsize\bfseries\color{azulF}}}
%--- Fin Partes- Captulos - secciones - subsecciones - subsubsections
%----------------------------------------------------------------------------------% Diseo de Cabeceras Contenido, Ttulo, secciones, subsecciones,etc.-%----------------------------------------------------------------------------------%Pgs blancas
%
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}

\vspace*{\fill}
\begin{center}
Esta pgina fue dejada intencionalmente blanca
\end{center}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
%-----------------Cabeceras-------------------------------------------------------\newcommand{\helv}{\fontfamily{phv}\fontsize{8}{10}\selectfont}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]{\markright{#1}{#1}}
% \renewcommand{\sectionmark}[1]{\markboth{\thesection\#1}}
\fancyhf{} % borra cabecera y pie actuales
\fancyhead[LE,RO]{\bfseries \helv\thepage} %Left Even page - Right Odd page
%\fancyhead[R]{\bfseries \helv\thepage} % Numeracin siempre a la derecha
\fancyhead[LO]{\helv\rightmark}
\fancyhead[RE]{\helv\leftmark}
\renewcommand{\headrulewidth}{0pt} % Sin raya. Con raya?: cambiar {0} por {0.5pt}
\renewcommand{\footrulewidth}{0pt}
\setlength\headheight{14.5pt}
\fancyheadoffset[R]{0.0cm} %Numeracin de pgina en el borde de la pgina
\addtolength{\headheight}{0.5pt} % espacio para la raya
\fancypagestyle{plain}{%
\fancyhead{} % elimina cabeceras y raya en pginas "plain"
\renewcommand{\headrulewidth}{0pt} }
% Fin cabeceras ------------------------------------------------------------------%-- Prlogo ----------------------------------------------------------------------\NewDocumentEnvironment{prologo}{O{}}{%
\addcontentsline{toc}{schapter}{%
\hspace{6em}{\color{azulF}{\fontfamily{phv}\fontsize{9}{10}\selectfont Prol\'ogo}}
\qquad}
\chapter*{Prlogo}
\bigskip\bigskip
\begin{minipage}{0.9\textwidth}
#1}{\end{minipage}}
%-- TITULO------------------------------------------------------------------------%
\def\thickhrulefill{\leavevmode \leaders \color{colorteorema}\hrule height 4pt\hfill
\kern \z@}
\renewcommand{\maketitle}{\begin{titlepage}%
%\let\footnotesize\small
\let\footnoterule\relax
\parindent \z@
\reset@font
\null
\vskip 10\p@
\hbox{\mbox{%

\hspace{4pt}%
\IfFileExists{images/logo.pdf}{\includegraphics[width=3em]{images/logo.pdf}}{}%
\hspace{4pt}
}%
\color{colortitulo}\vrule depth 0.9\textheight width 1pt%
%\vrule height2.75ex depth1.25ex width 1pt
\mbox{\hspace{2em}}
\vtop{% %%%%%%%%%%%%%%%%%%
\vskip 40\p@
\begin{flushleft}
\huge \bfseries \@title \par
\end{flushleft}
\vskip 80\p@
\begin{flushleft}
\@author \par
\end{flushleft}
\vskip 240\p@
\color{gray}
\begin{flushleft}
\fhv{10}{Revista digital}\\
\fhvb{12}{Matemtica, Educacin e Internet}\\
\fntg[phv][10]{%
\href{http://www.tec-digital.itcr.ac.cr/revistamatematica/}{(http://www.tecdigital.itcr.ac.cr/revistamatematica/).}}\\
\end{flushleft}
\vfil
}}
\null
\end{titlepage}%
\setcounter{footnote}{0}%
}
% Fin Titulo---------------------------------------------------------------------------%-------------------CONTENIDO ----------------------------------------------------%\usepackage{kpfonts}
\definecolor{doc}{RGB}{0,60,110}
%\usepackage{titletoc}
\contentsmargin{0cm}
\titlecontents{chapter}[0pc]
{\addvspace{30pt}%
\begin{tikzpicture}[remember picture, overlay]%
\draw[fill=doc!30,draw=doc!30] (-4,-.1) rectangle (0,0.5);%
\pgftext[left,x=-1.5 cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \ \thecontentslabel};%
\end{tikzpicture}\color{doc!40}\large\sc\bfseries}%
{}
{}
{\;\titlerule\;\large\sc\bfseries Pgina \thecontentspage
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=doc!25,draw=doc!20] (2pt,0) rectangle (6,0.1pt);
\end{tikzpicture}}%
\titlecontents{section}[2.4pc]

{\addvspace{1pt}}
{\contentslabel[\color{azulF}\thecontentslabel]{2.4pc}}
{}
{\hfill\small \color{azulF}\thecontentspage}
[]
\titlecontents*{subsection}[4pc]
{\addvspace{-1pt}\small}
{}
{}
{\hfill\small \color{azulF}\thecontentspage}
[ \textbullet\ ][]
%\makeatletter
\renewcommand{\tableofcontents}{%
\chapter*{%
\vspace*{-20\p@}%
\begin{tikzpicture}[remember picture, overlay]%
\pgftext[right,x=15cm,y=0.2cm]{\color{doc!30}\Huge\sc\bfseries \contentsname};%
\draw[fill=doc!30,draw=doc!30] (13,-.75) rectangle (20,1);%
\clip (13,-.75) rectangle (20,1);
\pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
\end{tikzpicture}}%
\@starttoc{toc}}
%\makeatother
% Fin Contenido ------------------------------------------------------------------%---------------------------------------------------------------------------------------% Copypright, ISBN, ...
%---------------------------------------------------------------------------------------\def\copyrightpage{\thispagestyle{empty}%
\vbox to\textheight\bgroup\vfill\obeylines\obeyspaces\xcopyrightpage}
\def\xcopyrightpage#1#2\end#3{\scriptsize\parindent=0pt
Copyright\copyright{#1}
\vskip40pt
#2\vskip200pt\egroup\endgroup}
\let\endcopyrightpage\relax
% Fin Copyright
% --------------------------------------------------------------------------% dofootnote con derechos --------------------------------------------------\def\dofnote#1#2{\vtop{\hyphenpenalty=10000
\advance\hsize -10pt \raggedright
\footnotesize{\it #1. }{ #2}\\
\noindent\hbox{\footnotesize
Derechos Reservados \copyright\ \thecopyrightyear\ Revista digital Matem\'atica,
Educaci\'on e Internet.
\href{www.tec-digital.itcr.ac.cr/revistamatematica/}{www.tecdigital.itcr.ac.cr/revistamatematica/}}}}
\def\offprintinfo#1#2{
\def\theoffprint{\bgroup\frenchspacing
\dofnote{#1}{#2}
\egroup}}
%-----------------------------------------------------------------------------

%-------------------------------------------------------------------------------% Entornos
%-------------------------------------------------------------------------------% Cajas con el paquete tcbcolor
% CONTADORES: wejemplo, wdefinicion, wlema, wteorema, wcorolario,
wproposicion,wejercicio
\newcounter{tcbca}[chapter]
\renewcommand{\thetcbca}{\thechapter.\arabic{tcbca}}
\newcounter{tcbejem}[chapter]
\renewcommand{\thetcbejem}{\thechapter.\arabic{tcbejem}}
\newcounter{tcble}[chapter]
\renewcommand{\thetcble}{\thechapter.\arabic{tcble}}
\newcounter{tcbteo}[chapter]
\renewcommand{\thetcbteo}{\thechapter.\arabic{tcbteo}}
\newcounter{tcbdefi}[chapter]
\renewcommand{\thetcbdefi}{\thechapter.\arabic{tcbdefi}}
\newcounter{tcbcoro}[chapter]
\renewcommand{\thetcbcoro}{\thechapter.\arabic{tcbcoro}}
\newcounter{tcbpropo}[chapter]
\renewcommand{\thetcbpropo}{\thechapter.\arabic{tcbpropo}}
\newcounter{tcbvoca}[chapter]
\renewcommand{\thetcbvoca}{\thechapter.\arabic{tcbvoca}}
\newcounter{tcbejer}[chapter]
\renewcommand{\thetcbejer}{\thechapter.\arabic{tcbejer}}
% Propiedades de nodo--------------------------------------------------------------\tikzset{
wnodeEjemplo/.style={%
rectangle, minimum width=4cm,
text=gray!10!black,
top color=colorejemplo!20!white, bottom color=colorejemplo,
inner sep=1mm,anchor=west,font=\normalsize},
wnodeTeorema/.style={%
rectangle, minimum width=4cm,
top color=colorteorema!50!white, bottom color=colorteorema,
text=black!80!white,
inner sep=1mm,anchor=west,font=\normalsize},
wnodeDefinicion/.style={%
rectangle, minimum width=4cm, %minimum height=0.3cm,
text=black,
top color=colordefinicion!20!white, bottom color=colordefinicion,
inner sep=1mm,anchor=west,font=\normalsize
},
wnodeCaja/.style={%
rectangle, minimum width=4cm,
top color=colorcaja, bottom color=colorcaja,
inner sep=1mm,anchor=west,font=\normalsize
}
}
% Definicin---------------------------------------------------------------------\newtcolorbox{wwdefinicion}[3][]{%

arc=0mm,breakable,
enhanced,colback=colorfondodefinicion,drop fuzzy shadow,
boxrule=0pt,
top=3mm, %Inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcbdefi}{#3},
overlay={%
% Borde
overlay first={\draw[color=colordefinicion,line width=1.9pt] (frame.north west)
--(frame.south west);
},
% Caja de Ttulo DEFINICION
\node[wnodeDefinicion]at ([xshift=-1pt, yshift=2.20mm]frame.north west)
{\textbf{Definicin \thetcbdefi \;#2}};
},
overlay last={\draw[color=colordefinicion,line width=1.9pt] (frame.north west)
--(frame.south west);
}
#1}%
%\NewDocumentEnvironment{wdefinicion}{O{} O{}
O{}}{\bigskip\begin{wwdefinicion}{#1}{#2}%
#3}{\end{wwdefinicion}\bigskip }
% Fin DEFINICION
% Ejemplo --------------------------------------------------------------------\newtcolorbox{wwejemplo}[3][]{%
arc=0mm,breakable,drop fuzzy shadow,
enhanced,colback=colorfondoejemplo,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcbejem}{#3},
overlay ={%
%Borde
overlay first={\draw[color=colorejemplo,line width=1.9pt] (frame.north west)
--(frame.south west);
},
% Caja de Ttulo EJEMPLO
\node[wnodeEjemplo]at ([xshift=-1pt,yshift=2.20mm]frame.north
west){\textbf{Ejemplo\;\thetcbejem \;\;#2}};
},
%Borde cambio de pgina
overlay middle={\draw[color=colorejemplo,line width=1.9pt] (frame.north west)
--(frame.south west);},
overlay last={\draw[color=colorejemplo,line width=1.9pt] (frame.north west)
--(frame.south west);

}
#1}
%\NewDocumentEnvironment{wejemplo}{O{} O{}
O{}}{\bigskip\begin{wwejemplo}{#1}{#2}%
#3}{\end{wwejemplo}\bigskip }
% Fin EJEMPLO
% Teorema ----------------------------------------------------------------\newtcolorbox{wwteorema}[3][]{%
arc=0mm,breakable,
enhanced,colback=colorfondoteorema,drop fuzzy shadow,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcbteo}{#3},
overlay = {%
%Bordes----------------------------------------------------------------overlay first={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);
},
%Caja de Ttulo: TEOREMA
node distance=0cm,
\node[wnodeTeorema](tituloTeo) at ([xshift=-1pt, yshift=2.20mm]frame.north west)
{\textbf{Teorema \thetcbteo \;#2}};
},
overlay last={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);
}
#1}
%\NewDocumentEnvironment{wteorema}{O{} O{}
O{}}{\bigskip\begin{wwteorema}{#1}{#2}%
#3}{\end{wwteorema}\bigskip }
% Fin TEOREMA
% LEMA ------------------------------------------------------------------------\newtcolorbox{wwlema}[3][]{%
arc=0mm,breakable,
enhanced,colback=colorfondoteorema,drop fuzzy shadow,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcble}{#3},
overlay={%
%Bordes----------------------------------------------------------------overlay first={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);

},
%Caja de Ttulo: LEMA
node distance=0cm,
\node[wnodeTeorema]at ([xshift=-1pt, yshift=2.20mm]frame.north west)
{ \textbf{Lema \thetcble\; #2}};
},
overlay last={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);
}
#1}
%\NewDocumentEnvironment{wlema}{O{} O{}
O{}}{\bigskip\begin{wwlema}{#1}{#2}%
#3}{\end{wwlema}\bigskip }
%Fin LEMA
% Proposicin ---------------------------------------------------------------\newtcolorbox{wwproposicion}[3][]{%
arc=0mm,breakable,
enhanced,colback=colorfondoteorema,drop fuzzy shadow,
boxrule=0pt,
top=3mm,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
step and label={tcbpropo}{#3},
overlay={%
%Bordes----------------------------------------------------------------overlay first={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);
},
%Caja de Ttulo: Proposicin
\node[wnodeTeorema]
at ([xshift=-1pt, yshift=2.20mm]frame.north west){ \textbf{Proposicin \;\thetcbpropo
\;#2}};},
overlay last={\draw[color=colorteorema,line width=1.9pt] (frame.north west)
--(frame.south west);
}
#1}
%\NewDocumentEnvironment{wproposicion}{O{} O{}
O{}}{\bigskip\begin{wwproposicion}{#1}{#2}%
#3}{\end{wwproposicion}\bigskip }
%Fin Proposicion----------------------------------------------------------------% % Corolario ------------------------------------------------------\newtcolorbox{wwcoro}[2][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,
top=1mm,left=3pt,
fontupper={\small\bf\sffamily {\color{azulF}Corolario \thetcbcoro}\;}~\normalfont,
step and label={tcbcoro}{#2},
overlay ={%

overlay first = {%barra vertical


\draw[color=gray,line width=3pt] ([xshift=2pt] frame.north west)--([xshift=2pt]
frame.south west); }
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=gray,line width=3pt]
([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
}
#1}
%\NewDocumentEnvironment{wcorolario}{O{}
O{}}{\smallskip\begin{wwcoro}{#1}%
}{\end{wwcoro}\smallskip }
% Corolario-----------------------------------------------------% Ejercicio - Caja para ejercicio solitario
\newtcolorbox{wwejercicio}[1][]{%
arc=0mm,breakable,enhanced,colback=gray!5,boxrule=0pt,
top=1mm,left=3pt,
fontupper={\bf\sffamily {\color{miverde}Ejercicio.}\;}~\normalfont,
overlay ={%
overlay first = {%barra vertical
\draw[color=gray,line width=3pt] ([xshift=2pt] frame.north west)--([xshift=2pt]
frame.south west); }
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=gray,line width=3pt]
([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
}
#1}
%\NewDocumentEnvironment{ejercicio}{O{}
O{}}{\smallskip\begin{wwejercicio}{#1}%
}{\end{wwejercicio}\smallskip }
% Ejercicio-----------------------------------------------------%CAJA simple--------------------------------------------------------------------\newtcolorbox{wwbox}[1][]{%
arc=0mm,breakable,drop fuzzy shadow,
enhanced,colback=grisamarillo,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
%step and label={tcbca}{#3},
overlay ={%
%Borde
overlay first={\draw[color=amarilloD,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}

},
%Borde cambio de pgina
overlay last={\draw[color=amarilloD,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
\newenvironment{scaja}[1][]{\bigskip\begin{wwbox}%
#1}{\end{wwbox}}
% Fin CAJA simple
% Fin CAJA simple
%CAJA de comentario --------------------------------------------------------------------\newtcolorbox{wwcaja}[2][]{%
arc=0mm,breakable,%drop fuzzy shadow,
enhanced,colback=colorfondocaja,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
%step and label={tcbca}{#3},
overlay ={%
%Borde
overlay first={\draw[color=colorcaja,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);},
% Caja de Ttulo CAJA
\node[ rectangle, %minimum width=0cm, minimum height=0.0cm,
top color=colorcaja, bottom color=colorcaja,
inner sep=0.5mm,anchor=west,font=\normalsize]at ([xshift=-0.4pt,
yshift=2.30mm]frame.north west){\textbf{#2}};
},
%Borde cambio de pgina
overlay last={\draw[color=colorcaja,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
%\NewDocumentEnvironment{wcaja}{O{} O{}}{\bigskip\begin{wwcaja}{#1}%
#2}{\end{wwcaja}\bigskip }
% Fin CAJA de comentario
%CAJA vocabulario------------------------------------------------------\newtcolorbox{vocabox}[3][]{%
arc=0mm,breakable,enhanced,colback=white,boxrule=0pt,
top=1mm, left=3pt,
step and label={tcbvoca}{#3},
fontupper={\small\bf\sffamily {\color{azulF}Vocabulario \thetcbvoca
\;#2}}~\normalfont, %"Vocabulario..."+texto del cuerpo

overlay ={%
overlay first = {%barra vertical
\draw[color=white,line width=3pt] ([xshift=2pt] frame.north west)--([xshift=2pt]
frame.south west); }
},%
% Mantener borde en cambio de pgina
overlay last ={\draw[color=white,line width=3pt] ([xshift=2pt] frame.north west)-([xshift=2pt] frame.south west); },
#1}
%\NewDocumentEnvironment{vocabulario}{O{} O{}
O{}}{\smallskip\begin{vocabox}{#1}{#2}%
#3}{\end{vocabox}\smallskip }
% Fin vocabulario
%CAJA nota------------------------------------------------------\newtcolorbox{notabox}[1][]{%
arc=0mm,breakable,
enhanced,colback=white,
boxrule=0pt,
top=3mm, %Separacin vertical - inicia texto
left=25pt,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper={\begin{tikzpicture}[overlay]
\node[draw=colordominanteF,line
width=1pt,circle,fill=white,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (15pt,3pt){\textcolor{colordominanteF}{N}};\end{tikzpicture}}~\normalfont,
%"NOTA..."+texto del cuerpo
overlay ={%
%Borde y crculo
overlay first={
\draw[color=white,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);
}
},
%Borde cambio de pgina
overlay last={\draw[color=white,line width=0.5pt] (frame.north west)
--([xshift=0pt]frame.north east)
--([xshift=0pt]frame.south east)
--([xshift=0pt]frame.south west)--(frame.north west);}
#1}
%\newenvironment{nota}[1][]{\bigskip\begin{notabox}%
#1}{\end{notabox}}
% Fin nota
% Fin TCOLORBOX-----------------------------------------------------------------%---------------Teoremas, definiciones, etc. SIN CAJAS --------------------------\setcounter{secnumdepth}{3}

\setcounter{tocdepth}{2}
\setcounter{chapter}{0}
\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
%Color nmero=##1, ##2=Teorema (def, etc) y ##3=[Teorema tal]
%
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont \color{azulF} ##1\
{\color{grisD}##2}\color{white}\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont \color{azulF} ##1\ {\color{grisD} ##2}\
{\color{azulF}\normalfont(##3).}\color{white}\theorem@separator]}
\theoremheaderfont{\sffamily\bfseries\color{azulF}}
\theorembodyfont{\normalfont}
\newtheorem{teorema}{Teorema}[chapter]
\newtheorem{lema}{Lema}[chapter]
\newtheorem{corolario}{{Corolario}}[chapter]
\newtheorem{definicion}{Definicin}[chapter]
\newtheorem{ejemplo}{Ejemplo}[chapter]
% Fin entornos Teoremas, definiciones, etc.---------------------------------------------%-------------------------------------------------------------------------------% LISTAS DE EJERCICIOS
%-------------------------------------------------------------------------------\RequirePackage{answers}
\newtheorem{exer}{}[chapter]
\newenvironment{ejer}{\begin{exer}\normalfont}{\end{exer}}
\Newassociation{solu}{Soln}{ans}
% USO del entorno personalizado--------------------------------------------------%\begin{ejercicios} --- \end{ejercicios} para listas simples
%\begin{cejercicios} --- \end{cejercicios} para listas en cajas
\NewDocumentEnvironment{ejercicios}{O{}}{%
\bigskip\begin{minipage}{\textwidth}{\bf\verde Ejercicios}
#1}{\end{minipage}\bigskip}
\colorlet{color1}{gray!5!white} % color fondo
\definecolor{color2}{RGB}{117,184,68} % color del nodo
% Caja ejercicios-\newtcolorbox{wwlistaejercicios}[1][]{%
arc=0mm,breakable,enhanced,colback=color1,boxrule=0pt,top=8mm,
enlarge top by=\baselineskip/2+1mm, enlarge top at break by=0mm,
pad at break=2mm,fontupper=\normalsize,
overlay ={ % nodo rectangular para "Ejercicios"
\node[rectangle, minimum width=4cm,
top color=color2, bottom color=color2,
inner sep=1mm,anchor=west,font=\normalsize]
at ([xshift=0pt,yshift=-3mm]frame.north west)%
{\textbf{Ejercicios}};},
overlay last ={ } % cambio de pgina, solo caja gris
#1}
% Nuevo entorno personalizado---------------------------------------\NewDocumentEnvironment{cejercicios}{O{}}{%
\bigskip\begin{wwlistaejercicios}%
#1}{\end{wwlistaejercicios}\bigskip } %

% ------------------------------------------------------------------% Entorno con Caja para ejercicios----------------------------------------%\begin{cajaejercicios} o \begin{cajaejercicios}[de tal]


% o \begin{cajaejercicios}[][ref]
% Entorno personalizado--------------------------------------------------\definecolor{colorejercicios}{RGB}{99,42,134}
%\newcounter{tcbejer}[chapter]
%\renewcommand{\thetcbejer}{\thechapter.\arabic{tcbejer}}
\newtcolorbox{wwejercicios}[3][]{%
arc=0mm,breakable,%drop fuzzy shadow,
enhanced,colback=gray!5,boxrule=0pt,top=7mm,
fontupper=\normalsize,step and label={tcbejer}{#3},
overlay ={%
overlay first = {
%Borde grueso superior
\draw[color=colorejercicios,line width=3pt] (frame.north west)-([xshift=0pt]frame.north east);
%Caja de Ttulo: Ejer -\node[rounded corners=3pt, draw=colorejercicios, top color=white, bottom color=white,
thick,inner sep=1mm,anchor=west, font=\small\bf\sffamily](tituloejer) at ([xshift=5mm,
yshift=0mm]frame.north west)
{\textbf{\color{miverde} Ejercicios \thetcbejer \;#2}};
%borde lnea inferior
\draw[color=colorejercicios,line width=0.2pt] (frame.south west)-([xshift=0pt]frame.south east);
} % overlay first
},%overlay
% % Mantener borde en cambio de pgina
% overlay middle = {\draw[color=colordominante,line width=0.2pt] (frame.north west)-([xshift=0pt]frame.north east);
%}
overlay middle ={},
overlay last = { %borde lnea inferior
\draw[color=colorejercicios,line width=0.2pt] (frame.south west)-([xshift=0pt]frame.south east);
}
#1}
%\NewDocumentEnvironment{cajaejercicios}{O{} O{}
O{}}{\smallskip\begin{wwejercicios}{#1}{#2}%
#3}{\end{wwejercicios}\smallskip }
% ejercicios--------------------------------------------------------% Comandos para paquete answers
% pregunta-solucin
\newcommand{\exersol}[2]{
\begin{ejer}
#1\scantokens{\begin{solu}#2\end{solu}}
\end{ejer}}
% listas \item pregunta-solucin
\newcommand{\itemps}[2]{\item #1\scantokens{\begin{solu}#2\end{solu}}}

\usepackage{enumitem}
\newcommand{\bex}{\scantokens{\begin{solu}
\end{solu}}\begin{enumerate}[label=\alph*.)]}
\newcommand{\eex}{\end{enumerate}}
% Soluciones al final del documento
\def\soluciones{
\expandafter\ifx\csname Closesolutionfile\endcsname \relax\else
\Closesolutionfile{ans}\fi
}
\def\solucionesCap#1{\section*{Soluciones del Cap\'{\i}tulo #1}\input{ans#1}}
% Fin Listas de Ejercicios------------------------------------------%----------------------------------------------------------------------------%hyperref
%----------------------------------------------------------------------------\RequirePackage[breaklinks,colorlinks=true, pdfstartview=FitV, linkcolor=azulF,
citecolor=azulF, urlcolor=azulF]{hyperref}
%\RequirePackage{breakurl} %braek url, usar despus de hyperref
%Uso \burl{http:...}
%-----------------------------------------------------------------------------%----------------------------------------------------------------------------%cdigo de programas (LaTeX en ese caso)
%----------------------------------------------------------------------------\RequirePackage{listings}
% Puede usar lstlisting|texto| para cdigo en el texto
\lstset{ %
language={[LaTeX]TeX}, %Pascal % lenguaje de programacin
basicstyle=\bfseries\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color{miverde},
backgroundcolor=\color{gray!5},
showstringspaces=false
}
%----------------------------------------------------------------------------%Listas de puntos con Tikz
%----------------------------------------------------------------------------% Puntos Tikz y Enumerate con Tikz \newcommand{\tpto}{\tikz \shadedraw [shading=ball] (0,0) circle (.1cm);}
\newcommand{\ttpto}[1]{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=blue] {\color{white}\Large\textbf#1};
\end{tikzpicture}}
\newcommand{\ttptov}{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=green] {\color{white}\Large\textbf.};
\end{tikzpicture}}
\newcommand{\ttptor}{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=red] {\color{white}\Large\textbf.};
\end{tikzpicture}}
\newcommand{\ptoazul}[1]{\begin{tikzpicture}
\node[scale=.5, circle, shade, ball color=blue] {\color{white}\Large\textbf#1};
\end{tikzpicture}}
\newcommand{\ptomb}{\ptoazul$\;$}

\newcommand{\itempto}{\item[\tpto]}
\newcommand{\pto}{\tpto}
\newcommand{\ptom}{\tpto$\;$}
\newcommand{\ptomv}{\ttptov$\;$}
\newcommand{\ptomr}{\ttptor$\;$}
% Listas -- con puntos
\RequirePackage{enumitem}
%\RequirePackage{enumerate}
\newcommand{\witem}[1]{\item[{\bf #1)}]}
\newcommand*{\itembolasgrises}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[fill=gray!50,shape=circle,draw,inner sep=1.2pt,line
width=0.2mm](n1){#1};}
\newcommand*{\itembolasazules}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=blue] {\color{white}\Large\bf#1};}
\newcommand*{\itembolasverdes}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=green] {\color{white}\Large\bf#1};}
\newcommand*{\itembolasrojas}[1]{%
\footnotesize\protect\tikz[baseline=-3pt]%
\protect\node[scale=.5, circle, shade, ball color=red] {\color{white}\Large\bf#1};}
%Comando para listas con bolas
\newcommand{\beaz}{\begin{enumerate}[label=\itembolasazules{\arabic*}]}
\newcommand{\eeaz}{\end{enumerate}}
\typeout{Paquete de Estilo A.\\
Revista digital Matemtica, Educacin e Internet.\\
http://www.tec-digital.itcr.ac.cr/revistamatematica/
}
% FIN Listas
%----------------------------------------------------------------------------% TABLAS CON Tikz
%----------------------------------------------------------------------------\usepackage{array}
\usetikzlibrary{calc,fit,shadows,arrows,positioning}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
%-%-----------------------------------------------------------------------------% Data Table
%-----------------------------------------------------------------------------\newsavebox{\dataTableContent} % Box
\newenvironment{dataTable}[1] % \new environment
{%
\begin{lrbox}{\dataTableContent}%
\begin{tabular}{#1}}%
%
{%
\end{tabular}

\end{lrbox}
\begin{tikzpicture}
\node [inner xsep=0pt] (tbl){\usebox{\dataTableContent}};
\begin{pgfonlayer}{background}
% table
\draw[rounded corners=1pt,top color=gray!1,bottom color=gray!30,draw=black]
(tbl.north east) rectangle (tbl.south west);
% top line
\draw[rounded corners=1pt,top color=gray!10!black,bottom
color=gray!50!black,draw=black]%
($(tbl.north west)$) rectangle ($(tbl.north east)-(0,1.5\baselineskip)$);
% bottom rule
\draw[rounded corners=0.25pt,fill=gray,draw=black]%
(tbl.south west) rectangle ($(tbl.south east)+(0,0.05)$);
\end{pgfonlayer}
\end{tikzpicture}}
% -%----------------------------------------------------------------------------%- Modoficacin de chapter para que abra y cierre archivos ans---------------%----------------------------------------------------------------------------\newcount\ansj % contador de listas ans i
\ansj=\thechapter
% % -- Infiltrar \chapter -------------------------------------------% \makeatletter %no es necesario en .sty
\let\stdchapter\chapter % \stdchapter guarda la def original de \chapter
\renewcommand*\chapter{ % -- Infiltrar: abrir y cerrar archivos ans j--\expandafter\ifx\csname Closesolutionfile\endcsname \relax\else
\Closesolutionfile{ans}\fi
\expandafter\ifx\csname Opensolutionfile\endcsname \relax\else
\Opensolutionfile{ans}[ans\number\ansj]\advance\ansj by 1\fi
%-----------------------------------------------------% Volver a la def original de \chapter
\@ifstar{\starchapter}{\@dblarg\nostarchapter}}
\newcommand*\starchapter[1]{\stdchapter*{#1}}
\def\nostarchapter[#1]#2{\stdchapter[{#1}]{#2}}
%\makeatother %no es necesario en .sty
% -- -------------------------------------------------------------------------

You might also like