mirror of
https://git.adityakumar.xyz/fphw.git
synced 2024-11-09 14:59:45 +00:00
this works fine for now
This commit is contained in:
parent
5c5f43ec7c
commit
6dc0021ffd
2 changed files with 66 additions and 19 deletions
63
fphw.cls
63
fphw.cls
|
@ -1,4 +1,4 @@
|
||||||
%% Tareas Estilosas
|
%% Stilish homeworks
|
||||||
%% Felipe Portales-Oliva (f.portales.oliva@gmail.com)
|
%% Felipe Portales-Oliva (f.portales.oliva@gmail.com)
|
||||||
%%
|
%%
|
||||||
%% Clase para crear respuestas a tareas de manera sencilla
|
%% Clase para crear respuestas a tareas de manera sencilla
|
||||||
|
@ -7,11 +7,14 @@
|
||||||
\ProvidesClass{fphw}[2019/03/19 LaTeX class to deliver your homework]
|
\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
|
% We will use the article class as a template, with a fontsize of 11pt
|
||||||
\LoadClassWithOptions{article}[]
|
\LoadClass{article}[onecolumn]
|
||||||
|
|
||||||
% UTF-8 is best coding
|
% UTF-8 is best coding
|
||||||
\RequirePackage[utf8]{inputenc}
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
|
||||||
|
% We load languages
|
||||||
|
\RequirePackage[spanish,british]{babel}
|
||||||
|
|
||||||
% We won't need those ugly margins
|
% We won't need those ugly margins
|
||||||
\RequirePackage{geometry}
|
\RequirePackage{geometry}
|
||||||
|
|
||||||
|
@ -21,6 +24,30 @@
|
||||||
% Header and footers, we will use the titles also
|
% Header and footers, we will use the titles also
|
||||||
\RequirePackage{fancyhdr,titling}
|
\RequirePackage{fancyhdr,titling}
|
||||||
|
|
||||||
|
\DeclareOption{twocolumn}{\OptionNotUsed}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%%%%%%%%%% Language support
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
% we hardcode some language options
|
||||||
|
\DeclareOption{spanish}{
|
||||||
|
\newcommand{\CourseLang}{Curso}
|
||||||
|
\newcommand{\ProfessorLang}{Docente}
|
||||||
|
\newcommand{\DateLang}{Fecha de entrega}
|
||||||
|
\newcommand{\StudentLang}{Nombre estudiante}
|
||||||
|
\selectlanguage{spanish}
|
||||||
|
}
|
||||||
|
|
||||||
|
\DeclareOption{english}{
|
||||||
|
\newcommand{\CourseLang}{Course}
|
||||||
|
\newcommand{\ProfessorLang}{Professor}
|
||||||
|
\newcommand{\DateLang}{Due date}
|
||||||
|
\newcommand{\StudentLang}{Student name}
|
||||||
|
\selectlanguage{british}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
% We define the macro for the name of the professor
|
% We define the macro for the name of the professor
|
||||||
|
@ -33,8 +60,8 @@
|
||||||
\newcommand{\institute}[1]{ \renewcommand{\institute}{#1} }
|
\newcommand{\institute}[1]{ \renewcommand{\institute}{#1} }
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%%%%%%%%%% Redefine the title for the class
|
||||||
% Redefine the title for the class
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\renewcommand{\maketitle}{%
|
\renewcommand{\maketitle}{%
|
||||||
\thispagestyle{plain}
|
\thispagestyle{plain}
|
||||||
\begin{center}
|
\begin{center}
|
||||||
|
@ -42,13 +69,13 @@
|
||||||
\hrule
|
\hrule
|
||||||
\vspace{10pt}
|
\vspace{10pt}
|
||||||
{\LARGE \bfseries \@title} \\[5pt]
|
{\LARGE \bfseries \@title} \\[5pt]
|
||||||
Student name: {\itshape \@author}
|
\StudentLang: {\itshape \@author}
|
||||||
\vspace{8pt}
|
\vspace{8pt}
|
||||||
\hrule
|
\hrule
|
||||||
\vspace{10pt}
|
\vspace{10pt}
|
||||||
Course: {\itshape\class} -- Professor: {\itshape\professor}
|
\CourseLang: {\itshape\class} -- \ProfessorLang: {\itshape\professor}
|
||||||
\\
|
\\
|
||||||
Due date: {\itshape\@date}
|
\DateLang: {\itshape\@date}
|
||||||
\vspace{20pt}
|
\vspace{20pt}
|
||||||
\end{center}
|
\end{center}
|
||||||
}
|
}
|
||||||
|
@ -72,8 +99,12 @@
|
||||||
% Standard
|
% Standard
|
||||||
\DeclareOption{standard}{\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}}
|
\DeclareOption{standard}{\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}}
|
||||||
|
|
||||||
|
%%% Set paper size for document
|
||||||
|
\DeclareOption{a4}{\geometry{a4paper}}
|
||||||
|
\DeclareOption{letter}{\geometry{letterpaper}}
|
||||||
|
|
||||||
% two columns are really difficult to grade, this is to avoid them
|
% two columns are really difficult to grade, this is to avoid them
|
||||||
\DeclareOption{twocolumn}{\OptionNotUsed}
|
% \DeclareOption{twocolumn}{\OptionNotUsed}
|
||||||
|
|
||||||
% the user can put their name on the header and footers along other info
|
% the user can put their name on the header and footers along other info
|
||||||
\DeclareOption{decorate}{
|
\DeclareOption{decorate}{
|
||||||
|
@ -88,13 +119,25 @@
|
||||||
\fancyfoot[RO] {\footnotesize\itshape\theauthor}
|
\fancyfoot[RO] {\footnotesize\itshape\theauthor}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% if no decoratios indicated, we do not decorate
|
||||||
|
\DeclareOption{donotdecorate}{\pagestyle{plain}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%%% These are the default options
|
||||||
|
\ExecuteOptions{donotdecorate,a4}
|
||||||
|
|
||||||
% As we loaded the article class we need to pass it options not specifically
|
% As we loaded the article class we need to pass it options not specifically
|
||||||
% defined, such as font size
|
% defined, such as font size
|
||||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
|
\DeclareOption*{\ClassWarningNoLine{fphw}{\CurrentOption not recognized}}
|
||||||
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% This is the point when we pass the options
|
% This is the point when we pass the options
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\ProcessOptions\relax
|
\ProcessOptions\relax
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% we finish the class
|
% we finish the class
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\endinput
|
\endinput
|
||||||
|
|
8
test.tex
8
test.tex
|
@ -1,18 +1,22 @@
|
||||||
% this is a test document for the class we defined in this project
|
% this is a test document for the class we defined in this project
|
||||||
|
|
||||||
\documentclass[11pt,standard,decorate,a4paper]{fphw}
|
\documentclass[standard,decorate,spanish,letter]{fphw}
|
||||||
|
|
||||||
\usepackage{lipsum,mathpazo}
|
\usepackage{lipsum,mathpazo}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\title{Solución Tarea \#1}
|
\title{Solución Tarea \#1}
|
||||||
\author{Felipe Ignacio Portales Oliva}
|
\author{Felipe Ignacio Portales Oliva}
|
||||||
|
|
||||||
\date{\today}
|
\date{\today}
|
||||||
\professor{Dr. G. Rubilar}
|
\professor{Dr. G. Rubilar}
|
||||||
\class{Teoría General de la Relatividad I}
|
\class{Teoría General de la Relatividad I}
|
||||||
\institute{Universidad de Concepción \\ Programa de Magíster en Ciencias con Mención en Física}
|
\institute{Universidad de Concepción \\ Programa de Magíster en Ciencias con Mención en Física}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\maketitle
|
\maketitle
|
||||||
\section{Lorem}
|
\section{Lorem}
|
||||||
|
@ -21,7 +25,7 @@
|
||||||
\subsection{Ipsum}
|
\subsection{Ipsum}
|
||||||
\lipsum[4-5]
|
\lipsum[4-5]
|
||||||
\subsubsection{Dolor}
|
\subsubsection{Dolor}
|
||||||
\lipsum[6-20]
|
\lipsum[6-10]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue