aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--fphw.cls78
-rw-r--r--tareas-fp.cls26
-rw-r--r--test.tex29
4 files changed, 101 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore
index b7afe8f..f3f5cdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
**.log
**.pdf
**.dvi
+**.synctex.gz
diff --git a/fphw.cls b/fphw.cls
new file mode 100644
index 0000000..ec83a54
--- /dev/null
+++ b/fphw.cls
@@ -0,0 +1,78 @@
+%% Tareas Estilosas
+%% Felipe Portales-Oliva (f.portales.oliva@gmail.com)
+%%
+%% Clase para crear respuestas a tareas de manera sencilla
+
+\NeedsTeXFormat{LaTeX2e} % we need to have LaTeX2e for this to compile
+\ProvidesClass{fphw}[2019/03/19 LaTeX class to deliver your homework]
+
+% We will use the article class as a template, with a fontsize of 11pt
+\LoadClass{article}
+
+% UTF-8 is best coding
+\RequirePackage[utf8]{inputenc}
+
+% We won't need those ugly margins
+\RequirePackage{geometry}
+
+% we will modify sections, subsections and sub subsections
+\RequirePackage{titlesec}
+
+
+% Minipage is cool
+% \RequirePackage{minipage}
+
+%%% set margins for the document
+% Narrow
+\DeclareOption{narrow}{\geometry{left=1.5cm,right=1.5cm,top=2cm,bottom=2cm}}
+
+% two columns are really difficult to grade, this is to avoid them
+% \DeclareOption{twocolumn}{\OptionNotUsed}
+
+% As we loaded the article class we need to pass it options not specifically
+% defined, such as font size
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+
+
+% This is the point when we pass the options
+\ProcessOptions\relax
+
+% We define the macro for the name of the professor
+\newcommand{\professor}[1]{ \renewcommand{\professor}{#1} }
+
+% We define the macro for the name of the class
+\newcommand{\class}[1]{ \renewcommand{\class}{#1} }
+
+% We define the macro for the name of the institution
+\newcommand{\institute}[1]{ \renewcommand{\institute}{#1} }
+
+
+% Redefine the title for the class
+\renewcommand{\maketitle}{%
+ \begin{center}
+ {\scshape \institute} \\[10pt]
+ \hrule
+ \vspace{10pt}
+ {\LARGE \bfseries \@title} \\[5pt]
+ Student name: {\itshape \@author}
+ \vspace{8pt}
+ \hrule
+ \vspace{10pt}
+ Course: {\itshape\class} -- Professor: {\itshape\professor}
+ \\
+ Due date: {\itshape\@date}
+ \vspace{20pt}
+ \end{center}
+}
+
+% Modification of section
+\titleformat{\section}[block]{\normalsize\bfseries\filcenter}{\thesection.}{.3cm}{}
+
+% modification of subsection and sub sub section
+\titleformat{\subsection}[runin]{\bfseries}{ \thesubsection.}
+{1mm}{}[.\quad]
+\titleformat{\subsubsection}[runin]{\bfseries\itshape}{ \thesubsubsection.}
+{1mm}{}[.\quad]
+
+% we finish the class
+\endinput
diff --git a/tareas-fp.cls b/tareas-fp.cls
deleted file mode 100644
index a898435..0000000
--- a/tareas-fp.cls
+++ /dev/null
@@ -1,26 +0,0 @@
-%% Tareas Estilosas
-%% Felipe Portales-Oliva (f.portales.oliva@gmail.com)
-%%
-%% Clase para crear respuestas a tareas de manera sencilla
-
-\NeedsTeXFormat{LaTeX2e} % we need to have LaTeX2e for this to compile
-\ProvidesClass{tareas-fp}[2019/03/19 LaTeX class to deliver your homework]
-
-% We will use the article class as a template, with a fontsize of 11pt
-\LoadClass{article}
-
-% UTF-8 is best coding
-\RequirePackage[utf8]{inputenc}
-
-% We won't need those ugly margins
-\RequirePackage{geometry}
-
-
-
-% two columns are really difficult to grade, this is to avoid them
-\DeclareOption{twocolumn}{\OptionNotUsed}
-
-% As we loaded the article class we need to pass it options not specifically defined, such as font size
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
-
-
diff --git a/test.tex b/test.tex
index d58181f..e837797 100644
--- a/test.tex
+++ b/test.tex
@@ -1,14 +1,29 @@
% this is a test document for the class we defined in this project
-\documentclass{tareas-fp}
+\documentclass[10pt,narrow]{fphw}
-\title{my tytle}
-\author{me}
-\date{today}
+\usepackage{lipsum}
-\begin{document}
-\maketitle
+\title{Homework \#1}
+\author{Felipe Portales Oliva}
+\date{\today}
+\professor{Dr. A. Landulfo}
+\class{Relativistic Quantum Mechanics}
+\institute{Universidad Federal do ABC \\ Programa de Pos Graduaçao en Física}
-hóla beééééébééééé
+
+\begin{document}
+\maketitle
+
+ \section{Lorem}
+\lipsum[1-3]
+\[ E= mc^2 \]
+\subsection{Ipsum}
+\lipsum[4-5]
+\subsubsection{Dolor}
+\lipsum[6-20]
+
+
\end{document}
+