Last active
January 11, 2023 22:34
-
-
Save rawlik/f468435c4639362d04847f547e27af54 to your computer and use it in GitHub Desktop.
Custom Latex style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{rawlikstyle}[A custom style for latex documents] | |
% always use the UTF-8 encoding | |
\RequirePackage[utf8]{inputenc} | |
% clickable links | |
\RequirePackage{hyperref} | |
% palatino font for text and maths | |
\RequirePackage{mathpazo} | |
\usepackage[light]{FiraSans} | |
%\RequirePackage{cabin} | |
% title | |
\RequirePackage{titling} | |
\pretitle{\sffamily \scshape \Huge \centering} | |
\posttitle{\bigbreak} | |
\predate{\medskip \sffamily \scshape \large \centering} | |
\postdate{\medbreak} | |
% affiliations | |
\RequirePackage[noblocks,auth-sc,affil-it]{authblk} | |
% the abstract | |
\RequirePackage{abstract} | |
\renewcommand{\abstracttextfont}{\sffamily\normalsize} | |
\renewcommand{\abstractname}{} % clear the title | |
\renewcommand{\absnamepos}{empty} % originally center | |
% write dates in the day, month, year order | |
\RequirePackage[UKenglish]{isodate} | |
% style of the titles of the sections | |
\usepackage[sc,sf,bf]{titlesec} | |
% separate paragraphs with a space rather than indentation | |
\RequirePackage[parfill]{parskip} | |
% figures and graphics | |
\RequirePackage{graphicx} | |
\RequirePackage{subfig} | |
\RequirePackage[export]{adjustbox} | |
% decide on the exact placement of figures with [H] | |
\RequirePackage{float} | |
\RequirePackage[dvipsnames]{xcolor} | |
% Captions | |
\RequirePackage[font={small, sf},labelfont={sf,bf}]{caption} | |
\renewcommand\figurename{Fig.} | |
% bibliography | |
\RequirePackage[style=nature,backend=biber,url=false,isbn=false,date=year]{biblatex} | |
% small font in the bibliography | |
\renewcommand*{\bibfont}{\footnotesize} | |
% do not show the issue | |
\AtEveryBibitem{\clearfield{issue}} | |
% upright greek characters | |
\RequirePackage{upgreek} | |
\RequirePackage{textgreek} | |
% typeset units properly | |
\RequirePackage{siunitx} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment