diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ddf6537 --- /dev/null +++ b/.gitignore @@ -0,0 +1,303 @@ +# From: https://github.com/github/gitignore/blob/e5323759e387ba347a9d50f8b0ddd16502eb71d4/TeX.gitignore + +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib diff --git a/Figures/Handgloves.png b/Figures/Handgloves.png new file mode 100644 index 0000000..109ea87 Binary files /dev/null and b/Figures/Handgloves.png differ diff --git a/README.md b/README.md index 707475a..a6327dc 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,59 @@ -Welcome to the Joyner Document Format official LaTeX class. -This class was written and tested using a default MacTeX installation, -so it should work out of the box -as long as you’re running an up-to-date LaTeX distribution. +# Joyner Document Format -## Quick start +Welcome to the **2022 fork** of the Joyner Document Format official LaTeX class. + +## TeX Installation + +If you already have Tex installed and configured for your OS than you can likely skip to Quick Start section + +### MacOS + +```sh +brew install text-live-utility +# Ensure required packages are installed +sudo tlmgr install collection-latexrecommended collection-latexextra collection-fontsrecommended collection-fontsextra collection-mathscience +``` + +### Linux + +```sh +# For Ubuntu (From https://github.com/iamjakewarner/jdf/pull/15/files) +sudo apt-get install texlive-full +``` + +### Windows + +Could possibly follow the Linux guide on WSL + +## CLI Quick start You can clone this repo and try typesetting `jdf-starter.tex` with the following commands: - biber jdf-starter - pdflatex jdf-starter +```sh +biber jdf-starter +pdflatex jdf-starter +``` The result should look like `jdf-starter.pdf`. -* `biber` command generates used referenes from `references.bib` +* `biber` command generates used references from `references.bib` * `pdflatex` command generates the final pdf +## Adding jdf.cls to Global TeX + +The `jdf.cls` file can be referenced by updating the `TEXINPUTS` with the path to the git checkout + +```sh +export TEXINPUTS=/path/to/the/checkout/jdf/ +``` + +## VSCode Quick Start + +1. Add the [Latex Workshop](https://github.com/James-Yu/LaTeX-Workshop) Extension + - Ensure that `texlive` for your OS is installed. See additional instructions in the extensions' README +1. Use the preview icon (top left) or use the keyboard shortcut (Ctrl + Alt + V). This will open up a live preview. +1. Once done, use the green play button, or use keyboard shortcut (Ctrl + Alt + B) to build the project and generate PDF. + ## License Copyright 2019 by Jake Warner. @@ -22,4 +61,4 @@ Copyright 2019 by Jake Warner. You have my permission to use JDF in whatever projects you wish, whether commercial, personal, or otherwise, in whatever way you like. Official license information can be found in [LICENSE](LICENSE) -(spoiler: it's the MIT License). +(spoiler: it's the MIT License 🙀). diff --git a/jdf-starter.pdf b/jdf-starter.pdf index 89d7805..533e51d 100644 Binary files a/jdf-starter.pdf and b/jdf-starter.pdf differ diff --git a/jdf-starter.tex b/jdf-starter.tex index c26c876..8580308 100644 --- a/jdf-starter.tex +++ b/jdf-starter.tex @@ -19,15 +19,22 @@ \end{abstract} \section{Typography} -All text in JDF should be set in the Palatino typeface. It is available practically everywhere as a system font: Microsoft ships a version called \emph{Palatino Linotype}, and Apple uses a version simply called \emph{Palatino}. Those without either can look for \emph{Book Antiqua} in their fonts list or download \href{https://www.ctan.org/tex-archive/fonts/tex-gyre/opentype}{\TeX\ Gyre Pagella} from CTAN. They all come in regular and bold weights with matching italics. +All text in JDF should be set in the Palatino typeface. It is available practically everywhere as a system font: Google Docs offers a version called \emph{Palatino Linotype}. It comes in regular and bold weights with matching italics. + +\begin{jdffigure} +\includegraphics[height=0.77cm]{Figures/Handgloves.png} \\ +{\huge Handgloves}% +\captionof{figure}{Palatino. Make sure the live text (bottom) uses the same font as the image (top).}\label{fig:Palatino}% +\end{jdffigure} +% For example in Figure \ref{fig:Palatino} on page \pageref{fig:Palatino}... \subsection{Body text} -Body text is set in the regular weight at 11 points with 17 points of line spacing, and 8.5 points of spacing added after each paragraph. It should be justified with hyphenation enabled where available. Paragraphs should not be indented. These styles can be automatically applied using the \emph{Normal} paragraph style. +Body text is set in the regular weight at 11 points with custom line spacing of 1.26, and 8.5 points of spacing added after each paragraph. It should be justified and paragraphs should not be indented. These styles can be automatically applied using the \emph{Normal} paragraph style. \textbf{Bold} and \textit{italics} should be used for emphasis. Hyperlinks may be inserted in the text, as well as {\tt in-line code}, superscripts\textsuperscript{ like this}, and subscripts\textsubscript{ like this}. \subsection{Title \& subtitle} -The paper title should be set in the regular weight at 17 points with 22 points of line spacing, centered at the top of the first page. The title may span up to three lines. For typical assignments, the document title may be as simple as “Assignment 1” More specialized assignments may warrant more unique paper names, like “A Proposal to Create a New Document Format.” +The paper title should be set in the regular weight at 17 points with 22 points of line spacing, centered at the top of the first page. The title may span up to three lines. For typical assignments, the document title may be as simple as "Assignment 1" More specialized assignments may warrant more unique paper names, like "A Proposal to Create a New Document Format." The author’s name and email should come next unless you want to or were asked to submit anonymously, in which case this can be omitted. They should be set in the same size and weight as body text, centered. These styles can be applied using the \emph{Title} and \emph{Subtitle} paragraph styles. @@ -38,17 +45,18 @@ \subsection{Headings} Headings should all be set in the same size as body text (11 pt) in bold. With the exception of \emph{Heading 1}, they should all have 8.5 pt of space before and after. They should be hierarchically numbered: Word, Pages, and \LaTeX\ will do this automatically when you use the appropriate paragraph styles, but Google Docs users will need to number their headings manually. Headings should not span more than one line. \subsubsection{Heading 1} -Heading 1 should be set in all caps, with letterspacing expanded by 0.66 points (6\%). It should have 11 points of space added before and 8.5 points of space added after. +\emph{Heading 1} should be set in all caps. It should have 11 points of space added before and 8.5 points of space added after \subsubsection{Headings 2\,–\,4} Besides \emph{Heading 1}, which is set in caps, headings should always use sentence case (i.e., first word capitalized) rather than title case; after all, they are not titles. \emph{Heading 2} should be set in bold roman (upright), and \emph{Heading 3} should be set in bold italics. The use of headings beyond \emph{Heading 3} is discouraged. -\subsubsubsection{Heading 4}\emph{Heading 4} is provided as a run-in sidehead. Like \emph{Heading 3}, it is set in bold italics, but it should be followed by an em dash and flow right into the text, as seen at the beginning of the current paragraph. It should be used more as a list style than a heading style, e.g. to set off a list of principles in a heuristic evaluation. +\subsubsubsection{Heading 4} +\emph{Heading 4} is provided as a run-in sidehead. Like \emph{Heading 3}, it is set in bold italics, but it should be followed by an em dash and flow right into the text, as seen at the beginning of the current paragraph. It should be used more as a list style than a heading style, e.g. to set off a list of principles in a heuristic evaluation. \subsection{Page layout} JDF uses the US Letter paper size (8.5" x 11"). It has a top margin of 1", and bottom and side margins of 1.5". This yields a text block of 5.5" x 8.5", which is exactly \(\frac{1}{2}\) the size of the page, divided lengthwise. -The page number should be included in the bottom margin, 1" from the bottom of the page – this creates symmetry with the top margin. No other elements should be placed in the margins. +The page number should be included in the bottom margin, 1" from the bottom of the page. No other elements should be placed in the margins. \section{Presentational elements} You are encouraged to use presentational elements liberally, as long as they add to the clarity of your submissions. They often require less space and fewer accompanying words to explain a given concept, and do a far better job of it. @@ -58,47 +66,44 @@ \subsection{Figures} If your figure includes a white background (e.g. an interface design or graph), it may aid legibility to add a \(\frac{1}{4}\)-point black border. -\begin{figure}[h] - \centering - \includegraphics[height=6cm]{Figures/flowchart.png} - \caption{Make sure your flowcharts are more useful than this one. Source: \href{https://xkcd.com/1195/}{XKCD}.} - \label{fig:flowchart} -\end{figure} +\begin{jdffigure} +\includegraphics[height=6cm]{Figures/flowchart.png}% +\captionof{figure}{Make sure your flowcharts are more useful than this one. Source: \href{https://xkcd.com/1195/}{XKCD}.}\label{fig:flowchart}% +\end{jdffigure} -Figure captions should be centered beneath the corresponding figure. The label (e.g. “Figure 1”) should be set in bold italics followed by an em dash, and the entire caption should be 8.5 pt with 14 pt of line spacing. The \emph{Figure Caption} style in Word will number your figures automatically. If need be, you may have one figure caption corresponding to consecutive figures and use either locational descriptors (e.g. “top left,” “middle”) or labels (e.g. “A”, “B”) to map parts of the caption to parts of the figure. Make sure captions fall on the same page as the corresponding figure or table; you may rearrange text to make this work. +Figure captions should be placed beneath the corresponding figure, indented 1" on the left and right sides. The label for the figure, e.g. "Figure 1," should be set in bold italics followed by an em dash, and the entire caption should be 8.5 points with 14 points of line spacing. Again, Word and LaTeX will number these automatically using the \emph{Figure Caption} paragraph style, but Docs users will need to number these manually. If need be, you may have one figure caption corresponding to multiple consecutive figures and use either locational descriptors (e.g. "top left," "middle") or labels (e.g. "A", "B") to map parts of the caption to parts of the figure. Make sure that caption falls on the same page as the corresponding figure or table; you may rearrange text to make this work. -In Word, you may need to either change the image’s text wrap settings to “Top and Bottom” or change the line spacing of the image to 1.0. +In Microsoft Word, you may need to either change the image’s text wrap settings to "Top and Bottom" or change the line spacing of the image to 1.0. \subsection{Tables} -You have freedom to format tables in the way that works best for your data. Generally, text should be left-aligned and numbers should be right-aligned or aligned at the decimal – you can do this using a custom tab stop. The default table style (shown below) reduces the text size to be equal to the caption text. +You have freedom to format tables in the way that works best for your data. Generally, text should be left-aligned and numbers should be right-aligned or aligned at the decimal – you can do this using a \href{https://practicaltypography.com/tabs-and-tab-stops.html}{custom tab stop}. The default table style (shown below) reduces the text size to be equal to the caption text. Table captions should be formatted the same way as figure captions, but they should be placed above the table. The popular mnemonic for this is: figures at the foot, tables at the top. Like figures, tables should not exceed the margins and should be centered on the page. -\begin{table}[h] % [h] forces the table to be output where it is defined in the code (it suppresses floating) - \caption{Mathematical constants. Notice how the approximations align at the decimal.} - \small % Reduce font size - \centering % Centre the table - \begin{tabular}{L{0.17\linewidth} C{0.12\linewidth} L{0.17\linewidth} L{0.4\linewidth}} - \textbf{Name} & \textbf{Symbol} & \textbf{Approximation} & \textbf{Description} \\ - \toprule[0.5pt] - Golden ratio & $\phi$ & 1.618 & Number such that the ratio of " to the number is equal to the ratio of its reciprocal to 1\\ - \midrule - Euler's number & $e$ & 2.71828 & Exponential growth constant\\ - \midrule - Archimedes' constant & $\pi$ & 3.14 & The ratio between circumference and diameter of a circle\\ - \midrule - One hundred & A+ & 100.00 & The grade we hope you’ll all earn in this class\\ - \end{tabular} -\end{table} +\begin{jdftable} +\captionof{table}{Mathematical constants. Notice how the approximations align at the decimal.}\label{table:Example} +\small % Reduce font size +\begin{tabular}{@{} L{0.15\linewidth} c S L{0.52\linewidth}} + \textbf{Name} & \textbf{Symbol} & \textbf{Approximation} & \textbf{Description} \\ + \toprule[0.5pt] + Golden ratio & $\phi$ & 1.618 & Number such that the ratio of " to the number is equal to the ratio of its reciprocal to 1\\ + \midrule + Euler's number & $e$ & 2.71828 & Exponential growth constant\\ + \midrule + Archimedes' constant & $\pi$ & 3.14 & The ratio between circumference and diameter of a circle\\ + \midrule + One hundred & A+ & 100.00 & The grade we hope you’ll all earn in this class\\ +\end{tabular} +\end{jdftable} \subsection{Additional elements} There are additional elements you may want to include in your paper, such as in-line or block quotes, lists, and more. For other content types not covered here, you have flexibility in determining how it should be used in this format. \subsubsection{Quotes} -If you would like to quote an outside source, you may do so with quotation marks followed by a citation. If a quote is fewer than three lines, you may write it in-line. It is acceptable to replace pronouns with their target in brackets for clarity. For example, “Heavy use of peer grading would compromise [the school’s] reputation” (Joyner, 2016). If a quote exceeds three lines, you should set it as its own paragraph with 0.5” side margins, using the Blockquote style. +If you would like to quote an outside source, you may do so with quotation marks followed by a citation. If a quote is fewer than three lines, you may write it in-line. It is acceptable to replace pronouns with their target in brackets for clarity. For example, "Heavy use of peer grading would compromise [the school’s] reputation" \citep{joyner2016}. If a quote exceeds three lines, you should set it as its own paragraph with 0.5" side margins, using the \emph{Blockquote} style. \begin{quotation} - \noindent “Whether or not the grades generated by peers are reliably similar to grades generated by experts is only one factor worth considering, however. Student perception is also an important factor. A recent study indicated that reliance on peer grading is one of the top drivers of high MOOC dropout rates. This problem may be addressed by reintroducing some expert grading where possible.” %\citep{joyner2016} +"Whether or not the grades generated by peers are reliably similar to grades generated by experts is only one factor worth considering, however. Student perception is also an important factor. A recent study indicated that reliance on peer grading is one of the top drivers of high MOOC dropout rates. This problem may be addressed by reintroducing some expert grading where possible." \citep{joyner2016} \end{quotation} \subsubsection{Lists} @@ -120,7 +125,7 @@ \subsubsection{Lists} \section{Procedural elements} \subsection{In-line citations} -Articles or sources to which you refer should be cited in-line with the authors’ names and the year of publication.\footnote{In-line citations are preferred over footnotes, and we favor APA citation format for both in-line citations and reference lists. Refer to the Purdue Online Writing Lab, or follow the above examples. Footnotes should use 8.5 point text with 14 point line spacing.} The citation should be placed close in the text to the actual claim, not merely at the end of the paragraph. For example: students in the OMSCS program are older and more likely to be employed than students in the on-campus program \citep{joyner2017}. In the event of multiple authors, list them. For example: research finds sentiment analysis of the text of OMSCS reviews corresponds to student-assigned ratings of the course \citep{newman2018}. You may also cite multiple studies together. For example: several studies have found students in the online version of an undergraduate CS1 class performed equally with students in a traditional version (\cite{joyner2018a}; \cite{joyner2018b}). If you would like to refer to an author in text, you may also do so by including the year (in parentheses) after the author’s name in the text. If a publication has more than 4 authors, you may list the first author followed by ‘et al.’ For example: \citeauthor{joyner2016} (\citeyear{joyner2016}) claim that a round of peer review prior to grading may improve graders’ efficiency and the quality of feedback given. This applies to parenthetical citations as well, e.g. \citep{joyner2016}. +Articles or sources to which you refer should be cited in-line with the authors’ names and the year of publication.\footnote{In-line citations are preferred over footnotes, and we favor APA citation format for both in-line citations and reference lists. Refer to the \href{https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/in_text_citations_the_basics.html}{Purdue Online Writing Lab}, or follow the above examples. Footnotes should use 8.5 point text with 1.26 line spacing.} The citation should be placed close in the text to the actual claim, not merely at the end of the paragraph. For example: students in the OMSCS program are older and more likely to be employed than students in the on-campus program \citep{joyner2017}. In the event of multiple authors, list them. For example: research finds sentiment analysis of the text of OMSCS reviews corresponds to student-assigned ratings of the course \citep{newman2018}. You may also cite multiple studies together. For example: several studies have found students in the online version of an undergraduate CS1 class performed equally with students in a traditional version (\cite{joyner2018a}; \cite{joyner2018b}). If you would like to refer to an author in text, you may also do so by including the year (in parentheses) after the author’s name in the text. If a publication has more than 4 authors, you may list the first author followed by ‘et al.’ For example: \citeinl{joyner2016} claim that a round of peer review prior to grading may improve graders’ efficiency and the quality of feedback given. This applies to parenthetical citations as well, e.g. \citep{joyner2016}. \subsection{Reference lists} References should be placed at the end of the paper in a dedicated section. Reference lists should be numbered and organized alphabetically by first author’s last name. If multiple papers have the same author(s) and year, you may append a letter to the end of the year to allow differentiated in-line text (e.g. Joyner, 2018a and Joyner, 2018b in the section above). If multiple papers have the same author(s), list them in chronological order starting with the older paper. Only works that are cited in-line should be included in the reference list. The reference list does not count against the length requirements. @@ -129,8 +134,8 @@ \section{References} \printbibliography[heading=none] \section{Appendices} -You may optionally move certain information to appendices at the end of your paper, after the reference list. If you have multiple appendices, you should create a section with a \emph{Heading 1} of “Appendices.” Each appendix should begin with a descriptive \emph{Heading 2}; appendices can thus be referenced in the body text using their heading number and description, e.g. “Appendix 5.1: Survey responses.” If you have only one appendix, you can label it with the word “Appendix” followed by a descriptive title, e.g., “Appendix: Survey responses.” +You may optionally move certain information to appendices at the end of your paper, after the reference list. If you have multiple appendices, you should create a section with a \emph{Heading 1} of "Appendices." Each appendix should begin with a descriptive \emph{Heading 2}; appendices can thus be referenced in the body text using their heading number and description, e.g. "Appendix 5.1: Survey responses." If you have only one appendix, you can label it with the word "Appendix" followed by a descriptive title, e.g., "Appendix: Survey responses." -These appendices do not count against the page limit, but they should not contain any information required to answer the question in full. The body text should be sufficient to answer the question, and the appendices should be included only for you to reference or to give additional context. If you decide to move content to an appendix, be sure to summarize the content and note it in relevant place in the body text, e.g., “The raw data can be viewed in \emph{Appendix 5.1: Survey responses}.” +These appendices do not count against the page limit, but they should not contain any information required to answer the question in full. The body text should be sufficient to answer the question, and the appendices should be included only for you to reference or to give additional context. If you decide to move content to an appendix, be sure to summarize the content and note it in relevant place in the body text, e.g., "The raw data can be viewed in \emph{Appendix 5.1: Survey responses}." -\end{document} \ No newline at end of file +\end{document} diff --git a/jdf.cls b/jdf.cls index e5f89e2..610249a 100644 --- a/jdf.cls +++ b/jdf.cls @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jdf}[2020/02/05 v2.2.0 Joyner Document Format] +\ProvidesClass{jdf}[2022/05/22 v2.2.0 Joyner Document Format] \newcommand{\papersize}{letterpaper} % Default value \DeclareOption{a4paper}{\renewcommand{\papersize}{a4paper}} @@ -11,7 +11,6 @@ \RequirePackage{etoolbox} % Required for conditional logic - %% % Page layout \ifstrequal{\papersize}{a4paper}{ % A4 paper page geometry settings @@ -19,8 +18,8 @@ \RequirePackage[ a4paper, top=26.25mm, - bottom=42.472mm, - left=34.361mm, + bottom=42.472mm, + left=34.361mm, right=34.361mm, footskip=16.222mm, % Space from the bottom margin to the baseline of the footer %showframe, % Uncomment to show how the type block is set on the page @@ -30,8 +29,8 @@ \RequirePackage[ \papersize, top=1in, - bottom=1.5in, - left=1.5in, + bottom=1.5in, + left=1.5in, right=1.5in, footskip=0.5in, % Space from the bottom margin to the baseline of the footer %showframe, % Uncomment to show how the type block is set on the page @@ -41,6 +40,7 @@ \RequirePackage{hyperref} % Required for including links \RequirePackage{changepage} +\RequirePackage[defaultlines=2,all]{nowidow} % Prevent line breaks in short paragraphs %% % Font stuff @@ -57,21 +57,19 @@ \RequirePackage{eulervm} \RequirePackage[scaled=.8819]{sourcecodepro} % Source Code Pro typeface for monospace \RequirePackage{csquotes} -%\defaultfontfeatures{Ligatures=TeX} % To support LaTeX ligatures (`` and --) % Letterspacing \RequirePackage[ activate={true,nocompatibility}, final, - tracking=true, kerning=true, spacing=true, - factor=1100, + factor=1260, stretch=10, shrink=10 ]{microtype} +\frenchspacing % Prevent double whitespaces between sentences -\SetTracking{encoding=*}{10} \lsstyle \newcommand\lsstylehelp[1]{\edef\MT@letterspace@{#1}\lsstyle} % Enable change to letterspacing @@ -79,6 +77,9 @@ \renewcommand{\,}{\ifmmode\mskip1mu\else\kern0.167em\fi} % Font sizes +\renewcommand\huge{% + \@setfontsize\huge{22}{36}% +} \renewcommand\normalsize{% \@setfontsize\normalsize{11}{17}% } @@ -107,12 +108,11 @@ \renewcommand{\maketitle}{\bgroup \begin{center} - {\large\selectfont\liningnums\lsstylehelp{0} \@title\par} - {\normalfont \@author}\\ - {\normalfont \@email} - \vspace{-11pt} + {\large\selectfont\liningnums\lsstylehelp{0} \par\@title\par} + {\normalfont \@author\\\@email}% + \vspace{-8.5pt} \end{center} - + \hypersetup{ pdftitle=\@title, pdfauthor=\@author @@ -127,10 +127,22 @@ \begin{adjustwidth}{0.5in}{0.5in} \normalfont% \textbf{\textit{Abstract\hairsp—\hairsp}}\ignorespaces - } - {% + }{% + \end{adjustwidth} + \vspace{-8.5pt} + \end{center} +} + + +%% +% Quotation +\renewenvironment{quotation}{% + \begin{center} + \vspace{-8.5pt} + \begin{adjustwidth}{0.5in}{0.5in} + \noindent }{% \end{adjustwidth} - \vspace{-11pt} + \vspace{-8.5pt} \end{center} } @@ -143,7 +155,7 @@ {\normalfont\liningnums\lsstylehelp{60}\bfseries} {\thesection}{0.333em} % Space between the title and label {\MakeUppercase} -\titlespacing*{\section}{0pt}{2.5pt}{0pt} +\titlespacing*{\section}{0pt}{0pt}{0pt} % Heading 2 \titleformat{\subsection} @@ -168,12 +180,15 @@ %% % Captions +% Note: don't use "figures" when floating is not desired. See: +% https://texblog.net/latex-archive/uncategorized/prevent-floating-image-figure-table/ \RequirePackage{caption} % Required for customising captions \DeclareCaptionFormat{letterspaced}{% \lsstylehelp{20}{% #1#2#3\par% }{}% } +\captionsetup{hypcap=false} % Resolves warning \captionsetup{format=letterspaced} % Use the letter spaced caption style by default \captionsetup{margin=1in} % Margin on the left and right sides of captions \captionsetup{justification=justified, singlelinecheck=false} % Left-align and justify captions @@ -182,6 +197,17 @@ \DeclareCaptionLabelSeparator{emdash}{\hairsp—\hairsp} % Custom caption label separator \captionsetup{labelsep=emdash} % Change the default colon between number and label to use the custom separator +\RequirePackage{mdframed} +\mdfdefinestyle{nonbreakingframe}{nobreak,linecolor=white,leftmargin=0,rightmargin=0,innerleftmargin=0,innerrightmargin=0,innertopmargin=0,innerbottommargin=0,skipabove=8.5pt,skipbelow=0} + +\newenvironment{jdffigure}{% + \begin{mdframed}[style=nonbreakingframe] + \begin{center} + }{% + \vspace{-8.5pt} + \end{center} + \end{mdframed} +} %% % Lists @@ -208,6 +234,7 @@ %% % Tables +\RequirePackage{siunitx} % Required for "S" to align by decimal % Set default table placement to htbp \def\fps@table{htbp} @@ -215,11 +242,19 @@ \RequirePackage{booktabs} % Required for better horizontal rules in tables \RequirePackage{array} % Required for manipulating table columns -\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % Define a new right-aligned column type -\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} % Define a new left-aligned (no justification) column type -\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % Define a new centred column type +\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % Define a new right-aligned paragraph column type +\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} % Define a new left-aligned (no justification) paragraph column type +\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % Define a new centered paragraph column type \setlength\lightrulewidth{0.03em} +\newenvironment{jdftable}{% + \begin{mdframed}[style=nonbreakingframe] + \begin{center} + }{% + \vspace{-8.5pt} + \end{center} + \end{mdframed} +} %% % Footnotes @@ -240,18 +275,18 @@ \RequirePackage[ bibstyle=authoryear, dashed=false, - sorting=nyt, + sorting=ynt, natbib=true, maxbibnames=99 ]{biblatex} \DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}} -\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}} +\DeclareFieldFormat{labelnumberwidth}{#1.} \defbibenvironment{bibliography} {\list {\printtext[labelnumberwidth]{% - \printfield{prefixnumber}% + \printfield{labelprefix}% \printfield{labelnumber}} }% {\setlength{\labelwidth}{\labelnumberwidth}% @@ -266,21 +301,53 @@ \DeclareNameAlias{sortname}{family-given} +% editing answer by moewe to get multiyear things going (2021a, 2021b) +% https://tex.stackexchange.com/questions/312539/unwanted-comma-between-author-and-year-using-citet-command +\DeclareCiteCommand{\citeyear} + {\usebibmacro{prenote}} + {\printfield{year}\printfield{extrayear}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citeyearpar}[\mkbibparens] + {\usebibmacro{prenote}} + {\printfield{year}\printfield{extrayear}} + {\multicitedelim} + {\usebibmacro{postnote}} + % Inline citations \renewcommand{\cite}[1]{\citeauthor{#1}, \citeyear{#1}} \renewcommand{\citep}[1]{(\citeauthor{#1}, \citeyear{#1})} - +\newcommand{\citeinl}[1]{\citeauthor{#1} (\citeyear{#1})} +% Missing Author +\newcommand{\citenoauth}[1]{\citetitle{#1}, \citeyear{#1}} +\newcommand{\citenoauthp}[1]{(\citetitle{#1}, \citeyear{#1})} +% Missing Author and Year +\newcommand{\citenoauthdate}[1]{\citetitle{#1}, n.d.} +\newcommand{\citenoauthdatep}[1]{(\citetitle{#1}, n.d.)} +% Missing Year +\newcommand{\citeauthnodate}[1]{\citeauthor{#1}, n.d.} +\newcommand{\citeauthnodatep}[1]{(\citeauthor{#1}, n.d.)} %% % Metadata \RequirePackage{xcolor} % Required for defining custom colours -\definecolor{linkBlue}{cmyk}{100,50,0,0} \hypersetup{ % bookmarks=true, % bookmarksopen=true, pdfpagemode=UseOutlines, - colorlinks, - citecolor=linkBlue, - urlcolor=linkBlue, - linkcolor=linkBlue + colorlinks=true, + citecolor=blue, + urlcolor=blue, + linkcolor=blue } + + +%% General Tex Notes +% Remove leading space on tables with "${}": https://stackoverflow.com/a/3155768/3219667 +% Why \arraybackslash: https://tex.stackexchange.com/a/387741/224014 +% Trailing comment swallows the end-of-line character: https://tex.stackexchange.com/a/7459/224014 + +%% Utilities +% Source: https://tex.stackexchange.com/a/484219/224014 +\newcommand{\comment}[1]{} diff --git a/references.bib b/references.bib index 9681453..6edd589 100644 --- a/references.bib +++ b/references.bib @@ -39,4 +39,4 @@ @inproceedings{newman2018 location = {London, United Kingdom}, publisher = {Springer}, year = {2018} -} \ No newline at end of file +}