-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.tex
95 lines (86 loc) · 2.71 KB
/
preamble.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\usepackage{amssymb}
\usepackage{xfrac}
% \usepackage{mdframed}
\usepackage[framemethod=TikZ]{mdframed} % noteboxes, boxes, etc.
\newcounter{definition}
\newenvironment{defin}[1][]{%
\stepcounter{definition}%
\ifstrempty{#1}%
{\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=white]
{\strut Definición};}}
% {\strut Definición~\thedefinition};}}
}%
{\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=white]
{\strut Definición:~#1};}}%
% {\strut Definición~\thedefinition:~#1};}}%
}%
\mdfsetup{innertopmargin=1pt,linecolor=black!60,%
linewidth=1pt,topline=true,
frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}
\begin{mdframed}[]\relax%
}{\end{mdframed}}
\newcounter{theorem}
\newenvironment{theo}[1][]{%
\stepcounter{theorem}%
\ifstrempty{#1}%
{\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=white]
{\strut Teorema};}}
% {\strut Teorema~\thetheorem};}}
}%
{\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=white]
{\strut Teorema~(#1)};}}%
% {\strut Teorema~\thetheorem:~#1};}}%
}%
\mdfsetup{innertopmargin=1pt,linecolor=black!60,%
linewidth=1pt,topline=true,
frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}
\begin{mdframed}[]\relax%
}{\end{mdframed}}
% \newmdtheoremenv{theo}{Teorema}
% \newmdtheoremenv{defin}{Definición}
% \usepackage{amsmath}
\usepackage{booktabs}
\ifxetex
\usepackage{polyglossia}
\setmainlanguage{spanish}
% Tabla en lugar de cuadro
\gappto\captionsspanish{\renewcommand{\tablename}{Tabla}
\renewcommand{\listtablename}{Índice de tablas}}
\else
\usepackage[spanish,es-tabla]{babel}
\fi
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand\subsectionmark[1]{}
\renewcommand\sectionmark[1]{}
\renewcommand{\arraystretch}{1.15}
\setlength{\headheight}{15pt}
% \renewcommand\frac[2]{{\scriptstyle\dfrac{#1}{#2}}}
% \usepackage[skins]{tcolorbox}
%
% \newtcolorbox{myframe}[2][]{%
% enhanced,colback=white,colframe=black,coltitle=black,
% sharp corners,boxrule=0.4pt,
% fonttitle=\itshape,
% attach boxed title to top left={yshift=-0.3\baselineskip-0.4pt,xshift=2mm},
% boxed title style={tile,size=minimal,left=0.5mm,right=0.5mm,
% colback=white,before upper=\strut},
% title=#2,#1
% }
%
% \newcommand{\ejemplo}{1}{\begin{myframe}{__Ejemplo__}
% #1
% \end{myframe}
% }