-
Notifications
You must be signed in to change notification settings - Fork 525
add pihph_article() #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add pihph_article() #362
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
e3a21dc
add pihph_article()
d5d6951
fix latex build failure (support older versions of pandoc)
c068472
add comment to mark pandoc highlighting code
01a16f8
add conditional for gloss package
6d8f4a2
add include-before in template
c17dcae
capitalise words in template name
0a481f2
fix wrong closing tag in pihph template
eb006ee
include url of PiHPh journal in the function docs
56b22d9
use 'mainfont' in pihph template
b7e91b8
move comment about fonts in pihph template
2550a74
move comment about default fonts in pihph template
7526884
add pandoc citation processing code
4612e89
fix author details in pihph template
68600e0
fix wrong if closing tag; add options for single/double quotes
9ca8f28
add missing pihph specific variables in skeleton
763df93
use polyglossia in pihph article
168e8be
add bib example in pihph article
5b9c448
add english variety option in pihph article
fa8e40d
fix fonts issue in the pihph format, other improvements
bafd378
remove unused variables from pihph latex template, use knitr::include…
3909d62
style
cderv 8cb691b
Add the shortname in template
cderv 284b993
Merge branch 'master' into pihph-article
cderv 26bdf81
Use correct case in short name
cderv 3019f99
Also set citation package has an argument keeping biblatex as default
cderv c123158
Add PR number to README
cderv 548d23f
Document default behavoir for this format
cderv 544ea4c
we prefer output as last part of the YAML as other template
cderv 7c24ad9
add comments and order as in the template
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,305 @@ | ||
% === GO TO THE USER CUSTOMIZATION SECTION TO MAKE CHANGES | ||
|
||
\documentclass[article, a4paper, 12pt, $for(classoption)$$classoption$$sep$,$endfor$]{memoir} | ||
|
||
% Please use XeLaTeX to compile | ||
|
||
\usepackage{xltxtra} | ||
\defaultfontfeatures{Ligatures=TeX} | ||
\usepackage{hyphenat} | ||
|
||
\newcommand\setlogofont[1]{\newfontfamily\logofont{#1}} | ||
\newcommand\setlicensefont[1]{\newfontfamily\licensefont{#1}} | ||
\usepackage{microtype} | ||
\usepackage{rotating} | ||
\usepackage{hyperxmp} | ||
\usepackage[colorlinks=true, unicode=true, breaklinks=true, linkcolor=black, urlcolor=blue, citecolor=black]{hyperref} | ||
|
||
\counterwithout{section}{chapter} | ||
\setsecnumdepth{subsubsection} | ||
\setcounter{tocdepth}{3} | ||
|
||
\usepackage[export]{adjustbox} | ||
\usepackage{graphicx} | ||
\usepackage[type={CC}, modifier={by}, version=4.0]{doclicense} | ||
|
||
\newcommand\affiliation[1]{{\normalfont\normalsize\itshape#1}} | ||
|
||
\pagestyle{simple} | ||
\makeevenfoot{simple}{}{}{} | ||
\makeoddfoot{simple}{}{}{} | ||
\raggedbottom | ||
|
||
\newcommand\authorheader[1]{\makeevenhead{simple}{\footnotesize\itshape#1}{}{\footnotesize\thepage}} | ||
\newcommand\titleheader[1]{\makeoddhead{simple}{\footnotesize\thepage}{}{\footnotesize\itshape#1}} | ||
|
||
\newcommand\thisdoi{10.2218/pihph.201x.x.xxxx} | ||
\newcommand\thisdoilink{http://dx.doi.org/\thisdoi} | ||
|
||
\renewcommand{\maketitlehooka}{% | ||
\vspace*{-60pt} | ||
\noindent\hspace*{-25pt}\begin{minipage}[t]{2.5cm} | ||
\vspace*{-16pt} | ||
\includegraphics[valign=t, width=2.5cm]{pihph-logo.png} | ||
\end{minipage} | ||
\begin{minipage}[t]{.75\linewidth} | ||
\centering | ||
$if(logofont)$\logofont$endif$\Large Papers in Historical Phonology\\[5pt] | ||
|
||
\footnotesize | ||
|
||
http://journals.ed.ac.uk/pihph | ||
|
||
ISSN 2399-6714 | ||
|
||
\footnotesize\vspace*{5pt} | ||
|
||
Volume 1, \thepage--\thelastpage | ||
|
||
DOI: \thisdoi | ||
\end{minipage} | ||
\begin{minipage}[t]{2.1cm} | ||
\centering | ||
\vspace*{-14pt} | ||
\adjustbox{valign=t}{\doclicenseImage[imagewidth=2.1cm]}\\ | ||
$if(licensefont)$\licensefont$endif$\tiny Licensed under~a \doclicenseLongNameRef{} License | ||
\end{minipage} | ||
} | ||
|
||
\pretitle{\vspace*{24pt}\begin{center}\large\bfseries} | ||
\preauthor{\begin{center}\large\scshape\begin{tabular}[t]{c}} | ||
\postauthor{\end{tabular}\end{center}\vspace*{12pt}} | ||
|
||
\predate{\relax} | ||
\postdate{\relax} | ||
\date{} | ||
|
||
\captionnamefont{\footnotesize\bfseries} | ||
\captiontitlefont{\footnotesize} | ||
|
||
\renewcommand\abstractnamefont{\normalfont\footnotesize\bfseries} | ||
\renewcommand\abstracttextfont{\normalfont\footnotesize} | ||
\setlength\absleftindent{1cm} | ||
\setlength\absrightindent{1cm} | ||
\setlength{\abstitleskip}{-17pt} | ||
\setbeforesecskip{-18pt} | ||
\setaftersecskip{6pt} | ||
\setsecheadstyle{\normalfont\bfseries} | ||
\setbeforesubsecskip{-18pt} | ||
\setaftersubsecskip{6pt} | ||
\setsubsecheadstyle{\normalfont\bfseries} | ||
\setbeforesubsubsecskip{-18pt} | ||
\setaftersubsubsecskip{6pt} | ||
\setsubsubsecheadstyle{\normalfont\bfseries} | ||
\renewenvironment{quote}{\list{}{\leftmargin=0.7cm\rightmargin=0.7cm}\item[]\footnotesize}{\endlist} | ||
|
||
\setlrmarginsandblock{4cm}{4cm}{*} | ||
\setulmarginsandblock{4.5cm}{4.5cm}{*} | ||
\checkandfixthelayout | ||
|
||
\setlength{\footmarkwidth}{0em} | ||
\setlength{\footmarksep}{0em} | ||
\footmarkstyle{\textsuperscript{#1}\hspace{.3em}} | ||
\setfootins{24pt}{\bigskipamount} | ||
\renewcommand*{\footnoterule}{% | ||
\kern-3pt% | ||
\hrule width 0.4\columnwidth | ||
\kern 2.6pt | ||
\vspace{12pt}} | ||
|
||
\usepackage[usenames]{xcolor} | ||
\definecolor{pihphgreen}{RGB}{118, 146, 60} | ||
\usepackage[most]{tcolorbox} | ||
|
||
\newtcolorbox{tcdoublebox}[1][]{% | ||
enhanced jigsaw, | ||
sharp corners, | ||
colback=white, | ||
text width=.95\textwidth, | ||
before={\vspace*{18pt}\noindent}, | ||
left skip=-5mm, | ||
borderline={1pt}{-2pt}{black}, | ||
#1 | ||
} | ||
|
||
\newcommand\commentsinvited{ | ||
\begin{tcdoublebox} | ||
|
||
\section*{\textcolor{pihphgreen}{Comments invited}} | ||
|
||
\textit{PiHPh} relies on post-publication review of the papers that it publishes. If you have any comments on this piece, please add them to its comments site. You are encouraged to consult this site after reading the paper, as there may be comments from other readers there, and replies from the author. This paper's site is here: | ||
|
||
\vspace*{1ex}\noindent \url{\thisdoilink} | ||
|
||
\end{tcdoublebox} | ||
} | ||
|
||
\widowpenalty=10000 | ||
\clubpenalty=10000 | ||
|
||
% === START OF USER CUSTOMIZATION | ||
|
||
|
||
\title{$title$$if(subtitle)$:\\$subtitle$$endif$} | ||
\author{$for(author)$$author.name$\\\affiliation{$author.affiliation$}$sep$ \and $endfor$} | ||
|
||
\authorheader{$if(author-header)$$author-header$$else$$for(author)$$author.name$$sep$, $endfor$$endif$} | ||
\titleheader{$if(title-header)$$title-header$$else$$title$$endif$} | ||
|
||
$if(mainfont)$ | ||
\setmainfont{$mainfont$} | ||
$endif$ | ||
$if(licensefont)$ | ||
\setlicensefont{$licensefont$} | ||
$endif$ | ||
$if(logofont)$ | ||
\setlogofont{$logofont$} | ||
$endif$ | ||
% If you do not have access to Cambria, you can use the metric-equivalent Caladea: https://fontlibrary.org/en/font/caladea | ||
% If you do not have access to Calibri, you can use the metric-equivalent Carlito: https://fontlibrary.org/en/font/carlito | ||
% Lekton available at https://www.fontsquirrel.com/fonts/lekton | ||
|
||
% Use polyglossia by default since the engine is xelatex. | ||
\usepackage{polyglossia} | ||
\setmainlanguage[$if(en-variant)$variant=$en-variant$$endif$]{english} | ||
\usepackage[autostyle$if(single-quotes)$,english=british$endif$]{csquotes} % remove the english=british option for double quotes | ||
$if(gloss)$ | ||
\usepackage{$gloss$} % for examples, feel free to use anything else | ||
stefanocoretta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$endif$ | ||
|
||
$if(listings)$ | ||
\usepackage{listings} | ||
$endif$ | ||
$if(lhs)$ | ||
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} | ||
$endif$ | ||
% Pandoc syntax highlighting | ||
$if(highlighting-macros)$ | ||
$highlighting-macros$ | ||
$endif$ | ||
stefanocoretta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$if(verbatim-in-note)$ | ||
\usepackage{fancyvrb} | ||
\VerbatimFootnotes % allows verbatim text in footnotes | ||
$endif$ | ||
|
||
% Some recommended packages | ||
|
||
\usepackage{booktabs} % for nice tables | ||
|
||
$if(biblatex)$ | ||
% BibLaTeX setup, recommended | ||
\usepackage[backend=biber, | ||
style=langsci-unified, % available on CTAN | ||
mincrossrefs=50, | ||
maxcitenames=3, | ||
maxbibnames=50, | ||
useprefix=true, | ||
doi=false]{biblatex} | ||
$for(bibliography)$ | ||
\addbibresource{$bibliography$} | ||
$endfor$ | ||
% remember to include the .bib extension | ||
% remember to run biber rather than bibtex if using this option | ||
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}} | ||
$endif$ | ||
|
||
% BibTeX setup, deprecated | ||
% \usepackage{natbib} | ||
% \bibpunct[:]{(}{)}{;}{a}{}{,} | ||
% \setlength\bibsep{0pt} | ||
|
||
|
||
% Pandoc citation processing | ||
$if(csl-refs)$ | ||
\newlength{\csllabelwidth} | ||
\setlength{\csllabelwidth}{3em} | ||
\newlength{\cslhangindent} | ||
\setlength{\cslhangindent}{1.5em} | ||
% for Pandoc 2.8 to 2.10.1 | ||
\newenvironment{cslreferences}% | ||
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% | ||
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% | ||
{\par} | ||
% For Pandoc 2.11+ | ||
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing | ||
{% don't indent paragraphs | ||
\setlength{\parindent}{0pt} | ||
% turn on hanging indent if param 1 is 1 | ||
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi | ||
% set entry spacing | ||
\ifnum #2 > 0 | ||
\setlength{\parskip}{#2\baselineskip} | ||
\fi | ||
}% | ||
{} | ||
\usepackage{calc} % for calculating minipage widths | ||
\newcommand{\CSLBlock}[1]{#1\hfill\break} | ||
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} | ||
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}} | ||
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} | ||
$endif$ | ||
|
||
stefanocoretta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$for(header-includes)$ | ||
$header-includes$ | ||
$endfor$ | ||
|
||
\begin{document} | ||
\setcounter{page}{1} | ||
\maketitle | ||
\thispagestyle{empty} | ||
|
||
$if(abstract)$ | ||
\begin{abstract} | ||
\noindent $abstract$ | ||
\end{abstract} | ||
$endif$ | ||
|
||
stefanocoretta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$for(include-before)$ | ||
$include-before$ | ||
$endfor$ | ||
|
||
$body$ | ||
|
||
\commentsinvited % Please do not change this | ||
|
||
$if(acknowledgements)$ | ||
\section*{Acknowledgements} | ||
$acknowledgements$ | ||
$endif$ | ||
|
||
$if(supplement)$ | ||
\section*{Associated material} | ||
$supplement$ | ||
$endif$ | ||
|
||
\section*{Author's contact details} | ||
\label{sec:auth-cont-deta} | ||
|
||
$for(author)$ | ||
\noindent \textit{$author.name$} | ||
|
||
$if(author.affiliation)$\noindent $author.affiliation$$endif$ | ||
|
||
$if(author.address)$\noindent $author.address$$endif$ | ||
|
||
$if(author.email)$ | ||
\vspace*{5pt} | ||
\noindent \textit{$author.email$} | ||
$endif$ | ||
$endfor$ | ||
|
||
$if(biblatex)$ | ||
% BibLaTeX setup, recommended | ||
\printbibliography[title=References] | ||
$endif$ | ||
|
||
% BibTeX setup, deprecated | ||
% \bibliographystyle{unified} % unified.bst can be obtained at http://cexlj.org/downloads/unified.bst | ||
% \renewcommand\bibsection{\section*{References}} | ||
%\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} | ||
|
||
|
||
$for(include-after)$ | ||
$include-after$ | ||
$endfor$ | ||
\end{document} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.