0

Brand new to LaTeX. I wanted to start simple by generating a one-page research statement following this minimalist research statement template on Overleaf. In the example, it clearly shows a running head including the author name and title in the upper right and left corners, respectively.

enter image description here

Unfortunately, when I open the template those components are missing and I cannot figure out how to correct what's already here to fix it.

enter image description here

This is the main .tex document, in which I've tried to replace YourName and Statement Type with my details:

.tex Document:

% 
% This format is intended to be used for frequently requested
% academic statements, like research and teaching statements.
%
% Uses Atkinson Hyperlegible font for better accessibility
%        (see https://brailleinstitute.org/freefont)
%
% Created by Acacia Ackles, 2021
%
% Free to share and redistribute with attribution (CC BY)
%

\documentclass[12pt]{ministate}

\name{YourName} \statement{Statement Type}

\begin{document}

\runninghead

\thispagestyle{fancy}

Sample text about how cool you are at doing stuff.

Some more sample text.

\textbf{A bold statement about you}, and how good your work is.

\bibliographystyle{plain} \end{document}

This uses the Arkinson Hyperlegible font and references a .cls file which I'll append to the bottom here.

Troubleshooting:

I've reviewd the fancyhdr documentation but haven't been able to figure out from that what is being misused. While I'm a proficient coder in some other langauges (Python, R, Bash, etc.), I'm still getting my bearings for how functions are defined in LaTeX and I'm wondering if that's where teh issue lies here. I did try to skip functions entirely and just directly specify the text I want in the header in the .cls document where the \@function_name are placed in the header function, but that did not work either.

I'm sure I'll figure it out as I learn more LaTeX but figured I'd see if the community could steer me in the right direction. Regardless, thanks so much for your time!

.cls Document:

\ProvidesClass{ministate}[2021/09/15 v1.0 Minimalist statement class]
\LoadClass[10pt,letterpaper]{article} % Font size and paper type

%--------------------------------------------------% % packages % % % %--------------------------------------------------% % Document Formatting \usepackage[margin=1in]{geometry} \usepackage{parskip} \usepackage{fancyhdr} \setlength{\headheight}{12pt}

% References and Citations \usepackage{url} \usepackage{hyperref} \usepackage{natbib}

%--------------------------------------------------% % Fonts % % % %--------------------------------------------------%

% !!!!!!! IMPORTANT !!!!!!! % !! XELATEX COMPILATION REQUIRED !! % Set compiler in Overleaf menu <-

\usepackage{fontspec} \usepackage{fontawesome}

% .ttf files required \setmainfont{AtkinsonHyperlegible}[ Extension = .ttf, UprightFont = -Regular, BoldFont = -Bold, ItalicFont = -Italic, BoldItalicFont = -BoldItalic]

%--------------------------------------------------% % New Commands % % % %--------------------------------------------------%

% NAME AND TYPE OF STATEMENT \def \name#1{\def@name{#1}} % Defines the \name command to set name \def @name {} % Sets @name to empty by default

\def \statement#1{\def@statement{#1}} % Defines the \statement command to set type of statement \def @statement {} % Sets @statement to empty by default

\def \runninghead{ \begingroup \pagestyle{fancy} \fancyhf{} \rhead{\MakeUppercase{\bf @name}} \lhead{\MakeUppercase{\bf @statement}} \rfoot{\thepage} \endgroup }

  • Not directly related, but use of \bf is deprecated. See https://tex.stackexchange.com/questions/41681/correct-way-to-bold-italicize-text – enkorvaks Dec 15 '22 at 03:08
  • 2
    The header provided by ministate.cls only displays automatically in TL2020 (See https://www.overleaf.com/learn/how-to/Using_the_Overleaf_project_menu#TeX_Live_version for changing Overleaf projects' TeX Live version). To get it working in TL2021 and newer, the \begingroup and \endgroup on lines 53, 59 of minipage.cls that surrounds the fancy page style configs need to be removed. – imnothere Dec 15 '22 at 03:39

1 Answers1

0

I will post the initial version that addresses the issue. The solution might not be optimal, and I encourage the community to improve it further.

% The package requires XeLaTeX to compile because of the custom fonts.

% Credits to the original author: Acacia Ackles % Original template: https://www.overleaf.com/latex/templates/minimalstatement/pzgpkvvrzyqj

% Modified by @GCerar \ProvidesClass{ministate}[2023/03/29 v2.0 Minimalist statement class] \LoadClass[11pt,a4paper]{article} % Font size and paper type % EDIT: Adapted fontsize and papersize

%--------------------------------------------------% % packages % % % %--------------------------------------------------% % Document Formatting \usepackage[margin=0.8in]{geometry} % EDIT: A bit less margin \usepackage{parskip}

\usepackage{fancyhdr} \setlength{\headheight}{15.2pt} \pagestyle{fancy}

\fancyfoot{} % Override existing foot numbering \fancyhf[HLE,HRO]{\bfseries@author} \fancyhf[HRE,HLO]{{\bfseries@title}\quad(@date)} \fancyhf[FLE,FRO]{\thepage}

% References and Citations \usepackage{url} \usepackage{hyperref} \usepackage{natbib}

% Fonts \usepackage{fontspec} \usepackage{fontawesome}

% .ttf files required \setmainfont{AtkinsonHyperlegible}[ Extension = .ttf, UprightFont = -Regular, BoldFont = -Bold, ItalicFont = -Italic, BoldItalicFont = -BoldItalic]

The template can be used as follows:

% 
% This format is intended to be used for frequently requested
% academic statements, like research and teaching statements.
%
% Uses Atkinson Hyperlegible font for better accessibility
%        (see https://brailleinstitute.org/freefont)
%
% Created by Acacia Ackles, 2021
%
% Free to share and redistribute with attribution (CC BY)
%

\documentclass[12pt]{./ministate}

\author{Author's name} \title{Statement Type}

\begin{document}

Sample text about how cool you are at doing stuff.

Some more sample text.

\textbf{A bold statement about you}, and how good your work is.

\bibliographystyle{plain} \end{document}

gcerar
  • 101
  • 2