Euterpe-zine/include/commands.tex

87 lines
2.7 KiB
TeX

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\graphicspath{{images/}} % Where are our images?
\usepackage{multicol} % Include two- or three-column sections
\counterwithout{footnote}{chapter} % Stop resetting the footnote count after each chapter
% \NumTabs{18} % Define 18 tab stops (at 1/4" intervals) [tabto package]
\raggedbottom % Don't force text to fill page
\setlength{\belowcaptionskip}{4pt} % Adjust space between caption and figure
\renewcommand*\contentsname{In This Issue…} % Change the name of the TOC
\raggedbottom
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Document Setup%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{geometry}
\geometry{
paperheight=8.5in,
paperwidth=5.5in,
margin=12mm,
% a5paper % Comment out for half-letter paper
}
\addtolength{\topmargin}{10mm} % Adjust and bottom margin
\addtolength{\textheight}{-20mm} % Adjust the bottom margin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Chapter Title Spacing %%%%%%%%%%%%%%%%%%%%
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter}
{20pt}
{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{10pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Custom Macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Make a nice border and box for the tops of our examples
\newcommand\klab[3]{\vspace{#1}\noindent{}\hrulefill\fbox{\texttt{~#2~}}\hrulefill\vspace{#3}}
% Add an \hrule with space above and below
\newcommand\krule[2]{\vspace{#1}\hrule\vspace{#2}}
% Make hrefs easier (must load package hyperref}
\newcommand\kref[2]{\href{#1}{{\texttt{#2}}}}
% Rotate text in tables easier
% https://tex.stackexchange.com/questions/89115/how-to-rotate-text-in-multirow-table
\newcommand\krot[3]{\parbox[t]{#1}{\multirow{#2}{*}{\rotatebox[origin=c]{90}{#3}}}}
% Make diversions easier (and uniform!)
\newcommand\kdivb[2]{
\medskip
\hrule
\medskip
\noindent{}\textbf{#1}
\vspace{#2mm}
\begin{multicols}{2}
}
\newcommand\kdive[1]{
\end{multicols}
\vspace{#1mm}
\hrule
\medskip
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% For lyrics issues only %%%%%%%%%%%%%%%%%%%
%% Add attributions to verse environment %%%%
\newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}
%% Define new lengths %%%%%%%%%%%%%%%%%%%%%%%
%% Redefine the verse environment %%%%%%%%%%%
\let\oldverse\verse
\def\verse{\oldverse\vspace{2em}\itshape}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Include URLS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Be sure to load this package last
% [hidelinks option to hide big red box. Thanks /u/0b0101011001001011
\usepackage[hidelinks]{hyperref} % Inlcude URLs, but load this package last