Skip to content

Instantly share code, notes, and snippets.

Last active Feb 16, 2017
What would you like to do?
Class file of academic CV
% Telling the compiler which version of LaTeX the package is for
% Giving the compiler some information about your package
% The first argument should match the filename of you class file
% The second argument is optional and provides a description of your class which will appear in the log and other places.
% The description must begin with a date in exactly the format and it should be the date the package was last modified.
% E.g. \documentclass{myCV}[2016/07/12] with a date which is newer than the date of last modification, a waring will be shown saying that the class is outdated.
\ProvidesClass{myCV}[2016/06/28 My custom CV class]
% Load all commands from "article" class
% Layout setup
\RequirePackage[top=2cm, bottom=2cm, outer=2cm, inner=5cm, heightrounded, marginparwidth=4cm, marginparsep=1cm]{geometry}
% Add notes to margin
\reversemarginpar % notes appear on the left
% Printing out page layout parameters
% \layout{}
% Font packages
% Setting section titles to bold and all capital with "\bfseries\scshape"
% \usepackage{mathpazo}
% \usepackage{newtxtext}
% Access to Lorem ipsum context for testing
% \lipsum[1-10]
% Modifying the section title
% Include "titlesec" package to customize our header styles.
% "\RequriedPackage" rather than "\usepackage" is being used since we are in ".cls" file, and it makes sure that each package is only loaded once.
% Section title customization
{\section} % command
[display] % shape
{\bfseries\scshape\raggedright\large} % format
{} % label
{0em} % sep
% \rule{\textwidth}{1pt}
% \vspace{1ex}
% \centering
} % before-code
% \vspace{-0.5ex}%
% \rule{\textwidth}{0.3pt}
] % after-code
\subsection[#1]{#1 \hfill #2}%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment