-
Notifications
You must be signed in to change notification settings - Fork 1
/
estilo-ejercicios.sty
136 lines (123 loc) · 4.12 KB
/
estilo-ejercicios.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{estilo-ejercicios}
\usepackage[utf8x]{inputenc}
\usepackage[spanish,es-nodecimaldot]{babel}
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage{enumerate}
\usepackage{comment}
\usepackage{graphicx}
\usepackage{mathrsfs}
\usepackage{setspace}
\usepackage{nccmath}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{pgf,tikz}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\usetikzlibrary{cd}
\usetikzlibrary{babel}
\hypersetup{colorlinks=true,citecolor=red, linkcolor=blue}
\renewcommand{\baselinestretch}{1,4}
\setlength{\oddsidemargin}{0.5in}
\setlength{\evensidemargin}{0.5in}
\setlength{\textwidth}{5.4in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0.5in}
\setlength{\headsep}{0.6in}
\setlength{\textheight}{8in}
\setlength{\footskip}{0.75in}
\theoremstyle{definition}
\newtheorem{ejer}{Ejercicio}
\newtheorem{lemma}{Lema}
\newtheorem{coro}{Corolario}
\newtheorem{prop}{Proposición}
\newtheorem*{defi}{Definición}
\newtheorem*{sol}{Solución}
\newtheorem*{theorem}{Teorema}
\newtheorem*{dem}{Demostración}
\newtheorem{ejercicioaux}{Ejercicio}
\newenvironment{ejercicio}[1]
{\renewcommand\theejercicioaux{#1}\ejercicioaux\label{ejer:#1}}
{\endejercicioaux}
\newcounter{ejercounter}[section]
\setcounter{ejercounter}{\value{ejercicioaux}}
\newenvironment{solucion}{\begin{trivlist}
\item[\hskip \labelsep {\textit{Solución}.}\hskip \labelsep]}{\end{trivlist}}
\setlength{\parindent}{0pt}
\newtheorem{nota}{Nota}
\SetUnicodeOption{mathletters}
\SetUnicodeOption{autogenerated}
\providecommand{\orden}[1]{\mathcal{O}\left({#1}\right)}
\providecommand{\abs}[1]{\left\lvert#1\right\rvert}
\providecommand{\norm}[1]{\lVert#1\rVert}
\providecommand{\ninf}[1]{\norm{#1}_\infty}
\providecommand{\numn}[1]{\norm{#1}_1}
\providecommand{\gabs}[1]{\left|{#1}\right|}
\newcommand{\bor}[1]{\mathcal{B}(#1)}
\providecommand{\func}[2]{\colon{#1}\longrightarrow{#2}}
\newcommand{\A}{\mathbb{A}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\calF}{\mathcal{F}}
\newcommand{\calA}{\mathcal{A}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\X}{\chi}
\newcommand{\V}{\mathcal{V}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\mm}{\mathfrak{m}}
\newcommand{\pp}{\mathfrak{p}}
\newcommand{\qq}{\mathfrak{q}}
\providecommand{\Zn}[1]{\Z / \Z #1}
\newcommand{\resi}{\varepsilon_L}
\newcommand{\cee}{\mathbb{C}}
\providecommand{\xn}[1]{x_1\dotsc x_{#1}}
\providecommand{\kn}{[x_1\dotsc x_{n}]}
\providecommand{\conv}[1]{\overset{#1}{\longrightarrow}}
\providecommand{\mini}[2]{\min_{#1}{\left\{#2\right\}}}
\providecommand{\maxi}[2]{\max_{#1}{\left\{#2\right\}}}
\providecommand{\gene}[1]{\langle{#1}\rangle}
\providecommand{\deci}[1]{\left\{{#1}\right\}}
\providecommand{\suelo}[1]{\left\lfloor{#1}\right\rfloor}
\providecommand{\ceil}[1]{\left\lceil{#1}\right\rceil}
\providecommand{\convcs}{\xrightarrow{CS}}
% xrightarrow{d}[d]
\setcounter{ejer}{0}
\newcommand{\cicl}{\mathcal{C}}
\newcommand{\parcial}[2]{\frac{\partial #1}{\partial #2}}
\DeclareMathOperator{\Ima}{Im}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\Rea}{Re}
\DeclareMathOperator{\coker}{coker}
\raggedbottom
% Esto es para meter un itemize multiculumna, a ver si va
\usepackage{etoolbox,refcount}
\usepackage{multicol}
\newcounter{countitems}
\newcounter{nextitemizecount}
\newcommand{\setupcountitems}{%
\stepcounter{nextitemizecount}%
\setcounter{countitems}{0}%
\preto\item{\stepcounter{countitems}}%
}
\makeatletter
\newcommand{\computecountitems}{%
\edef\@currentlabel{\number\c@countitems}%
\label{countitems@\number\numexpr\value{nextitemizecount}-1\relax}%
}
\newcommand{\nextitemizecount}{%
\getrefnumber{countitems@\number\c@nextitemizecount}%
}
\newcommand{\previtemizecount}{%
\getrefnumber{countitems@\number\numexpr\value{nextitemizecount}-1\relax}%
}
\makeatother
\newenvironment{AutoMultiColItemize}{%
\ifnumcomp{\nextitemizecount}{>}{3}{\begin{multicols}{2}}{}%
\setupcountitems\begin{itemize}}%
{\end{itemize}%
\unskip\computecountitems\ifnumcomp{\previtemizecount}{>}{3}{\end{multicols}}{}}