commit 7d5b7bbcd0d5e591dca6cff8b4f48394ea412105 Author: ming Date: Sun Jul 27 01:28:14 2025 +0800 first commit diff --git a/authoraffil/_extension.yaml b/authoraffil/_extension.yaml new file mode 100644 index 0000000..e2823ac --- /dev/null +++ b/authoraffil/_extension.yaml @@ -0,0 +1,16 @@ +title: Authors and affiliation formatting for quarto +authors: + - name: Ming Su + email: mingsu@rcees.ac.cn + orcid: 0000-0001-9821-1268 + url: https://drwater.net/team/ming-su/ + - name: Lorenz A. Kapsner + orcid: 0000-0003-1866-860X + - name: Albert Krewinkel + orcid: 0000-0002-9455-0796 + - name: Robert Winkler +version: 0.3.2 +quarto-required: ">=1.3.0" +contributes: + filters: + - authoraffil.lua diff --git a/authoraffil/authoraffil.lua b/authoraffil/authoraffil.lua new file mode 100644 index 0000000..43b2580 --- /dev/null +++ b/authoraffil/authoraffil.lua @@ -0,0 +1,75 @@ +--[[ +authors-block – affiliations block extension for quarto +Copyright (c) 2023 Lorenz A. Kapsner +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +]] + +local List = require("pandoc.List") +local from_utils = require("utils") +local normalize_affiliations = from_utils.normalize_affiliations +local normalize_authors = from_utils.normalize_authors +local from_authors = require("from_author_info_blocks") +local default_marks = from_authors.default_marks +local create_equal_contributors_block = from_authors.create_equal_contributors_block +local create_affiliations_blocks = from_authors.create_affiliations_blocks +local create_correspondence_blocks = from_authors.create_correspondence_blocks +local is_corresponding_author = from_authors.is_corresponding_author +local author_inline_generator = from_authors.author_inline_generator +local create_authors_inlines = from_authors.create_authors_inlines + +function Pandoc(doc) + local meta = doc.meta + local body = List:new({}) + local mark = function(mark_name) + return default_marks[mark_name] + end + + -- Process CRediT roles + if meta.authors then + local credit_roles = List:new({}) + for i, author in ipairs(meta.authors) do + if author.role then + local roles = List:new({}) + for role, level in pairs(author.role) do + roles:insert(pandoc.Str(role .. ": " .. stringify(level))) + end + if #roles > 0 then + local author_name = stringify(author.name) + credit_roles:insert(pandoc.Para({ + pandoc.Str(author_name .. ": "), + pandoc.Str(table.concat(roles:map(stringify), ", ")), + })) + end + end + end + if #credit_roles > 0 then + body:insert(pandoc.Header(2, pandoc.Str("Author Contributions"))) + body:extend(credit_roles) + end + end + + body:extend(create_equal_contributors_block(meta.authors, mark) or {}) + body:extend(create_affiliations_blocks(meta.affiliations, meta) or {}) + body:extend(create_correspondence_blocks(meta.authors, mark) or {}) + body:extend(doc.blocks) + + for _i, author in ipairs(meta.authors) do + author.test = is_corresponding_author(author) + end + + meta.affiliations = normalize_affiliations(meta.affiliations or {}) + meta.author = meta.authors:map(normalize_authors(meta.affiliations)) + meta.author = pandoc.MetaInlines(create_authors_inlines(meta.author, mark, meta)) + meta.affiliations = nil + + return pandoc.Pandoc(body, meta) +end diff --git a/authoraffil/from_author_info_blocks.lua b/authoraffil/from_author_info_blocks.lua new file mode 100644 index 0000000..e1216f1 --- /dev/null +++ b/authoraffil/from_author_info_blocks.lua @@ -0,0 +1,297 @@ +--[[ +affiliation-blocks – generate title components +Copyright © 2017–2021 Albert Krewinkel +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +]] + +local from_utils = require("utils") +local has_key = from_utils.has_key +local List = require("pandoc.List") +local utils = require("pandoc.utils") +local stringify = utils.stringify + +local M = {} + +local default_marks = { + corresponding_author = FORMAT == "latex" and { pandoc.RawInline("latex", "*") } or { pandoc.Str("*") }, + equal_contributor = FORMAT == "latex" and { pandoc.RawInline("latex", "\\#") } or { pandoc.Str("#") }, +} + +local function get_orcid_mark(orcid_value) + if not orcid_value then + return {} + end + local orcid_str + if type(orcid_value) == "string" then + orcid_str = orcid_value + elseif type(orcid_value) == "table" then + if orcid_value.text then + orcid_str = orcid_value.text + elseif orcid_value[1] and orcid_value[1].text then + orcid_str = orcid_value[1].text + else + return {} + end + else + return {} + end + orcid_str = orcid_str:gsub("[%-%s]", "") + if FORMAT == "latex" then + return { pandoc.RawInline("latex", "\\orcidlink{" .. orcid_str .. "}") } + elseif FORMAT:match("docx") then + local orcid_url = "https://orcid.org/" .. orcid_str + return { + pandoc.Str(" "), + pandoc.Link("ID", orcid_url), + } + else + local orcid_url = "https://orcid.org/" .. orcid_str + return { pandoc.Link(pandoc.Str(""), orcid_url, "", { class = "orcid" }) } + end +end + +M.default_marks = default_marks + +local function is_equal_contributor(author) + if has_key(author, "attributes") then + return author.attributes["equal-contributor"] + end + return nil +end + +local function create_equal_contributors_block(authors, mark) + local has_equal_contribs = List:new(authors):find_if(is_equal_contributor) + if not has_equal_contribs then + return nil + end + local contributors = { + pandoc.Superscript(mark("equal_contributor")), + pandoc.Space(), + pandoc.Str("These authors contributed equally to this work."), + } + return List:new({ pandoc.Para(contributors) }) +end +M.create_equal_contributors_block = create_equal_contributors_block + +local function intercalate(lists, elem) + local result = List:new({}) + for i = 1, (#lists - 1) do + result:extend(lists[i]) + result:extend(elem) + end + if #lists > 0 then + result:extend(lists[#lists]) + end + return result +end + +local function is_corresponding_author(author) + if has_key(author, "attributes") then + if author.attributes["corresponding"] then + return author.email + end + end + return nil +end +M.is_corresponding_author = is_corresponding_author + +local function create_correspondence_blocks(authors, mark) + local corresponding_authors = List:new({}) + for _, author in ipairs(authors) do + if is_corresponding_author(author) then + local mailto = "mailto:" .. stringify(author.email) + local author_with_mail = List:new( + author.name.literal + .. List:new({ pandoc.Space(), pandoc.Str("(") }) + .. author.email + .. List:new({ pandoc.Str(")") }) + ) + local link = pandoc.Link(author_with_mail, mailto) + table.insert(corresponding_authors, { link }) + end + end + if #corresponding_authors == 0 then + return nil + end + local correspondence = List:new({ + pandoc.Superscript(mark("corresponding_author")), + pandoc.Space(), + pandoc.Str("Corresponding to:"), + pandoc.Space(), + }) + local sep = List:new({ pandoc.Str(","), pandoc.Space() }) + return { pandoc.Para(correspondence .. intercalate(corresponding_authors, sep)) } +end + +M.create_correspondence_blocks = create_correspondence_blocks + +local function author_inline_generator(get_mark, meta) + return function(author) + local author_marks = List:new({}) + if has_key(author, "orcid") then + author_marks[#author_marks + 1] = get_orcid_mark(author.orcid) + end + local affilstyle = meta and meta.affilstyle and stringify(meta.affilstyle) or "alphabeta" + for _, idx in ipairs(author.affiliations) do + local idx_num = tonumber(stringify(idx)) -- Convert MetaString/MetaInlines to number + if not idx_num then + error("Invalid affiliation index: " .. tostring(idx)) + end + local idx_str + if affilstyle == "number" then + idx_str = tostring(idx_num) + else + if idx_num > 26 then + error("Too many affiliations: only up to 26 (a-z) are supported") + end + idx_str = string.char(96 + idx_num) + end + author_marks[#author_marks + 1] = { pandoc.Str(idx_str) } + end + if has_key(author, "attributes") then + if author.attributes["equal-contributor"] then + author_marks[#author_marks + 1] = get_mark("equal_contributor") + end + end + if is_corresponding_author(author) then + author_marks[#author_marks + 1] = get_mark("corresponding_author") + end + if FORMAT:match("latex") then + author.name.literal[#author.name.literal + 1] = pandoc.Superscript(intercalate(author_marks, { pandoc.Str(",") })) + return author + else + local res = List.clone(author.name.literal) + res[#res + 1] = pandoc.Superscript(intercalate(author_marks, { pandoc.Str(",") })) + return res + end + end +end +M.author_inline_generator = author_inline_generator + +local function create_authors_inlines(authors, mark, meta) + local inlines_generator = author_inline_generator(mark, meta) + local inlines = List:new(authors):map(inlines_generator) + local and_str = List:new({ pandoc.Space(), pandoc.Str("and"), pandoc.Space() }) + local last_author = inlines[#inlines] + inlines[#inlines] = nil + local result = intercalate(inlines, { pandoc.Str(","), pandoc.Space() }) + if #authors > 1 then + if #authors == 2 then + result:extend(and_str) + else + result:extend(List:new({ pandoc.Str(",") }) .. and_str) + end + end + result:extend(last_author) + return result +end +M.create_authors_inlines = create_authors_inlines + +local function create_affiliations_blocks_alphabeta(affiliations, meta) + local affilstyle = meta and meta.affilstyle and stringify(meta.affilstyle) or "alphabeta" + local affil_lines = List:new(affiliations):map(function(affil, i) + if affilstyle == "number" then + num_inlines = pandoc.List:new({ + pandoc.Superscript(pandoc.Str(tostring(i))), + pandoc.Space(), + }) + else + num_inlines = pandoc.List:new({ + pandoc.Superscript(pandoc.Str(string.char(96 + i))), + pandoc.Space(), + }) + end + local name_inlines = type(affil.name) == "table" and affil.name or { pandoc.Str(tostring(affil.name)) } + local city_inlines = type(affil.city) == "table" and affil.city or { pandoc.Str(tostring(affil.city)) } + local postcode_inlines = type(affil["postal-code"]) == "table" and affil["postal-code"] + or { pandoc.Str(tostring(affil["postal-code"])) } + local country_inlines = type(affil.country) == "table" and affil.country + or { pandoc.Str(tostring(affil.country or affil["postal-code"])) } + return num_inlines + :extend(name_inlines) + :extend({ pandoc.Str(", ") }) + :extend(city_inlines) + :extend({ pandoc.Space() }) + :extend(postcode_inlines) + :extend({ pandoc.Str(", ") }) + :extend(country_inlines) + :extend({ pandoc.Str(".") }) + end) + local combined_inlines = pandoc.List:new() + for i, line in ipairs(affil_lines) do + combined_inlines:extend(line) + if i < #affil_lines then + combined_inlines:extend({ pandoc.LineBreak() }) + end + end + return { pandoc.Para(combined_inlines) } +end + +local function create_affiliations_blocks_number(affiliations, meta) + local affilstyle = meta and meta.affilstyle and stringify(meta.affilstyle) or "alphabeta" + local affil_lines = List:new(affiliations):map(function(affil, i) + local num_inlines = pandoc.List:new({ + pandoc.Superscript(pandoc.Str(tostring(i))), + pandoc.Space(), + }) + local name_inlines = type(affil.name) == "table" and affil.name or { pandoc.Str(tostring(affil.name)) } + local city_inlines = type(affil.city) == "table" and affil.city or { pandoc.Str(tostring(affil.city)) } + local postcode_inlines = type(affil["postal-code"]) == "table" and affil["postal-code"] + or { pandoc.Str(tostring(affil["postal-code"])) } + local country_inlines = type(affil.country) == "table" and affil.country + or { pandoc.Str(tostring(affil.country or affil["postal-code"])) } + return num_inlines + :extend(name_inlines) + :extend({ pandoc.Str(", ") }) + :extend(city_inlines) + :extend({ pandoc.Space() }) + :extend(postcode_inlines) + :extend({ pandoc.Str(", ") }) + :extend(country_inlines) + :extend({ pandoc.Str(".") }) + end) + local combined_inlines = pandoc.List:new() + for i, line in ipairs(affil_lines) do + combined_inlines:extend(line) + if i < #affil_lines then + combined_inlines:extend({ pandoc.LineBreak() }) + end + end + return { pandoc.Para(combined_inlines) } +end + +M.create_affiliations_blocks = create_affiliations_blocks_alphabeta + +function Meta(meta) + local affilstyle = meta and meta.affilstyle and stringify(meta.affilstyle) or "alphabeta" + M.create_affiliations_blocks = affilstyle == "number" and create_affiliations_blocks_number + or create_affiliations_blocks_alphabeta + if meta.authors then + meta.author = create_authors_inlines(meta.authors, M.default_marks, meta) + end + if meta.affiliations then + meta.institute = M.create_affiliations_blocks(meta.affiliations, meta) + end + if meta.authors then + local equal_contributors = create_equal_contributors_block(meta.authors, M.default_marks) + if equal_contributors then + meta["equal-contributors"] = equal_contributors + end + local correspondence = create_correspondence_blocks(meta.authors, M.default_marks) + if correspondence then + meta.correspondence = correspondence + end + end + return meta +end + +return M diff --git a/authoraffil/from_scholarly_metadata.lua b/authoraffil/from_scholarly_metadata.lua new file mode 100644 index 0000000..a9dcf5b --- /dev/null +++ b/authoraffil/from_scholarly_metadata.lua @@ -0,0 +1,51 @@ +--[[ +ScholarlyMeta – normalize author/affiliation meta variables +Copyright (c) 2017-2021 Albert Krewinkel, Robert Winkler +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +]] + +local List = require("pandoc.List") +local utils = require("pandoc.utils") +local stringify = utils.stringify + +local M = {} + +local function has_id(id) + return function(x) + return x.id == id + end +end + +local function resolve_institutes(institute, known_institutes) + local unresolved_institutes + if institute == nil then + unresolved_institutes = {} + elseif type(institute) == "string" or type(institute) == "number" then + unresolved_institutes = { institute } + else + unresolved_institutes = institute + end + local result = List:new({}) + for i, inst in ipairs(unresolved_institutes) do + local intermed_val = known_institutes:find_if(has_id(stringify(inst))) + if intermed_val then + result[i] = pandoc.MetaString(tostring(intermed_val.index)) + else + result[i] = pandoc.MetaString(tostring(inst)) + end + end + return result +end +M.resolve_institutes = resolve_institutes + +return M + diff --git a/authoraffil/utils.lua b/authoraffil/utils.lua new file mode 100644 index 0000000..2f5df89 --- /dev/null +++ b/authoraffil/utils.lua @@ -0,0 +1,49 @@ +--[[ +authors-block – affiliations block extension for quarto +Copyright (c) 2023 Lorenz A. Kapsner +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +]] + +local List = require("pandoc.List") +local utils = require("pandoc.utils") +local stringify = utils.stringify +local from_scholarly = require("from_scholarly_metadata") +local resolve_institutes = from_scholarly.resolve_institutes + +local M = {} + +local function normalize_affiliations(affiliations) + local affiliations_norm = List:new(affiliations or {}):map(function(affil, i) + affil.index = pandoc.MetaString(tostring(i)) + affil.id = pandoc.MetaString(stringify(affil.id or affil.name)) + return affil + end) + return affiliations_norm +end +M.normalize_affiliations = normalize_affiliations + +local function has_key(set, key) + return set[key] ~= nil +end +M.has_key = has_key + +local function normalize_authors(affiliations) + return function(auth) + auth.id = pandoc.MetaString(stringify(auth.name)) + auth.affiliations = resolve_institutes(auth.affiliations or {}, affiliations) + return auth + end +end +M.normalize_authors = normalize_authors + +return M + diff --git a/dwbk/_extension.yml b/dwbk/_extension.yml new file mode 100644 index 0000000..9cd1a57 --- /dev/null +++ b/dwbk/_extension.yml @@ -0,0 +1,47 @@ +title: dwms-pdf-quarto +author: Ming Su +version: 0.0.1 +quarto-required: ">=1.3.0" +contributes: + formats: + common: + knitr: + opts_chunk: + echo: false + message: false + warning: false + pdf: + documentclass: ctexbook # 使用ctexbook文档类专门处理中文 + classoption: + - fntef + - UTF8 + # - scheme=plain # 标题样式方案 + - zihao=-4 # 正文字号小四 + papersize: a4 + geometry: [left=2.5cm, right=2.5cm, top=2.54cm, bottom=2.54cm] + linestretch: 1.25 + toc: true + toc-depth: 3 + number-sections: true + lang: zh-CN + fig-pos: "!t" + colorlinks: true + urlcolor: blue + sansfont: "Gill Sans" + sansfontoptions: + - Color=39729E + mainfont: "Source Sans 3" #| Verdana (fontsize: 11pt) # Source Sans 3 | Times New Roman| Helvetica | PT Sans + monofont: "JetBrains Mono" + mathfont: "Cambria Math" + # 确保中文标点符号正确处理 + CJKoptions: | + AutoFakeBold=true + block-headings: false + include-in-header: header.tex + template-partials: + - "partials/title.tex" + - "partials/before-body.tex" + - "partials/after-body.tex" +filters: + - latex-environment +lightbox: auto diff --git a/dwbk/header.tex b/dwbk/header.tex new file mode 100644 index 0000000..47eb13c --- /dev/null +++ b/dwbk/header.tex @@ -0,0 +1,106 @@ +% ----------------------- +% CUSTOM PREAMBLE STUFF +% ----------------------- +\usepackage{xeCJK} +\usepackage{enumitem} +\usepackage{fontspec} +\usepackage{float} +\usepackage[normalem]{ulem} +\usepackage{hyperref} +\usepackage{nameref} %needed by zref-xr +\usepackage{xr-hyper} +\usepackage[normalem]{ulem} +\usepackage{setspace} +\usepackage{lineno} +\usepackage{caption} +\captionsetup{singlelinecheck=off} +\usepackage[UTF8, scheme=plain]{ctex} +\usepackage{orcidlink} +\usepackage{eso-pic} + +\usepackage{ctexcap} % 中文标题处理 +\usepackage[perpage]{footmisc} % 脚注每页重置 +\setlength{\parindent}{2em} % 中文段落缩进2字符 + +\setCJKmainfont[AutoFakeBold=true]{SimHei} +\setCJKsansfont[AutoFakeBold]{Microsoft YaHei} +% \setCJKmonofont[AutoFakeBold]{KaiTi} + + + +% ----------------- +% Title block stuff +% ----------------- + +% Title +\makeatletter +\renewcommand{\title}[1]{\gdef\@title{\Huge\textbf{#1}}} % Adjust \Huge or other font commands +\makeatother + + +% ------------------ +% Section headings +% ------------------ +\usepackage{titlesec} +\titleformat*{\section}{\Large\sffamily\bfseries\raggedright} +\titleformat*{\subsection}{\large\sffamily\bfseries\raggedright} +\titleformat*{\subsubsection}{\normalsize\sffamily\bfseries\raggedright} +\titleformat*{\paragraph}{\small\sffamily\bfseries\raggedright} + +%\titlespacing{}{}{}{} +% Starred version removes indentation in following paragraph +\titlespacing*{\section}{0em}{2em}{0.1em} +\titlespacing*{\subsection}{0em}{1.25em}{0.1em} +\titlespacing*{\subsubsection}{0em}{0.75em}{0em} + +% ------------------ +% Headers/Footers +% ------------------ +\usepackage{fancyhdr} +\pagestyle{fancy} + +\fancyhf{} +\fancyhead[L,C,R]{} +\fancyfoot[L,C]{} +\fancyfoot[R]{\thepage} + \fancyfootoffset{3.5cm} +\renewcommand{\headrulewidth}{1pt} +\fancypagestyle{plain}{% + \renewcommand{\headrulewidth}{0pt}% + \fancyhf{}% + \fancyfoot[R]{\thepage}% +} +\renewcommand\footnoterule{\rule{\linewidth}{0.1pt}\vspace{5pt}} + +% ------------------ +% Captions +% ------------------ +\usepackage[labelfont=bf,labelsep=period]{caption} +\captionsetup[figure]{font=footnotesize,justification=raggedright,singlelinecheck=false,format=hang} + + +% --------------------------- +% END CUSTOM PREAMBLE STUFF +% --------------------------- +% +% +%% Let's define some colours +\definecolor{light}{HTML}{ECF1EC} +\definecolor{highlight}{HTML}{800080} +\definecolor{dark}{HTML}{330033} + +%% Let's add the border on the left hand side +\AddToShipoutPicture{% + \AtPageLowerLeft{% + \put(0,0){% % 从页面左下角(0,0)开始 + \color{light}\rule{2.4cm}{\LenToUnit\paperheight}% % 左侧3cm宽的边框 + }% + }% + % logo + \AtPageLowerLeft{% start the bar at the bottom left of the page + \put(0.5cm,27.2cm){% % 从左侧边缘向右移动0.75cm,垂直位置27.2cm + \color{light}\includegraphics[width=1.5cm]{_extensions/drwater/dwen/logo.png} + }% + }% +} + diff --git a/dwbk/partials/after-body.tex b/dwbk/partials/after-body.tex new file mode 100644 index 0000000..e69de29 diff --git a/dwbk/partials/before-body.tex b/dwbk/partials/before-body.tex new file mode 100644 index 0000000..9a0f30e --- /dev/null +++ b/dwbk/partials/before-body.tex @@ -0,0 +1,33 @@ +$-- Implements the frontmatter, title page, and abstract. + +% for some reason this does not work in header +\renewcommand{\abstractname}{Abstract.} + +% add the short title to the fancy header +$if(shorttitle)$ +\fancyhead[R]{$shorttitle$} +$endif$ +$if(shortauthors)$ +\fancyhead[L]{$shortauthors$} +$endif$ + +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +\maketitle +%\noindent \rule{\linewidth}{.5pt} +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$if(keywords)$ +\begin{keywords} +\def\sep{;\ } +$for(keywords/allbutlast)$$keywords$\sep $endfor$ +$for(keywords/last)$$keywords$$endfor$ +\end{keywords} +$endif$ +$endif$ +%\noindent \rule{\linewidth}{.5pt} +$endif$ \ No newline at end of file diff --git a/dwbk/partials/title.tex b/dwbk/partials/title.tex new file mode 100644 index 0000000..b86298e --- /dev/null +++ b/dwbk/partials/title.tex @@ -0,0 +1,15 @@ +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large\sffamily\bfseries #1 \par}}{}{} +} +\makeatother +\subtitle{$subtitle$} +$endif$ +$-- This supports Quarto's authors normalization +\author{$for(authors)$\footnotesize $it.name.literal$$sep$ \and $endfor$} +\date{$date$} diff --git a/dwbkaa/_extension.yaml b/dwbkaa/_extension.yaml new file mode 100644 index 0000000..9291731 --- /dev/null +++ b/dwbkaa/_extension.yaml @@ -0,0 +1,23 @@ +title: Chinese Book Template +authors: + - name: Grok Team + affiliation: xAI +version: 0.1.0 +quarto-required: ">=1.3.0" +contributes: + formats: + pdf: + template-partials: + - partials/title.tex + - partials/before-body.tex + - partials/after-body.tex + include-in-header: + - header.tex + documentclass: book + papersize: a4 + geometry: + - margin=1in + toc: true + toc-depth: 2 + number-sections: true + lang: zh diff --git a/dwbkaa/header.tex b/dwbkaa/header.tex new file mode 100644 index 0000000..af202f7 --- /dev/null +++ b/dwbkaa/header.tex @@ -0,0 +1,55 @@ +% Configuring Chinese fonts with Noto Serif CJK SC or fallback +\usepackage{xeCJK} +% Try Noto Serif CJK SC; fallback to Source Han Serif SC if Noto is unavailable +% \IfFontExistsTF{Noto Serif CJK SC}{ +% \setCJKmainfont{Noto Serif CJK SC} +% \setCJKsansfont{Noto Sans CJK SC} +% \setCJKmonofont{Noto Sans Mono CJK SC} +% }{ +% \IfFontExistsTF{Source Han Serif SC}{ +% \setCJKmainfont{Source Han Serif SC}[BoldFont=Source Han Serif SC Bold, ItalicFont=Source Han Serif SC Light] +% \setCJKsansfont{Source Han Sans SC}[BoldFont=Source Han Sans SC Bold] +% \setCJKmonofont{Source Han Sans SC} % 等宽字体通常用黑体 +% }{ +% \setCJKmainfont{SimSun} % Windows宋体 +% \setCJKsansfont{Microsoft YaHei} % 微软雅黑 +% \setCJKmonofont{SimHei} % 黑体 +% } +% } + +% Ensuring proper Chinese punctuation and spacing +\XeTeXlinebreaklocale "zh" +\XeTeXlinebreakskip = 0pt plus 1pt + +% Loading essential packages +\usepackage{geometry} +\usepackage{setspace} +\usepackage{hyperref} +\usepackage{tocloft} +\usepackage{graphicx} +\usepackage{xcolor} +\usepackage{fontspec} % For font existence checking + +% Setting hyperlink colors +\hypersetup{ + colorlinks=true, + linkcolor=blue, + citecolor=blue, + urlcolor=blue +} + +% Configuring double spacing +\doublespacing + +% Customizing table of contents +\renewcommand{\cfttoctitlefont}{\huge\bfseries} +\renewcommand{\cftchapfont}{\large\bfseries} +\renewcommand{\cftsecfont}{\normalsize} +\setlength{\cftbeforetoctitleskip}{-2em} +\setlength{\cftaftertoctitleskip}{1em} + +% Defining logo placeholder +\newcommand{\booklogo}[1]{\includegraphics[width=0.3\textwidth]{#1}} + +% Ensuring compatibility with Quarto +\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} diff --git a/dwbkaa/inst/img/rceeslogo.png b/dwbkaa/inst/img/rceeslogo.png new file mode 100755 index 0000000..f8cf1d5 Binary files /dev/null and b/dwbkaa/inst/img/rceeslogo.png differ diff --git a/dwbkaa/inst/img/rceeslonglogo.png b/dwbkaa/inst/img/rceeslonglogo.png new file mode 100755 index 0000000..5460fde Binary files /dev/null and b/dwbkaa/inst/img/rceeslonglogo.png differ diff --git a/dwbkaa/inst/img/signms.png b/dwbkaa/inst/img/signms.png new file mode 100755 index 0000000..ed103bc Binary files /dev/null and b/dwbkaa/inst/img/signms.png differ diff --git a/dwbkaa/inst/img/signmy.png b/dwbkaa/inst/img/signmy.png new file mode 100755 index 0000000..1d57677 Binary files /dev/null and b/dwbkaa/inst/img/signmy.png differ diff --git a/dwbkaa/partials/after-body.tex b/dwbkaa/partials/after-body.tex new file mode 100644 index 0000000..df7f38d --- /dev/null +++ b/dwbkaa/partials/after-body.tex @@ -0,0 +1,15 @@ +% Starting back matter +\backmatter + +% Optional appendix +% Uncomment and customize as needed +% \appendix +% \chapter{附录} +% 您的附录内容 +% \clearpage + +% Bibliography (if defined in Quarto) +\ifx\@biblio\undefined\else + \printbibliography + \clearpage +\fi diff --git a/dwbkaa/partials/before-body.tex b/dwbkaa/partials/before-body.tex new file mode 100644 index 0000000..80daf35 --- /dev/null +++ b/dwbkaa/partials/before-body.tex @@ -0,0 +1,15 @@ +% Starting front matter +\frontmatter + +% Table of contents +\tableofcontents +\clearpage + +% Optional preface or dedication +% Uncomment and customize as needed +% \chapter*{序言} +% 您的序言内容 +% \clearpage + +% Switching to main matter +\mainmatter diff --git a/dwbkaa/partials/rceeslonglogo.png b/dwbkaa/partials/rceeslonglogo.png new file mode 100755 index 0000000..5460fde Binary files /dev/null and b/dwbkaa/partials/rceeslonglogo.png differ diff --git a/dwbkaa/partials/title.tex b/dwbkaa/partials/title.tex new file mode 100644 index 0000000..e69de29 diff --git a/dwcl/_extension.yaml b/dwcl/_extension.yaml new file mode 100644 index 0000000..109ddbb --- /dev/null +++ b/dwcl/_extension.yaml @@ -0,0 +1,27 @@ +title: Academic Letter Template +authors: + - name: Ming Su + affiliation: drwater +version: 0.1.0 +quarto-required: ">=1.3.0" +resources: + - header.tex + - partials/title.tex + - partials/before-body.tex + - partials/after-body.tex +contributes: + formats: + pdf: + template-partials: + - partials/title.tex + - partials/before-body.tex + - partials/after-body.tex + include-in-header: + - header.tex + documentclass: letter + papersize: letter + geometry: + - margin=1in + toc: false + number-sections: false + lang: en diff --git a/dwcl/header.tex b/dwcl/header.tex new file mode 100644 index 0000000..a34806f --- /dev/null +++ b/dwcl/header.tex @@ -0,0 +1,59 @@ +% Academic Letter Header Configuration +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{microtype} +\usepackage{url} +\usepackage[hidelinks]{hyperref} +\usepackage{setspace} +\usepackage{geometry} +\usepackage[T1]{fontenc} +\usepackage[quiet]{fontspec} + +\geometry{ + headheight = 0.7in, + top=1.5in, + bottom=1.5cm, + left=3cm, + right=3cm, +} + +\setmainfont{Calibri} + +% Custom letter formatting +% +\makeatletter +\renewcommand{\opening}[1]{% + \thispagestyle{firstpage}% + \par\nobreak\vspace{2\parskip}% + \noindent\ignorespaces #1\par\nobreak + \@afterheading +} + +\let\ps@empty\ps@plain +\let\ps@firstpage\ps@plain + +\newcommand{\authordetails}[1]{\renewcommand{\authordetails}{#1}} +\newcommand{\recipientdetails}[1]{\renewcommand{\recipientdetails}{#1}} + +\fancypagestyle{firstpage}{ + \fancyhf{} + \fancyhead[L]{\includegraphics[height=0.6in]{$from_institution_logo$}} + \fancyhead[R]{$author$\\\footnotesize{$from_email$\\$from_phone$}} +} + +\fancypagestyle{plain}{ + \fancyhf{} + \fancyhead[L]{\includegraphics[height=0.6in]{$from_institution_logo$}} + \fancyhead[R]{$author$\\\footnotesize{$from_email$\\$from_phone$}} +} + +\fancypagestyle{empty}{ + \fancyhf{} + \fancyhead[L]{\includegraphics[height=0.6in]{$from_institution_logo$}} + \fancyhead[R]{$author$\\\footnotesize{$from_email$\\$from_phone$}} +} +\makeatother + + +\newcommand{\forcelettermode}{\ifhmode\unskip\par\fi} + diff --git a/dwcl/partials/after-body.tex b/dwcl/partials/after-body.tex new file mode 100644 index 0000000..32da72e --- /dev/null +++ b/dwcl/partials/after-body.tex @@ -0,0 +1,2 @@ +\closing{$closing_greeting$} +\end{letter} diff --git a/dwcl/partials/before-body.tex b/dwcl/partials/before-body.tex new file mode 100644 index 0000000..b181527 --- /dev/null +++ b/dwcl/partials/before-body.tex @@ -0,0 +1,2 @@ +\begin{letter}{\recipientdetails} +\opening{$opening_greeting$} diff --git a/dwcl/partials/title.tex b/dwcl/partials/title.tex new file mode 100644 index 0000000..e9c25c4 --- /dev/null +++ b/dwcl/partials/title.tex @@ -0,0 +1,25 @@ +% Title page customization +\address{ + \raggedleft{ + \footnotesize{ + $author$\\ + \authordetails\\ + \hspace{1mm} + } + } + \vspace{-0.05\textheight} +} + +\authordetails{ + $from_position$\\ + $from_department$\\ + $from_institution$\\ + $from_address$ +} + +\recipientdetails{ + $to_professional_title$ $to_name$\\ + $if(to_journal)$\textit{$to_journal$}$endif$ +} + +\signature{$author$, on behalf of all authors\\Email: $from_email$} diff --git a/dwen/_extension.yml b/dwen/_extension.yml new file mode 100644 index 0000000..fe4ed86 --- /dev/null +++ b/dwen/_extension.yml @@ -0,0 +1,17 @@ +title: PrettyPDF +author: Nicola Rennie +version: 0.0.5 +contributes: + project: + project: + type: book + formats: + pdf: + include-in-header: + - "header.tex" + include-before-body: + - "partials/before-body.tex" + toc: false + code-block-bg: light + linkcolor: highlight + urlcolor: highlight diff --git a/dwen/header.tex b/dwen/header.tex new file mode 100644 index 0000000..13f92ba --- /dev/null +++ b/dwen/header.tex @@ -0,0 +1,59 @@ +% load packages +\usepackage{geometry} +\usepackage{xcolor} +\usepackage{eso-pic} +\usepackage{fancyhdr} +\usepackage{sectsty} +\usepackage{fontspec} +\usepackage{titlesec} + +%% Set page size with a wider right margin +\geometry{a4paper, total={170mm,257mm}, left=20mm, top=20mm, bottom=20mm, right=50mm} + +%% Let's define some colours +\definecolor{light}{HTML}{ECF1EC} +\definecolor{highlight}{HTML}{800080} +\definecolor{dark}{HTML}{330033} + +%% Let's add the border on the right hand side +\AddToShipoutPicture{% + \AtPageLowerLeft{% + \put(\LenToUnit{\dimexpr\paperwidth-3cm},0){% + \color{light}\rule{3cm}{\LenToUnit\paperheight}% + }% + }% + % logo + \AtPageLowerLeft{% start the bar at the bottom right of the page + \put(\LenToUnit{\dimexpr\paperwidth-2.25cm},27.2cm){% move it to the top right + \color{light}\includegraphics[width=1.5cm]{_extensions/drwater/dwen/logo.png} + }% + }% +} + +%% Style the page number +\fancypagestyle{mystyle}{ + \fancyhf{} + \renewcommand\headrulewidth{0pt} + \fancyfoot[R]{\thepage} + \fancyfootoffset{3.5cm} +} +\setlength{\footskip}{20pt} + +%% style the chapter/section fonts +\chapterfont{\color{dark}\fontsize{20}{16.8}\selectfont} +\sectionfont{\color{dark}\fontsize{20}{16.8}\selectfont} +\subsectionfont{\color{dark}\fontsize{14}{16.8}\selectfont} +\titleformat{\subsection} + {\sffamily\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}] + +% left align title +\makeatletter +\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt} +\begin{flushleft} + {\sffamily\huge\textbf{\MakeUppercase{\@title}}} \vspace{0.3cm} \newline + {\Large {\@subtitle}} \newline + \@author +\end{flushleft}\egroup +} +\makeatother + diff --git a/dwen/logo.png b/dwen/logo.png new file mode 100755 index 0000000..f8cf1d5 Binary files /dev/null and b/dwen/logo.png differ diff --git a/dwen/partials/before-body.tex b/dwen/partials/before-body.tex new file mode 100644 index 0000000..1a6c5f1 --- /dev/null +++ b/dwen/partials/before-body.tex @@ -0,0 +1 @@ +\pagestyle{mystyle} \ No newline at end of file diff --git a/dwms/_extension.yml b/dwms/_extension.yml new file mode 100644 index 0000000..e400a8b --- /dev/null +++ b/dwms/_extension.yml @@ -0,0 +1,41 @@ +title: dwms-pdf-quarto +author: Ming Su +version: 0.0.1 +quarto-required: ">=1.3.0" +contributes: + formats: + common: + knitr: + opts_chunk: + echo: false + message: false + warning: false + pdf: + documentclass: article + toc: false + papersize: letter + fontsize: 12pt + geometry: margin=1in + fig-height: 4 # smaller fig heights make floating easier + fig-width: 7.5 # set to the (full width - margins) of letter + fig-pos: "!t" + colorlinks: true + urlcolor: blue + sansfont: "Gill Sans" + sansfontoptions: + - Color=39729E + mainfont: "Source Sans 3" #| Verdana (fontsize: 11pt) # Source Sans 3 | Times New Roman| Helvetica | PT Sans + monofont: "JetBrains Mono" + mathfont: "Cambria Math" + CJKmainfont: SimHei + block-headings: false # to deal with titlesec problems + include-in-header: header.tex + template-partials: + - "partials/title.tex" + - "partials/before-body.tex" + - "partials/after-body.tex" +filters: + - latex-environment + - authors-block +lightbox: auto +commands: [clab] diff --git a/dwms/header.tex b/dwms/header.tex new file mode 100644 index 0000000..bf33a39 --- /dev/null +++ b/dwms/header.tex @@ -0,0 +1,133 @@ +% ----------------------- +% CUSTOM PREAMBLE STUFF +% ----------------------- +\usepackage{enumitem} +\usepackage{fontspec} +\usepackage{float} +\usepackage[normalem]{ulem} +\usepackage{hyperref} +\usepackage{nameref} %needed by zref-xr +\usepackage{zref-xr,zref-hyperref,zref-user} +\usepackage{xr-hyper} +\usepackage[normalem]{ulem} +\usepackage{setspace} +\usepackage{lineno} +\usepackage{caption} +\captionsetup{singlelinecheck=off} +\usepackage[UTF8, scheme=plain]{ctex} +\usepackage{orcidlink} + +% \setkomafont{author}{\normalsize} + +% for revision +\usepackage{adjustbox} +% \usepackage{xcolor} +\usepackage{mdframed} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + linecolor=gray!30, + backgroundcolor=gray!5, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=0pt, + innerbottommargin=0pt + ]{refquote} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + backgroundcolor=red!3!white, + linecolor=red!30!white, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=10pt, + innerbottommargin=10pt + ]{question} +% setup hyperlink for page and line number +\def\msname{MS} +\def\smname{SM} +\setenumerate{labelsep=*, leftmargin=1.0pc} +%\zexternaldocument*{ManuscriptNew\veraa} +\zexternaldocument*{\msname} +\zexternaldocument*{\smname} +\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{ + \linelabel{line:#1}}} +%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf] +\makeatletter +\newcommand{\clab}[2][]{ + \protected@write\@auxout{\let\clab\@secondoftwo}{ + \string\newlabel{r:#1}{{#2}{}}}% + \hlabel{#1}#2\hlabel{#1end}} +\makeatother +\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line +\zref{line:#1}--\zref{line:#1end}:}\\}} +\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}} +% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\} +\renewenvironment{quote}{\begin{question}}{\end{question}} +% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}} + + + + +% ----------------- +% Title block stuff +% ----------------- + +% Title +\makeatletter +\renewcommand{\title}[1]{\gdef\@title{\large\textbf{#1}}} % Adjust \Huge or other font commands +\makeatother + + +% ------------------ +% Section headings +% ------------------ +\usepackage{titlesec} +\titleformat*{\section}{\Large\sffamily\bfseries\raggedright} +\titleformat*{\subsection}{\large\sffamily\bfseries\raggedright} +\titleformat*{\subsubsection}{\normalsize\sffamily\bfseries\raggedright} +\titleformat*{\paragraph}{\small\sffamily\bfseries\raggedright} + +%\titlespacing{}{}{}{} +% Starred version removes indentation in following paragraph +\titlespacing*{\section}{0em}{2em}{0.1em} +\titlespacing*{\subsection}{0em}{1.25em}{0.1em} +\titlespacing*{\subsubsection}{0em}{0.75em}{0em} + +% ------------------ +% Headers/Footers +% ------------------ +% \usepackage{fancyhdr} +% \pagestyle{fancy} +% \fancyhf{} +% \fancyhead[L,C,R]{} +% \fancyfoot[L,C]{} +% \fancyfoot[R]{\thepage} +% \renewcommand{\headrulewidth}{1pt} +% \fancypagestyle{plain}{% +% \renewcommand{\headrulewidth}{0pt}% +% \fancyhf{}% +% \fancyfoot[R]{\thepage}% +% } +% \renewcommand\footnoterule{\rule{\linewidth}{0.1pt}\vspace{5pt}} + +% ------------------ +% Captions +% ------------------ +\usepackage[labelfont=bf,labelsep=period]{caption} +\captionsetup[figure]{font=footnotesize,justification=raggedright,singlelinecheck=false,format=hang} + + +% --------------------------- +% END CUSTOM PREAMBLE STUFF +% --------------------------- diff --git a/dwms/partials/after-body.tex b/dwms/partials/after-body.tex new file mode 100644 index 0000000..e69de29 diff --git a/dwms/partials/before-body.tex b/dwms/partials/before-body.tex new file mode 100644 index 0000000..9a0f30e --- /dev/null +++ b/dwms/partials/before-body.tex @@ -0,0 +1,33 @@ +$-- Implements the frontmatter, title page, and abstract. + +% for some reason this does not work in header +\renewcommand{\abstractname}{Abstract.} + +% add the short title to the fancy header +$if(shorttitle)$ +\fancyhead[R]{$shorttitle$} +$endif$ +$if(shortauthors)$ +\fancyhead[L]{$shortauthors$} +$endif$ + +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +\maketitle +%\noindent \rule{\linewidth}{.5pt} +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$if(keywords)$ +\begin{keywords} +\def\sep{;\ } +$for(keywords/allbutlast)$$keywords$\sep $endfor$ +$for(keywords/last)$$keywords$$endfor$ +\end{keywords} +$endif$ +$endif$ +%\noindent \rule{\linewidth}{.5pt} +$endif$ \ No newline at end of file diff --git a/dwms/partials/title.tex b/dwms/partials/title.tex new file mode 100644 index 0000000..b86298e --- /dev/null +++ b/dwms/partials/title.tex @@ -0,0 +1,15 @@ +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large\sffamily\bfseries #1 \par}}{}{} +} +\makeatother +\subtitle{$subtitle$} +$endif$ +$-- This supports Quarto's authors normalization +\author{$for(authors)$\footnotesize $it.name.literal$$sep$ \and $endfor$} +\date{$date$} diff --git a/inst/css/style.css b/inst/css/style.css new file mode 100755 index 0000000..0bbdcff --- /dev/null +++ b/inst/css/style.css @@ -0,0 +1,109 @@ +.udot { + text-decoration-line: underline; + text-decoration-color: rgb(50, 50, 50); + text-decoration-style: dashed; + text-decoration-thickness: 1px; +} + +.good { + background-color: forestgreen; + color: lightyellow; +} + +.bad { + background-color: orangered; + color: lightyellow; +} + +.del { + text-decoration-line: line-through; + text-decoration-color: rgb(222 13 13); + text-decoration-style: initial; + text-decoration-thickness: 1.5px; +} + + +.todo { + background-color: darkorange; + color: lightyellow; +} + +.com { + background-color: #0025ff; + font-weight: bold; + color: lightyellow; +} + +.add { + text-decoration-line: underline; + text-decoration-color: rgb(222 13 13); + background-color: violet; + text-decoration-style: initial; + text-decoration-thickness: 2px; +} + + +del { + text-decoration-line: line-through; + text-decoration-color: rgb(222 13 13); + text-decoration-style: initial; + text-decoration-thickness: 1.0px; +} + + +ins { + text-decoration-color: rgb(222 93 93); + background-color: violet; + text-decoration-style: initial; + text-decoration-thickness: 2px; +} + +.clab { + background-color: rgb(255, 245, 240); +} + +.rem { + background-color: darkorange; + color: lightyellow; + text-decoration-thickness: 2px; +} + + +#criticnav { + position: fixed; + z-index: 1100; + top: 0; + right: 0; + width: 120px; + border-bottom: solid 1px #ffffff; + margin: 0; + padding: 10; + background-color: rgb(143 38 38 / 95%); + color: #ffffff; + font-size: 12px; + font-family: "Helvetica Neue", helvetica, arial, sans-serif !important +} + +#criticnav ul { + list-style-type: none; + width: 90%; + margin: 0 auto; + padding: 0 +} + +#criticnav ul li { + display: block; + width: 100px; + min-width: 80px; + text-align: center; + padding: 5px 0 3px !important; + margin: 5px 2px !important; + line-height: 1em; + float: center; + text-transform: uppercase; + cursor: pointer; + border-radius: 20px; + border: 3px solid rgba(255,255,255,0); + color: #fff !important +} + diff --git a/inst/img/rceeslogo.png b/inst/img/rceeslogo.png new file mode 100755 index 0000000..f8cf1d5 Binary files /dev/null and b/inst/img/rceeslogo.png differ diff --git a/inst/img/rceeslonglogo.png b/inst/img/rceeslonglogo.png new file mode 100755 index 0000000..5460fde Binary files /dev/null and b/inst/img/rceeslonglogo.png differ diff --git a/inst/img/signms.png b/inst/img/signms.png new file mode 100755 index 0000000..ed103bc Binary files /dev/null and b/inst/img/signms.png differ diff --git a/inst/img/signmy.png b/inst/img/signmy.png new file mode 100755 index 0000000..1d57677 Binary files /dev/null and b/inst/img/signmy.png differ diff --git a/inst/tex/american-chemical-society.csl b/inst/tex/american-chemical-society.csl new file mode 100755 index 0000000..01f8c49 --- /dev/null +++ b/inst/tex/american-chemical-society.csl @@ -0,0 +1,280 @@ + + diff --git a/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl b/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl new file mode 100755 index 0000000..f7c84f0 --- /dev/null +++ b/inst/tex/china-national-standard-gb-t-7714-2015-numeric.csl @@ -0,0 +1,435 @@ + + diff --git a/inst/tex/cv.tex b/inst/tex/cv.tex new file mode 100755 index 0000000..d35a19a --- /dev/null +++ b/inst/tex/cv.tex @@ -0,0 +1,240 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Academic Letter LaTeX and RMarkdown Structure % +% Author: Pedro Henrique Pereira Braga % +% % +% License: % +% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Set the font size (11pt, for now) and paper size (e.g. letterpaper, a4paper) +\documentclass[11pt, letterpaper]{letter} + +%---------------------------------------------------------------------- +% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS +%---------------------------------------------------------------------- + +\usepackage{graphicx} % Required for including pictures +\usepackage{fancyhdr} % Allows the use of fancy headers and footers + +\usepackage{microtype} % For typography improvement + +\usepackage{url} % Allows the use of hyperlinks +\urlstyle{same} % Allows hyperlink fonts to be the same as the mainfont +\usepackage[hidelinks]{hyperref} % Allows the use of hyperlinks and +% removes the blue boxes around the link + +\pagestyle{empty} % Removes headers and footers + +\usepackage{setspace} % Allows the use of double spacing in the letter body + +\setlength\parindent{1cm} % Paragraph indentation + +% Create a new command for the horizontal rule in the document which allows +% thickness specification +\makeatletter + \def\@texttop{} % force the address to start above +\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress + \thispagestyle{firstpage}% + {\raggedleft\@date\par}% + \else % home address + \thispagestyle{empty}% + {\raggedleft\begin{tabular}{l@{}}\ignorespaces + \fromaddress \\*[2\parskip]% + \@date \end{tabular}\par}% + \fi + %\vspace{2\parskip}% <-- Removed + %{\raggedright \toname \\ \toaddress \par}% <-- Removed + %\vspace{2\parskip}% <-- Removed + #1\par\nobreak} +\let\ps@empty\ps@plain +\let\ps@firstpage\ps@plain +\makeatother + +%-------------------------------------------------------------------------- +% FONTS +%-------------------------------------------------------------------------- + +\usepackage[T1]{fontenc} % Output font encoding for international characters +% \usepackage[utf8]{inputenc} % Required for inputting international characters +\usepackage[quiet]{fontspec} % Allows the use of fontspec +\setmainfont{Calibri} +% \usepackage{txfonts} % Allows the use of Lato fonts + + +%---------------------------------------------------------------------------- +% DOCUMENT MARGINS +%---------------------------------------------------------------------------- + +\usepackage{geometry} % Required for adjusting page dimensions + +\geometry{ + headheight = 0.7in, % Header height + top=1.5in, % Top margin + bottom=1.5cm, % Bottom margin + left=3cm, % Left margin + right=3cm, % Right margin + % showframe, % Uncomment to show how the type block is set on the page +} + +%----------------------------------------------------------------------------- +% AUTHOR AND RECIPIENTS NEW COMMANDS AND DETAILS STRUCTURE +%----------------------------------------------------------------------------- + +\newcommand{\authordetails}[1]{\renewcommand{\authordetails}{#1}} +\newcommand{\recipientdetails}[1]{\renewcommand{\recipientdetails}{#1}} + +%----------------------------------------------------------------------------- +% HEADER STRUCTURE +%----------------------------------------------------------------------------- + +\address{ + % Include the author's details on the right side of the page under the line + \raggedleft{ + \footnotesize{ % Use a smaller font size + $author$\\ % Author name + \authordetails\\ + \hspace{1mm} + } + } + \vspace{-0.05\textheight} % Move the date and letter content up +} + +%------------------------------------------------------------------------------ +% COMPOSE THE ENTIRE HEADER +%------------------------------------------------------------------------------ + +\renewcommand{\opening}[1]{ + {\fromaddress + \vspace{0.05\textheight}\\ % Print the sender's address here and add some whitespace to allow the printing of the date + \raggedleft{$date$} % Include the date, aligned to the right + \par % par + } + {\raggedright + \toname\\ + \toaddress + \par} % Print the recipient's name and adress + \vspace{0.25cm} % White vertical space after recipient's address + \noindent #1 % Following this, insert the opening info +} + +%------------------------------------------------------------------------------ +% SIGNATURE STRUCTURE +%------------------------------------------------------------------------------ +% The signature is a combination of the author's name, title and institution +\signature{$author$, on behalf of all authors\\ + Email: $from_email$} + +% I will later combine the option of inserting a signature within it + +\renewcommand{\closing}[1]{ + \vspace{2.5mm} % Some whitespace after the letter content and before the signature + \noindent % Stop paragraph indentation + % \hspace*{\longindentation} % Move the signature right to the value of \longindentation + \parbox{\indentedwidth}{ + \raggedright + #1 % Print the signature text + % \vskip 1.65cm % Whitespace between the closing text and author's name for a physical signature + \\\includegraphics[height=0.6in, keepaspectratio=true]{$from_sign$}\\ + \fromsig % Prints the value of \signature{}, i.e. author name and title + } +} + +%------------------------------------------------------------------------------- +% AUTHOR'S INFORMATION +%------------------------------------------------------------------------------- + +\authordetails{ + $from_position$\\ + $from_department$\\ % Sender's department/institution + $from_institution$\\ + $from_address$ % Sender's address + % $from_city$, $from_state_province$\\ % Sender's city, state or province, + % $from_postalcode$\\ % postal code + % $from_country$ +} + +%------------------------------------------------------------------------------ +% RECIPIENT'S INFORMATION +%------------------------------------------------------------------------------ + +\recipientdetails{ +$to_professional_title$ $to_name$\\ + $if(to_journal)$ +\textit{$to_journal$} +$endif$ +} + +%------------------------------------------------------------------------------ +% HEADER CONTENTS +%------------------------------------------------------------------------------ + +\fancypagestyle{firstpage}{ + \fancyhf{} + \fancyhead[L]{ + \includegraphics[height=0.6in, keepaspectratio=true]{$from_institution_logo$} + } + \fancyhead[R]{$author$\\ + \footnotesize{ + $from_email$\\ % Sender's email address + % $from_personal_website$ \\ % Sender's URL + $from_phone$ % Sender's phone number + } + } + } + +\fancypagestyle{plain}{ + \fancyhf{} + \fancyhead[L]{ + \includegraphics[height=0.6in, keepaspectratio=true]{$from_institution_logo$} + } + \fancyhead[R]{$author$\\ + \footnotesize{ + $from_email$\\ % Sender's email address + % $from_personal_website$ \\ % Sender's URL + $from_phone$ % Sender's phone number + } + } + } + +\fancypagestyle{empty}{ + \fancyhf{} + \fancyhead[L]{ + \includegraphics[height=0.6in, keepaspectratio=true]{$from_institution_logo$} + } + \fancyhead[R]{$author$\\ + \footnotesize{ + $from_email$\\ % Sender's email address + % $from_personal_website$ \\ % Sender's URL + $from_phone$ % Sender's phone number + } + } + } + +%------------------------------------------------------------------------------ +\pagestyle{plain} + +\begin{document} + +%------------------------------------------------------------------------------ +% TO ADDRESS +%------------------------------------------------------------------------------ + +\begin{letter}{\recipientdetails} + +%------------------------------------------------------------------------------ +% LETTER CONTENT +%------------------------------------------------------------------------------ + +\opening{$opening_greeting$} +% \begin{doublespacing} + +$body$ + +% \end{doublespacing} +\closing{$closing_greeting$} + +%------------------------------------------------------------------------------ + +\end{letter} +\end{document} diff --git a/inst/tex/els.tex b/inst/tex/els.tex new file mode 100755 index 0000000..197540d --- /dev/null +++ b/inst/tex/els.tex @@ -0,0 +1,426 @@ +$-- Keeping in template layout for backward compatibility +\documentclass[$if(layout)$$layout$$else$$for(classoption)$$classoption$$sep$,$endfor$$endif$]{elsarticle} %review=doublespace preprint=single 5p=2 column +%%% Begin My package additions %%%%%%%%%%%%%%%%%%% +\usepackage[hyphens]{url} +$if(journal)$ +\journal{$journal$} % Sets Journal name +$endif$ +\usepackage{lineno} % add +$if(linenumbers)$ +\linenumbers % turns line numbering on +$endif$ +\usepackage{graphicx} +\usepackage{xstring} +\usepackage[table]{xcolor} +%%%%%%%%%%%%%%%% end my additions to header +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[utf8]{inputenc} + $if(euro)$ + \usepackage{eurosym} + $endif$ +\else % if luatex or xelatex + \usepackage{fontspec} + \ifxetex + \usepackage{xltxtra,xunicode} + \fi + \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \newcommand{\euro}{€} + $if(mainfont)$ + \setmainfont{$mainfont$} + $endif$ + $if(sansfont)$ + \setsansfont{$sansfont$} + $endif$ + $if(monofont)$ + \setmonofont{$monofont$} + $endif$ + $if(mathfont)$ + \setmathfont{$mathfont$} + $endif$ +\fi +% use microtype if available +\IfFileExists{microtype.sty}{\usepackage{microtype}}{} +$if(geometry)$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$if(natbib)$ +\usepackage{natbib} +\setcitestyle{$natbiboptions$} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +$if(graphics)$ +\usepackage{graphicx} +$endif$ +\ifxetex + \usepackage[setpagesize=false, % page size defined by xetex + unicode=false, % unicode breaks when used with xetex + xetex]{hyperref} +\else + \usepackage[unicode=true]{hyperref} +\fi +\hypersetup{breaklinks=true, + bookmarks=true, + pdfauthor={$author-meta$}, + pdftitle={$title-meta$}, + colorlinks=$if(colorlinks)$true$else$false$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, + linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, + pdfborder={0 0 0}} +\urlstyle{same} % don't use monospace font for urls +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\renewcommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +$if(numbersections)$ +\setcounter{secnumdepth}{5} +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(lang)$ +\ifxetex + \usepackage{polyglossia} + \setmainlanguage{$mainlang$} +\else + \usepackage[$lang$]{babel} +\fi +$endif$ +% Pandoc toggle for numbering sections (defaults to be off) +$if(numbersections)$ +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(highlighting-macros)$ +% Pandoc syntax highlighting +$highlighting-macros$ +$endif$ +% tightlist command for lists without linebreak +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(tables)$ +% From pandoc table feature +\usepackage{longtable,booktabs,array} +$if(multirow)$ +\usepackage{multirow} +$endif$ +\usepackage{calc} % for calculating minipage widths +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +$endif$ +$if(csl-refs)$ +% Pandoc citation processing +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacingunit} % times entry-spacing +\setlength{\cslentryspacingunit}{\parskip} +% 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}[2] % #1 hanging-ident, #2 entry spacing +{% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \let\oldpar\par + \def\par{\hangindent=\cslhangindent\oldpar} + \fi + % set entry spacing + \setlength{\parskip}{#2\cslentryspacingunit} + }% +{} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ + +\usepackage{xifthen} +% set special color for EST +\ifthenelse{\equal{$journal$}{Environmental Science \& Technology}} +{\definecolor{seccol}{RGB}{56, 95, 66}} +{\definecolor{seccol}{RGB}{0, 0, 0}} + +$if(uppersections)$ +\usepackage{titlesec} +\titleformat{\section} +{\color{seccol}\large\bfseries\MakeUppercase}{\thesection}{1em}{} +$endif$ +$if(sectiononnewpage)$ +\AddToHook{cmd/section/before}{\clearpage} +$endif$ + +\usepackage{enumitem} +\usepackage{fontspec} +\usepackage{float} +\setmainfont{Helvetica} +\usepackage[normalem]{ulem} +\usepackage{hyperref} +\usepackage{nameref} %needed by zref-xr +\usepackage{zref-xr,zref-hyperref,zref-user} +\usepackage{xr-hyper} + +% force to use \zref +$if(msname)$ +\def\msname{$msname$} +\zexternaldocument*{\msname} +\renewcommand{\ref}{\zref} +$endif$ +$if(smname)$ +\def\smname{$smname$} +\zexternaldocument*{\smname} +$endif$ + +\zxrsetup{toltxlabel=true} +{\catcode`\#=12 \gdef\hashchar{#1}} +\makeatletter +\newcommand\hzref[1]{\edef\next{% + \noexpand\href{% + \zref@extractdefault{#1}{url}{}% + \zref@ifrefcontainsprop{#1}{anchor}{% + \hashchar\zref@extract{#1}{anchor}}{}}% + {\noexpand\zref{#1}}}\next} +\makeatother + + + +$if(revision)$ +% \usepackage{xcolor} +\usepackage{adjustbox} +\usepackage{mdframed} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + linecolor=gray!30, + backgroundcolor=gray!5, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=0pt, + innerbottommargin=0pt + ]{refquote} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + backgroundcolor=red!3!white, + linecolor=red!30!white, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=10pt, + innerbottommargin=10pt + ]{question} +\setenumerate{labelsep=*, leftmargin=1.0pc} +% setup hyperlink for page and line number +\def\msname{$if(msname)$$msname$$else$MS$endif$} +\def\smname{$if(smname)$$smname$$else$SM$endif$} +\setenumerate{labelsep=*, leftmargin=1.0pc} +%\zexternaldocument*{ManuscriptNew\veraa} +\zexternaldocument*{\msname} +\zexternaldocument*{\smname} +\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{ + \linelabel{line:#1}}} +%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf] +\makeatletter + \newcommand{\clab}[2]{% + \protected@write\@auxout{\let\clab\@secondoftwo}{ + \string\newlabel{r:#1}{{#2}{}}}% + \hlabel{#1}#2\hlabel{#1end}} +\makeatother +\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line +\zref{line:#1}--\zref{line:#1end}:}\\}} +\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}} +% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\} +\renewenvironment{quote}{\begin{question}}{\end{question}} +% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}} +$endif$ + +% def default corresponding authors and equal contributing authors variables +\def\hascorr{0} +\def\haseqc{0} +% check if corresponding author(s) and equal contributing authors are available +$for(author)$$if(author.correspondence)$\def\hascorr{1}$endif$$if(author.equal-contributor)$\def\haseqc{1}$endif$ $endfor$ + +\newcommand{\getcorrauthinfo}{ + \subsection{Corresponding Author(s)} + \def\a{} \def\b{} \def\c{} + \hspace{-2.2em} + $for(author)$ + $if(author.correspondence)$ + \textbf{$author.name$:} + \vspace{-1em} + \begin{enumerate}[labelindent=-12pt,label=\arabic*.,itemindent=0em,leftmargin=!, itemsep = -10pt] + $for(author.institute)$ \def\a{$author.institute$} + $for(institute)$ \def\b{$institute.id$} \def\c{$institute.name$} + \ifx \a\b \item \c; \fi + $endfor$ + $endfor$ + $if(author.email)$\item email: $author.email$;$endif$ + $if(author.orcid)$\item orcid: $author.orcid$;$endif$ + $if(author.tel)$\item Tel: $author.tel$;$endif$ + $if(author.fax)$\item Fax: $author.fax$$endif$ + \end{enumerate} + $endif$ + $endfor$ +} + +\newcommand{\getotherauthinfo}{ + \subsection{Author(s)} + \def\a{} \def\b{} \def\c{} + \hspace{-2.2em} + $for(author)$ + $if(author.correspondence)$ + $else$ + \textbf{$author.name$:} + \vspace{-1em} + \begin{enumerate}[labelindent=-12pt,label=\arabic*.,itemindent=0em,leftmargin=!, itemsep = -10pt] + $for(author.institute)$ \def\a{$author.institute$} $for(institute)$ \def\b{$institute.id$} \def\c{$institute.name$} + \ifx \a\b \item \c; \fi + $endfor$ + $endfor$ + $if(author.email)$\item email: $author.email$;$endif$ + $if(author.orcid)$\item orcid: $author.orcid$;$endif$ + $if(author.tel)$\item Tel: $author.tel$;$endif$ + $if(author.fax)$\item Fax: $author.fax$$endif$ + \end{enumerate} + $endif$ + $endfor$ +} + +$preamble$ + +% remove the two line around Abstract +$if(abstract)$ +$else$ +\makeatletter +\renewcommand{\MaketitleBox}{% + \resetTitleCounters + \def\baselinestretch{1}% + \begin{center} + \def\baselinestretch{1}% + \large \@title \par + \vskip 18pt + \normalsize\elsauthors \par + \vskip 30pt + \footnotesize \itshape \elsaddress \par + \end{center} + \vskip 12pt +} +\makeatother +$endif$ + +\begin{document} +$for(include-before)$ +$include-before$ +$endfor$ +\begin{frontmatter} + + \title{$title$$if(subtitle)$\\\Large{$subtitle$}$endif$} + $for(author)$\author$if(authorwithinstitute)$[$for(author.institute)$$author.institute$$sep$,$endfor$]$endif${$author.name$$if(author.correspondence)$\corref{corrauth}$endif$$if(author.equal-contributor)$\corref{eqcon}$endif$ $if(author.footnote)$\fnref{$author.footnote$}$endif$}$if(author.email)$\ead{$author.email$}$endif$$endfor$ + $if(authorwithinstitute)$ $for(institute)$ \address[$institute.id$]{$institute.name$} $endfor$ $endif$ + % generate corresponding authors. + % \StrBehind is from xstring package + \ifnum \hascorr=1 + \def\corrauths{ + $for(author)$$if(author.correspondence)$and $author.name$ ($author.email$) $endif$$endfor$} + \cortext[corrauth]{Corresponding to \StrBehind*{\corrauths}{and }.} + \fi + + % generate equal contributing authors. + \ifnum \haseqc=1 + \def\eqa{$for(author)$$if(author.equal-contributor)$and $author.name$ $endif$$endfor$} + \cortext[eqcon]{\StrBehind*{\eqa}{and } are equally contributed to this work.} + \fi + + $for(footnote)$ + \fntext[$footnote.id$]{$footnote.text$} + $endfor$ + + $if(abstract)$ + \begin{abstract} + $abstract$ + \end{abstract} + $if(keywords)$ + \begin{keyword} + $for(keywords/allbutlast)$$keywords$ \sep $endfor$ + $for(keywords/last)$$keywords$$endfor$ + \end{keyword} + $endif$ + $endif$ +\end{frontmatter} + +$body$ + +$if(authorwithinstitute)$ +$else$ +\section{Author Information} + +\getcorrauthinfo{} + +\getotherauthinfo{} + +$endif$ + + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$bibliography$} +$endif$ +$endif$ + +$for(include-after)$ +$include-after$ +$endfor$ +\end{document} diff --git a/inst/tex/elsevier-harvard.csl b/inst/tex/elsevier-harvard.csl new file mode 100755 index 0000000..5d88c51 --- /dev/null +++ b/inst/tex/elsevier-harvard.csl @@ -0,0 +1,239 @@ + + diff --git a/inst/tex/header.tex b/inst/tex/header.tex new file mode 100755 index 0000000..a10af4d --- /dev/null +++ b/inst/tex/header.tex @@ -0,0 +1,74 @@ +\usepackage{enumitem} +\usepackage{fontspec} +\usepackage{float} +\usepackage[normalem]{ulem} +\usepackage{hyperref} +\usepackage{nameref} %needed by zref-xr +\usepackage{zref-xr,zref-hyperref,zref-user} +\usepackage{xr-hyper} + + +\setkomafont{author}{\normalsize} + +\makeatletter +\renewcommand{\title}[1]{\gdef\@title{\large\textbf{#1}}} % Adjust \Huge or other font commands +% \renewcommand{\author}[1]{\gdef\@author{\normalsize\textrm{#1}}} % Adjust \Huge or other font commands +% \renewcommand{\author}[1]{\normalsize\textit{#1}} % Use \normalsize and \textit for customization +\makeatother + +\usepackage{adjustbox} +% \usepackage{xcolor} +\usepackage{mdframed} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + linecolor=gray!30, + backgroundcolor=gray!5, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=0pt, + innerbottommargin=0pt + ]{refquote} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + backgroundcolor=red!3!white, + linecolor=red!30!white, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=10pt, + innerbottommargin=10pt + ]{question} +% setup hyperlink for page and line number +\def\msname{MS} +\def\smname{SM} +\setenumerate{labelsep=*, leftmargin=1.0pc} +%\zexternaldocument*{ManuscriptNew\veraa} +\zexternaldocument*{\msname} +\zexternaldocument*{\smname} +\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{ + \linelabel{line:#1}}} +%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf] +\makeatletter +\newcommand{\clab}[2][]{ + \protected@write\@auxout{\let\clab\@secondoftwo}{ + \string\newlabel{r:#1}{{#2}{}}}% + \hlabel{#1}#2\hlabel{#1end}} +\makeatother +\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line +\zref{line:#1}--\zref{line:#1end}:}\\}} +\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}} +% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\} +\renewenvironment{quote}{\begin{question}}{\end{question}} +% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}} + diff --git a/inst/tex/nature-biotechnology.csl b/inst/tex/nature-biotechnology.csl new file mode 100644 index 0000000..216c8b9 --- /dev/null +++ b/inst/tex/nature-biotechnology.csl @@ -0,0 +1,17 @@ + + diff --git a/inst/tex/nature.csl b/inst/tex/nature.csl new file mode 100644 index 0000000..7b058ba --- /dev/null +++ b/inst/tex/nature.csl @@ -0,0 +1,154 @@ + + diff --git a/inst/tex/supp.cls b/inst/tex/supp.cls new file mode 100755 index 0000000..c7c1e9e --- /dev/null +++ b/inst/tex/supp.cls @@ -0,0 +1,1359 @@ +%% +%% This is file `supp.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% supp.dtx (with options: `class') +%% +%% Copyright 2007-2020 Elsevier Ltd +%% +%% This file is part of the 'supp Bundle'. +%% ------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% The list of all files belonging to the 'supp Bundle' is +%% given in the file `manifest.txt'. +%% +%% +%% +%% + \def\RCSfile{supp}% + \def\RCSversion{3.3}% + \def\RCSdate{2020/11/20}% + \def\@shortjnl{\relax} + \def\@journal{Elsevier Ltd} + \def\@company{Elsevier Ltd} + \def\@issn{000-0000} + \def\@shortjid{supp} +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{\@shortjid}[\RCSdate, \RCSversion: \@journal] +\def\ABD{\AtBeginDocument} +\newif\ifpreprint \preprintfalse +\newif\ifnonatbib \nonatbibfalse +\newif\iflongmktitle \longmktitlefalse +\newif\ifnopreprintline \nopreprintlinefalse +\newif\ifdoubleblind \doubleblindfalse + +\newif\ifuseexplthreefunctions \useexplthreefunctionsfalse + +\IfFileExists{expl3.sty}{% + \global\useexplthreefunctionstrue% + \RequirePackage{expl3}}{} +\ifuseexplthreefunctions\relax% +\IfFileExists{xparse.sty}{\RequirePackage{xparse}}{} +\IfFileExists{etoolbox.sty}{\RequirePackage{etoolbox}}{} +\fi + +\def\@blstr{1} +\newdimen\@bls +\@bls=\baselineskip + +\def\@finalWarning{% + *****************************************************\MessageBreak + This document is typeset in the CRC style which\MessageBreak + is not suitable for submission.\MessageBreak + \MessageBreak + Please typeset again using 'preprint' option\MessageBreak + for creating PDF suitable for submission.\MessageBreak + ******************************************************\MessageBreak +} + +\DeclareOption{preprint}{\global\preprinttrue + \gdef\@blstr{1}\xdef\jtype{0}% + \AtBeginDocument{\@twosidefalse\@mparswitchfalse}} +\DeclareOption{nopreprintline}{\global\nopreprintlinetrue} +\DeclareOption{final}{\gdef\@blstr{1}\global\preprintfalse} +\DeclareOption{review}{\global\preprinttrue\gdef\@blstr{1.5}} +\DeclareOption{authoryear}{\xdef\@biboptions{round,authoryear}} +\DeclareOption{number}{\xdef\@biboptions{numbers}} +\DeclareOption{numbers}{\xdef\@biboptions{numbers}} +\DeclareOption{nonatbib}{\global\nonatbibtrue} +\DeclareOption{longtitle}{\global\longmktitletrue} +\DeclareOption{5p}{\xdef\jtype{5}\global\preprintfalse + \ExecuteOptions{twocolumn}} + \def\jtype{0} +\DeclareOption{3p}{\xdef\jtype{3}\global\preprintfalse} +\DeclareOption{1p}{\xdef\jtype{1}\global\preprintfalse + \AtBeginDocument{\@twocolumnfalse}} +\DeclareOption{times}{\IfFileExists{txfonts.sty}% + {\AtEndOfClass{\RequirePackage{txfonts}% + \gdef\ttdefault{cmtt}% + \let\iint\relax + \let\iiint\relax + \let\iiiint\relax + \let\idotsint\relax + \let\openbox\relax}}{\AtEndOfClass{\RequirePackage{times}}}} + +\DeclareOption{endfloat}{\IfFileExists{endfloat.sty} + {\AtEndOfClass{\RequirePackage[markers]{endfloat}}}{}} +\DeclareOption{endfloats}{\IfFileExists{endfloat.sty} + {\AtEndOfClass{\RequirePackage[markers]{endfloat}}}{}} +\DeclareOption{numafflabel} + {\AtBeginDocument{\def\theaffn{\arabic{affn}}}} %*% +\DeclareOption{lefttitle} + {\AtBeginDocument{\def\supptitlealign{flushleft}}} %*% +\DeclareOption{centertitle} + {\AtBeginDocument{\def\supptitlealign{center}}} %*% +\DeclareOption{reversenotenum} + {\AtBeginDocument{\def\theaffn{\arabic{affn}} + \def\thefnote{\alph{fnote}}}} +\DeclareOption{doubleblind}{\doubleblindtrue} + +\ExecuteOptions{a4paper,10pt,oneside,onecolumn,number,preprint,centertitle} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions +\LoadClass{article} +\RequirePackage{graphicx} +\let\comma\@empty +\let\tnotesep\@empty +\let\@title\@empty + +\def\useelstitle{} + +\def\title#1{\g@addto@macro\@title{#1% + \global\let\tnoteref\@gobble}% + \g@addto@macro\useelstitle{#1}} + +\def\elsLabel#1{\@bsphack\protected@write\@auxout{}% + {\string\Newlabel{#1}{\@currentlabel}}\@esphack} +\def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}} + +\def\elsRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}} + +\let\@tnotemark\@empty + +\ifdoubleblind + \def\tnotemark[#1]{} +\else + \def\tnotemark[#1]{\@for\mytmark:=#1\do{% + \expandafter\ifcase\elsRef{\mytmark}\or$^{\star}$\or + $^{,\star\star}$\fi + }% +} +\fi + +\def\tnoteref#1{\tnotemark[{#1}]} +\let\@tnotes\@empty +\newcounter{tnote} +\def\tnotetext[#1]#2{\g@addto@macro\@tnotes{% + \stepcounter{tnote}\elsLabel{#1}% + \def\thefootnote{\ifcase\c@tnote\or$\star$\or$\star\star$\fi}% + \footnotetext{#2}}} + +\let\@nonumnotes\@empty +\def\nonumnote#1{\g@addto@macro\@nonumnotes{% + \let\thefootnote\relax\footnotetext{#1}}} + +\newcounter{fnote} +\def\thefnote{\arabic{fnote}} +\def\fnmark[#1]{\let\comma\@empty + \def\@fnmark{\@for\@@fnmark:=#1\do{% + \edef\fnotenum{\@ifundefined{X@\@@fnmark}{1}{\elsRef{\@@fnmark}}}% + \unskip\comma\fnotenum\let\comma,}}% +} + +\def\fnref#1{\fnmark[#1]} + +\let\@fnotes\@empty\let\@fnmark\@empty +\def\fntext[#1]#2{\g@addto@macro\@fnotes{% + \refstepcounter{fnote}\elsLabel{#1}% + \def\thefootnote{\c@fnote}% + \global\setcounter{footnote}{\c@fnote}% + \footnotetext{#2}}} + +\def\cormark[#1]{\edef\cnotenum{\elsRef{#1}}% + \unskip\textsuperscript{\sep\ifcase\cnotenum\or + $\ast$\or$\ast\ast$\fi\hspace{-1pt}}\let\sep=,} + +\let\@cormark\@empty +\let\@cornotes\@empty +\newcounter{cnote} +\def\cortext[#1]#2{\g@addto@macro\@cornotes{% + \refstepcounter{cnote}\elsLabel{#1}% + \def\thefootnote{\ifcase\thecnote\or$\ast$\or + $\ast\ast$\fi}% + \footnotetext{#2}}} + +\let\@corref\@empty +\def\corref#1{\edef\cnotenum{\elsRef{#1}}% + \edef\@corref{\ifcase\cnotenum\or + $\ast$\or$\ast\ast$\fi\hskip-1pt}} + +\def\resetTitleCounters{\c@cnote=0 + \c@fnote=0 \c@tnote=0 \c@footnote=0} + +\let\eadsep\@empty +\def\@elseads{} +\let\@elsuads\@empty +\let\@cormark\@empty +\def\hashchar{\expandafter\@gobble\string\~} +\def\underscorechar{\expandafter\@gobble\string\_} +\def\lbracechar{\expandafter\@gobble\string\{} +\def\rbracechar{\expandafter\@gobble\string\}} + +\gdef\ead{\@ifnextchar[{\@uad}{\@ead}} +\gdef\@ead#1{\bgroup + \def\_{\underscorechar}% + \def\{{\lbracechar}% + \def~{\hashchar}% + \def\}{\rbracechar}% + \edef\tmp{\the\@eadauthor}% + \immediate\write\@auxout{\string\emailauthor + {#1}{\expandafter\strip@prefix\meaning\tmp}}% + \egroup +} +\newcounter{ead} +\gdef\emailauthor#1#2{\stepcounter{ead}% + \g@addto@macro\@elseads{\raggedright% + \let\corref\@gobble\def\@@tmp{#1}% + \eadsep{\ttfamily\expandafter\strip@prefix\meaning\@@tmp} + (#2)\def\eadsep{\unskip,\space}}% +} +\gdef\@uad[#1]#2{\bgroup + \def~{\hashchar}% + \def\_{\underscorechar}% + \def~{\hashchar}% + \def\}{\rbracechar}% + \edef\tmp{\the\@eadauthor} + \immediate\write\@auxout{\string\urlauthor + {#2}{\expandafter\strip@prefix\meaning\tmp}}% + \egroup +} +\gdef\urlauthor#1#2{\g@addto@macro\@elsuads{\let\corref\@gobble% + \def\@@tmp{#1}\raggedright\eadsep + {\ttfamily\expandafter\strip@prefix\meaning\@@tmp}\space(#2)% + \def\eadsep{\unskip,\space}}% +} + +\def\elsauthors{} +\def\useauthors{} +\def\elsprelimauthors{} + +\def\pprinttitle{} +\let\authorsep\@empty +\let\prelimauthorsep\@empty +\let\sep\@empty +\newcounter{author} +\def\author{\@ifnextchar[{\@@author}{\@author}} + +\newtoks\@eadauthor +\def\@@author[#1]#2{% + \g@addto@macro\elsprelimauthors{% + \prelimauthorsep#2% + \def\prelimauthorsep{\unskip,\space}}% + \g@addto@macro\elsauthors{% + \def\baselinestretch{1}% + \authorsep#2\unskip\textsuperscript{%#1% + \@for\@@affmark:=#1\do{% + \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}% + \unskip\sep\affnum\let\sep=,}% + \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi + \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi + }% + \def\authorsep{\unskip,\space}% + \global\let\sep\@empty\global\let\@corref\@empty + \global\let\@fnmark\@empty}% + \@eadauthor={#2}% + \g@addto@macro\useauthors{#2; }% +} + +\def\@author#1{% + \g@addto@macro\elsprelimauthors{% + \prelimauthorsep#1% + \def\prelimauthorsep{\unskip,\space}}% + \g@addto@macro\elsauthors{\normalsize% + \def\baselinestretch{1}% + \upshape\authorsep#1\unskip\textsuperscript{% + \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi + \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi + }% + \def\authorsep{\unskip,\space}% + \global\let\@fnmark\@empty + \global\let\@corref\@empty \global\let\sep\@empty}% + \@eadauthor={#1}% + \g@addto@macro\useauthors{#1; }% +} + +\AtBeginDocument{% + \@ifpackageloaded{hyperref}{% + \expandafter\gdef\csname Hy@title\endcsname{\useelstitle}% + \expandafter\gdef\csname Hy@author\endcsname{\useauthors}% + }{} +} + +\def\elsaddress{} +\def\addsep{\par\vskip6pt} + +\def\@alph#1{% + \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or + l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or + y\or z% + \or aa\or ab\or ac\or ad\or ae\or af\or ag\or ah\or ai\or aj\or + ak\or al\or am\or an\or ao\or ap\or aq\or ar\or as\or at\or au\or + av\or aw\or ax\or ay\or az% + \or ba\or bb\or bc\or bd\or be\or bf\or bg\or bh\or bi\or bj\or + bk\or bl\or bm\or bn\or bo\or bp\or bq\or br\or bs\or bt\or bu\or + bv\or bw\or bx\or by\or bz% + \or ca\or cb\or cc\or cd\or ce\or cf\or cg\or ch\or ci\or cj\or + ck\or cl\or cm\or cn\or co\or cp\or cq\or cr\or cs\or ct\or cu\or + cv\or cw\or cx\or cy\or cz% + \or da\or db\or dc\or dd\or de\or df\or dg\or dh\or di\or dj\or + dk\or dl\or dm\or dn\or do\or dp\or dq\or dr\or ds\or dt\or du\or + dv\or dw\or dx\or dy\or dz% + \or ea\or eb\or ec\or ed\or ee\or ef\or eg\or eh\or ei\or ej\or + ek\or el\or em\or en\or eo\or ep\or eq\or er\or es\or et\or eu\or + ev\or ew\or ex\or ey\or ez% + \or fa\or fb\or fc\or fd\or fe\or ff\or fg\or fh\or fi\or fj\or + fk\or fl\or fm\or fn\or fo\or fp\or fq\or fr\or fs\or ft\or fu\or + fv\or fw\or fx\or fy\or fz% + \or ga\or gb\or gc\or gd\or ge\or gf\or gg\or gh\or gi\or gj\or + gk\or gl\or gm\or gn\or go\or gp\or gq\or gr\or gs\or gt\or gu\or + gv\or gw\or gx\or gy\or gz% + \else\@ctrerr\fi} + +\newcounter{affn} +\renewcommand\theaffn{\alph{affn}} + +\ifuseexplthreefunctions\relax% + \ExplSyntaxOn + \def\ca_affitem_postskip{\mbox{~}\unskip\ignorespaces} + %%Author Address + \DeclareDocumentCommand \ca_organization { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_postal_code { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_aff_city { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_address_line { O{,}m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_state { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_country { O{ } m } + { + % #2 #1 + \csgappto { ca_affiliation_values } { #2 #1 } + } + + \DeclareDocumentCommand \ca_stm_organization { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_postal_code { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_city { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_address_line { O{,}m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_state { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_country { O{ } m } + { + #2 #1 + } + + \keys_define:nn { stm / affiliation } + { + op .tl_set_x:N = \l_organization_punc_tl, + oraganizationsep .tl_set_x:N = \l_organization_punc_tl, + ap .tl_set_x:N = \l_address_line_punc_tl, + addresslinesep .tl_set_x:N = \l_address_line_punc_tl, + cp .tl_set_x:N = \l_city_punc_tl, + citysep .tl_set_x:N = \l_city_punc_tl, + pp .tl_set_x:N = \l_postal_code_punc_tl, + postcodesep .tl_set_x:N = \l_postal_code_punc_tl, + sp .tl_set_x:N = \l_state_punc_tl, + statesep .tl_set_x:N = \l_state_punc_tl, + o .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + organization .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + a .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + addressline .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + c .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + city .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + p .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + postcode .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + s .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + state .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + orp .tl_set_x:N = \l_organization_punc_tl, + adp .tl_set_x:N = \l_address_line_punc_tl, + cip .tl_set_x:N = \l_city_punc_tl, + pcp .tl_set_x:N = \l_postal_code_punc_tl, + stp .tl_set_x:N = \l_state_punc_tl, + cyp .tl_set_x:N = \l_country_punc_tl, + or .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + ad .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + ci .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + pc .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + st .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + cy .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + country .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + unknown .code:n = { + \ifstrempty { #1 } { + \csxappto { ca_affiliation_values } + { {\l_keys_key_tl}~ } + } { + \csxappto { ca_affiliation_values } + { {#1}~ } + } + } + } + + \cs_set:Npn \__reset_affiliation: + { + \tl_gset:Nn \l_organization_punc_tl { , } + \tl_gset:Nn \l_address_line_punc_tl { , } + \tl_gset:Nn \l_city_punc_tl { , } + \tl_gset:Nn \l_postal_code_punc_tl { , } + \tl_gset:Nn \l_state_punc_tl { , } + \tl_gset:Nn \l_country_punc_tl { } + } + + \DeclareDocumentCommand\affiliation{ o m }{ + \__reset_affiliation: + \csgdef { ca_affiliation_values } { } + \IfNoValueTF { #2 } + { } + { + \keys_set:nn { stm / affiliation } { #2 } + } + \csgappto{elsaddress}{ + \def\baselinestretch{1}% + \refstepcounter{affn} + \xdef\@currentlabel{\theaffn} + \IfNoValueTF { #1 } + { } + { \elsLabel{#1} } + \textsuperscript{\theaffn}} + \csxappto{elsaddress}{ + \csuse { ca_affiliation_values } + \par + } + } + \ExplSyntaxOff + \else% + \def\caaffitempostskip{\space} + + \DeclareRobustCommand\caorganization[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\capostalcode[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaffcity[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaddressline[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castate[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\cacountry[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castmorganization[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmpostalcode[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaffcity[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaddressline[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmstate[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmcountry[2][,]{% + #2#1\caaffitempostskip% + } + + \define@key{affiliation}{op}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{orp}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{organizationsep}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{ap}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{adp}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{addresslinesep}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{cp}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cip}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cyp}{\xdef\@countrypunc{#1}} + \define@key{affiliation}{citysep}{\xdef\@citypunc{#1}} + \define@key{affiliation}{pp}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{pop}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{postcodesep}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{sp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{stp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{statesep}{\xdef\@statepunc{#1}} + \define@key{affiliation}{countrysep}{\xdef\@countrypunc{#1}} + + \define@key{affiliation}{organization}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{addressline}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{city}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{postcode}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{state}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{or}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{ad}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{ci}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{po}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{st}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{o}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{a}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{c}{% + \cacity[\@citypunc]{#1}} + \define@key{affiliation}{p}{% + \capostcode[\@postcodepunc]{#1}} + \define@key{affiliation}{s}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{cy}{% + \cacountry[\@countrypunc]{#1}} + \define@key{affiliation}{country}{% + \cacountry[\@countrypunc]{#1}} + + \gdef\@resetaffiliation{% + \gdef\@organizationpunc{,}% + \gdef\@addresslinepunc{,}% + \gdef\@citypunc{,}% + \gdef\@statepunc{,}% + \gdef\@postcodepunc{,}% + \gdef\@countrypunc{}% + } + + \def\affiliation{\@ifnextchar[{\@@affiliation}{\@affiliation}} + + \newcommand*{\newstmrobustcmd}{} + \protected\def\newstmrobustcmd{\@star@or@long\stmetb@new@command} + + \def\stmetb@new@command#1{\@testopt{\stmetb@newcommand#1}0} + + \def\stmetb@newcommand#1[#2]{% + \@ifnextchar[%] + {\stmetb@xargdef#1[#2]} + {\ifx\l@ngrel@x\relax + \let\l@ngrel@x\protected + \else + \protected\def\l@ngrel@x{\protected\long}% + \fi + \@argdef#1[#2]}} + + \long\def\stmetb@xargdef#1[#2][#3]#4{% + \@ifdefinable#1{% + \expandafter\protected + \expandafter\def + \expandafter#1% + \expandafter{% + \expandafter\@testopt + \csname\string#1\endcsname{#3}}% + \expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}}} + % + \newcommand{\ifstmundef}[1]{% + \ifdefined#1% + \ifx#1\relax + \expandafter\expandafter + \expandafter\@firstoftwo + \else + \expandafter\expandafter + \expandafter\@secondoftwo + \fi + \else + \expandafter\@firstoftwo + \fi} + \newcommand{\stmexpandonce}[1]{% + \unexpanded\expandafter{#1}} + \newstmrobustcmd{\gstmappto}[2]{% + \ifundef{#1} + {\xdef#1{\unexpanded{#2}}} + {\xdef#1{\stmexpandonce#1\unexpanded{#2}}}} + \newstmrobustcmd{\xstmappto}[2]{% + \ifstmundef{#1} + {\xdef#1{#2}} + {\xdef#1{\stmexpandonce#1#2}}} + + \long\def\@@affiliation[#1]#2{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \elsLabel{#1}% + \setkeys{affiliation}{#2}% + \g@addto@macro\elsaddress{% + \def\baselinestretch{1}% + \refstepcounter{affn}% + \xdef\@currentlabel{\theaffn}% + \elsLabel{#1}% + \textsuperscript{\theaffn}} + \xstmappto\elsaddress{\caaffiliationvalues\par}} + + \long\def\@affiliation#1{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \setkeys{affiliation}{#1}% + \g@addto@macro\elsauthors{% + \def\baselinestretch{1}}% + \xstmappto\elsaddress{\caaffiliationvalues\par}} +\fi + +\def\address{\@ifnextchar[{\@@address}{\@address}} + +\long\def\@@address[#1]#2{\g@addto@macro\elsaddress{% + \def\baselinestretch{1}% + \refstepcounter{affn} + \xdef\@currentlabel{\theaffn} + \elsLabel{#1}% + \textsuperscript{\theaffn}#2\par}} + +\long\def\@address#1{\g@addto@macro\elsauthors{% + \def\baselinestretch{1}% + \addsep\footnotesize\itshape#1\def\addsep{\par\vskip6pt}% + \def\authorsep{\par\vskip8pt}}} + +\newbox\absbox +\renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup + \hsize=\textwidth\def\baselinestretch{1}% + \noindent\unskip\textbf{\@suppabstitle} %*% + \par\medskip\noindent\unskip\ignorespaces} + {\egroup} + +\newbox\supphighlightsbox +\newbox\suppgrabsbox +\def\@supphighlightstitle{Highlights} +\def\@suppgrabstitle{Graphical Abstract} +\newif\ifelsprelimpagegrabs\global\elsprelimpagegrabsfalse +\newif\ifelsprelimpagehl\global\elsprelimpagehlfalse +\def\suppprelims{% + \ifelsprelimpagegrabs\relax% + \thispagestyle{empty}% + \unvbox\suppgrabsbox% + \pagebreak\clearpage% + \fi% + \ifelsprelimpagehl\relax% + \thispagestyle{empty} + \unvbox\supphighlightsbox% + \pagebreak\clearpage% + \setcounter{page}{1}% + \fi% +} +\newenvironment{highlights}{% + \global\elsprelimpagehltrue% + \global\setbox\supphighlightsbox=\vbox\bgroup + \hsize=\textwidth\def\baselinestretch{1}% + \noindent\unskip{\Large\@supphighlightstitle}%*% + \par\vskip12pt\noindent\unskip\ignorespaces\textbf{\@title}% + \ifx\elsprelimauthors\@empty\relax\else% + \par\vskip6pt\noindent\unskip\ignorespaces\elsprelimauthors% + \fi% + \par\medskip\noindent\unskip\ignorespaces + \begin{itemize} + } + {\end{itemize} + \egroup} +\newenvironment{graphicalabstract}{% + \global\elsprelimpagegrabstrue% + \global\setbox\suppgrabsbox=\vbox\bgroup + \hsize=\textwidth\def\baselinestretch{1}% + \noindent\unskip{\Large\@suppgrabstitle}%*% + \par\vskip12pt\noindent\unskip\ignorespaces\textbf{\@title}% + \ifx\elsprelimauthors\@empty\relax\else% + \par\vskip6pt\noindent\unskip\ignorespaces\elsprelimauthors% + \fi% + \par\medskip\noindent\unskip\ignorespaces} + {\egroup} + +\newbox\keybox +\let\@suppkwdtitle\@empty %*% +\def\keywordtitle#1{\gdef\@suppkwdtitle{#1}} %*% +\def\keywordtitlesep#1{\gdef\@suppkeywordtitlesep{#1}} %*% +\keywordtitle{Keywords} %*% +\keywordtitlesep{:\ } +\def\keyword{% + \def\sep{\unskip, }% + \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}} + \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}% + \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}% + \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}% + \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth + \normalsize\normalfont\def\baselinestretch{1} + \parskip\z@ + \noindent\textit{\@suppkwdtitle\@elsarticlekeywordtitlesep} + \raggedright % Keywords are not justified. + \ignorespaces} +\def\endkeyword{\par \egroup} + +\newdimen\Columnwidth +\Columnwidth=\columnwidth + +\def\printFirstPageNotes{% + \iflongmktitle + \let\columnwidth=\textwidth + \fi +\ifdoubleblind +\else + \ifx\@tnotes\@empty\else\@tnotes\fi + \ifx\@nonumnotes\@empty\else\@nonumnotes\fi + \ifx\@cornotes\@empty\else\@cornotes\fi + \ifx\@elseads\@empty\relax\else + \let\thefootnote\relax + \footnotetext{\ifnum\theead=1\relax + \textit{Email address:\space}\else + \textit{Email addresses:\space}\fi + \@elseads}\fi + \ifx\@elsuads\@empty\relax\else + \let\thefootnote\relax + \footnotetext{\textit{URL:\space}% + \@elsuads}\fi +\fi + \ifx\@fnotes\@empty\else\@fnotes\fi + \iflongmktitle\if@twocolumn + \let\columnwidth=\Columnwidth\fi\fi +} + +%% Pushing text to begin on newpage %*% +\def\newpage@after@title{title} +\def\newpage@after@author{author} +\def\newpage@after@abstract{abstract} +\def\newpageafter#1% + {\gdef\@suppnewpageafter{#1}} + +\long\def\pprintMaketitle{\clearpage + \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi + \resetTitleCounters + \def\baselinestretch{1}% + \printFirstPageNotes + \begin{\supptitlealign}% + \thispagestyle{pprintTitle}% + \def\baselinestretch{1}% + \Large\@title\par\vskip18pt% + \ifx\@suppnewpageafter\newpage@after@title% %*% + \newpage + \fi% + \ifdoubleblind + \vspace*{2pc} + \else + \normalsize\elsauthors\par\vskip10pt + \footnotesize\itshape\elsaddress\par\vskip36pt + \fi + \ifx\@suppnewpageafter\newpage@after@author% %*% + \newpage + \fi% + \hrule\vskip12pt + \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi + \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi + \hrule\vskip12pt + \ifx\@suppnewpageafter\newpage@after@abstract% %*% + \newpage + \fi% + \end{\supptitlealign}% + \gdef\thefootnote{\arabic{footnote}}% + } + +\def\printWarning{% + \mbox{}\par\vfill\par\bgroup + \fboxsep12pt\fboxrule1pt + \hspace*{.18\textwidth} + \fcolorbox{gray50}{gray10}{\box\warnbox} + \egroup\par\vfill\thispagestyle{empty} + \setcounter{page}{0} + \clearpage} + +\long\def\finalMaketitle{% + \resetTitleCounters + \def\baselinestretch{1}% + \MaketitleBox + \thispagestyle{pprintTitle}% + \gdef\thefootnote{\arabic{footnote}}% + } + +\long\def\MaketitleBox{% + \resetTitleCounters + \def\baselinestretch{1}% + \begin{\supptitlealign}% + \def\baselinestretch{1}% + \Large\@title\par\vskip18pt + \ifdoubleblind + \vspace*{2pc} + \else + \normalsize\elsauthors\par\vskip10pt + \footnotesize\itshape\elsaddress\par\vskip36pt + \fi + \hrule\vskip12pt + \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi + \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi + \hrule\vskip12pt + \end{\supptitlealign}% +} + +\def\FNtext#1{\par\bgroup\footnotesize#1\egroup} +\newdimen\space@left +\def\alarm#1{\typeout{******************************}% + \typeout{#1}% + \typeout{******************************}% +} + +\def\titlespancalculator#1#2#3#4{% + % break count + \@tempcnta=#4\relax% + % pagebreakcount increment + \advance\@tempcnta by 1\relax% + % title page height + \@tempdima=#1\relax% + % Page height - title page notes height (only for first break) + % Page height - textheight (for remaining breaks) + % Page height - title page notes height + \@tempdimb=#2\relax% + % Remaining title page height + \advance\@tempdima -\the\@tempdimb% + % Checks if remaining title page + % height less than textheight + \ifdim\the\@tempdima>#3\relax% + \titlespancalculator% + {\the\@tempdima}{#3}{#3}{\the\@tempcnta}%Break again + \else% + % Save break count and exit. + \xdef\savetitlepagespan{\the\@tempcnta}% + \fi% +}% + +\long\def\myfor#1#2#3{% + \@tempcnta=#1\relax% + \ifnum#1<#2\relax% + \advance\@tempcnta by 1\relax% + #3% + \myfor{\the\@tempcnta}{#2}{#3}% + \fi} + +\long\def\getSpaceLeft{%\global\@twocolumnfalse% + \global\setbox0=\vbox{\hsize=\textwidth\MaketitleBox}% + \global\setbox1=\vbox{\hsize=\textwidth + \let\footnotetext\FNtext + \printFirstPageNotes}% + \xdef\noteheight{\the\ht1}% + \xdef\titleheight{\the\ht0}% + \@tempdima=\vsize + \advance\@tempdima-\noteheight + \advance\@tempdima-1\baselineskip + \xdef\savefpageheight{\the\@tempdima}% + \setbox2=\vbox{\titlespancalculator{\titleheight}% + {\savefpageheight}{\textheight}{0}}% +} + + \skip\footins=24pt + +\newbox\els@boxa +\newbox\els@boxb + +\ifpreprint + \def\maketitle{\suppprelims\pprintMaketitle} + \else + \ifnum\jtype=1 + \def\maketitle{% + \suppprelims% + \iflongmktitle\getSpaceLeft + \ifdim\noteheight>0pt% + \advance\@tempdima-1.35\baselineskip + \fi% + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \ifnum\savetitlepagespan>1\relax% + \myfor{2}{\savetitlepagespan}{% + \global\setbox\els@boxb=\vsplit0 to \textheight%\@tempdima + \box\els@boxb} + \else% + \fi% + \box0% + \else + \finalMaketitle\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \else + \ifnum\jtype=5 + \def\maketitle{% + \suppprelims% + \iflongmktitle\getSpaceLeft + \ifdim\noteheight>0pt% + \advance\@tempdima-1.35\baselineskip + \fi% + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \ifnum\savetitlepagespan>1\relax% + \myfor{2}{\savetitlepagespan}{% + \global\setbox\els@boxb=\vsplit0 to \textheight%\@tempdima + \twocolumn[\box\els@boxb]} + \else% + \fi% + \twocolumn[\box0]%\printFirstPageNotes + \else + \twocolumn[\finalMaketitle]\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}} + \else + \if@twocolumn + \def\maketitle{% + \suppprelims% + \iflongmktitle\getSpaceLeft + \ifdim\noteheight>0pt% + \advance\@tempdima-1.35\baselineskip + \fi% + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \ifnum\savetitlepagespan>1\relax% + \myfor{2}{\savetitlepagespan}{% + \global\setbox\els@boxb=\vsplit0 to \textheight%\@tempdima + \twocolumn[\box\els@boxb]} + \else% + \fi% + \twocolumn[\box0]% + \else + \twocolumn[\finalMaketitle]\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \else + \def\maketitle{% + \suppprelims% + \iflongmktitle\getSpaceLeft + \ifdim\noteheight>0pt% + \advance\@tempdima-1.35\baselineskip + \fi% + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \ifnum\savetitlepagespan>1\relax% + \myfor{2}{\savetitlepagespan}{% + \global\setbox\els@boxb=\vsplit0 to \textheight%\@tempdima + \box\els@boxb} + \else% + \fi% + \box0% + \else + \suppprelims% + \finalMaketitle\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \fi + \fi + \fi +\fi + +\let\@suppmyfooter\@empty +\let\@suppmyfooteralign\@empty +\def\@suppmyfooteralignleft{L} +\def\@suppmyfooteralignright{R} +\def\@suppmyfooteraligncenter{C} + +\def\myfooter[#1]#2 %*% + {\gdef\@suppmyfooteralign{#1} + \gdef\@suppmyfooter{#2}} + +\def\myfooterfont#1{\gdef\@myfooterfont{#1}} +\myfooterfont{\footnotesize\itshape} +\def\ps@pprintTitle{% + \let\@oddhead\@empty + \let\@evenhead\@empty + \def\@oddfoot{\footnotesize\itshape + \ifx\@journal\@empty + \else\@journal\fi\hfill}% + \let\@evenfoot\@oddfoot} + +\def\@seccntDot{.} +\def\@seccntformat#1{\csname the#1\endcsname\@seccntDot\hskip 0.5em} + +\renewcommand\section{\@startsection {section}{1}{\z@}% + {18\p@ \@plus 6\p@ \@minus 3\p@}% + {9\p@ \@plus 6\p@ \@minus 3\p@}% + {\normalsize\bfseries\boldmath}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {12\p@ \@plus 6\p@ \@minus 3\p@}% + {3\p@ \@plus 6\p@ \@minus 3\p@}% + {\normalfont\normalsize\itshape}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {12\p@ \@plus 6\p@ \@minus 3\p@}% + {\p@}% + {\normalfont\normalsize\itshape}} + +\def\paragraph{\secdef{\els@aparagraph}{\els@bparagraph}} +\def\els@aparagraph[#1]#2{\elsparagraph[#1]{#2.}} +\def\els@bparagraph#1{\elsparagraph*{#1.}} + +\newcommand\elsparagraph{\@startsection{paragraph}{4}{0\z@}% + {10\p@ \@plus 6\p@ \@minus 3\p@}% + {-6\p@}% + {\normalfont\itshape}} +\newdimen\leftMargin +\leftMargin=2em +\newtoks\@enLab %\newtoks\@enfont +\def\@enQmark{?} +\def\@enLabel#1#2{% + \edef\@enThe{\noexpand#1{\@enumctr}}% + \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}% + \@enloop} +\def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= } +\def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop} +\def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop} +\def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop} +\def\@enloop{\futurelet\@entemp\@enloop@} +\def\@enloop@{% + \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else + \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else + \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else + \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else + \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else + \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else + \ifx \bgroup\@entemp \let\@tempa\@enGroup \else + \ifx \@enum@\@entemp \let\@tempa\@gobble \else + \let\@tempa\@enOther + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\newlength{\@sep} \newlength{\@@sep} +\setlength{\@sep}{.5\baselineskip plus.2\baselineskip + minus.2\baselineskip} +\setlength{\@@sep}{.1\baselineskip plus.01\baselineskip + minus.05\baselineskip} +\providecommand{\sfbc}{\rmfamily\upshape} +\providecommand{\sfn}{\rmfamily\upshape} +\def\@enfont{\ifnum \@enumdepth >1\let\@nxt\sfn \else\let\@nxt\sfbc \fi\@nxt} +\def\enumerate{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi + \@ifnextchar[{\@@enum@}{\@enum@}} +\def\@@enum@[#1]{% + \@enLab{}\let\@enThe\@enQmark + \@enloop#1\@enum@ + \ifx\@enThe\@enQmark\@warning{The counter will not be printed.% + ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi + \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}% + \expandafter\let\csname the\@enumctr\endcsname\@enThe + \csname c@\@enumctr\endcsname7 + \expandafter\settowidth + \csname leftmargin\romannumeral\@enumdepth\endcsname + {\the\@enLab\hskip\labelsep}% + \@enum@} +\def\@enum@{\list{{\@enfont\csname label\@enumctr\endcsname}}% + {\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}% + \ifnum \@enumdepth>1\setlength{\topsep}{\@@sep}\else + \setlength{\topsep}{\@sep}\fi + \ifnum \@enumdepth>1\setlength{\itemsep}{0pt plus1pt minus1pt}% + \else \setlength{\itemsep}{\@@sep}\fi + %\setlength\leftmargin{\leftMargin}%%%{1.8em} + \setlength{\parsep}{0pt plus1pt minus1pt}% + \setlength{\parskip}{0pt plus1pt minus1pt} + }} + +\def\endenumerate{\par\ifnum \@enumdepth >1\addvspace{\@@sep}\else + \addvspace{\@sep}\fi \endlist} + +\def\sitem{\@noitemargtrue\@item[\@itemlabel *]} + +\def\itemize{\@ifnextchar[{\@Itemize}{\@Itemize[]}} + +\def\@Itemize[#1]{\def\next{#1}% + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \ifx\next\@empty\else\expandafter\def\csname + labelitem\romannumeral\the\@itemdepth\endcsname{#1}\fi% + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list\csname\@itemitem\endcsname + {\def\makelabel##1{\hss\llap{##1}}}% + \fi} +\def\newdefinition#1{% + \@ifnextchar[{\@odfn{#1}}{\@ndfn{#1}}}%] +\def\@ndfn#1#2{% + \@ifnextchar[{\@xndfn{#1}{#2}}{\@yndfn{#1}{#2}}} +\def\@xndfn#1#2[#3]{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}\@newctr{#1}[#3]% + \expandafter\xdef\csname the#1\endcsname{% + \expandafter\noexpand\csname the#3\endcsname \@dfncountersep + \@dfncounter{#1}}% + \global\@namedef{#1}{\@dfn{#1}{#2}}% + \global\@namedef{end#1}{\@enddefinition}}} +\def\@yndfn#1#2{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}% + \expandafter\xdef\csname the#1\endcsname{\@dfncounter{#1}}% + \global\@namedef{#1}{\@dfn{#1}{#2}}% + \global\@namedef{end#1}{\@enddefinition}}} +\def\@odfn#1[#2]#3{% + \@ifundefined{c@#2}{\@nocounterr{#2}}% + {\expandafter\@ifdefinable\csname #1\endcsname + {\global\@namedef{the#1}{\@nameuse{the#2}} + \global\@namedef{#1}{\@dfn{#2}{#3}}% + \global\@namedef{end#1}{\@enddefinition}}}} +\def\@dfn#1#2{% + \refstepcounter{#1}% + \@ifnextchar[{\@ydfn{#1}{#2}}{\@xdfn{#1}{#2}}} +\def\@xdfn#1#2{% + \@begindefinition{#2}{\csname the#1\endcsname}\ignorespaces} +\def\@ydfn#1#2[#3]{% + \@opargbegindefinition{#2}{\csname the#1\endcsname}{#3}\ignorespaces} +\def\@dfncounter#1{\noexpand\arabic{#1}} +\def\@dfncountersep{.} +\def\@begindefinition#1#2{\trivlist + \item[\hskip\labelsep{\bfseries #1\ #2.}]\upshape} +\def\@opargbegindefinition#1#2#3{\trivlist + \item[\hskip\labelsep{\bfseries #1\ #2\ (#3).}]\upshape} +\def\@enddefinition{\endtrivlist} + +\def\@begintheorem#1#2{\trivlist + \let\baselinestretch\@blstr + \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape} +\def\@opargbegintheorem#1#2#3{\trivlist + \let\baselinestretch\@blstr + \item[\hskip \labelsep{\bfseries #1\ #2\ (#3).}]\itshape} + +\def\newproof#1{% + \@ifnextchar[{\@oprf{#1}}{\@nprf{#1}}} +\def\@nprf#1#2{% + \@ifnextchar[{\@xnprf{#1}{#2}}{\@ynprf{#1}{#2}}} +\def\@xnprf#1#2[#3]{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}\@newctr{#1}[#3]% + \expandafter\xdef\csname the#1\endcsname{% + \expandafter\noexpand\csname the#3\endcsname \@prfcountersep + \@prfcounter{#1}}% + \global\@namedef{#1}{\@prf{#1}{#2}}% + \global\@namedef{end#1}{\@endproof}}} +\def\@ynprf#1#2{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}% + \expandafter\xdef\csname the#1\endcsname{\@prfcounter{#1}}% + \global\@namedef{#1}{\@prf{#1}{#2}}% + \global\@namedef{end#1}{\@endproof}}} +\def\@oprf#1[#2]#3{% + \@ifundefined{c@#2}{\@nocounterr{#2}}% + {\expandafter\@ifdefinable\csname #1\endcsname + {\global\@namedef{the#1}{\@nameuse{the#2}}% + \global\@namedef{#1}{\@prf{#2}{#3}}% + \global\@namedef{end#1}{\@endproof}}}} +\def\@prf#1#2{% + \refstepcounter{#1}% + \@ifnextchar[{\@yprf{#1}{#2}}{\@xprf{#1}{#2}}} +\def\@xprf#1#2{% + \@beginproof{#2}{\csname the#1\endcsname}\ignorespaces} +\def\@yprf#1#2[#3]{% + \@opargbeginproof{#2}{\csname the#1\endcsname}{#3}\ignorespaces} +\def\@prfcounter#1{\noexpand\arabic{#1}} +\def\@prfcountersep{.} +\def\@beginproof#1#2{\trivlist\let\baselinestretch\@blstr + \item[\hskip \labelsep{\scshape #1.}]\rmfamily} +\def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr + \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily} +\def\@endproof{\endtrivlist} +\newcommand*{\qed}{\hbox{}\hfill$\Box$} + +\@ifundefined{@biboptions}{\xdef\@biboptions{numbers}}{} +\InputIfFileExists{\jobname.spl}{}{} +\ifnonatbib\relax\else + \RequirePackage[\@biboptions]{natbib} +\fi +\newwrite\splwrite +\immediate\openout\splwrite=\jobname.spl +\def\biboptions#1{\def\next{#1}\immediate\write\splwrite{% + \string\g@addto@macro\string\@biboptions{% + ,\expandafter\strip@prefix\meaning\next}}} + +\let\baselinestretch=\@blstr +\ifnum\jtype=1 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=562pt, + textwidth=384pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=12pt, + footnotesep=24pt plus 2pt minus 12pt, + } + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \if@twocolumn\global\@twocolumnfalse\fi +\else\ifnum\jtype=3 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=622pt, + textwidth=468pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=18pt, + footnotesep=24pt plus 2pt minus 12pt, + columnsep=2pc + } + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \if@twocolumn\input{fleqn.clo}\fi +\else\ifnum\jtype=5 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=682pt, + textwidth=522pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=18pt, + footnotesep=24pt plus 2pt minus 12pt, + columnsep=18pt + }% + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \input{fleqn.clo} + \global\@twocolumntrue +%% +%% End of option '5p' +%% +\fi\fi\fi +\def\journal#1{\gdef\@journal{#1}} + \let\@journal\@empty +\newenvironment{frontmatter}{}{\maketitle} + +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip\footnotesize + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} + +\AtBeginDocument{\@ifpackageloaded{hyperref} + {\def\@linkcolor{blue} + \def\@anchorcolor{blue} + \def\@citecolor{blue} + \def\@filecolor{blue} + \def\@urlcolor{blue} + \def\@menucolor{blue} + \def\@pagecolor{blue} +\begingroup + \@makeother\`% + \@makeother\=% + \edef\x{% + \edef\noexpand\x{% + \endgroup + \noexpand\toks@{% + \catcode 96=\noexpand\the\catcode`\noexpand\`\relax + \catcode 61=\noexpand\the\catcode`\noexpand\=\relax + }% + }% + \noexpand\x + }% +\x +\@makeother\` +\@makeother\= +}{}} +%% +\def\appendixname{Appendix } +\renewcommand\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \setcounter{equation}{0} + \gdef\thefigure{\@Alph\c@section.\arabic{figure}}% + \gdef\thetable{\@Alph\c@section.\arabic{table}}% + \gdef\thesection{\appendixname~\@Alph\c@section}% + \@addtoreset{equation}{section}% + \gdef\theequation{\@Alph\c@section.\arabic{equation}}% + \addtocontents{toc}{\string\let\string\numberline\string\tmptocnumberline}{}{} +} + +%%%% \numberline width calculation for appendix. +\newdimen\appnamewidth +\def\tmptocnumberline#1{% + \setbox0=\hbox{\appendixname} + \appnamewidth=\wd0 + \addtolength\appnamewidth{2.5pc} + \hb@xt@\appnamewidth{#1\hfill} +} + +%% Added for work with amsrefs.sty + +\@ifpackageloaded{amsrefs}% + {} + {%\let\bibsection\relax% + \AtBeginDocument{\def\cites@b#1#2,#3{% + \begingroup[% + \toks@{\InnerCite{#2}#1}% + \ifx\@empty#3\@xp\@gobble\fi + \cites@c#3% +}}} +%% +%% Added for avoiding clash with cleveref.sty +\@ifpackageloaded{cleveref}% + {} + {\def\tnotetext[#1]#2{\g@addto@macro\@tnotes{% + \refstepcounter{tnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thetnote}} + \def\thefootnote{\ifcase\c@tnote\or$\star$\or$\star\star$\fi}% + \footnotetext{#2}}} +%%% + \def\fntext[#1]#2{\g@addto@macro\@fnotes{% + \refstepcounter{fnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thefnote}} + \def\thefootnote{\thefnote}% + \global\setcounter{footnote}{\c@fnote}% + \footnotetext{#2}}} +%%% + \def\cortext[#1]#2{\g@addto@macro\@cornotes{% + \refstepcounter{cnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thecnote}} + \def\thefootnote{\ifcase\c@cnote\or$\ast$\or + $\ast\ast$\fi}% + \footnotetext{#2}}} +} + +\def\textmarker#1#2{\textcolor{#1}{#2}}%*% +\endinput +%% +%% End of file `supp.cls'. diff --git a/inst/tex/supp.tex b/inst/tex/supp.tex new file mode 100755 index 0000000..5ceb998 --- /dev/null +++ b/inst/tex/supp.tex @@ -0,0 +1,432 @@ +$-- Keeping in template layout for backward compatibility +\documentclass[$if(layout)$$layout$$else$$for(classoption)$$classoption$$sep$,$endfor$$endif$]{_extensions/inst/tex/supp} %review=doublespace preprint=single 5p=2 column +%%% Begin My package additions %%%%%%%%%%%%%%%%%%% +\usepackage[hyphens]{url} +$if(journal)$ +\journal{$journal$} % Sets Journal name +$endif$ +\usepackage{lineno} % add +$if(linenumbers)$ +\linenumbers % turns line numbering on +$endif$ +\usepackage{graphicx} +\usepackage{xstring} +\usepackage{xcolor} +%%%%%%%%%%%%%%%% end my additions to header +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[utf8]{inputenc} + $if(euro)$ + \usepackage{eurosym} + $endif$ +\else % if luatex or xelatex + \usepackage{fontspec} + \ifxetex + \usepackage{xltxtra,xunicode} + \fi + \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \newcommand{\euro}{€} + $if(mainfont)$ + \setmainfont{$mainfont$} + $endif$ + $if(sansfont)$ + \setsansfont{$sansfont$} + $endif$ + $if(monofont)$ + \setmonofont{$monofont$} + $endif$ + $if(mathfont)$ + \setmathfont{$mathfont$} + $endif$ +\fi +% use microtype if available +\IfFileExists{microtype.sty}{\usepackage{microtype}}{} +$if(geometry)$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$if(natbib)$ +\usepackage{natbib} +\setcitestyle{$natbiboptions$} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +$if(graphics)$ +\usepackage{graphicx} +$endif$ +\ifxetex + \usepackage[setpagesize=false, % page size defined by xetex + unicode=false, % unicode breaks when used with xetex + xetex]{hyperref} +\else + \usepackage[unicode=true]{hyperref} +\fi +\hypersetup{breaklinks=true, + bookmarks=true, + pdfauthor={$author-meta$}, + pdftitle={$title-meta$}, + colorlinks=$if(colorlinks)$true$else$false$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, + linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, + pdfborder={0 0 0}} +\urlstyle{same} % don't use monospace font for urls +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\renewcommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +$if(numbersections)$ +\setcounter{secnumdepth}{5} +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(lang)$ +\ifxetex + \usepackage{polyglossia} + \setmainlanguage{$mainlang$} +\else + \usepackage[$lang$]{babel} +\fi +$endif$ +% Pandoc toggle for numbering sections (defaults to be off) +$if(numbersections)$ +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(highlighting-macros)$ +% Pandoc syntax highlighting +$highlighting-macros$ +$endif$ +% tightlist command for lists without linebreak +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(tables)$ +% From pandoc table feature +\usepackage{longtable,booktabs,array} +$if(multirow)$ +\usepackage{multirow} +$endif$ +\usepackage{calc} % for calculating minipage widths +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +$endif$ +$if(csl-refs)$ +% Pandoc citation processing +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacingunit} % times entry-spacing +\setlength{\cslentryspacingunit}{\parskip} +% 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}[2] % #1 hanging-ident, #2 entry spacing +{% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \let\oldpar\par + \def\par{\hangindent=\cslhangindent\oldpar} + \fi + % set entry spacing + \setlength{\parskip}{#2\cslentryspacingunit} + }% +{} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ + + +\usepackage{xifthen} +% set special color for EST +\ifthenelse{\equal{$journal$}{Environmental Science \& Technology}} +{\definecolor{seccol}{RGB}{56, 95, 66}} +{\definecolor{seccol}{RGB}{0, 0, 0}} + +$if(uppersections)$ +\usepackage{titlesec} +\titleformat{\section} +{\color{seccol}\large\bfseries\MakeUppercase}{\thesection}{1em}{} +$endif$ +$if(sectiononnewpage)$ +\AddToHook{cmd/section/before}{\clearpage} +$endif$ + +\usepackage{enumitem} +\usepackage{fontspec} +\usepackage{float} +\setmainfont{Helvetica} +\usepackage[normalem]{ulem} +\usepackage{hyperref} +\usepackage{nameref} %needed by zref-xr +\usepackage{zref-xr,zref-hyperref,zref-user} +\usepackage{xr-hyper} + +% force to use \zref +$if(msname)$ +\def\msname{$msname$} +\zexternaldocument*{\msname} +\renewcommand{\ref}{\zref} +$endif$ +$if(smname)$ +\def\smname{$smname$} +\zexternaldocument*{\smname} +$endif$ + +\zxrsetup{toltxlabel=true} +{\catcode`\#=12 \gdef\hashchar{#1}} +\makeatletter +\newcommand\hzref[1]{\edef\next{% + \noexpand\href{% + \zref@extractdefault{#1}{url}{}% + \zref@ifrefcontainsprop{#1}{anchor}{% + \hashchar\zref@extract{#1}{anchor}}{}}% + {\noexpand\zref{#1}}}\next} +\makeatother + + + +$if(revision)$ +% \usepackage{xcolor} +\usepackage{adjustbox} +\usepackage{mdframed} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + linecolor=gray!30, + backgroundcolor=gray!5, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=0pt, + innerbottommargin=0pt + ]{refquote} +\newmdenv[topline=false, + leftline=true, + bottomline=false, + rightline=false, + linewidth=3pt, + %backgroundcolor=lightgray, + backgroundcolor=red!3!white, + linecolor=red!30!white, + skipabove=\topsep, + skipbelow=\topsep, + leftmargin=0pt, + rightmargin=0pt, + innertopmargin=10pt, + innerbottommargin=10pt + ]{question} +\setenumerate{labelsep=*, leftmargin=1.0pc} +% setup hyperlink for page and line number +\def\msname{$if(msname)$$msname$$else$MS$endif$} +\def\smname{$if(smname)$$smname$$else$SM$endif$} +\setenumerate{labelsep=*, leftmargin=1.0pc} +%\zexternaldocument*{ManuscriptNew\veraa} +\zexternaldocument*{\msname} +\zexternaldocument*{\smname} +\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{ + \linelabel{line:#1}}} +%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf] +\makeatletter + \newcommand{\clab}[2]{% + \protected@write\@auxout{\let\clab\@secondoftwo}{ + \string\newlabel{r:#1}{{#2}{}}}% + \hlabel{#1}#2\hlabel{#1end}} +\makeatother +\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line +\zref{line:#1}--\zref{line:#1end}:}\\}} +\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}} +% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\} +\renewenvironment{quote}{\begin{question}}{\end{question}} +% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}} +$endif$ + + +% def default corresponding authors and equal contributing authors variables +\def\hascorr{0} +\def\haseqc{0} +% check if corresponding author(s) and equal contributing authors are available +$for(author)$$if(author.correspondence)$\def\hascorr{1}$endif$$if(author.equalcontribution)$\def\haseqc{1}$endif$ $endfor$ + +\newcommand{\getcorrauthinfo}{ + \subsection{Corresponding Author(s)} + \def\a{} \def\b{} \def\c{} + \hspace{-2.2em} + $for(author)$ + $if(author.correspondence)$ + \textbf{$author.name$:} + \vspace{-1em} + \begin{enumerate}[labelindent=-12pt,label=\arabic*.,itemindent=0em,leftmargin=!, itemsep = -10pt] + $for(author.institute)$ \def\a{$author.institute$} + $for(institute)$ \def\b{$institute.id$} \def\c{$institute.name$} + \ifx \a\b \item \c; \fi + $endfor$ + $endfor$ + $if(author.email)$\item email: $author.email$;$endif$ + $if(author.orcid)$\item orcid: $author.orcid$;$endif$ + $if(author.tel)$\item Tel: $author.tel$;$endif$ + $if(author.fax)$\item Fax: $author.fax$$endif$ + \end{enumerate} + $endif$ + $endfor$ +} + +\newcommand{\getotherauthinfo}{ + \subsection{Author(s)} + \def\a{} \def\b{} \def\c{} + \hspace{-2.2em} + $for(author)$ + $if(author.correspondence)$ + $else$ + \textbf{$author.name$:} + \vspace{-1em} + \begin{enumerate}[labelindent=-12pt,label=\arabic*.,itemindent=0em,leftmargin=!, itemsep = -10pt] + $for(author.institute)$ \def\a{$author.institute$} $for(institute)$ \def\b{$institute.id$} \def\c{$institute.name$} + \ifx \a\b \item \c; \fi + $endfor$ + $endfor$ + $if(author.email)$\item email: $author.email$;$endif$ + $if(author.orcid)$\item orcid: $author.orcid$;$endif$ + $if(author.tel)$\item Tel: $author.tel$;$endif$ + $if(author.fax)$\item Fax: $author.fax$$endif$ + \end{enumerate} + $endif$ + $endfor$ +} + +$preamble$ + +% remove the two line around Abstract +$if(abstract)$ +$else$ +\makeatletter +\renewcommand{\MaketitleBox}{% + \resetTitleCounters + \def\baselinestretch{1}% + \begin{center} + \def\baselinestretch{1}% + \large \@title \par + \vskip 18pt + \normalsize\elsauthors \par + \vskip 30pt + \footnotesize \itshape \elsaddress \par + \end{center} + \vskip 12pt +} +\makeatother +$endif$ + +\begin{document} +$for(include-before)$ +$include-before$ +$endfor$ +\begin{frontmatter} + + \title{$title$$if(subtitle)$\\\Large{$subtitle$}$endif$} + $for(author)$\author$if(authorwithinstitute)$[$for(author.institute)$$author.institute$$sep$,$endfor$]$endif${$author.name$$if(author.correspondence)$\corref{corrauth}$endif$$if(author.equalcontribution)$\corref{eqcon}$endif$ $if(author.footnote)$\fnref{$author.footnote$}$endif$}$if(author.email)$\ead{$author.email$}$endif$$endfor$ + $if(authorwithinstitute)$ $for(institute)$ \address[$institute.id$]{$institute.name$} $endfor$ $endif$ + % generate corresponding authors. + % \StrBehind is from xstring package + \ifnum \hascorr=1 + \def\corrauths{ + $for(author)$$if(author.correspondence)$and $author.name$ ($author.email$) $endif$$endfor$} + \cortext[corrauth]{Corresponding to \StrBehind*{\corrauths}{and }.} + \fi + + % generate equal contributing authors. + \ifnum \haseqc=1 + \def\eqa{$for(author)$$if(author.equalcontribution)$and $author.name$ $endif$$endfor$} + \cortext[eqcon]{\StrBehind*{\eqa}{and } are equally contributed to this work.} + \fi + + $for(footnote)$ + \fntext[$footnote.id$]{$footnote.text$} + $endfor$ + + $if(abstract)$ + \begin{abstract} + $abstract$ + \end{abstract} + $if(keywords)$ + \begin{keyword} + $for(keywords/allbutlast)$$keywords$ \sep $endfor$ + $for(keywords/last)$$keywords$$endfor$ + \end{keyword} + $endif$ + $endif$ +\end{frontmatter} + +$body$ + +$if(authorwithinstitute)$ +$else$ +\section{Author Information} + +\getcorrauthinfo{} + +\getotherauthinfo{} + +\section{Notes} + +The authors declare no competing financial interest. + +$endif$ + + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$bibliography$} +$endif$ +$endif$ + +$for(include-after)$ +$include-after$ +$endfor$ +\end{document} diff --git a/inst/tex/the-isme-j.csl b/inst/tex/the-isme-j.csl new file mode 100755 index 0000000..730aefc --- /dev/null +++ b/inst/tex/the-isme-j.csl @@ -0,0 +1,181 @@ + + diff --git a/inst/word/MS.docx b/inst/word/MS.docx new file mode 100755 index 0000000..5b9ad12 Binary files /dev/null and b/inst/word/MS.docx differ diff --git a/inst/word/RN.docx b/inst/word/RN.docx new file mode 100755 index 0000000..a74403c Binary files /dev/null and b/inst/word/RN.docx differ diff --git a/inst/word/cv.docx b/inst/word/cv.docx new file mode 100755 index 0000000..3727b07 Binary files /dev/null and b/inst/word/cv.docx differ diff --git a/inst/word/manu.docx b/inst/word/manu.docx new file mode 100755 index 0000000..fedaf1e Binary files /dev/null and b/inst/word/manu.docx differ diff --git a/inst/word/repcn.docx b/inst/word/repcn.docx new file mode 100755 index 0000000..18580b1 Binary files /dev/null and b/inst/word/repcn.docx differ diff --git a/titlepage/_author-affiliation-themes.tex b/titlepage/_author-affiliation-themes.tex new file mode 100644 index 0000000..1602ea2 --- /dev/null +++ b/titlepage/_author-affiliation-themes.tex @@ -0,0 +1,95 @@ +$if(false)$ +% This sectrion defines the author block and affiliation blocks +% based on the author and affiliation theme +$endif$ +\newcommand{\authorstyle}[1]{{$if(titlepage-theme.author-fontsize)$\fontsize{$titlepage-theme.author-fontsize$}{$titlepage-theme.author-spacing$}\selectfont +$endif$$for(titlepage-theme.author-fontstyle)$\$titlepage-theme.author-fontstyle${$endfor$#1$for(titlepage-theme.author-fontstyle)$}$endfor$}} + +\newcommand{\affiliationstyle}[1]{{$if(titlepage-theme.affiliation-fontsize)$\fontsize{$titlepage-theme.affiliation-fontsize$}{$titlepage-theme.affiliation-spacing$}\selectfont +$endif$$for(titlepage-theme.affiliation-fontstyle)$\$titlepage-theme.affiliation-fontstyle${$endfor$#1$for(titlepage-theme.affiliation-fontstyle)$}$endfor$}} + +$if(titlepage-style-code.author.none)$ +\newcommand{\titlepageauthorblock}{} +$endif$ +$if(titlepage-style-code.author.plain)$ +\newcommand{\titlepageauthorblock}{ +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{$for(by-author)$\nohyphens{$by-author.name.literal$}$sep$$titlepage-theme.author-sep$$if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$$endfor$\\}} +} +$endif$ +$if(titlepage-style-code.author.plain-with-and)$ +\newcommand{\titlepageauthorblock}{ +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{$if(by-author/allbutlast)$$for(by-author/allbutlast)$\nohyphens{$by-author.name.literal$}$sep$$titlepage-theme.author-sep$ $if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$$endfor$$for(by-author/last)$ and \nohyphens{$by-author.name.literal$}$endfor$$else$$for(by-author/last)$\nohyphens{$by-author.name.literal$}$if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$$endfor$$endif$}} +} +$endif$ +$if(titlepage-style-code.author.superscript)$ +\newcommand{\titlepageauthorblock}{ +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{$for(by-author)$\nohyphens{$by-author.name.literal$}$for(by-author.affiliations)${\textsuperscript{$it.number$}}$sep${\textsuperscript{,}}$endfor$$if(by-author.email)$$if(by-author.affiliations)$\textsuperscript{,}$endif${\textsuperscript{*}}$endif$$sep$$titlepage-theme.author-sep$ $if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$$endfor$}} +} +$endif$ +$if(titlepage-style-code.author.superscript-with-and)$ +\newcommand{\titlepageauthorblock}{ +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{$if(by-author/allbutlast)$$for(by-author/allbutlast)$\nohyphens{$by-author.name.literal$}$for(by-author.affiliations)${\textsuperscript{$it.number$}}$sep$\textsuperscript{,}$endfor$$if(by-author.email)$$if(by-author.affiliations)$\textsuperscript{,}$endif${\textsuperscript{*}}$endif$$sep$$titlepage-theme.author-sep$ $if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$$endfor$$for(by-author/last)$ and $if(titlepage-theme.author-space-between)$~\\ \vspace{$titlepage-theme.author-space-between$}$endif$\nohyphens{$by-author.name.literal$}$for(by-author.affiliations)${\textsuperscript{$it.number$}}$sep$\textsuperscript{,}$endfor$$if(by-author.email)$$if(by-author.affiliations)$\textsuperscript{,}$endif${\textsuperscript{*}}$endif$$endfor$$else$$for(by-author/last)$\nohyphens{$by-author.name.literal$}$for(by-author.affiliations)${\textsuperscript{$it.number$}}$sep$\textsuperscript{,}$endfor$$if(by-author.email)$$if(by-author.affiliations)$\textsuperscript{,}$endif${\textsuperscript{,*}}$endif$$endfor$$endif$}}} +$endif$ +$if(titlepage-style-code.author.author-address)$ +\newcommand{\titlepageauthorblock}{ +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{ +$for(by-author)$$by-author.name.literal$$if(by-author.affiliations)$$titlepage-theme.affiliation-sep$$for(by-author.affiliations)$$by-author.affiliations.name$$if(by-author.affiliations.department)$$titlepage-theme.affiliation-sep$$by-author.affiliations.department$$endif$$if(by-author.affiliations.address)$$titlepage-theme.affiliation-sep$$for(by-author.affiliations.address)$$by-author.affiliations.address$$sep$$titlepage-theme.affiliation-sep$$endfor$$endif$$sep$$titlepage-theme.affiliation-sep$$endfor$$endif$$if(by-author.email)$$titlepage-theme.affiliation-sep$$by-author.email$$endif$$sep$\\ +$if(titlepage-theme.author-space-between)$\vspace{$titlepage-theme.author-space-between$}$endif$$endfor$}}} +$endif$ +$if(titlepage-style-code.author.two-column)$ +\newcommand{\titlepageauthorblock}{ +\newlength{\miniA} +\setlength{\miniA}{0pt} +\newlength{\namelen} +$for(by-author)$\settowidth{\namelen}{$by-author.name.literal$}\setlength{\miniA}{\maxof{\miniA}{\namelen}}$endfor$ +\setlength{\miniA}{\miniA+0.05\textwidth} +\newlength{\miniB} +\setlength{\miniB}{0.99\textwidth - \miniA} +\begin{minipage}{\miniA} +\begin{flushleft} +$if(titlepage-theme.author-color)$\textcolor{$titlepage-theme.author-color$}$endif${\authorstyle{$for(by-author)$$by-author.name.literal$$sep$\\ $if(titlepage-theme.author-space-between)$ +\vspace{$titlepage-theme.author-space-between$}$endif$$endfor$}} +\end{flushleft} +\end{minipage} +\begin{minipage}{\miniB} +\begin{flushright} +$if(titlepage-theme.affiliation-color)$\textcolor{$titlepage-theme.affiliation-color$}$endif${\affiliationstyle{$for(by-author)$$for(by-author.affiliations/first)$$by-author.affiliations.name$ +$endfor$$sep$\\ +$if(titlepage-theme.affiliation-space-between)$\vspace{$titlepage-theme.affiliation-space-between$} +$endif$$endfor$\\}} +\end{flushright} +\end{minipage}} +$endif$ + +$if(titlepage-style-code.affiliation.none)$ +\newcommand{\titlepageaffiliationblock}{} +$endif$ +$if(titlepage-style-code.affiliation.numbered-list)$ +\newcommand{\titlepageaffiliationblock}{ +\hangindent=1em +\hangafter=1 +\affiliationstyle{$for(by-affiliation)${$it.number$}.~$if(by-affiliation.name)$$it.name$$endif$$if(by-affiliation.department)$$if(by-affiliation.name)$$titlepage-theme.affiliation-sep$$endif$$it.department$$endif$$if(by-affiliation.address)$$if(by-affiliation.name)$$titlepage-theme.affiliation-sep$$else$$if(by-affiliation.department)$$titlepage-theme.affiliation-sep$$endif$$endif$$it.address$$endif$% +$sep$\par\hangindent=1em\hangafter=1$if(titlepage-theme.affiliation-space-between)$ +\vspace{$titlepage-theme.affiliation-space-between$}$endif$ +$endfor$ +}} +$endif$ +$if(titlepage-style-code.affiliation.numbered-list-with-correspondence)$ +\newcommand{\titlepageaffiliationblock}{ +\hangindent=1em +\hangafter=1 +{\affiliationstyle{ +$for(by-affiliation)${$it.number$}.~$if(by-affiliation.name)$$it.name$$endif$$if(by-affiliation.department)$$if(by-affiliation.name)$$titlepage-theme.affiliation-sep$$endif$$it.department$$endif$$if(by-affiliation.address)$$if(by-affiliation.name)$$titlepage-theme.affiliation-sep$$else$$if(by-affiliation.department)$$titlepage-theme.affiliation-sep$$endif$$endif$$it.address$$endif$ +$sep$\par\hangindent=1em\hangafter=1$if(titlepage-theme.affiliation-space-between)$ +\vspace{$titlepage-theme.affiliation-space-between$}$endif$ +$endfor$ + +\vspace{1\baselineskip} +$if(author)$ +$for(by-author)$ +$if(by-author.email)$ +* \textit{Correspondence:}~$by-author.name.literal$~$by-author.email$ +$endif$$endfor$$endif$ +}} +} +$endif$ diff --git a/titlepage/_coverpage.tex b/titlepage/_coverpage.tex new file mode 100644 index 0000000..59996d6 --- /dev/null +++ b/titlepage/_coverpage.tex @@ -0,0 +1,120 @@ +% This is a combination of Pandoc templating and LaTeX +% Pandoc templating https://pandoc.org/MANUAL.html#templates +% See the README for help + +\thispagestyle{empty} + +$if(coverpage-geometry)$ +\newgeometry{$for(coverpage-geometry)$$coverpage-geometry$$sep$,$endfor$} +$else$ +\newgeometry{top=-100in} +$endif$ + +% Page color +$if(coverpage-theme.page-html-color)$ +\definecolor{pgcolor}{HTML}{$coverpage-theme.page-html-color$} +\pagecolor{pgcolor}\afterpage{\nopagecolor} +$endif$ + +\newcommand{\coverauthorstyle}[1]{{$if(coverpage-theme.author-fontsize)$\fontsize{$coverpage-theme.author-fontsize$}{$coverpage-theme.author-spacing$}\selectfont +$endif$$for(coverpage-theme.author-fontstyle)$\$coverpage-theme.author-fontstyle${$endfor$$if(coverpage-theme.author-color)$\textcolor{$coverpage-theme.author-color$}$endif${#1}$for(coverpage-theme.author-fontstyle)$}$endfor$}} + +\begin{tikzpicture}[remember picture, overlay, inner sep=0pt, outer sep=0pt] + +$if(coverpage-bg-image)$ +\tikzfading[name=fadeout, inner color=transparent!0,outer color=transparent!100] +\tikzfading[name=fadein, inner color=transparent!100,outer color=transparent!0] +\node[$if(coverpage-theme.bg-image-fading)$ scope fading=$coverpage-theme.bg-image-fading$, $endif$anchor=south west$if(coverpage-theme.bg-image-rotate)$, rotate=$coverpage-theme.bg-image-rotate$$endif$$if(coverpage-theme.bg-image-opacity)$, opacity=$coverpage-theme.bg-image-opacity$$endif$] at ($$(current page.south west)+($if(coverpage-theme.bg-image-left)$$coverpage-theme.bg-image-left$$else$0cm$endif$, $if(coverpage-theme.bg-image-bottom)$$coverpage-theme.bg-image-bottom$$else$0cm$endif$)$$) { +\includegraphics[width=$coverpage-theme.bg-image-size$, keepaspectratio]{$coverpage-bg-image$}}; +$endif$ + +$if(coverpage-style-code.title.plain)$ +$if(coverpage-title)$ +% Title +\newcommand{\titlelocationleft}{$coverpage-theme.title-left$} +\newcommand{\titlelocationbottom}{$coverpage-theme.title-bottom$} +\newcommand{\titlealign}{$coverpage-theme.title-align$} + +\begin{scope}{% +$if(coverpage-theme.title-fontsize)$\fontsize{$coverpage-theme.title-fontsize$}{$coverpage-theme.title-spacing$}\selectfont +$endif$$if(coverpage-theme.title-fontfamily)$\coverpagetitlefont +$endif$\node[anchor=$coverpage-theme.title-anchor$, align=$coverpage-theme.title-align$, rotate=$coverpage-theme.title-rotate$] (Title1) at ($$(current page.south west)+(\titlelocationleft,\titlelocationbottom)$$) [text width = $coverpage-theme.title-width$$if(coverpage-theme.title-node-spec)$, $coverpage-theme.title-node-spec$$endif$] {$if(coverpage-theme.title-color)$\textcolor{$coverpage-theme.title-color$}$endif${$for(coverpage-theme.title-fontstyle)$\$coverpage-theme.title-fontstyle${$endfor$\nohyphens{$coverpage-title$}$for(coverpage-theme.title-fontstyle)$}$endfor$}}; +} +\end{scope} +$endif$ +$endif$ +$if(coverpage-style-code.author.plain)$ +$if(coverpage-author)$ + +% Author +\newcommand{\authorlocationleft}{$coverpage-theme.author-left$} +\newcommand{\authorlocationbottom}{$coverpage-theme.author-bottom$} +\newcommand{\authoralign}{$coverpage-theme.author-align$} + +\begin{scope} +{% +$if(coverpage-theme.author-fontsize)$\fontsize{$coverpage-theme.author-fontsize$}{$coverpage-theme.author-spacing$}\selectfont +$endif$$if(coverpage-theme.author-fontfamily)$\coverpageauthorfont +$endif$\node[anchor=$coverpage-theme.author-anchor$, align=$coverpage-theme.author-align$, rotate=$coverpage-theme.author-rotate$] (Author1) at ($$(current page.south west)+(\authorlocationleft,\authorlocationbottom)$$) [text width = $coverpage-theme.author-width$$if(coverpage-theme.author-node-spec)$, $coverpage-theme.author-node-spec$$endif$] {\coverauthorstyle{$for(coverpage-author)$$coverpage-author$$sep$$coverpage-theme.author-sep$$endfor$\\}}; +} +\end{scope} +$endif$ +$endif$ +$if(coverpage-style-code.header.plain)$ +$if(coverpage-header)$ + +% Header +\newcommand{\headerlocationleft}{$coverpage-theme.header-left$} +\newcommand{\headerlocationbottom}{$coverpage-theme.header-bottom$} +\newcommand{\headerlocationalign}{$coverpage-theme.header-align$} + +\begin{scope} +{% +$if(coverpage-theme.header-fontsize)$\fontsize{$coverpage-theme.header-fontsize$}{$coverpage-theme.header-spacing$}\selectfont +$endif$ $if(coverpage-theme.header-fontfamily)$\coverpageheaderfont +$endif$\node[anchor=$coverpage-theme.header-anchor$, align=$coverpage-theme.header-align$, rotate=$coverpage-theme.header-rotate$] (Header1) at % +($$(current page.south west)+(\headerlocationleft,\headerlocationbottom)$$) [text width = $coverpage-theme.header-width$$if(coverpage-theme.header-node-spec)$, $coverpage-theme.header-node-spec$$endif$] {$if(coverpage-theme.header-color)$\textcolor{$coverpage-theme.header-color$}$endif${$for(coverpage-theme.header-fontstyle)$\$coverpage-theme.header-fontstyle${$endfor$\nohyphens{$coverpage-header$}$for(coverpage-theme.header-fontstyle)$}$endfor$}}; +} +\end{scope} +$endif$ +$endif$ +$if(coverpage-style-code.footer.plain)$ +$if(coverpage-footer)$ + +% Footer +\newcommand{\footerlocationleft}{$coverpage-theme.footer-left$} +\newcommand{\footerlocationbottom}{$coverpage-theme.footer-bottom$} +\newcommand{\footerlocationalign}{$coverpage-theme.footer-align$} + +\begin{scope} +{% +$if(coverpage-theme.footer-fontsize)$\fontsize{$coverpage-theme.footer-fontsize$}{$coverpage-theme.footer-spacing$}\selectfont +$endif$ $if(coverpage-theme.footer-fontfamily)$\coverpagefooterfont +$endif$\node[anchor=$coverpage-theme.footer-anchor$, align=$coverpage-theme.footer-align$, rotate=$coverpage-theme.footer-rotate$] (Footer1) at % +($$(current page.south west)+(\footerlocationleft,\footerlocationbottom)$$) [text width = $coverpage-theme.footer-width$$if(coverpage-theme.footer-node-spec)$, $coverpage-theme.footer-node-spec$$endif$] {$if(coverpage-theme.footer-color)$\textcolor{$coverpage-theme.footer-color$}$endif${$for(coverpage-theme.footer-fontstyle)$\$coverpage-theme.footer-fontstyle${$endfor$\nohyphens{$coverpage-footer$}$for(coverpage-theme.footer-fontstyle)$}$endfor$}}; +} +\end{scope} +$endif$ +$endif$ +$if(coverpage-style-code.date.plain)$ +$if(coverpage-date)$ + +% Date +\newcommand{\datelocationleft}{$coverpage-theme.date-left$} +\newcommand{\datelocationbottom}{$coverpage-theme.date-bottom$} +\newcommand{\datelocationalign}{$coverpage-theme.date-align$} + +\begin{scope} +{% +$if(coverpage-theme.date-fontsize)$\fontsize{$coverpage-theme.date-fontsize$}{$coverpage-theme.date-spacing$}\selectfont +$endif$ $if(coverpage-theme.date-fontfamily)$\coverpagedatefont +$endif$\node[anchor=$coverpage-theme.date-anchor$, align=$coverpage-theme.date-align$, rotate=$coverpage-theme.date-rotate$] (Date1) at % +($$(current page.south west)+(\datelocationleft,\datelocationbottom)$$) [text width = $coverpage-theme.date-width$$if(coverpage-theme.date-node-spec)$, $coverpage-theme.date-node-spec$$endif$] {$if(coverpage-theme.date-color)$\textcolor{$coverpage-theme.date-color$}$endif${$for(coverpage-theme.date-fontstyle)$\$coverpage-theme.date-fontstyle${$endfor$\nohyphens{$coverpage-date$}$for(coverpage-theme.date-fontstyle)$}$endfor$}}; +} +\end{scope} +$endif$ +$endif$ + +\end{tikzpicture} +\clearpage +\restoregeometry diff --git a/titlepage/_extension.yml b/titlepage/_extension.yml new file mode 100644 index 0000000..f99226b --- /dev/null +++ b/titlepage/_extension.yml @@ -0,0 +1,20 @@ +title: titlepage +author: Eli Holmes +quarto-required: ">=1.1.0" +version: 3.3.11 +contributes: + format: + pdf: + filters: + - titlepage-theme.lua + - coverpage-theme.lua + template-partials: + - "_coverpage.tex" + - "_author-affiliation-themes.tex" + - "_header-footer-date-themes.tex" + - "_title-themes.tex" + - "_titlepage.tex" + - "before-body.tex" + - "pandoc.tex" + format-resources: + - "fonts/qualitype/opentype/QTDublinIrish.otf" diff --git a/titlepage/_header-footer-date-themes.tex b/titlepage/_header-footer-date-themes.tex new file mode 100644 index 0000000..7b0bd95 --- /dev/null +++ b/titlepage/_header-footer-date-themes.tex @@ -0,0 +1,156 @@ +\newcommand{\headerstyled}{% +{$if(titlepage-theme.header-fontsize)$\fontsize{$titlepage-theme.header-fontsize$}{$titlepage-theme.header-spacing$}\selectfont +$endif$$for(titlepage-theme.header-fontstyle)$\$titlepage-theme.header-fontstyle${$endfor$$titlepage-header$$for(titlepage-theme.header-fontstyle)$}$endfor$} +} +\newcommand{\footerstyled}{% +{$if(titlepage-theme.footer-fontsize)$\fontsize{$titlepage-theme.footer-fontsize$}{$titlepage-theme.footer-spacing$}\selectfont +$endif$$for(titlepage-theme.footer-fontstyle)$\$titlepage-theme.footer-fontstyle${$endfor$$titlepage-footer$$for(titlepage-theme.footer-fontstyle)$}$endfor$} +} +\newcommand{\datestyled}{% +{$if(titlepage-theme.date-fontsize)$\fontsize{$titlepage-theme.date-fontsize$}{$titlepage-theme.date-spacing$}\selectfont +$endif$$for(titlepage-theme.date-fontstyle)$\$titlepage-theme.date-fontstyle${$endfor$$date$$for(titlepage-theme.date-fontstyle)$}$endfor$} +} + +$if(titlepage-style-code.header.none)$ +\newcommand{\titlepageheaderblock}{} +$endif$ + +$if(titlepage-style-code.header.plain)$ +\newcommand{\titlepageheaderblock}{\headerstyled} +$endif$ +$if(titlepage-style-code.header.colorbox)$ +\newcommand{\titlepageheaderblock}{ +{\setlength{\fboxrule}{$if(titlepage-theme.header-colorbox-borderwidth)$$titlepage-theme.header-colorbox-borderwidth$$else$0pt$endif$} +\fcolorbox{$if(titlepage-theme.header-colorbox-bordercolor)$$titlepage-theme.header-colorbox-bordercolor$$else$black$endif$}{$if(titlepage-theme.header-colorbox-fill)$$titlepage-theme.header-colorbox-fill$$else$cyan$endif$}{ +\parbox[t]{0.90\minipagewidth}{ % Outer full width box +\parbox[t]{0.85\minipagewidth}{ % Inner box for inner right text margin +$if(titlepage-theme.header-align)$\titlepageheaderalign$else$$if(titlepage-theme.page-align)$\titlepagepagealign$endif$$endif$ +\vspace{0.7cm} + +\headerstyled + +\vspace{0.7cm} +}} % end of parboxes +} % fcolorbox +} % ensure fbox set is restricted +} +$endif$ +$if(titlepage-style-code.header.doublelinewide)$ +\newcommand{\titlepageheaderblock}{ +\rule{\textwidth}{0.4pt} % Thin horizontal rule +\vspace{0.1\textheight} % Whitespace between the top rules and title + +\headerstyled + +\vspace{0.025\textheight} +\rule{0.3\textwidth}{0.4pt} % Short horizontal rule under the title +} +$endif$ +$if(titlepage-style-code.header.doublelinetight)$ +\newcommand{\titlepageheaderblock}{ +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +\HRule\\[0.4cm] + +\headerstyled + +\HRule\\ +} +$endif$ + +$if(titlepage-style-code.footer.none)$ +\newcommand{\titlepagefooterblock}{} +$endif$ +$if(titlepage-style-code.footer.plain)$ +\newcommand{\titlepagefooterblock}{ +\footerstyled +} +$endif$ +$if(titlepage-style-code.footer.colorbox)$ +\newcommand{\titlepagefooterblock}{ +{\setlength{\fboxrule}{$if(titlepage-theme.footer-colorbox-borderwidth)$$titlepage-theme.footer-colorbox-borderwidth$$else$0pt$endif$} +\fcolorbox{$if(titlepage-theme.footer-colorbox-bordercolor)$$titlepage-theme.footer-colorbox-bordercolor$$else$black$endif$}{$if(titlepage-theme.footer-colorbox-fill)$$titlepage-theme.footer-colorbox-fill$$else$cyan$endif$}{ +\parbox[t]{0.90\minipagewidth}{ % Outer full width box +\parbox[t]{0.85\minipagewidth}{ % Inner box for inner right text margin +$if(titlepage-theme.footer-align)$\titlepagefooteralign$else$$if(titlepage-theme.page-align)$\titlepagepagealign$endif$$endif$ +\vspace{0.7cm} + +\footerstyled + +\vspace{0.7cm} +}} % end of parboxes +} % fcolorbox +} % ensure fbox set is restricted +} +$endif$ +$if(titlepage-style-code.footer.doublelinewide)$ +\newcommand{\titlepagefooterblock}{ +\rule{\textwidth}{0.4pt} % Thin horizontal rule +\vspace{0.1\textheight} % Whitespace between the top rules and title + +\footerstyled + +\vspace{0.025\textheight} +\rule{0.3\textwidth}{0.4pt} % Short horizontal rule under the title +} +$endif$ +$if(titlepage-style-code.footer.doublelinetight)$ +\newcommand{\titlepagefooterblock}{ +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +\HRule\\[0.4cm] + +\footerstyled + +\HRule\\ +} +$endif$ + +$if(titlepage-style-code.date.none)$ +\newcommand{\titlepagedateblock}{} +$endif$ +$if(titlepage-style-code.date.plain)$ +\newcommand{\titlepagedateblock}{ +\datestyled +} +$endif$ +$if(titlepage-style-code.date.colorbox)$ +\newcommand{\titlepagedateblock}{ +{\setlength{\fboxrule}{$if(titlepage-theme.date-colorbox-borderwidth)$$titlepage-theme.date-colorbox-borderwidth$$else$0pt$endif$} +\fcolorbox{$if(titlepage-theme.date-colorbox-bordercolor)$$titlepage-theme.date-colorbox-bordercolor$$else$black$endif$}{$if(titlepage-theme.date-colorbox-fill)$$titlepage-theme.date-colorbox-fill$$else$cyan$endif$}{ +\parbox[t]{0.90\minipagewidth}{ % Outer full width box +\parbox[t]{0.85\minipagewidth}{ % Inner box for inner right text margin +$if(titlepage-theme.date-align)$\titlepagedatealign$else$$if(titlepage-theme.page-align)$\titlepagepagealign$endif$$endif$ +\vspace{0.7cm} + +\datestyled + +\vspace{0.7cm} +}} % end of parboxes +} % fcolorbox +} % ensure fbox set is restricted +} +$endif$ +$if(titlepage-style-code.date.doublelinewide)$ +\newcommand{\titlepagedateblock}{ +\rule{\textwidth}{0.4pt} % Thin horizontal rule +\vspace{0.1\textheight} % Whitespace between the top rules and title + +\datestyled + +\vspace{0.025\textheight} +\rule{0.3\textwidth}{0.4pt} % Short horizontal rule under the title +} +$endif$ +$if(titlepage-style-code.date.doublelinetight)$ +\newcommand{\titlepagedateblock}{ +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +\HRule\\[0.4cm] + +\datestyled + +\HRule\\ +} +$endif$ + diff --git a/titlepage/_title-themes.tex b/titlepage/_title-themes.tex new file mode 100644 index 0000000..a1c5c39 --- /dev/null +++ b/titlepage/_title-themes.tex @@ -0,0 +1,68 @@ +$if(false)$ +% This file defines the author block and affiliation block +% based on the author and affiliation theme +% none, plain, colorbox, doublelined +$endif$ + +\newcommand{\titleandsubtitle}{ +% Title and subtitle +$if(title)$ +{$if(titlepage-theme.title-fontsize)$\fontsize{$titlepage-theme.title-fontsize$}{$titlepage-theme.title-spacing$}\selectfont +$endif$$if(titlepage-theme.title-color)$\textcolor{$titlepage-theme.title-color$}$endif${$for(titlepage-theme.title-fontstyle)$\$titlepage-theme.title-fontstyle${$endfor$\nohyphens{$title$}$for(titlepage-theme.title-fontstyle)$}$endfor$}\par +}% +$endif$ +$if(subtitle)$ + +\vspace{\betweentitlesubtitle} +{ +$if(titlepage-theme.subtitle-fontsize)$\fontsize{$titlepage-theme.subtitle-fontsize$}{$titlepage-theme.subtitle-spacing$}\selectfont +$endif$$if(titlepage-theme.subtitle-color)$\textcolor{$titlepage-theme.subtitle-color$}$endif${$for(titlepage-theme.subtitle-fontstyle)$\$titlepage-theme.subtitle-fontstyle${$endfor$\nohyphens{$subtitle$}$for(titlepage-theme.subtitle-fontstyle)$}$endfor$}\par +}$endif$} +$-- +$if(titlepage-style-code.title.none)$ +\newcommand{\titlepagetitleblock}{}$endif$ +$-- +$if(titlepage-style-code.title.plain)$ +\newcommand{\titlepagetitleblock}{ +\titleandsubtitle +} +$endif$ +$-- +$if(titlepage-style-code.title.colorbox)$ +\newcommand{\titlepagetitleblock}{ +{\setlength{\fboxrule}{$if(titlepage-theme.title-colorbox-borderwidth)$$titlepage-theme.title-colorbox-borderwidth$$else$0pt$endif$} +\fcolorbox{$if(titlepage-theme.title-colorbox-bordercolor)$$titlepage-theme.title-colorbox-bordercolor$$else$black$endif$}{$if(titlepage-theme.title-colorbox-fill)$$titlepage-theme.title-colorbox-fill$$else$cyan$endif$}{ +\parbox[t]{0.90\minipagewidth}{ % Outer full width box +\parbox[t]{0.85\minipagewidth}{ % Inner box for inner right text margin +$if(titlepage-theme.title-align)$\titlepagetitlealign$else$$if(titlepage-theme.page-align)$\titlepagepagealign$endif$$endif$ +\vspace{0.7cm} + +\titleandsubtitle + +\vspace{0.7cm} +}} % end of parboxes +} % fcolorbox +} % ensure fbox set is restricted +}$endif$ +$-- +$if(titlepage-style-code.title.doublelinewide)$ +\newcommand{\titlepagetitleblock}{ +\rule{\textwidth}{0.4pt} % Thin horizontal rule +\vspace{0.025\textheight} % Whitespace between the top rules and title + +\titleandsubtitle + +\vspace{0.025\textheight} +\rule{0.3\textwidth}{0.4pt} % Short horizontal rule under the title +}$endif$ +$-- +$if(titlepage-style-code.title.doublelinetight)$ +\newcommand{\titlepagetitleblock}{ +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +\HRule\\[0.4cm] + +\titleandsubtitle + +\HRule\\ +}$endif$ diff --git a/titlepage/_titlepage.tex b/titlepage/_titlepage.tex new file mode 100644 index 0000000..cf4eb22 --- /dev/null +++ b/titlepage/_titlepage.tex @@ -0,0 +1,213 @@ +%%% TITLE PAGE START + +% Set up alignment commands +$if(titlepage-theme.page-align)$ +%Page +\newcommand{\titlepagepagealign}{ +\ifthenelse{\equal{$titlepage-theme.page-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.page-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.page-align$}{left}}{\raggedright}{} +} +$endif$ +$if(titlepage-theme.title-align)$ +%% Titles +\newcommand{\titlepagetitlealign}{ +\ifthenelse{\equal{$titlepage-theme.title-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.title-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.title-align$}{left}}{\raggedright}{} +\ifthenelse{\equal{$titlepage-theme.title-align$}{spread}}{\makebox[\linewidth][s]}{} +} +$endif$ +$if(titlepage-theme.author-align)$ +%Author +\newcommand{\titlepageauthoralign}{ +\ifthenelse{\equal{$titlepage-theme.author-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.author-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.author-align$}{left}}{\raggedright}{} +\ifthenelse{\equal{$titlepage-theme.author-align$}{spread}}{\makebox[\linewidth][s]}{} +} +$endif$ +$if(titlepage-theme.affiliation-align)$ +%Affiliation +\newcommand{\titlepageaffiliationalign}{ +\ifthenelse{\equal{$titlepage-theme.affiliation-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.affiliation-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.affiliation-align$}{left}}{\raggedright}{} +\ifthenelse{\equal{$titlepage-theme.affiliation-align$}{spread}}{\makebox[\linewidth][s]}{} +} +$endif$ +$if(titlepage-theme.footer-align)$ +%Footer +\newcommand{\titlepagefooteralign}{ +\ifthenelse{\equal{$titlepage-theme.footer-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.footer-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.footer-align$}{left}}{\raggedright}{} +\ifthenelse{\equal{$titlepage-theme.footer-align$}{spread}}{\makebox[\linewidth][s]}{} +} +$endif$ +$if(titlepage-theme.header-align)$ +%Header +\newcommand{\titlepageheaderalign}{ +\ifthenelse{\equal{$titlepage-theme.header-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.header-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.header-align$}{left}}{\raggedright}{} +\ifthenelse{\equal{$titlepage-theme.header-align$}{spread}}{\makebox[\linewidth][s]}{} +} +$endif$ +$if(titlepage-theme.logo-align)$ +%Logo +\newcommand{\titlepagelogoalign}{ +\ifthenelse{\equal{$titlepage-theme.logo-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.logo-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.logo-align$}{left}}{\raggedright}{} +} +$endif$ +$if(titlepage-theme.date-align)$ +%% Titles +\newcommand{\titlepagedatealign}{ +\ifthenelse{\equal{$titlepage-theme.title-align$}{right}}{\raggedleft}{} +\ifthenelse{\equal{$titlepage-theme.title-align$}{center}}{\centering}{} +\ifthenelse{\equal{$titlepage-theme.title-align$}{left}}{\raggedright}{} +} +$endif$ + +$-- % Set up commands based on themes +$_title-themes.tex()$ +$_author-affiliation-themes.tex()$ +$_header-footer-date-themes.tex()$ + +%set up blocks so user can specify order +\newcommand{\titleblock}{$if(title)$ +$if(subtitle)$ +\newlength{\betweentitlesubtitle} +\setlength{\betweentitlesubtitle}{$if(titlepage-theme.title-subtitle-space-between)$$titlepage-theme.title-subtitle-space-between$$else$\baselineskip$endif$} +$endif$ +{$if(titlepage-theme.title-align)$\titlepagetitlealign$endif$ +$if(titlepage-theme.title-fontfamily)$\titlepagetitlefont$endif$ +{\titlepagetitleblock} +} + +\vspace{$if(titlepage-theme.title-space-after)$$titlepage-theme.title-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\authorblock}{$if(author)$ +{$if(titlepage-theme.author-align)$\titlepageauthoralign +$endif$$if(titlepage-theme.author-fontfamily)$\titlepageauthorfont +$endif$\titlepageauthorblock} + +\vspace{$if(titlepage-theme.author-space-after)$$titlepage-theme.author-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\affiliationblock}{$if(author)$ +$if(titlepage-theme.affiliation-color)$\textcolor{$titlepage-theme.affiliation-color$}$endif${$if(titlepage-theme.affiliation-align)$\titlepageaffiliationalign +$endif$$if(titlepage-theme.affiliation-fontfamily)$\titlepageaffiliationfont +$endif$\titlepageaffiliationblock} + +\vspace{$if(titlepage-theme.affiliation-space-after)$$titlepage-theme.affiliation-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\logoblock}{$if(titlepage-logo)$ +{$if(titlepage-theme.logo-align)$\titlepagelogoalign +$endif$\includegraphics[width=$if(titlepage-theme.logo-size)$$titlepage-theme.logo-size$$else$0.2\textwidth$endif$]{$titlepage-logo$}} + +\vspace{$if(titlepage-theme.logo-space-after)$$titlepage-theme.logo-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\footerblock}{$if(titlepage-footer)$ +$if(titlepage-theme.footer-color)$\textcolor{$titlepage-theme.footer-color$}$endif${$if(titlepage-theme.footer-align)$\titlepagefooteralign +$endif$$if(titlepage-theme.footer-fontfamily)$\titlepagefooterfont +$endif$\titlepagefooterblock} + +\vspace{$if(titlepage-theme.footer-space-after)$$titlepage-theme.footer-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\dateblock}{$if(date)$ +$if(titlepage-theme.date-color)$\textcolor{$titlepage-theme.date-color$}$endif${$if(titlepage-theme.date-align)$\titlepagedatealign +$endif$$if(titlepage-theme.date-fontfamily)$\titlepagedatefont +$endif$\titlepagedateblock} + +\vspace{$if(titlepage-theme.date-space-after)$$titlepage-theme.date-space-after$$else$0pt$endif$} +$else$$endif$} + +\newcommand{\headerblock}{$if(titlepage-header)$ +$if(titlepage-theme.header-color)$\textcolor{$titlepage-theme.header-color$}$endif${$if(titlepage-theme.header-align)$\titlepageheaderalign +$endif$$if(titlepage-theme.header-fontfamily)$\titlepageheaderfont$endif$\titlepageheaderblock + +\vspace{$if(titlepage-theme.header-space-after)$$titlepage-theme.header-space-after$$else$0pt$endif$} +}$else$$endif$} +$-- +$if(titlepage-geometry)$ +\newgeometry{$for(titlepage-geometry)$$titlepage-geometry$$sep$,$endfor$} +$endif$ +$-- +$if(titlepage-theme.page-html-color)$ +\definecolor{pgcolor}{HTML}{$titlepage-theme.page-html-color$} +\pagecolor{pgcolor}\afterpage{\nopagecolor} +$else$$if(titlepage-theme.page-color)$ +\colorlet{pgcolor}{$titlepage-theme.page-color$} +\pagecolor{pgcolor}\afterpage{\nopagecolor} +$endif$$endif$ +$-- +$if(titlepage-bg-image)$ +% background image +\newlength{\bgimagesize} +\setlength{\bgimagesize}{$if(titlepage-theme.bg-image-size)$$titlepage-theme.bg-image-size$$else$\paperwidth$endif$} +\LENGTHDIVIDE{\bgimagesize}{\paperwidth}{\theRatio} % from calculator pkg +\This$if(titlepage-theme.bg-image-location)$$titlepage-theme.bg-image-location$$else$ULCorner$endif$WallPaper{\theRatio}{$titlepage-bg-image$} +$endif$ + +\thispagestyle{empty} % no page numbers on titlepages +$if(titlepage-theme.page-fontfamily)$\titlepagefont$endif$ + +$if(titlepage-theme.vrule-width)$ +$if(titlepage-theme.vrule-text)$ +\newcommand{\vrulecode}{\noindent\colorbox{$titlepage-theme.vrule-color$}{\begin{minipage}[b][0.99\textheight][c]{\vrulewidth}$if(titlepage-theme.vrule-text)$ +\centering\rotatebox{90}{\makebox[0.88\textheight][r]{$if(titlepage-theme.vrule-text-fontstyle)$$for(titlepage-theme.vrule-text-fontstyle)$\$titlepage-theme.vrule-text-fontstyle${$endfor$$endif$$if(titlepage-theme.vrule-text-color)$\color{$titlepage-theme.vrule-text-color$}$endif$$titlepage-theme.vrule-text$$for(titlepage-theme.vrule-text-fontstyle)$}$endfor$}}$endif$\end{minipage}}} +$else$ +\newcommand{\vrulecode}{\textcolor{$titlepage-theme.vrule-color$}{\rule{\vrulewidth}{\textheight}}} +$endif$ +\newlength{\vrulewidth} +\setlength{\vrulewidth}{$titlepage-theme.vrule-width$} +\newlength{\B} +\setlength{\B}{\ifdim\vrulewidth > 0pt $titlepage-theme.vrule-space$\else 0pt\fi} +\newlength{\minipagewidth} +\ifthenelse{\equal{$titlepage-theme.vrule-align$}{left} \OR \equal{$titlepage-theme.vrule-align$}{right} } +{% True case +\setlength{\minipagewidth}{\textwidth - \vrulewidth - \B - 0.1\textwidth} +}{ +\setlength{\minipagewidth}{\textwidth - 2\vrulewidth - 2\B - 0.1\textwidth} +} +$else$ +\newlength{\minipagewidth} +\setlength{\minipagewidth}{\textwidth} +$endif$ +$if(titlepage-theme.vrule-width)$ +\ifthenelse{\equal{$titlepage-theme.vrule-align$}{left} \OR \equal{$titlepage-theme.vrule-align$}{leftright}} +{% True case +\raggedleft % needed for the minipage to work +\vrulecode +\hspace{\B} +}{% +\raggedright % else it is right only and width is not 0 +} +$else$ +\raggedright % single minipage +$endif$ +% [position of box][box height][inner position]{width} +% [s] means stretch out vertically; assuming there is a vfill +\begin{minipage}[b][\textheight][s]{\minipagewidth} +$if(titlepage-theme.page-align)$\titlepagepagealign$endif$ +$for(titlepage-theme.elements)$ +$titlepage-theme.elements$ +$sep$ + +$endfor$ +\par + +\end{minipage}\ifthenelse{\equal{$titlepage-theme.vrule-align$}{right} \OR \equal{$titlepage-theme.vrule-align$}{leftright} }{ +\hspace{\B} +\vrulecode}{} +\clearpage +$if(titlepage-geometry)$\restoregeometry +$endif$%%% TITLE PAGE END + diff --git a/titlepage/before-body.tex b/titlepage/before-body.tex new file mode 100644 index 0000000..2f483ec --- /dev/null +++ b/titlepage/before-body.tex @@ -0,0 +1,39 @@ +%%%%% begin titlepage extension code + +$if(has-frontmatter)$ + \begin{frontmatter} +$endif$ + +\begin{titlepage} +$-- % Coverpage +$if(coverpage-true)$ +$_coverpage.tex()$ +$endif$ +$if(coverpage-include-file)$ + +$for(coverpage-include-file)$\input{$coverpage-include-file$} +\clearpage +$endfor$$endif$ + +$-- % Titlepage +$if(titlepage-true)$ +$if(titlepage-file)$ +% Use the file +\input{$titlepage-filename$} +$else$ +$_titlepage.tex()$ +$endif$ +$endif$ +$if(titlepage-include-file)$ + +$for(titlepage-include-file)$\input{$titlepage-include-file$} +\clearpage +$endfor$$endif$ +\end{titlepage} +\setcounter{page}{1} +$if(has-frontmatter)$ +\end{frontmatter} +$endif$ + +%%%%% end titlepage extension code + diff --git a/titlepage/coverpage-theme.lua b/titlepage/coverpage-theme.lua new file mode 100644 index 0000000..82c0945 --- /dev/null +++ b/titlepage/coverpage-theme.lua @@ -0,0 +1,491 @@ +local function isEmpty(s) + return s == nil or s == '' +end + +local function file_exists(name) + local f=io.open(name,"r") + if f~=nil then io.close(f) return true else return false end +end + +local function getVal(s) + return pandoc.utils.stringify(s) +end + +function script_path() + local str = debug.getinfo(2, "S").source:sub(2) + return str:match("(.*/)") +end + +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + + return false +end + +local function dump(o) + if type(o) == 'table' then + local s = '{ ' + for k,v in pairs(o) do + if type(k) ~= 'number' then k = '"'..k..'"' end + s = s .. '['..k..'] = ' .. dump(v) .. ',' + end + return s .. '} ' + else + return tostring(o) + end +end + +local function table_concat(t1,t2) + for _,v in ipairs(t2) do table.insert(t1, v) end + return t1 +end + +function Meta(m) +--[[ +This function checks that the value the user set is ok and stops with an error message if no. +yamlelement: the yaml metadata. e.g. m["coverpage-theme"]["page-align"] +yamltext: page, how to print the yaml value in the error message. e.g. coverpage-theme: page-align +okvals: a text table of ok styles. e.g. {"right", "center"} +--]] + local function check_yaml (yamlelement, yamltext, okvals) + choice = pandoc.utils.stringify(yamlelement) + if not has_value(okvals, choice) then + print("\n\ntitlepage extension error: " .. yamltext .. " is set to " .. choice .. ". It can be " .. pandoc.utils.stringify(table.concat(okvals, ", ")) .. ".\n\n") + return false + else + return true + end + + return true + end + +--[[ +This function gets the value of something like coverpage-theme.title-style and sets a value coverpage-theme.title-style.plain (for example). It also +does error checking against okvals. "plain" is always ok and if no value is set then the style is set to plain. +page: titlepage or coverpage +styleelement: page, title, subtitle, header, footer, affiliation, date, etc +okvals: a text table of ok styles. e.g. {"plain", "two-column"} +--]] + local function set_style (page, styleelement, okvals) + yamltext = page .. "-theme" .. ": " .. styleelement .. "-style" + yamlelement = m[page .. "-theme"][styleelement .. "-style"] + if not isEmpty(yamlelement) then + ok = check_yaml (yamlelement, yamltext, okvals) + if ok then + m[page .. "-style-code"][styleelement] = {} + m[page .. "-style-code"][styleelement][getVal(yamlelement)] = true + else + error() + end + else + m[page .. "-style-code"][styleelement] = {} + m[page .. "-style-code"][styleelement]["plain"] = true + end + end + +--[[ +This function assigns the themevals to the meta data +--]] + local function assign_value (tab) + for i, value in pairs(tab) do + if isEmpty(m['coverpage-theme'][i]) then + m['coverpage-theme'][i] = value + end + end + + return m + end + + local coverpage_table = { + ["title"] = function (m) + themevals = { + ["page-align"] = "left", + ["title-style"] = "plain", + ["author-style"] = "none", + ["footer-style"] = "none", + ["header-style"] = "none", + ["date-style"] = "none", + } + assign_value(themevals) + + return m + end, + ["author"] = function (m) + themevals = { + ["page-align"] = "left", + ["title-style"] = "none", + ["author-style"] = "plain", + ["footer-style"] = "none", + ["header-style"] = "none", + ["date-style"] = "none", + } + assign_value(themevals) + + return m + end, + ["titleauthor"] = function (m) + themevals = { + ["page-align"] = "left", + ["title-style"] = "plain", + ["author-style"] = "plain", + ["footer-style"] = "none", + ["header-style"] = "none", + ["date-style"] = "none", + } + assign_value(themevals) + + return m + end, + ["true"] = function (m) + themevals = { + ["page-align"] = "left" + } + assign_value(themevals) + + return m + end, + ["great-wave"] = function (m) + themevals = { + ["page-align"] = "right", + ["title-style"] = "plain", + ["author-style"] = "none", + ["footer-style"] = "plain", + ["header-style"] = "none", + ["date-style"] = "none", + } + assign_value(themevals) + + return m + end, + ["otter"] = function (m) + themevals = { + ["page-align"] = "left", + ["title-style"] = "plain", + ["author-style"] = "plain", + ["footer-style"] = "none", + ["header-style"] = "none", + ["date-style"] = "none", + } + assign_value(themevals) + + return m + end, + } + + m['coverpage-file'] = false + if m.coverpage then + choice = pandoc.utils.stringify(m.coverpage) + okvals = {"none", "true", "title", "author", "titleauthor", "otter", "great-wave"} + isatheme = has_value (okvals, choice) + if not isatheme then + if not file_exists(choice) then + error("titlepage extension error: coverpage can be a tex file or one of the themes: " .. pandoc.utils.stringify(table.concat(okvals, ", ")) .. ".") + else + m['coverpage-file'] = true + m['coverpage-filename'] = choice + m['coverpage'] = "file" + end + else + ok = check_yaml (m.coverpage, "coverpage", okvals) + if not ok then error("") end + end + if not m['coverpage-file'] and choice ~= "none" then + m["coverpage-true"] = true + if isEmpty(m['coverpage-theme']) then + m['coverpage-theme'] = {} + end + coverpage_table[choice](m) -- add the theme defaults + end + if m['coverpage-file'] then + m["coverpage-true"] = true + if not isEmpty(m['coverpage-theme']) then + print("\n\ntitlepage extension message: since you passed in a static coverpage file, coverpage-theme is ignored.n\n") + end + end + if choice == "none" then + m["coverpage-true"] = false + end + else -- coverpage is false or not passed in + m["coverpage-true"] = false + m.coverpage = "none" + end + +-- Only for themes +-- coverpage-theme will exist if using a theme +if not m['coverpage-file'] and m['coverpage-true'] then + +--[[ +Set up the demos +--]] + choice = pandoc.utils.stringify(m.coverpage) + if choice == "great-wave" then + if isEmpty(m['coverpage-bg-image']) then +-- m['coverpage-bg-image'] = script_path().."images/TheGreatWaveoffKanagawa.jpeg" + m['coverpage-bg-image'] = "img/TheGreatWaveoffKanagawa.jpeg" + end + if isEmpty(m['coverpage-title']) then + m['coverpage-title'] = "quarto_titlepages" + end + if isEmpty(m['coverpage-footer']) then + m['coverpage-footer'] = "Templates for title pages and covers" + end + demovals = {["title-align"] = "right", ["title-fontsize"] = 40, ["title-fontfamily"] = "QTDublinIrish.otf", ["title-bottom"] = "10in", ["author-style"] = "none", ["footer-fontsize"] = 20, ["footer-fontfamily"] = "QTDublinIrish.otf", ["footer-align"] = "right", ["footer-bottom"] = "9.5in", ["page-html-color"] = "F6D5A8", ["bg-image-fading"] = "north"} + for dkey, val in pairs(demovals) do + if isEmpty(m['coverpage-theme'][dkey]) then + m['coverpage-theme'][dkey] = val + end + end + end + if choice == "otter" then + if isEmpty(m['coverpage-bg-image']) then +-- m['coverpage-bg-image'] = script_path().."images/otter-bar.jpeg" + m['coverpage-bg-image'] = "img/otter-bar.jpeg" + end + if isEmpty(m['coverpage-title']) then + m['coverpage-title'] = "Otters" + end + if isEmpty(m['coverpage-author']) then + m['coverpage-author'] = {"EE", "Holmes"} + end + demovals = {["title-color"] = "white", ["title-fontfamily"] = "QTDublinIrish.otf", ["title-fontsize"] = 100, ["author-fontstyle"] = {"textsc"}, ["author-sep"] = "newline", ["author-align"] = "right", ["author-fontsize"] = 30, ["author-bottom"] = "2in"} + for dkey, val in pairs(demovals) do + if isEmpty(m['coverpage-theme'][dkey]) then + m['coverpage-theme'][dkey] = val + end + end + end + +-- set the coverpage values unless user passed them in as coverpage-key + for key, val in pairs({"title", "author", "date"}) do + if isEmpty(m['coverpage-' .. val]) then + if not isEmpty(m[val]) then + m['coverpage-' .. val] = m[val] + end + end + end +-- make a bit more robust to whatever user passes in for coverpage-author + if not isEmpty(m['coverpage-author']) then + for key, val in pairs(m['coverpage-author']) do + m['coverpage-author'][key] = getVal(m['coverpage-author'][key]) + end + end + +-- fix "true" to figure out what was passed in + if choice == "true" then + for key, val in pairs({"title", "author", "footer", "header", "date"}) do + if not isEmpty(m['coverpage-' .. val]) then + if isEmpty(m['coverpage-theme'][val .. "-style"]) then + m['coverpage-theme'][val .. "-style"] = "plain" + end + else + m['coverpage-theme'][val .. "-style"] = "none" + end + end + end + + +--[[ +Error checking and setting the style codes +--]] + -- Style codes + m["coverpage-style-code"] = {} + okvals = {"none", "plain"} + set_style("coverpage", "title", okvals) + set_style("coverpage", "footer", okvals) + set_style("coverpage", "header", okvals) + set_style("coverpage", "author", okvals) + set_style("coverpage", "date", okvals) + + if isEmpty(m['coverpage-bg-image']) then + m['coverpage-bg-image'] = "none" -- need for stringify to work + end + choice = pandoc.utils.stringify(m['coverpage-bg-image']) + if choice == "none" then + m['coverpage-bg-image'] = false + else + m['coverpage-theme']['bg-image-anchor'] = "south west" -- fixed + image_table = {["bottom"] = 0.0, ["left"] = 0.0, ["rotate"] = 0.0, ["opacity"] = 1.0} + for key, val in pairs(image_table) do + if isEmpty(m['coverpage-theme']['bg-image-' .. key]) then + m['coverpage-theme']['bg-image-' .. key] = val + end + end + if isEmpty(m['coverpage-theme']['bg-image-size']) then + m['coverpage-theme']['bg-image-size'] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\paperwidth")} + end + if not isEmpty(m['coverpage-theme']['bg-image-fading']) then + okvals = {"top", "bottom", "left", "right", "north", "south", "east", "west", "fadeout" } + ok = check_yaml (m["coverpage-theme"]["bg-image-fading"], "coverpage-theme: bg-image-fading", okvals) + if not ok then error("") end + if getVal(m['coverpage-theme']['bg-image-fading']) == "left" then m['coverpage-theme']['bg-image-fading'] = "west" end + if getVal(m['coverpage-theme']['bg-image-fading']) == "right" then m['coverpage-theme']['bg-image-fading'] = "east" end + if getVal(m['coverpage-theme']['bg-image-fading']) == "top" then m['coverpage-theme']['bg-image-fading'] = "north" end + if getVal(m['coverpage-theme']['bg-image-fading']) == "bottom" then m['coverpage-theme']['bg-image-fading'] = "south" end + end + end -- bg-image attributes + if m['coverpage-bg-image'] then -- not false + choice = pandoc.utils.stringify(m['coverpage-bg-image']) + if not file_exists(choice) then + error("\n\ntitlepage extension error: coverpage-bg-image file " .. choice .. " cannot be opened. Is the file path and name correct? Using a demo? Demo options are great-wave and otter.\n\n") + end + end + +--[[ +Set the fontsize spacing defaults +if page-fontsize was passed in or if fontsize passed in but not spacing +--]] + + -- if not passed in then it will take page-fontsize and page-spacing + for key, val in pairs({"title", "author", "footer", "header", "date"}) do + if getVal(m["coverpage-theme"][val .. "-style"]) ~= "none" then + if not isEmpty(m["coverpage-theme"]["page-fontsize"]) then + if isEmpty(m["coverpage-theme"][val .. "-fontsize"]) then + m["coverpage-theme"][val .. "-fontsize"] = getVal(m["coverpage-theme"]["page-fontsize"]) + end + end + end + end + -- make sure spacing is set if user passed in fontsize + for key, val in pairs({"page", "title", "author", "footer", "header", "date"}) do + if not isEmpty(m['coverpage-theme'][val .. "-fontsize"]) then + if isEmpty(m['coverpage-theme'][val .. "-spacing"]) then + m['coverpage-theme'][val .. "-spacing"] = 1.2*getVal(m['coverpage-theme'][val .. "-fontsize"]) + end + end + end + +--[[ +Set author sep character +--]] + if isEmpty(m['coverpage-theme']["author-sep"]) then + m['coverpage-theme']["author-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex",", ")} + end + if getVal(m['coverpage-theme']["author-sep"]) == "newline" then + m['coverpage-theme']["author-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\\\")} + end + +--[[ +Set affiliation sep character +--]] + if isEmpty(m['coverpage-theme']["affiliation-sep"]) then + m['coverpage-theme']["affiliation-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex",",~")} + end + if getVal(m['coverpage-theme']["affiliation-sep"]) == "newline" then + m['coverpage-theme']["affiliation-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\\\")} + end + +--[[ +Set the defaults for the coverpage alignments +default coverpage alignment is left +because coverpage uses tikzpicture, the alignments of the elements must be set +--]] + if isEmpty(m['coverpage-theme']["page-align"]) then + m['coverpage-theme']["page-align"] = "left" + end + for key, val in pairs({"page", "title", "author", "footer", "header", "logo", "date"}) do + if not isEmpty(m["coverpage-theme"][val .. "-align"]) then + okvals = {"right", "left", "center"} + if has_value({"title", "author", "footer", "header", "date"}, val) then table.insert(okvals, "spread") end + ok = check_yaml (m["coverpage-theme"][val .. "-align"], "coverpage-theme: " .. val .. "-align", okvals) + if not ok then error("") end + else + m["coverpage-theme"][val .. "-align"] = getVal(m['coverpage-theme']["page-align"]) + end + end + +--[[ +Set left and width alignments, bottom distance and rotation +--]] + for key, val in pairs({"title", "author", "footer", "header", "date"}) do + if m['coverpage-theme'][val .. "-style"] ~= "none" then + if getVal(m['coverpage-theme'][val .. "-align"]) == "left" then + m['coverpage-theme'][val .. "-anchor"] = "north west" -- not user controlled + if isEmpty(m['coverpage-theme'][val .. "-left"]) then + m['coverpage-theme'][val .. '-left'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.2\\paperwidth")} + if isEmpty(m['coverpage-theme'][val .. '-width']) then + m['coverpage-theme'][val .. '-width'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.7\\paperwidth")} + end + else + if isEmpty(m['coverpage-theme'][val .. '-width']) then + error("titlepage extension error: if you specify coverpage-theme "..val.."-left, you must also specify "..val.."-width.") + end + end + end -- left + if getVal(m['coverpage-theme'][val .. '-align']) == "right" then + m['coverpage-theme'][val .. '-anchor'] = "north east" -- not user controlled + if isEmpty(m['coverpage-theme'][val .. '-left']) then + m['coverpage-theme'][val .. '-left'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.8\\paperwidth")} + if isEmpty(m['coverpage-theme'][val .. '-width']) then + m['coverpage-theme'][val .. '-width'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.7\\paperwidth")} + end + else + if isEmpty(m['coverpage-theme'][val .. '-width']) then + error("titlepage extension error: if you specify coverpage-theme "..val.."-left, you must also specify "..val.."-width.") + end + end + end -- right + if getVal(m['coverpage-theme'][val .. '-align']) == "center" then + m['coverpage-theme'][val .. '-anchor'] = "north" -- not user controlled + if isEmpty(m['coverpage-theme'][val .. '-left']) then + m['coverpage-theme'][val .. '-left'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.5\\paperwidth")} + if isEmpty(m['coverpage-theme'][val .. '-width']) then + m['coverpage-theme'][val .. '-width'] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.8\\paperwidth")} + end + else + if isEmpty(m['coverpage-theme'][val .. '-width']) then + error("titlepage extension error: if you specify coverpage-theme "..val.."-left, you must also specify "..val.."-width.") + end + end + end -- center + -- Set the bottom distances + bottom_table = {["title"] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.8\\paperheight")}, ["author"] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.25\\paperheight")}, ["footer"] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.1\\paperheight")}, ["header"] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.9\\paperheight")}, ["date"] = pandoc.MetaInlines{ + pandoc.RawInline("latex", "0.05\\paperheight")}} + for bkey, bval in pairs(bottom_table) do + if isEmpty(m['coverpage-theme'][bkey .. '-bottom']) then + m['coverpage-theme'][bkey .. '-bottom'] = bval + end + end -- bottom distance + -- set rotation + if isEmpty(m['coverpage-theme'][val .. '-rotate']) then + m['coverpage-theme'][val .. '-rotate'] = 0 + end -- rotate + end -- if style not none + end -- for loop + + +--[[ +Set logo defaults +--]] + if not isEmpty(m['coverpage-logo']) then + if isEmpty(m['coverpage-theme']["logo-size"]) then + m['coverpage-theme']["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.2\\paperwidth")} + end + end + +end -- end the theme section + + return m + +end + + diff --git a/titlepage/fonts/qualitype/COPYING-QUALITYPE b/titlepage/fonts/qualitype/COPYING-QUALITYPE new file mode 100644 index 0000000..be6400c --- /dev/null +++ b/titlepage/fonts/qualitype/COPYING-QUALITYPE @@ -0,0 +1,449 @@ +Copyright (c) 1992 QualiType. + +These fonts are distributed, at your option, under the terms of the SIL Open +Font License (https://scripts.sil.org/OFL) or the GNU General Public License +(https://www.gnu.org/licenses/gpl-2.0.txt), either version 2.0 or, at your +option, any later version. As a special exception, if you create a document +that uses this font, and embed this font or unaltered portions of this font in +the document, this font does not by itself cause the resulting document to be +covered by the GNU General Public License. This exception does not, however, +invalidate any other reasons why the document might be covered by the GNU +General Public License. + +*** + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +SIL OPEN FONT LICENSE + +Version 1.1 – 26 February 2007 + +PREAMBLE + +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and open +framework in which fonts may be shared and improved in partnership with +others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The fonts, +including any derivative works, can be bundled, embedded, redistributed and/or +sold with any software provided that any reserved names are not used by +derivative works. The fonts and derivatives, however, cannot be released under +any other type of license. The requirement for fonts to remain under this +license does not apply to any document created using the fonts or their +derivatives. + +DEFINITIONS + +“Font Software” refers to the set of files released by the Copyright Holder(s) +under this license and clearly marked as such. This may include source files, +build scripts and documentation. + +“Reserved Font Name” refers to any names specified as such after the copyright +statement(s). + +“Original Version” refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +“Modified Version” refers to any derivative made by adding to, deleting, or +substituting — in part or in whole — any of the components of the Original +Version, by changing formats or by porting the Font Software to a new +environment. + +“Author” refers to any designer, engineer, programmer, technical writer or +other person who contributed to the Font Software. + +PERMISSION & CONDITIONS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the Font Software, to use, study, copy, merge, embed, modify, redistribute, +and sell modified and unmodified copies of the Font Software, subject to the +following conditions: + +1) Neither the Font Software nor any of its individual components, in Original +or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be +bundled,redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be included +either as stand-alone text files, human-readable headers or in the appropriate +machine-readable metadata fields within text or binary files as long as those +fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Νame(s) +unless explicit written permission is granted by the corresponding Copyright +Holder. This restriction only applies to the primary font name as presented to +the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any Modified +Version, except to acknowledge the contribution(s) of the Copyright Holder(s) +and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be +distributed entirely under this license, and must not be distributed under any +other license. The requirement for fonts to remain under this license does not +apply to any document created using the Font Software. + +TERMINATION + +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER + +THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +*** + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + diff --git a/titlepage/fonts/qualitype/README b/titlepage/fonts/qualitype/README new file mode 100644 index 0000000..15363a6 --- /dev/null +++ b/titlepage/fonts/qualitype/README @@ -0,0 +1,10 @@ +QualiType font collection +Copyright (c) 1992 QualiType +Version 2019-12-26 +*** +These 45 fonts were created by QualiType. With the kind permisison of John +Colletti, these fonts have been released as free and open-source. The fonts +are usable under the SIL OFL 1.1 or the GNU GPL 2.0 (or later, at your option) +with a font exception. See COPYING for more details. + +This package is maintained by Daniel Benjamin Miller diff --git a/titlepage/fonts/qualitype/doc/qualitype-doc.pdf b/titlepage/fonts/qualitype/doc/qualitype-doc.pdf new file mode 100644 index 0000000..92fa054 Binary files /dev/null and b/titlepage/fonts/qualitype/doc/qualitype-doc.pdf differ diff --git a/titlepage/fonts/qualitype/doc/qualitype-doc.tex b/titlepage/fonts/qualitype/doc/qualitype-doc.tex new file mode 100644 index 0000000..862be3e --- /dev/null +++ b/titlepage/fonts/qualitype/doc/qualitype-doc.tex @@ -0,0 +1,18 @@ +\documentclass[12pt]{article} +\usepackage{fontspec} +\setmainfont{QTCaslan} +\usepackage{microtype} +\author{Daniel Benjamin Miller} +\title{The QualiType font collection} +\begin{document} +\maketitle +\section{Description} +These 45 fonts were created by QualiType. With the kind permisison of John +Colletti, these fonts have been released as free and open-source. The fonts +are usable under the SIL OFL 1.1 or the GNU GPL 2.0 (or later, at your option) +with a font exception. See \texttt{COPYING} for more details. The fonts do not include small capitals, old-style figures or any other OpenType goodies. They are released in part with future extension in mind. The \texttt{qualitype} package will only carry the OpenType versions of the original 1992 fonts; improvements should be given a new name and a corresponding separate package. +\section{Fonts Included} +\begin{itemize} +\item QTAbbie\item QTAgateType-Bold\item QTAgateType-Italic\item QTAgateType\item QTAncientOlive-Bold\item QTAncientOlive\item QTAntiquePost\item QTArabian\item QTArnieB\item QTArtiston\item QTAtchen\item QTAvanti-Italic\item QTAvanti\item QTBasker-Bold\item QTBasker-Italic\item QTBasker\item QTBeckman\item QTBengal-Bold\item QTBengal\item QTBlackForest\item QTBlimpo\item QTBodini-Bold\item QTBodini-Italic\item QTBodini\item QTBodiniPoster-Italic\item QTBodiniPoster\item QTBookmann-Bold\item QTBookmann-BoldItalic\item QTBookmann-Italic\item QTBookmann\item QTBoulevard\item QTBrushStroke\item QTCaligulatype\item QTCanaithtype\item QTCascadetype\item QTCaslan-Bold\item QTCaslan-BoldItalic\item QTCaslan-Italic\item QTCaslan\item QTCaslanOpen\item QTCasual\item QTChanceryType-Bold\item QTChanceryType-Italic\item QTChanceryType\item QTChicagoland\item QTClaytablet\item QTCloisteredMonk\item QTCoronation\item QTDeuce\item QTDingBits\item QTDoghaus\item QTDoghausHeavy\item QTDoghausLight\item QTDublinIrish\item QTEraType-Bold\item QTEraType\item QTEurotype-Bold\item QTEurotype\item QTFloraline-Bold\item QTFloraline\item QTFlorencia\item QTFraktur\item QTFrank\item QTFrankHeavy\item QTFrizQuad-Bold\item QTFrizQuad\item QTFuture-Italic\item QTFuture\item QTFuturePoster\item QTGaromand-Bold\item QTGaromand-BoldItalic\item QTGaromand-Italic\item QTGaromand\item QTGhoulFace\item QTGraphLite\item QTGraveure-Bold\item QTGraveure\item QTGreece\item QTHandwriting\item QTHeidelbergType\item QTHelvet-Black\item QTHelvet-BoldOutline\item QTHelvetCnd-Black\item QTHelvetCnd-Light\item QTHelvetCnd\item QTHoboken\item QTHowardType\item QTHowardTypeFat\item QTImpromptu\item QTJupiter\item QTKooper-Italic\item QTKooper\item QTKorrin-Italic\item QTKorrin\item QTKung-Fu\item QTLautrecType\item QTLetterGoth-Bold\item QTLetterGoth-BoldItalic\item QTLetterGoth-Italic\item QTLetterGoth\item QTLinoscroll\item QTLinostroke\item QTLondonScroll\item QTMagicMarker\item QTMerryScript\item QTMilitary\item QTOKCorral-Cnd\item QTOKCorral-Ext\item QTOKCorral\item QTOldGoudy-Bold\item QTOldGoudy-Italic\item QTOldGoudy\item QTOptimum-Bold\item QTOptimum-BoldItalic\item QTOptimum-Italic\item QTOptimum\item QTPalatine-Bold\item QTPalatine-Italic\item QTPalatine\item QTPandora\item QTParisFrance\item QTPeignoir-Lite\item QTPeignoir\item QTPiltdown\item QTPristine-Bold\item QTPristine-BoldItalic\item QTPristine-Italic\item QTPristine\item QTRobotic2000\item QTSanDiego\item QTSchoolCentury-Bold\item QTSchoolCentury-BoldItalic\item QTSchoolCentury-Italic\item QTSchoolCentury\item QTSlogantype\item QTSnowCaps\item QTStoryTimeCaps\item QTTechtone-Bold\item QTTechtone-BoldItalic\item QTTechtone-Italic\item QTTechtone\item QTTheatre\item QTTimeOutline\item QTTumbleweed\item QTUSA-Uncial\item QTVagaRound-Bold\item QTVagaRound\item QTWeise-Bold\item QTWeise-Italic\item QTWeise\item QTWestEnd +\end{itemize} +\end{document} diff --git a/titlepage/fonts/qualitype/opentype/QTAbbie.otf b/titlepage/fonts/qualitype/opentype/QTAbbie.otf new file mode 100644 index 0000000..53c0879 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAbbie.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAgateType-Bold.otf b/titlepage/fonts/qualitype/opentype/QTAgateType-Bold.otf new file mode 100644 index 0000000..2dc04f4 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAgateType-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAgateType-Italic.otf b/titlepage/fonts/qualitype/opentype/QTAgateType-Italic.otf new file mode 100644 index 0000000..906e6e0 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAgateType-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAgateType.otf b/titlepage/fonts/qualitype/opentype/QTAgateType.otf new file mode 100644 index 0000000..c823a6e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAgateType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAncientOlive-Bold.otf b/titlepage/fonts/qualitype/opentype/QTAncientOlive-Bold.otf new file mode 100644 index 0000000..524ed4d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAncientOlive-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAncientOlive.otf b/titlepage/fonts/qualitype/opentype/QTAncientOlive.otf new file mode 100644 index 0000000..1bcbf24 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAncientOlive.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAntiquePost.otf b/titlepage/fonts/qualitype/opentype/QTAntiquePost.otf new file mode 100644 index 0000000..a414578 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAntiquePost.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTArabian.otf b/titlepage/fonts/qualitype/opentype/QTArabian.otf new file mode 100644 index 0000000..68a3960 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTArabian.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTArnieB.otf b/titlepage/fonts/qualitype/opentype/QTArnieB.otf new file mode 100644 index 0000000..5f5c3eb Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTArnieB.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTArtiston.otf b/titlepage/fonts/qualitype/opentype/QTArtiston.otf new file mode 100644 index 0000000..e2e5a8c Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTArtiston.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAtchen.otf b/titlepage/fonts/qualitype/opentype/QTAtchen.otf new file mode 100644 index 0000000..6038a6f Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAtchen.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAvanti-Italic.otf b/titlepage/fonts/qualitype/opentype/QTAvanti-Italic.otf new file mode 100644 index 0000000..db46838 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAvanti-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTAvanti.otf b/titlepage/fonts/qualitype/opentype/QTAvanti.otf new file mode 100644 index 0000000..7fc1f35 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTAvanti.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBasker-Bold.otf b/titlepage/fonts/qualitype/opentype/QTBasker-Bold.otf new file mode 100644 index 0000000..d3cc207 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBasker-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBasker-Italic.otf b/titlepage/fonts/qualitype/opentype/QTBasker-Italic.otf new file mode 100644 index 0000000..328295a Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBasker-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBasker.otf b/titlepage/fonts/qualitype/opentype/QTBasker.otf new file mode 100644 index 0000000..7408c8d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBasker.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBeckman.otf b/titlepage/fonts/qualitype/opentype/QTBeckman.otf new file mode 100644 index 0000000..e5fec16 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBeckman.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBengal-Bold.otf b/titlepage/fonts/qualitype/opentype/QTBengal-Bold.otf new file mode 100644 index 0000000..0956181 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBengal-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBengal.otf b/titlepage/fonts/qualitype/opentype/QTBengal.otf new file mode 100644 index 0000000..bbb84d3 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBengal.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBlackForest.otf b/titlepage/fonts/qualitype/opentype/QTBlackForest.otf new file mode 100644 index 0000000..dfe3359 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBlackForest.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBlimpo.otf b/titlepage/fonts/qualitype/opentype/QTBlimpo.otf new file mode 100644 index 0000000..fa2c644 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBlimpo.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBodini-Bold.otf b/titlepage/fonts/qualitype/opentype/QTBodini-Bold.otf new file mode 100644 index 0000000..e8fbb86 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBodini-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBodini-Italic.otf b/titlepage/fonts/qualitype/opentype/QTBodini-Italic.otf new file mode 100644 index 0000000..7e4b553 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBodini-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBodini.otf b/titlepage/fonts/qualitype/opentype/QTBodini.otf new file mode 100644 index 0000000..129f01c Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBodini.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBodiniPoster-Italic.otf b/titlepage/fonts/qualitype/opentype/QTBodiniPoster-Italic.otf new file mode 100644 index 0000000..4ce6720 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBodiniPoster-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBodiniPoster.otf b/titlepage/fonts/qualitype/opentype/QTBodiniPoster.otf new file mode 100644 index 0000000..ce4c447 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBodiniPoster.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBookmann-Bold.otf b/titlepage/fonts/qualitype/opentype/QTBookmann-Bold.otf new file mode 100644 index 0000000..921f7a4 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBookmann-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBookmann-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTBookmann-BoldItalic.otf new file mode 100644 index 0000000..e302cd3 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBookmann-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBookmann-Italic.otf b/titlepage/fonts/qualitype/opentype/QTBookmann-Italic.otf new file mode 100644 index 0000000..8c35902 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBookmann-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBookmann.otf b/titlepage/fonts/qualitype/opentype/QTBookmann.otf new file mode 100644 index 0000000..5ae0568 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBookmann.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBoulevard.otf b/titlepage/fonts/qualitype/opentype/QTBoulevard.otf new file mode 100644 index 0000000..84b84fc Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBoulevard.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTBrushStroke.otf b/titlepage/fonts/qualitype/opentype/QTBrushStroke.otf new file mode 100644 index 0000000..1195d8e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTBrushStroke.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaligulatype.otf b/titlepage/fonts/qualitype/opentype/QTCaligulatype.otf new file mode 100644 index 0000000..a444976 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaligulatype.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCanaithtype.otf b/titlepage/fonts/qualitype/opentype/QTCanaithtype.otf new file mode 100644 index 0000000..8d12667 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCanaithtype.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCascadetype.otf b/titlepage/fonts/qualitype/opentype/QTCascadetype.otf new file mode 100644 index 0000000..0763ac0 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCascadetype.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaslan-Bold.otf b/titlepage/fonts/qualitype/opentype/QTCaslan-Bold.otf new file mode 100644 index 0000000..2ca89a5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaslan-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaslan-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTCaslan-BoldItalic.otf new file mode 100644 index 0000000..d4564e4 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaslan-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaslan-Italic.otf b/titlepage/fonts/qualitype/opentype/QTCaslan-Italic.otf new file mode 100644 index 0000000..ec7ba1d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaslan-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaslan.otf b/titlepage/fonts/qualitype/opentype/QTCaslan.otf new file mode 100644 index 0000000..37a91b2 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaslan.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCaslanOpen.otf b/titlepage/fonts/qualitype/opentype/QTCaslanOpen.otf new file mode 100644 index 0000000..15cda14 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCaslanOpen.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCasual.otf b/titlepage/fonts/qualitype/opentype/QTCasual.otf new file mode 100644 index 0000000..a0fe658 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCasual.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTChanceryType-Bold.otf b/titlepage/fonts/qualitype/opentype/QTChanceryType-Bold.otf new file mode 100644 index 0000000..1cf6403 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTChanceryType-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTChanceryType-Italic.otf b/titlepage/fonts/qualitype/opentype/QTChanceryType-Italic.otf new file mode 100644 index 0000000..eb568df Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTChanceryType-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTChanceryType.otf b/titlepage/fonts/qualitype/opentype/QTChanceryType.otf new file mode 100644 index 0000000..bdc24a2 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTChanceryType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTChicagoland.otf b/titlepage/fonts/qualitype/opentype/QTChicagoland.otf new file mode 100644 index 0000000..06cf155 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTChicagoland.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTClaytablet.otf b/titlepage/fonts/qualitype/opentype/QTClaytablet.otf new file mode 100644 index 0000000..e328ea2 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTClaytablet.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCloisteredMonk.otf b/titlepage/fonts/qualitype/opentype/QTCloisteredMonk.otf new file mode 100644 index 0000000..77362bf Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCloisteredMonk.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTCoronation.otf b/titlepage/fonts/qualitype/opentype/QTCoronation.otf new file mode 100644 index 0000000..be310fd Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTCoronation.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDeuce.otf b/titlepage/fonts/qualitype/opentype/QTDeuce.otf new file mode 100644 index 0000000..4aa326d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDeuce.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDingBits.otf b/titlepage/fonts/qualitype/opentype/QTDingBits.otf new file mode 100644 index 0000000..cf30c49 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDingBits.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDoghaus.otf b/titlepage/fonts/qualitype/opentype/QTDoghaus.otf new file mode 100644 index 0000000..672c240 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDoghaus.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDoghausHeavy.otf b/titlepage/fonts/qualitype/opentype/QTDoghausHeavy.otf new file mode 100644 index 0000000..6b0b90a Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDoghausHeavy.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDoghausLight.otf b/titlepage/fonts/qualitype/opentype/QTDoghausLight.otf new file mode 100644 index 0000000..2157fa4 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDoghausLight.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTDublinIrish.otf b/titlepage/fonts/qualitype/opentype/QTDublinIrish.otf new file mode 100644 index 0000000..6067986 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTDublinIrish.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTEraType-Bold.otf b/titlepage/fonts/qualitype/opentype/QTEraType-Bold.otf new file mode 100644 index 0000000..7a1e3d0 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTEraType-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTEraType.otf b/titlepage/fonts/qualitype/opentype/QTEraType.otf new file mode 100644 index 0000000..c2b2c4d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTEraType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTEurotype-Bold.otf b/titlepage/fonts/qualitype/opentype/QTEurotype-Bold.otf new file mode 100644 index 0000000..81208f7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTEurotype-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTEurotype.otf b/titlepage/fonts/qualitype/opentype/QTEurotype.otf new file mode 100644 index 0000000..2209ab5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTEurotype.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFloraline-Bold.otf b/titlepage/fonts/qualitype/opentype/QTFloraline-Bold.otf new file mode 100644 index 0000000..5cee6dd Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFloraline-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFloraline.otf b/titlepage/fonts/qualitype/opentype/QTFloraline.otf new file mode 100644 index 0000000..a233a2a Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFloraline.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFlorencia.otf b/titlepage/fonts/qualitype/opentype/QTFlorencia.otf new file mode 100644 index 0000000..d6d27a1 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFlorencia.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFraktur.otf b/titlepage/fonts/qualitype/opentype/QTFraktur.otf new file mode 100644 index 0000000..baf6b9e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFraktur.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFrank.otf b/titlepage/fonts/qualitype/opentype/QTFrank.otf new file mode 100644 index 0000000..fa84eca Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFrank.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFrankHeavy.otf b/titlepage/fonts/qualitype/opentype/QTFrankHeavy.otf new file mode 100644 index 0000000..0c312e5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFrankHeavy.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFrizQuad-Bold.otf b/titlepage/fonts/qualitype/opentype/QTFrizQuad-Bold.otf new file mode 100644 index 0000000..44d7a56 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFrizQuad-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFrizQuad.otf b/titlepage/fonts/qualitype/opentype/QTFrizQuad.otf new file mode 100644 index 0000000..8efa492 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFrizQuad.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFuture-Italic.otf b/titlepage/fonts/qualitype/opentype/QTFuture-Italic.otf new file mode 100644 index 0000000..7a3ff82 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFuture-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFuture.otf b/titlepage/fonts/qualitype/opentype/QTFuture.otf new file mode 100644 index 0000000..3d232d7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFuture.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTFuturePoster.otf b/titlepage/fonts/qualitype/opentype/QTFuturePoster.otf new file mode 100644 index 0000000..a8e41fa Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTFuturePoster.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGaromand-Bold.otf b/titlepage/fonts/qualitype/opentype/QTGaromand-Bold.otf new file mode 100644 index 0000000..a971e05 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGaromand-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGaromand-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTGaromand-BoldItalic.otf new file mode 100644 index 0000000..e867c83 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGaromand-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGaromand-Italic.otf b/titlepage/fonts/qualitype/opentype/QTGaromand-Italic.otf new file mode 100644 index 0000000..70858a7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGaromand-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGaromand.otf b/titlepage/fonts/qualitype/opentype/QTGaromand.otf new file mode 100644 index 0000000..400e880 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGaromand.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGhoulFace.otf b/titlepage/fonts/qualitype/opentype/QTGhoulFace.otf new file mode 100644 index 0000000..5625f19 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGhoulFace.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGraphLite.otf b/titlepage/fonts/qualitype/opentype/QTGraphLite.otf new file mode 100644 index 0000000..3fe3aff Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGraphLite.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGraveure-Bold.otf b/titlepage/fonts/qualitype/opentype/QTGraveure-Bold.otf new file mode 100644 index 0000000..cc9d2e1 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGraveure-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGraveure.otf b/titlepage/fonts/qualitype/opentype/QTGraveure.otf new file mode 100644 index 0000000..ce0faba Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGraveure.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTGreece.otf b/titlepage/fonts/qualitype/opentype/QTGreece.otf new file mode 100644 index 0000000..82377f5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTGreece.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHandwriting.otf b/titlepage/fonts/qualitype/opentype/QTHandwriting.otf new file mode 100644 index 0000000..070a4c3 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHandwriting.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHeidelbergType.otf b/titlepage/fonts/qualitype/opentype/QTHeidelbergType.otf new file mode 100644 index 0000000..69bdc23 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHeidelbergType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHelvet-Black.otf b/titlepage/fonts/qualitype/opentype/QTHelvet-Black.otf new file mode 100644 index 0000000..f280314 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHelvet-Black.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHelvet-BoldOutline.otf b/titlepage/fonts/qualitype/opentype/QTHelvet-BoldOutline.otf new file mode 100644 index 0000000..4ea293c Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHelvet-BoldOutline.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Black.otf b/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Black.otf new file mode 100644 index 0000000..d7cd3fc Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Black.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Light.otf b/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Light.otf new file mode 100644 index 0000000..01443e6 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHelvetCnd-Light.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHelvetCnd.otf b/titlepage/fonts/qualitype/opentype/QTHelvetCnd.otf new file mode 100644 index 0000000..2a7b96d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHelvetCnd.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHoboken.otf b/titlepage/fonts/qualitype/opentype/QTHoboken.otf new file mode 100644 index 0000000..17abd23 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHoboken.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHowardType.otf b/titlepage/fonts/qualitype/opentype/QTHowardType.otf new file mode 100644 index 0000000..67863e7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHowardType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTHowardTypeFat.otf b/titlepage/fonts/qualitype/opentype/QTHowardTypeFat.otf new file mode 100644 index 0000000..22b90b7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTHowardTypeFat.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTImpromptu.otf b/titlepage/fonts/qualitype/opentype/QTImpromptu.otf new file mode 100644 index 0000000..052f075 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTImpromptu.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTJupiter.otf b/titlepage/fonts/qualitype/opentype/QTJupiter.otf new file mode 100644 index 0000000..d9eb343 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTJupiter.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTKooper-Italic.otf b/titlepage/fonts/qualitype/opentype/QTKooper-Italic.otf new file mode 100644 index 0000000..76c9b08 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTKooper-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTKooper.otf b/titlepage/fonts/qualitype/opentype/QTKooper.otf new file mode 100644 index 0000000..b95216e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTKooper.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTKorrin-Italic.otf b/titlepage/fonts/qualitype/opentype/QTKorrin-Italic.otf new file mode 100644 index 0000000..46e0cee Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTKorrin-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTKorrin.otf b/titlepage/fonts/qualitype/opentype/QTKorrin.otf new file mode 100644 index 0000000..60d0d1e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTKorrin.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTKung-Fu.otf b/titlepage/fonts/qualitype/opentype/QTKung-Fu.otf new file mode 100644 index 0000000..1d73fdd Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTKung-Fu.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLautrecType.otf b/titlepage/fonts/qualitype/opentype/QTLautrecType.otf new file mode 100644 index 0000000..0cd067b Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLautrecType.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLetterGoth-Bold.otf b/titlepage/fonts/qualitype/opentype/QTLetterGoth-Bold.otf new file mode 100644 index 0000000..b1f6798 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLetterGoth-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLetterGoth-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTLetterGoth-BoldItalic.otf new file mode 100644 index 0000000..c5f171d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLetterGoth-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLetterGoth-Italic.otf b/titlepage/fonts/qualitype/opentype/QTLetterGoth-Italic.otf new file mode 100644 index 0000000..392368a Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLetterGoth-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLetterGoth.otf b/titlepage/fonts/qualitype/opentype/QTLetterGoth.otf new file mode 100644 index 0000000..d55c878 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLetterGoth.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLinoscroll.otf b/titlepage/fonts/qualitype/opentype/QTLinoscroll.otf new file mode 100644 index 0000000..1024dbb Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLinoscroll.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLinostroke.otf b/titlepage/fonts/qualitype/opentype/QTLinostroke.otf new file mode 100644 index 0000000..0a7ab75 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLinostroke.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTLondonScroll.otf b/titlepage/fonts/qualitype/opentype/QTLondonScroll.otf new file mode 100644 index 0000000..37e3965 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTLondonScroll.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTMagicMarker.otf b/titlepage/fonts/qualitype/opentype/QTMagicMarker.otf new file mode 100644 index 0000000..daf2494 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTMagicMarker.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTMerryScript.otf b/titlepage/fonts/qualitype/opentype/QTMerryScript.otf new file mode 100644 index 0000000..bfae7a5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTMerryScript.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTMilitary.otf b/titlepage/fonts/qualitype/opentype/QTMilitary.otf new file mode 100644 index 0000000..b3a06a5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTMilitary.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOKCorral-Cnd.otf b/titlepage/fonts/qualitype/opentype/QTOKCorral-Cnd.otf new file mode 100644 index 0000000..1dfebd0 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOKCorral-Cnd.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOKCorral-Ext.otf b/titlepage/fonts/qualitype/opentype/QTOKCorral-Ext.otf new file mode 100644 index 0000000..33cff47 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOKCorral-Ext.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOKCorral.otf b/titlepage/fonts/qualitype/opentype/QTOKCorral.otf new file mode 100644 index 0000000..fbbabcc Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOKCorral.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOldGoudy-Bold.otf b/titlepage/fonts/qualitype/opentype/QTOldGoudy-Bold.otf new file mode 100644 index 0000000..40c3bb4 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOldGoudy-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOldGoudy-Italic.otf b/titlepage/fonts/qualitype/opentype/QTOldGoudy-Italic.otf new file mode 100644 index 0000000..6cc6233 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOldGoudy-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOldGoudy.otf b/titlepage/fonts/qualitype/opentype/QTOldGoudy.otf new file mode 100644 index 0000000..462fca3 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOldGoudy.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOptimum-Bold.otf b/titlepage/fonts/qualitype/opentype/QTOptimum-Bold.otf new file mode 100644 index 0000000..24adcf8 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOptimum-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOptimum-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTOptimum-BoldItalic.otf new file mode 100644 index 0000000..c5f3731 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOptimum-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOptimum-Italic.otf b/titlepage/fonts/qualitype/opentype/QTOptimum-Italic.otf new file mode 100644 index 0000000..bf82803 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOptimum-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTOptimum.otf b/titlepage/fonts/qualitype/opentype/QTOptimum.otf new file mode 100644 index 0000000..ca17f00 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTOptimum.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPalatine-Bold.otf b/titlepage/fonts/qualitype/opentype/QTPalatine-Bold.otf new file mode 100644 index 0000000..86c4cfc Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPalatine-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPalatine-Italic.otf b/titlepage/fonts/qualitype/opentype/QTPalatine-Italic.otf new file mode 100644 index 0000000..24f0868 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPalatine-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPalatine.otf b/titlepage/fonts/qualitype/opentype/QTPalatine.otf new file mode 100644 index 0000000..7ce3a53 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPalatine.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPandora.otf b/titlepage/fonts/qualitype/opentype/QTPandora.otf new file mode 100644 index 0000000..a280442 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPandora.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTParisFrance.otf b/titlepage/fonts/qualitype/opentype/QTParisFrance.otf new file mode 100644 index 0000000..37e2c27 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTParisFrance.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPeignoir-Lite.otf b/titlepage/fonts/qualitype/opentype/QTPeignoir-Lite.otf new file mode 100644 index 0000000..eeecfd0 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPeignoir-Lite.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPeignoir.otf b/titlepage/fonts/qualitype/opentype/QTPeignoir.otf new file mode 100644 index 0000000..8ed2369 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPeignoir.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPiltdown.otf b/titlepage/fonts/qualitype/opentype/QTPiltdown.otf new file mode 100644 index 0000000..f41097c Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPiltdown.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPristine-Bold.otf b/titlepage/fonts/qualitype/opentype/QTPristine-Bold.otf new file mode 100644 index 0000000..d5cd2c7 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPristine-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPristine-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTPristine-BoldItalic.otf new file mode 100644 index 0000000..5a6832d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPristine-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPristine-Italic.otf b/titlepage/fonts/qualitype/opentype/QTPristine-Italic.otf new file mode 100644 index 0000000..aa09bbf Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPristine-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTPristine.otf b/titlepage/fonts/qualitype/opentype/QTPristine.otf new file mode 100644 index 0000000..daf305c Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTPristine.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTRobotic2000.otf b/titlepage/fonts/qualitype/opentype/QTRobotic2000.otf new file mode 100644 index 0000000..622f0e9 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTRobotic2000.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSanDiego.otf b/titlepage/fonts/qualitype/opentype/QTSanDiego.otf new file mode 100644 index 0000000..5e1fd81 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSanDiego.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Bold.otf b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Bold.otf new file mode 100644 index 0000000..111b71a Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSchoolCentury-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-BoldItalic.otf new file mode 100644 index 0000000..aa1734b Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Italic.otf b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Italic.otf new file mode 100644 index 0000000..bd2f2eb Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSchoolCentury-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSchoolCentury.otf b/titlepage/fonts/qualitype/opentype/QTSchoolCentury.otf new file mode 100644 index 0000000..dbff5fb Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSchoolCentury.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSlogantype.otf b/titlepage/fonts/qualitype/opentype/QTSlogantype.otf new file mode 100644 index 0000000..e7da0bf Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSlogantype.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTSnowCaps.otf b/titlepage/fonts/qualitype/opentype/QTSnowCaps.otf new file mode 100644 index 0000000..382d077 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTSnowCaps.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTStoryTimeCaps.otf b/titlepage/fonts/qualitype/opentype/QTStoryTimeCaps.otf new file mode 100644 index 0000000..6d80ea6 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTStoryTimeCaps.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTechtone-Bold.otf b/titlepage/fonts/qualitype/opentype/QTTechtone-Bold.otf new file mode 100644 index 0000000..d427375 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTechtone-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTechtone-BoldItalic.otf b/titlepage/fonts/qualitype/opentype/QTTechtone-BoldItalic.otf new file mode 100644 index 0000000..6f1e096 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTechtone-BoldItalic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTechtone-Italic.otf b/titlepage/fonts/qualitype/opentype/QTTechtone-Italic.otf new file mode 100644 index 0000000..bfff756 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTechtone-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTechtone.otf b/titlepage/fonts/qualitype/opentype/QTTechtone.otf new file mode 100644 index 0000000..e3fdfe5 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTechtone.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTheatre.otf b/titlepage/fonts/qualitype/opentype/QTTheatre.otf new file mode 100644 index 0000000..116486b Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTheatre.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTimeOutline.otf b/titlepage/fonts/qualitype/opentype/QTTimeOutline.otf new file mode 100644 index 0000000..5d2ed37 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTimeOutline.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTTumbleweed.otf b/titlepage/fonts/qualitype/opentype/QTTumbleweed.otf new file mode 100644 index 0000000..8a7cfec Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTTumbleweed.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTUSA-Uncial.otf b/titlepage/fonts/qualitype/opentype/QTUSA-Uncial.otf new file mode 100644 index 0000000..8d57739 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTUSA-Uncial.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTVagaRound-Bold.otf b/titlepage/fonts/qualitype/opentype/QTVagaRound-Bold.otf new file mode 100644 index 0000000..981882e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTVagaRound-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTVagaRound.otf b/titlepage/fonts/qualitype/opentype/QTVagaRound.otf new file mode 100644 index 0000000..0db86c6 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTVagaRound.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTWeise-Bold.otf b/titlepage/fonts/qualitype/opentype/QTWeise-Bold.otf new file mode 100644 index 0000000..c60438e Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTWeise-Bold.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTWeise-Italic.otf b/titlepage/fonts/qualitype/opentype/QTWeise-Italic.otf new file mode 100644 index 0000000..9136526 Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTWeise-Italic.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTWeise.otf b/titlepage/fonts/qualitype/opentype/QTWeise.otf new file mode 100644 index 0000000..c9a551d Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTWeise.otf differ diff --git a/titlepage/fonts/qualitype/opentype/QTWestEnd.otf b/titlepage/fonts/qualitype/opentype/QTWestEnd.otf new file mode 100644 index 0000000..b5462ec Binary files /dev/null and b/titlepage/fonts/qualitype/opentype/QTWestEnd.otf differ diff --git a/titlepage/images/TheGreatWaveoffKanagawa.jpeg b/titlepage/images/TheGreatWaveoffKanagawa.jpeg new file mode 100755 index 0000000..a6d11c0 Binary files /dev/null and b/titlepage/images/TheGreatWaveoffKanagawa.jpeg differ diff --git a/titlepage/images/corner-bg.png b/titlepage/images/corner-bg.png new file mode 100755 index 0000000..02e4127 Binary files /dev/null and b/titlepage/images/corner-bg.png differ diff --git a/titlepage/images/logo.png b/titlepage/images/logo.png new file mode 100755 index 0000000..bc5e6a6 Binary files /dev/null and b/titlepage/images/logo.png differ diff --git a/titlepage/images/nmfs-opensci-logo.png b/titlepage/images/nmfs-opensci-logo.png new file mode 100755 index 0000000..8014cbf Binary files /dev/null and b/titlepage/images/nmfs-opensci-logo.png differ diff --git a/titlepage/images/otter-bar.jpeg b/titlepage/images/otter-bar.jpeg new file mode 100644 index 0000000..ceb5daf Binary files /dev/null and b/titlepage/images/otter-bar.jpeg differ diff --git a/titlepage/images/ringed-seal.png b/titlepage/images/ringed-seal.png new file mode 100755 index 0000000..0f604cf Binary files /dev/null and b/titlepage/images/ringed-seal.png differ diff --git a/titlepage/mathjax.html b/titlepage/mathjax.html new file mode 100644 index 0000000..226a061 --- /dev/null +++ b/titlepage/mathjax.html @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/titlepage/pandoc.tex b/titlepage/pandoc.tex new file mode 100644 index 0000000..62b14cd --- /dev/null +++ b/titlepage/pandoc.tex @@ -0,0 +1,104 @@ +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ + +$tightlist.tex()$ +$tables.tex()$ +$graphics.tex()$ +$citations.tex()$ + +$for(header-includes)$ +$header-includes$ +$endfor$ + +\usepackage{hyphenat} +\usepackage{ifthen} +\usepackage{calc} +\usepackage{calculator} + +$if(titlepage-bg-image)$ +\usepackage{graphicx} +\usepackage{wallpaper} +$endif$ + +$if(titlepage-geometry)$ +\usepackage{geometry} +$endif$ + +$if(coverpage)$ +\usepackage{graphicx} +\usepackage{geometry} +\usepackage{afterpage} +\usepackage{tikz} +\usetikzlibrary{calc} +\usetikzlibrary{fadings} +\usepackage[pagecolor=none]{pagecolor} +$endif$ + +$if(titlepage-theme.page-color)$ +\usepackage[pagecolor=none]{pagecolor} +$endif$ + +$if(titlepage)$ +% Set the titlepage font families +$if(titlepage-theme.page-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepagefont}{$titlepage-theme.page-fontfamily$} +$endif$ + +$if(titlepage-theme.title-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepagetitlefont}{$titlepage-theme.title-fontfamily$} +$endif$ + +$if(titlepage-theme.author-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepageauthorfont}{$titlepage-theme.author-fontfamily$} +$endif$ + +$if(titlepage-theme.affiliation-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepageaffiliationfont}{$titlepage-theme.affiliation-fontfamily$} +$endif$ + +$if(titlepage-theme.footer-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepagefooterfont}{$titlepage-theme.footer-fontfamily$} +$endif$ + +$if(titlepage-theme.header-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\titlepageheaderfont}{$titlepage-theme.header-fontfamily$} +$endif$ + +$endif$ + +$if(coverpage)$ +% Set the coverpage font families +$if(coverpage-theme.page-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpagefont}{$coverpage-theme.page-fontfamily$} +$endif$ +$if(coverpage-theme.title-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpagetitlefont}{$coverpage-theme.title-fontfamily$} +$endif$ +$if(coverpage-theme.author-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpageauthorfont}{$coverpage-theme.author-fontfamily$} +$endif$ +$if(coverpage-theme.footer-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpagefooterfont}{$coverpage-theme.footer-fontfamily$} +$endif$ +$if(coverpage-theme.header-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpageheaderfont}{$coverpage-theme.header-fontfamily$} +$endif$ +$if(coverpage-theme.date-fontfamily)$ +\usepackage{fontspec} +\newfontfamily{\coverpagedatefont}{$coverpage-theme.date-fontfamily$} +$endif$ + +$endif$ + diff --git a/titlepage/titlepage-theme.lua b/titlepage/titlepage-theme.lua new file mode 100644 index 0000000..7b1f8fb --- /dev/null +++ b/titlepage/titlepage-theme.lua @@ -0,0 +1,558 @@ +local function isEmpty(s) + return s == nil or s == '' +end + +local function file_exists(name) + local f=io.open(name,"r") + if f~=nil then io.close(f) return true else return false end +end + +local function getVal(s) + return pandoc.utils.stringify(s) +end + +local function is_equal (s, val) + if isEmpty(s) then return false end + if getVal(s) == val then return true end + + return false +end + +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + + return false +end + +local function dump(o) + if type(o) == 'table' then + local s = '{ ' + for k,v in pairs(o) do + if type(k) ~= 'number' then k = '"'..k..'"' end + s = s .. '['..k..'] = ' .. dump(v) .. ',' + end + return s .. '} ' + else + return tostring(o) + end +end + +function Meta(m) +--[[ +This function checks that the value the user set is ok and stops with an error message if no. +yamlelement: the yaml metadata. e.g. m["titlepage-theme"]["page-align"] +yamltext: page, how to print the yaml value in the error message. e.g. titlepage-theme: page-align +okvals: a text table of ok styles. e.g. {"right", "center"} +--]] + local function check_yaml (yamlelement, yamltext, okvals) + choice = pandoc.utils.stringify(yamlelement) + if not has_value(okvals, choice) then + print("\n\ntitlepage extension error: " .. yamltext .. " is set to " .. choice .. ". It can be " .. pandoc.utils.stringify(table.concat(okvals, ", ")) .. ".\n\n") + return false + else + return true + end + + return true + end + +--[[ +This function gets the value of something like titlepage-theme.title-style and sets a value titlepage-theme.title-style.plain (for example). It also +does error checking against okvals. "plain" is always ok and if no value is set then the style is set to plain. +page: titlepage or coverpage +styleement: page, title, subtitle, header, footer, affiliation, etc +okvals: a text table of ok styles. e.g. {"plain", "two-column"} +--]] + local function set_style (page, styleelement, okvals) + yamltext = page .. "-theme" .. ": " .. styleelement .. "-style" + yamlelement = m[page .. "-theme"][styleelement .. "-style"] + if not isEmpty(yamlelement) then + ok = check_yaml (yamlelement, yamltext, okvals) + if ok then + m[page .. "-style-code"][styleelement] = {} + m[page .. "-style-code"][styleelement][getVal(yamlelement)] = true + else + error() + end + else +-- print("\n\ntitlepage extension error: " .. yamltext .. " needs a value. Should have been set in titlepage-theme lua filter.\n\n") +-- error() + m[page .. "-style-code"][styleelement] = {} + m[page .. "-style-code"][styleelement]["plain"] = true + end + end + +--[[ +This function assigns the themevals to the meta data +--]] + local function assign_value (tab) + for i, value in pairs(tab) do + if isEmpty(m['titlepage-theme'][i]) then + m['titlepage-theme'][i] = value + end + end + + return m + end + + local titlepage_table = { + ["academic"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\headerblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\dateblock")} + }, + ["page-align"] = "center", + ["title-style"] = "doublelinetight", + ["title-fontstyle"] = {"huge", "bfseries"}, + ["title-space-after"] = "1.5cm", + ["subtitle-fontstyle"] = {"Large"}, + ["author-style"] = "two-column", + ["affiliation-style"] = "none", + ["author-fontstyle"] = {"textsc"}, + ["affiliation-fontstyle"] = {"large"}, + ["logo-space-after"] = pandoc.MetaInlines{pandoc.RawInline("latex","2\\baselineskip")}, + ["header-fontstyle"] = {"textsc", "LARGE"}, + ["header-space-after"] = "1.5cm", + ["date-fontstyle"] = {"large"} + } + assign_value(themevals) + + return m + end, + ["bg-image"] = function (m) + if isEmpty(m['titlepage-bg-image']) then + m['titlepage-bg-image'] = "corner-bg.png" + end + if isEmpty(m['titlepage-geometry']) then + m['titlepage-geometry'] = pandoc.List({"top=3in", "bottom=1in", "right=1in", "left=1in"}) + end + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\affiliationblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "left", + ["title-style"] = "plain", + ["title-fontstyle"] = {"large", "bfseries"}, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","4\\baselineskip")}, + ["subtitle-fontstyle"] = {"large", "textit"}, + ["author-style"] = "superscript-with-and", + ["author-fontstyle"] = {"large"}, + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-fontstyle"] = {"large"}, + ["footer-space-after"] = "1pt", + ["affiliation-space-after"] = "1pt", + ["footer-style"] = "plain", + ["footer-fontstyle"] = {"large"}, + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.25\\textheight")}, + ["logo-space-after"] = pandoc.MetaInlines{pandoc.RawInline("latex","2\\baselineskip")}, + ["vrule-width"] = "1pt", + ["bg-image-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.5\\paperwidth")}, + ["bg-image-location"] = "ULCorner", + } + assign_value(themevals) + + return m + end, + ["classic-lined"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "center", + ["title-style"] = "doublelinewide", + ["title-fontsize"] = 30, + ["title-fontstyle"] = {"uppercase"}, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.1\\textheight")}, + ["subtitle-fontstyle"] = {"Large", "textit"}, + ["author-style"] = "plain", + ["author-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\hskip1em")}, + ["author-fontstyle"] = {"Large"}, + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-fontstyle"] = {"large"}, + ["affiliation-space-after"] = "1pt", + ["footer-style"] = "plain", + ["footer-fontstyle"] = {"large", "textsc"}, + ["footer-space-after"] = "1pt", + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.25\\textheight")}, + ["logo-space-after"] = "1cm", + } + assign_value(themevals) + + return m + end, + ["colorbox"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")} + }, + ["page-align"] = "left", + ["title-style"] = "colorbox", + ["title-fontsize"] = 40, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["subtitle-fontsize"] = 25, + ["subtitle-fontstyle"] = {"bfseries"}, + ["title-subtitle-space-between"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","5\\baselineskip")}, + ["author-style"] = "plain", + ["author-sep"] = "newline", + ["author-fontstyle"] = {"Large"}, + ["author-align"] = "right", + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["title-colorbox-borderwidth"] = "2mm", + ["title-colorbox-bordercolor"] = "black", + } + assign_value(themevals) + + return m + end, + ["formal"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","A report presented at the annual\\\\meeting on 10 August 2025\\\\ \\vspace{0.8cm}")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "center", + ["title-style"] = "plain", + ["title-fontstyle"] = {"Huge", "textbf"}, + ["title-space-after"] = "1.5cm", + ["subtitle-fontstyle"] = {"LARGE"}, + ["title-subtitle-space-between"] = "0.5cm", + ["author-style"] = "plain", + ["author-sep"] = "newline", + ["author-fontstyle"] = {"textbf"}, + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-fontstyle"] = {"large"}, + ["affiliation-space-after"] = "1pt", + ["footer-style"] = "plain", + ["footer-fontstyle"] = {"Large", "textsc"}, + ["footer-space-after"] = "1pt", + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.4\\textwidth")}, + ["logo-space-after"] = "1cm", + } + assign_value(themevals) + + return m + end, + ["vline"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\affiliationblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "left", + ["title-style"] = "plain", + ["title-fontstyle"] = {"large", "bfseries"}, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","4\\baselineskip")}, + ["subtitle-fontstyle"] = {"large", "textit"}, + ["author-style"] = "superscript-with-and", + ["author-fontstyle"] = {"large"}, + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-fontstyle"] = {"large"}, + ["affiliation-space-after"] = "1pt", + ["footer-style"] = "plain", + ["footer-fontstyle"] = {"large"}, + ["footer-space-after"] = "1pt", + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.15\\textheight")}, + ["logo-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.1\\textheight")}, + ["vrule-width"] = "2pt", + ["vrule-align"] = "left", + ["vrule-color"] = "black", + } + assign_value(themevals) + + return m + end, + ["vline-text"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\affiliationblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "left", + ["title-style"] = "plain", + ["title-fontstyle"] = {"large", "bfseries"}, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","4\\baselineskip")}, + ["subtitle-fontstyle"] = {"large", "textit"}, + ["author-style"] = "superscript-with-and", + ["author-fontstyle"] = {"large"}, + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-fontstyle"] = {"large"}, + ["affiliation-space-after"] = "1pt", + ["footer-style"] = "plain", + ["footer-fontstyle"] = {"large"}, + ["footer-space-after"] = "1pt", + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.15\\textheight")}, + ["logo-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.1\\textheight")}, + ["vrule-width"] = "0.5in", + ["vrule-align"] = "left", + ["vrule-color"] = "blue", + ["vrule-text-color"] = "white", + ["vrule-text-fontstyle"] = {"bfseries", "Large"}, + ["vrule-text"] = "Add your text in vrule-text" + } + assign_value(themevals) + + return m + end, + ["plain"] = function (m) + themevals = { + ["elements"] = { + pandoc.MetaInlines{pandoc.RawInline("latex","\\headerblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\titleblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\authorblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\affiliationblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\vfill")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\logoblock")}, + pandoc.MetaInlines{pandoc.RawInline("latex","\\footerblock")} + }, + ["page-align"] = "left", + ["title-style"] = "plain", + ["title-fontstyle"] = {"Large"}, + ["title-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","4\\baselineskip")}, + ["title-subtitle-space-between"] = "1pt", + ["subtitle-fontstyle"] = {"textit"}, + ["author-style"] = "superscript-with-and", + ["author-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["affiliation-style"] = "numbered-list-with-correspondence", + ["affiliation-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","2\\baselineskip")}, + ["header-style"] = "plain", + ["header-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.2\\textheight")}, + ["footer-style"] = "plain", + ["footer-space-after"] = "1pt", + ["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.1\\textheight")}, + ["logo-space-after"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","1\\baselineskip")}, + } + assign_value(themevals) + + return m + end, + ["none"] = function (m) return m end + } + + m['titlepage-file'] = false + if isEmpty(m.titlepage) then m['titlepage'] = "plain" end + if getVal(m.titlepage) == "false" then m['titlepage'] = "none" end + if getVal(m.titlepage) == "true" then m['titlepage'] = "plain" end + if getVal(m.titlepage) == "none" then + m['titlepage-true'] = false + else + m['titlepage-true'] = true + end + choice = pandoc.utils.stringify(m.titlepage) + okvals = {"plain", "vline", "vline-text", "bg-image", "colorbox", "academic", "formal", "classic-lined"} + isatheme = has_value (okvals, choice) + if not isatheme and choice ~= "none" then + if not file_exists(choice) then + error("titlepage extension error: titlepage can be a tex file or one of the themes: " .. pandoc.utils.stringify(table.concat(okvals, ", ")) .. ".") + else + m['titlepage-file'] = true + m['titlepage-filename'] = choice + m['titlepage'] = "file" + end + end + if m['titlepage-file'] and not isEmpty(m['titlepage-theme']) then + print("\n\ntitlepage extension message: since you passed in a static titlepage file, titlepage-theme is ignored.n\n") + end + if not m['titlepage-file'] and choice ~= "none" then + if isEmpty(m['titlepage-theme']) then + m['titlepage-theme'] = {} + end + titlepage_table[choice](m) -- add the theme defaults + end + +-- Only for themes +-- titlepage-theme will exist if using a theme +if not m['titlepage-file'] and m['titlepage-true'] then +--[[ +Error checking and setting the style codes +--]] + -- Style codes + m["titlepage-style-code"] = {} + okvals = {"none", "plain", "colorbox", "doublelinewide", "doublelinetight"} + set_style("titlepage", "title", okvals) + set_style("titlepage", "footer", okvals) + set_style("titlepage", "header", okvals) + set_style("titlepage", "date", okvals) + okvals = {"none", "plain", "plain-with-and", "superscript", "superscript-with-and", "two-column", "author-address"} + set_style("titlepage", "author", okvals) + okvals = {"none", "numbered-list", "numbered-list-with-correspondence"} + set_style("titlepage", "affiliation", okvals) + if is_equal(m['titlepage-theme']["author-style"], "author-address") and is_equal(m['titlepage-theme']["author-align"], "spread") then + error("\n\nquarto_titlepages error: If author-style is two-column, then author-align cannot be spread.\n\n") + end + +--[[ +Set the fontsize defaults +if page-fontsize was passed in or if fontsize passed in but not spacing +--]] + for key, val in pairs({"title", "author", "affiliation", "footer", "header", "date"}) do + if isEmpty(m["titlepage-theme"][val .. "-fontsize"]) then + if not isEmpty(m["titlepage-theme"]["page-fontsize"]) then + m["titlepage-theme"][val .. "-fontsize"] = getVal(m["titlepage-theme"]["page-fontsize"]) + end + end + end + for key, val in pairs({"page", "title", "subtitle", "author", "affiliation", "footer", "header", "date"}) do + if not isEmpty(m['titlepage-theme'][val .. "-fontsize"]) then + if isEmpty(m['titlepage-theme'][val .. "-spacing"]) then + m['titlepage-theme'][val .. "-spacing"] = 1.2*getVal(m['titlepage-theme'][val .. "-fontsize"]) + end + end + end + +--[[ +Set author sep character +--]] + if isEmpty(m['titlepage-theme']["author-sep"]) then + m['titlepage-theme']["author-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex",", ")} + end + if getVal(m['titlepage-theme']["author-sep"]) == "newline" then + m['titlepage-theme']["author-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\\\")} + end + +--[[ +Set affiliation sep character +--]] + if isEmpty(m['titlepage-theme']["affiliation-sep"]) then + m['titlepage-theme']["affiliation-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex",",~")} + end + if getVal(m['titlepage-theme']["affiliation-sep"]) == "newline" then + m['titlepage-theme']["affiliation-sep"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\\\")} + end + +--[[ +Set vrule defaults +--]] + if not isEmpty(m['titlepage-theme']["vrule-width"]) then + if isEmpty(m['titlepage-theme']["vrule-color"]) then + m['titlepage-theme']["vrule-color"] = "black" + end + if isEmpty(m['titlepage-theme']["vrule-space"]) then + m['titlepage-theme']["vrule-space"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.05\\textwidth")} + end + if isEmpty(m['titlepage-theme']["vrule-align"]) then + m['titlepage-theme']["vrule-align"] = "left" + end + end + if not isEmpty(m["titlepage-theme"]["vrule-align"]) then + okvals = {"left", "right", "leftright"} + ok = check_yaml (m["titlepage-theme"]["vrule-align"], "titlepage-theme: vrule-align", okvals) + if not ok then error("") end + end + +--[[ +Set the defaults for the titlepage alignments +default titlepage alignment is left +--]] + if isEmpty(m['titlepage-theme']["page-align"]) then + m['titlepage-theme']["page-align"] = "left" + end + for key, val in pairs({"page", "title", "author", "affiliation", "footer", "header", "logo", "date"}) do + if not isEmpty(m["titlepage-theme"][val .. "-align"]) then + okvals = {"right", "left", "center"} + if has_value({"title", "author", "footer", "header"}, val) then table.insert(okvals, "spread") end + ok = check_yaml (m["titlepage-theme"][val .. "-align"], "titlepage-theme: " .. val .. "-align", okvals) + if not ok then error("") end + end + end + +--[[ +Set bg-image defaults +--]] + if not isEmpty(m['titlepage-bg-image']) then + if isEmpty(m['titlepage-theme']["bg-image-size"]) then + m['titlepage-theme']["bg-image-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","\\paperwidth")} + end + if not isEmpty(m["titlepage-theme"]["bg-image-location"]) then + okvals = {"ULCorner", "URCorner", "LLCorner", "LRCorner", "TileSquare", "Center"} + ok = check_yaml (m["titlepage-theme"]["bg-image-location"], "titlepage-theme: bg-image-location", okvals) + if not ok then error("") end + end + end + +--[[ +Set logo defaults +--]] + if not isEmpty(m['titlepage-logo']) then + if isEmpty(m['titlepage-theme']["logo-size"]) then + m['titlepage-theme']["logo-size"] = pandoc.MetaInlines{ + pandoc.RawInline("latex","0.2\\paperwidth")} + end + end + +end -- end the theme section + + return m + +end + +