first commit
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
|
@ -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{<command>}{<left>}{<before-sep>}{<after-sep>}
|
||||
% 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}
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
|
@ -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$
|
|
@ -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$}
|
|
@ -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
|
|
@ -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}}
|
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 222 KiB |
After Width: | Height: | Size: 250 KiB |
After Width: | Height: | Size: 150 KiB |
|
@ -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
|
|
@ -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
|
After Width: | Height: | Size: 222 KiB |
|
@ -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
|
|
@ -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}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
\closing{$closing_greeting$}
|
||||
\end{letter}
|
|
@ -0,0 +1,2 @@
|
|||
\begin{letter}{\recipientdetails}
|
||||
\opening{$opening_greeting$}
|
|
@ -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$}
|
|
@ -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
|
|
@ -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
|
||||
|
After Width: | Height: | Size: 81 KiB |
|
@ -0,0 +1 @@
|
|||
\pagestyle{mystyle}
|
|
@ -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]
|
|
@ -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{<command>}{<left>}{<before-sep>}{<after-sep>}
|
||||
% 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
|
||||
% ---------------------------
|
|
@ -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$
|
|
@ -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$}
|
|
@ -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
|
||||
}
|
||||
|
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 222 KiB |
After Width: | Height: | Size: 250 KiB |
After Width: | Height: | Size: 150 KiB |
|
@ -0,0 +1,280 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="expanded" default-locale="en-US">
|
||||
<info>
|
||||
<title>American Chemical Society</title>
|
||||
<title-short>ACS</title-short>
|
||||
<id>http://www.zotero.org/styles/american-chemical-society</id>
|
||||
<link href="http://www.zotero.org/styles/american-chemical-society" rel="self"/>
|
||||
<link href="https://pubs.acs.org/doi/full/10.1021/acsguide.40303" rel="documentation"/>
|
||||
<link href="https://pubs.acs.org/doi/book/10.1021/acsguide" rel="documentation"/>
|
||||
<author>
|
||||
<name>Julian Onions</name>
|
||||
<email>julian.onions@gmail.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Ivan Bushmarinov</name>
|
||||
<email>ib@ineos.ac.ru</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="chemistry"/>
|
||||
<summary>The American Chemical Society style</summary>
|
||||
<updated>2021-06-04T03:27:50+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="en">
|
||||
<terms>
|
||||
<term name="editortranslator" form="short">
|
||||
<single>ed. and translator</single>
|
||||
<multiple>eds. and translators</multiple>
|
||||
</term>
|
||||
<term name="translator" form="short">
|
||||
<single>translator</single>
|
||||
<multiple>translators</multiple>
|
||||
</term>
|
||||
<term name="collection-editor" form="short">
|
||||
<single>series ed.</single>
|
||||
<multiple>series eds.</multiple>
|
||||
</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="editor">
|
||||
<group delimiter="; ">
|
||||
<names variable="editor translator" delimiter="; ">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="title"/>
|
||||
</names>
|
||||
<names variable="collection-editor">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="title"/>
|
||||
</names>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author" suffix=".">
|
||||
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter="; " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=", " text-case="capitalize-first"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<choose>
|
||||
<if type="thesis" match="any">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" text-case="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" text-case="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="volume">
|
||||
<group delimiter=" ">
|
||||
<text term="volume" form="short" text-case="capitalize-first"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="series">
|
||||
<text variable="collection-title"/>
|
||||
</macro>
|
||||
<macro name="pages">
|
||||
<label variable="page" form="short" suffix=" " strip-periods="true"/>
|
||||
<text variable="page"/>
|
||||
</macro>
|
||||
<macro name="book-container">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<choose>
|
||||
<if type="entry-dictionary entry-encyclopedia" match="none">
|
||||
<group delimiter=" ">
|
||||
<text term="in" text-case="capitalize-first"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="issued">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</macro>
|
||||
<macro name="full-issued">
|
||||
<date variable="issued" delimiter=" ">
|
||||
<date-part name="month" form="long" suffix=" "/>
|
||||
<date-part name="day" suffix=", "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout delimiter="," vertical-align="sup">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography second-field-align="flush" entry-spacing="0">
|
||||
<layout suffix=".">
|
||||
<text variable="citation-number" prefix="(" suffix=") "/>
|
||||
<text macro="author" suffix=" "/>
|
||||
<choose>
|
||||
<if type="article-journal review" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<text variable="container-title" font-style="italic" form="short"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="issued" font-weight="bold"/>
|
||||
<choose>
|
||||
<if variable="volume">
|
||||
<group delimiter=" ">
|
||||
<text variable="volume" font-style="italic"/>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<text term="issue" form="short" text-case="capitalize-first"/>
|
||||
<text variable="issue"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article-magazine article-newspaper article" match="any">
|
||||
<group delimiter=" ">
|
||||
<text macro="title" suffix="."/>
|
||||
<text variable="container-title" font-style="italic" suffix="."/>
|
||||
<text macro="edition"/>
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="full-issued"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="genre"/>
|
||||
</group>
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<text macro="title"/>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
<text macro="editor" prefix=" "/>
|
||||
<text macro="series"/>
|
||||
<choose>
|
||||
<if type="report">
|
||||
<group delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="number"/>
|
||||
</group>
|
||||
<date variable="issued" form="text"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
|
||||
<group delimiter="; ">
|
||||
<text macro="book-container"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="series"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<text macro="issued"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="volume"/>
|
||||
<text macro="pages"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="webpage">
|
||||
<group delimiter=" ">
|
||||
<text variable="title"/>
|
||||
<text variable="URL"/>
|
||||
<date variable="accessed" prefix="(accessed " suffix=")" delimiter=" ">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" prefix="-" form="numeric-leading-zeros"/>
|
||||
<date-part name="day" prefix="-" form="numeric-leading-zeros"/>
|
||||
</date>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group delimiter=", ">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</group>
|
||||
<group delimiter=", ">
|
||||
<text macro="issued"/>
|
||||
<text variable="volume" font-style="italic"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="DOI" prefix=". https://doi.org/"/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
|
@ -0,0 +1,435 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" names-delimiter=". " name-as-sort-order="all" sort-separator=" " demote-non-dropping-particle="never" initialize-with=" " initialize-with-hyphen="false" page-range-format="expanded" default-locale="zh-CN">
|
||||
<info>
|
||||
<title>China National Standard GB/T 7714-2015 (numeric, 中文)</title>
|
||||
<id>http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric</id>
|
||||
<link href="http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric" rel="self"/>
|
||||
<link href="http://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D8055ED3A7E05397BE0A0AB82A" rel="documentation"/>
|
||||
<author>
|
||||
<name>牛耕田</name>
|
||||
<email>buffalo_d@163.com</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Zeping Lee</name>
|
||||
<email>zepinglee@gmail.com</email>
|
||||
</contributor>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="generic-base"/>
|
||||
<summary>The Chinese GB/T 7714-2015 numeric style</summary>
|
||||
<updated>2022-02-23T10:44:01+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale xml:lang="zh-CN">
|
||||
<date form="text">
|
||||
<date-part name="year" suffix="年" range-delimiter="—"/>
|
||||
<date-part name="month" form="numeric" suffix="月" range-delimiter="—"/>
|
||||
<date-part name="day" suffix="日" range-delimiter="—"/>
|
||||
</date>
|
||||
<terms>
|
||||
<term name="edition" form="short">版</term>
|
||||
<term name="open-quote">“</term>
|
||||
<term name="close-quote">”</term>
|
||||
<term name="open-inner-quote">‘</term>
|
||||
<term name="close-inner-quote">’</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<locale>
|
||||
<date form="numeric">
|
||||
<date-part name="year" range-delimiter="/"/>
|
||||
<date-part name="month" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
|
||||
<date-part name="day" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
|
||||
</date>
|
||||
<terms>
|
||||
<term name="page-range-delimiter">-</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<!-- 引用日期 -->
|
||||
<macro name="accessed-date">
|
||||
<date variable="accessed" form="numeric" prefix="[" suffix="]"/>
|
||||
</macro>
|
||||
<!-- 主要责任者 -->
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name>
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<substitute>
|
||||
<names variable="composer"/>
|
||||
<names variable="illustrator"/>
|
||||
<names variable="director"/>
|
||||
<choose>
|
||||
<if variable="container-title" match="none">
|
||||
<names variable="editor"/>
|
||||
</if>
|
||||
</choose>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<!-- 书籍的卷号(“第 x 卷”或“第 x 册”) -->
|
||||
<macro name="book-volume">
|
||||
<choose>
|
||||
<if type="article article-journal article-magazine article-newspaper periodical" match="none">
|
||||
<choose>
|
||||
<if is-numeric="volume">
|
||||
<group delimiter=" ">
|
||||
<label variable="volume" form="short" text-case="capitalize-first"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="volume"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<!-- 专著主要责任者 -->
|
||||
<macro name="container-author">
|
||||
<names variable="editor">
|
||||
<name>
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<substitute>
|
||||
<names variable="editorial-director"/>
|
||||
<names variable="collection-editor"/>
|
||||
<names variable="container-author"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<!-- 专著题名 -->
|
||||
<macro name="container-title">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=": ">
|
||||
<choose>
|
||||
<if variable="container-title">
|
||||
<text variable="container-title"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="event"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text macro="book-volume"/>
|
||||
</group>
|
||||
<choose>
|
||||
<if variable="event-date">
|
||||
<date variable="event-date" form="text"/>
|
||||
<text variable="event-place"/>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 版本项 -->
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<!-- 电子资源的更新或修改日期 -->
|
||||
<macro name="issued-date">
|
||||
<date variable="issued" form="numeric"/>
|
||||
</macro>
|
||||
<!-- 出版年 -->
|
||||
<macro name="issued-year">
|
||||
<choose>
|
||||
<if is-uncertain-date="issued">
|
||||
<date variable="issued" prefix="[" suffix="]">
|
||||
<date-part name="year" range-delimiter="-"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<date variable="issued">
|
||||
<date-part name="year" range-delimiter="-"/>
|
||||
</date>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<!-- 专著的出版项 -->
|
||||
<macro name="publishing">
|
||||
<group delimiter=": ">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=": ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
<!-- 非电子资源显示“出版年” -->
|
||||
<choose>
|
||||
<if variable="publisher page" type="book chapter paper-conference thesis" match="any">
|
||||
<text macro="issued-year"/>
|
||||
</if>
|
||||
<else-if variable="URL DOI" match="none">
|
||||
<text macro="issued-year"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
<choose>
|
||||
<!-- 纯电子资源显示“更新或修改日期” -->
|
||||
<if variable="publisher page" type="book chapter paper-conference thesis" match="none">
|
||||
<choose>
|
||||
<if variable="URL DOI" match="any">
|
||||
<text macro="issued-date" prefix="(" suffix=")"/>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
<text macro="accessed-date"/>
|
||||
</macro>
|
||||
<!-- 其他责任者 -->
|
||||
<macro name="secondary-contributor">
|
||||
<names variable="translator">
|
||||
<name>
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<label form="short" prefix=", "/>
|
||||
</names>
|
||||
</macro>
|
||||
<!-- 连续出版物中的析出文献的出处项(年、卷、期等信息) -->
|
||||
<macro name="periodical-publishing">
|
||||
<group>
|
||||
<group delimiter=": ">
|
||||
<group>
|
||||
<group delimiter=", ">
|
||||
<text macro="container-title" text-case="title"/>
|
||||
<choose>
|
||||
<if type="article-newspaper">
|
||||
<text macro="issued-date"/>
|
||||
</if>
|
||||
<else>
|
||||
<text macro="issued-year"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
<text macro="accessed-date"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 题名 -->
|
||||
<macro name="title">
|
||||
<group delimiter=", ">
|
||||
<group delimiter=": ">
|
||||
<text variable="title"/>
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if variable="container-title" type="paper-conference" match="none">
|
||||
<text macro="book-volume"/>
|
||||
</if>
|
||||
</choose>
|
||||
<choose>
|
||||
<if type="bill legal_case legislation patent regulation report standard" match="any">
|
||||
<text variable="number"/>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
</group>
|
||||
<choose>
|
||||
<if variable="container-title" type="paper-conference" match="none">
|
||||
<choose>
|
||||
<if variable="event-date">
|
||||
<text variable="event-place"/>
|
||||
<date variable="event-date" form="text"/>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
<text macro="type-code" prefix="[" suffix="]"/>
|
||||
</macro>
|
||||
<!-- 文献类型标识 -->
|
||||
<macro name="type-code">
|
||||
<group delimiter="/">
|
||||
<choose>
|
||||
<if type="article">
|
||||
<choose>
|
||||
<if variable="archive">
|
||||
<text value="A"/>
|
||||
</if>
|
||||
<else>
|
||||
<text value="M"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
<else-if type="article-journal article-magazine periodical" match="any">
|
||||
<text value="J"/>
|
||||
</else-if>
|
||||
<else-if type="article-newspaper">
|
||||
<text value="N"/>
|
||||
</else-if>
|
||||
<else-if type="bill collection legal_case legislation regulation" match="any">
|
||||
<text value="A"/>
|
||||
</else-if>
|
||||
<else-if type="book chapter" match="any">
|
||||
<text value="M"/>
|
||||
</else-if>
|
||||
<else-if type="dataset">
|
||||
<text value="DS"/>
|
||||
</else-if>
|
||||
<else-if type="map">
|
||||
<text value="CM"/>
|
||||
</else-if>
|
||||
<else-if type="paper-conference">
|
||||
<text value="C"/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text value="P"/>
|
||||
</else-if>
|
||||
<else-if type="post post-weblog webpage" match="any">
|
||||
<text value="EB"/>
|
||||
</else-if>
|
||||
<else-if type="report">
|
||||
<text value="R"/>
|
||||
</else-if>
|
||||
<else-if type="software">
|
||||
<text value="CP"/>
|
||||
</else-if>
|
||||
<else-if type="standard">
|
||||
<text value="S"/>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<text value="D"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text value="Z"/>
|
||||
</else>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="URL DOI" match="any">
|
||||
<text value="OL"/>
|
||||
</if>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 获取和访问路径以及 DOI -->
|
||||
<macro name="url-doi">
|
||||
<group delimiter=". ">
|
||||
<text variable="URL"/>
|
||||
<text variable="DOI" prefix="DOI:"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 连续出版物的年卷期 -->
|
||||
<macro name="year-volume-issue">
|
||||
<group>
|
||||
<group delimiter=", ">
|
||||
<text macro="issued-year"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
<text variable="issue" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 专著和电子资源 -->
|
||||
<macro name="monograph-layout">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
<text macro="secondary-contributor"/>
|
||||
<text macro="edition"/>
|
||||
<text macro="publishing"/>
|
||||
<text macro="url-doi"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 专著中的析出文献 -->
|
||||
<macro name="chapter-in-book-layout">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="author"/>
|
||||
<group delimiter="//">
|
||||
<group delimiter=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="secondary-contributor"/>
|
||||
</group>
|
||||
<group delimiter=". ">
|
||||
<text macro="container-author"/>
|
||||
<text macro="container-title"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="edition"/>
|
||||
<text macro="publishing"/>
|
||||
<text macro="url-doi"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 连续出版物 -->
|
||||
<macro name="serial-layout">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
<text macro="year-volume-issue"/>
|
||||
<text macro="publishing"/>
|
||||
<text variable="URL"/>
|
||||
<text variable="DOI" prefix="DOI:"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 连续出版物中的析出文献 -->
|
||||
<macro name="article-in-periodical-layout">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
<text macro="periodical-publishing"/>
|
||||
<text macro="url-doi"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 专利文献 -->
|
||||
<macro name="patent-layout">
|
||||
<group delimiter=". " suffix=".">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
<group>
|
||||
<text macro="issued-date"/>
|
||||
<text macro="accessed-date"/>
|
||||
</group>
|
||||
<text macro="url-doi"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 正文中引用的文献标注格式 -->
|
||||
<macro name="citation-layout">
|
||||
<group>
|
||||
<text variable="citation-number"/>
|
||||
</group>
|
||||
</macro>
|
||||
<!-- 参考文献表格式 -->
|
||||
<macro name="entry-layout">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper" match="any">
|
||||
<text macro="article-in-periodical-layout"/>
|
||||
</if>
|
||||
<else-if type="periodical">
|
||||
<text macro="serial-layout"/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text macro="patent-layout"/>
|
||||
</else-if>
|
||||
<else-if type="paper-conference" variable="container-title" match="any">
|
||||
<text macro="chapter-in-book-layout"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="monograph-layout"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number" after-collapse-delimiter=",">
|
||||
<layout vertical-align="sup" delimiter="," prefix="[" suffix="]">
|
||||
<text macro="citation-layout"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" second-field-align="flush">
|
||||
<!-- 取消这部分注释可以使用 CSL-M 的功能支持双语 -->
|
||||
<!-- <layout locale="en"><text variable="citation-number" prefix="[" suffix="]"/><text macro="entry-layout"/></layout> -->
|
||||
<layout>
|
||||
<text variable="citation-number" prefix="[" suffix="]"/>
|
||||
<text macro="entry-layout"/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
|
@ -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}
|
|
@ -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}
|
|
@ -0,0 +1,239 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US">
|
||||
<info>
|
||||
<title>Elsevier - Harvard (with titles)</title>
|
||||
<id>http://www.zotero.org/styles/elsevier-harvard</id>
|
||||
<link href="http://www.zotero.org/styles/elsevier-harvard" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/ecology-letters" rel="template"/>
|
||||
<link href="http://www.elsevier.com/journals/biological-conservation/0006-3207/guide-for-authors#68000" rel="documentation"/>
|
||||
<author>
|
||||
<name>David Kaplan</name>
|
||||
<email>david.kaplan@ird.fr</email>
|
||||
</author>
|
||||
<contributor>
|
||||
<name>Simon Kornblith</name>
|
||||
<email>simon@simonster.com</email>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Bruce D'Arcus</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Curtis M. Humphrey</name>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Richard Karnesky</name>
|
||||
<email>karnesky+zotero@gmail.com</email>
|
||||
<uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
|
||||
</contributor>
|
||||
<contributor>
|
||||
<name>Sebastian Karcher</name>
|
||||
</contributor>
|
||||
<category citation-format="author-date"/>
|
||||
<category field="biology"/>
|
||||
<category field="generic-base"/>
|
||||
<updated>2014-03-04T00:09:00+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<macro name="container">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in" prefix=", " suffix=": "/>
|
||||
<names variable="editor translator" delimiter=", " suffix=", ">
|
||||
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
|
||||
</names>
|
||||
<group delimiter=", ">
|
||||
<text variable="container-title" text-case="title"/>
|
||||
<text variable="collection-title" text-case="title"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group prefix=", " delimiter=", ">
|
||||
<text variable="container-title"/>
|
||||
<text variable="collection-title"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group prefix=". " delimiter=", ">
|
||||
<text variable="container-title" form="short"/>
|
||||
<text variable="collection-title"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" prefix=" (" suffix=")" text-case="capitalize-first"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<text macro="title"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="author-short">
|
||||
<names variable="author">
|
||||
<name form="short" and="text" delimiter=", " initialize-with=". "/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" form="short" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" form="short" quotes="true"/>
|
||||
</else>
|
||||
</choose>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="DOI">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else-if type="webpage post-weblog" match="any">
|
||||
<group delimiter=" ">
|
||||
<text value="URL"/>
|
||||
<text variable="URL"/>
|
||||
<group prefix="(" suffix=").">
|
||||
<text term="accessed" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="month" form="numeric" suffix="."/>
|
||||
<date-part name="day" suffix="."/>
|
||||
<date-part name="year" form="short"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="report thesis" match="any">
|
||||
<text variable="title"/>
|
||||
<group prefix=" (" suffix=")" delimiter=" ">
|
||||
<text variable="genre"/>
|
||||
<text variable="number" prefix="No. "/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
|
||||
<text variable="title"/>
|
||||
<text macro="edition" prefix=", "/>
|
||||
</else-if>
|
||||
<else-if type="webpage">
|
||||
<text variable="title"/>
|
||||
<text value="WWW Document" prefix=" [" suffix="]"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="event">
|
||||
<choose>
|
||||
<if variable="event">
|
||||
<text term="presented at" text-case="capitalize-first" suffix=" "/>
|
||||
<text variable="event"/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="issued">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date" form="short"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
<text value="ed"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="locators">
|
||||
<choose>
|
||||
<if type="article-journal article-magazine article-newspaper" match="any">
|
||||
<group prefix=" " delimiter=", ">
|
||||
<group>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
|
||||
<group delimiter=", " prefix=". ">
|
||||
<text macro="event"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter paper-conference" match="any">
|
||||
<group delimiter=", " prefix=". ">
|
||||
<text macro="event"/>
|
||||
<text macro="publisher"/>
|
||||
<group>
|
||||
<label variable="page" form="short" suffix=" "/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text variable="number" prefix=". "/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="issued" sort="descending"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter="; ">
|
||||
<group delimiter=", ">
|
||||
<text macro="author-short"/>
|
||||
<text macro="issued"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="locator" form="short"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
|
||||
<sort>
|
||||
<key macro="author"/>
|
||||
<key macro="issued" sort="descending"/>
|
||||
</sort>
|
||||
<layout>
|
||||
<group suffix=".">
|
||||
<text macro="author" suffix=","/>
|
||||
<text macro="issued" prefix=" "/>
|
||||
<group prefix=". ">
|
||||
<text macro="title"/>
|
||||
<text macro="container"/>
|
||||
<text macro="locators"/>
|
||||
</group>
|
||||
</group>
|
||||
<text macro="access" prefix=". "/>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
|
@ -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}}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-GB">
|
||||
<!-- Generated with https://github.com/citation-style-language/utilities/tree/master/generate_dependent_styles/data/npg -->
|
||||
<info>
|
||||
<title>Nature Biotechnology</title>
|
||||
<id>http://www.zotero.org/styles/nature-biotechnology</id>
|
||||
<link href="http://www.zotero.org/styles/nature-biotechnology" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/nature" rel="independent-parent"/>
|
||||
<link href="http://www.nature.com/nbt/pdf/gta.pdf" rel="documentation"/>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="biology"/>
|
||||
<issn>1087-0156</issn>
|
||||
<eissn>1546-1696</eissn>
|
||||
<updated>2014-06-17T02:29:16+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
</style>
|
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
|
||||
<info>
|
||||
<title>Nature</title>
|
||||
<id>http://www.zotero.org/styles/nature</id>
|
||||
<link href="http://www.zotero.org/styles/nature" rel="self"/>
|
||||
<link href="http://www.nature.com/nature/authors/gta/index.html#a5.4" rel="documentation"/>
|
||||
<link href="http://www.nature.com/srep/publish/guidelines#references" rel="documentation"/>
|
||||
<author>
|
||||
<name>Michael Berkowitz</name>
|
||||
<email>mberkowi@gmu.edu</email>
|
||||
</author>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="science"/>
|
||||
<category field="generic-base"/>
|
||||
<issn>0028-0836</issn>
|
||||
<eissn>1476-4687</eissn>
|
||||
<updated>2022-07-02T13:18:26+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<text variable="title" font-style="italic"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name sort-separator=", " delimiter=", " and="symbol" initialize-with=". " delimiter-precedes-last="never" name-as-sort-order="all"/>
|
||||
<label form="short" prefix=", "/>
|
||||
<et-al font-style="italic"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="access">
|
||||
<choose>
|
||||
<if variable="volume" type="article" match="any"/>
|
||||
<else-if variable="DOI">
|
||||
<text variable="DOI" prefix="doi:"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="issuance">
|
||||
<choose>
|
||||
<if type="bill book graphic legal_case legislation motion_picture song thesis chapter paper-conference" match="any">
|
||||
<group delimiter="; " suffix=".">
|
||||
<group delimiter=", " prefix="(" suffix=")">
|
||||
<text variable="publisher" form="long"/>
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article">
|
||||
<group delimiter=" ">
|
||||
<choose>
|
||||
<if variable="genre" match="any">
|
||||
<text variable="genre" text-case="capitalize-first"/>
|
||||
</if>
|
||||
<else>
|
||||
<text term="article" text-case="capitalize-first"/>
|
||||
</else>
|
||||
</choose>
|
||||
<text term="at"/>
|
||||
<choose>
|
||||
<if variable="DOI" match="any">
|
||||
<text variable="DOI" prefix="https://doi.org/"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="URL"/>
|
||||
</else>
|
||||
</choose>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="report webpage post post-weblog" match="any">
|
||||
<group delimiter=" ">
|
||||
<text variable="URL"/>
|
||||
<date date-parts="year" form="text" variable="issued" prefix="(" suffix=")"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<date variable="issued" prefix="(" suffix=")">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-title">
|
||||
<choose>
|
||||
<if type="article-journal">
|
||||
<text variable="container-title" font-style="italic" form="short"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<names variable="editor" prefix="(" suffix=")">
|
||||
<label form="short" suffix=" "/>
|
||||
<name and="symbol" delimiter-precedes-last="never" initialize-with=". " name-as-sort-order="all"/>
|
||||
</names>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="volume">
|
||||
<choose>
|
||||
<if type="article-journal" match="any">
|
||||
<text variable="volume" font-weight="bold" suffix=","/>
|
||||
</if>
|
||||
<else>
|
||||
<group delimiter=" ">
|
||||
<label variable="volume" form="short"/>
|
||||
<text variable="volume"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout vertical-align="sup" delimiter=",">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography et-al-min="6" et-al-use-first="1" second-field-align="flush" entry-spacing="0" line-spacing="2">
|
||||
<layout suffix=".">
|
||||
<text variable="citation-number" suffix="."/>
|
||||
<group delimiter=" ">
|
||||
<text macro="author" suffix="."/>
|
||||
<text macro="title" suffix="."/>
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in"/>
|
||||
</if>
|
||||
</choose>
|
||||
<text macro="container-title"/>
|
||||
<text macro="editor"/>
|
||||
<text macro="volume"/>
|
||||
<text variable="page"/>
|
||||
<text macro="issuance"/>
|
||||
<text macro="access"/>
|
||||
</group>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
|
@ -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}
|
|
@ -0,0 +1,181 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
|
||||
<info>
|
||||
<title>The ISME Journal</title>
|
||||
<id>http://www.zotero.org/styles/the-isme-journal</id>
|
||||
<link href="http://www.zotero.org/styles/the-isme-journal" rel="self"/>
|
||||
<link href="http://www.zotero.org/styles/journal-of-frailty-and-aging" rel="template"/>
|
||||
<link href="http://www.nature.com/ismej/ismej_new_gta.pdf" rel="documentation"/>
|
||||
<author>
|
||||
<name>Patrick O'Brien</name>
|
||||
<email>obrienpat86@gmail.com</email>
|
||||
</author>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="biology"/>
|
||||
<issn>1751-7362</issn>
|
||||
<eissn>1751-7370</eissn>
|
||||
<summary>The ISME Journal style, which is not the same as for Nature</summary>
|
||||
<updated>2018-03-19T15:30:26+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" strip-periods="true" prefix=" (" suffix=")"/>
|
||||
<substitute>
|
||||
<names variable="editor"/>
|
||||
<names variable="translator"/>
|
||||
</substitute>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<text term="in" text-case="capitalize-first" suffix=": "/>
|
||||
<names variable="editor">
|
||||
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
|
||||
<label form="short" strip-periods="true" prefix=" (" suffix=")."/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<choose>
|
||||
<if is-numeric="edition">
|
||||
<group delimiter=" ">
|
||||
<number variable="edition" form="ordinal"/>
|
||||
<text term="edition" form="short" strip-periods="true"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="edition"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="book">
|
||||
<group delimiter=", " suffix=". ">
|
||||
<text variable="title"/>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="title" suffix=". "/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="publisher">
|
||||
<group delimiter=", ">
|
||||
<text variable="publisher"/>
|
||||
<text variable="publisher-place"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<date variable="issued">
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</macro>
|
||||
<citation collapse="citation-number">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout prefix="[" suffix="]" delimiter=", ">
|
||||
<text variable="citation-number"/>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography et-al-min="7" et-al-use-first="6" second-field-align="flush" line-spacing="2" entry-spacing="0">
|
||||
<layout>
|
||||
<text variable="citation-number" suffix=". "/>
|
||||
<group delimiter=". ">
|
||||
<text macro="author"/>
|
||||
<text macro="title"/>
|
||||
</group>
|
||||
<choose>
|
||||
<if type="chapter">
|
||||
<text macro="editor"/>
|
||||
<group delimiter=". " suffix=". ">
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text variable="container-title" font-style="italic"/>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
<text macro="year-date"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="page" form="short" strip-periods="true"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="paper-conference">
|
||||
<text macro="editor"/>
|
||||
<group delimiter=". " suffix=". ">
|
||||
<group prefix=" " delimiter=", ">
|
||||
<text variable="container-title" form="short" font-style="italic"/>
|
||||
<text macro="edition"/>
|
||||
</group>
|
||||
<text macro="year-date"/>
|
||||
<group delimiter=", ">
|
||||
<text macro="publisher"/>
|
||||
<group delimiter=" ">
|
||||
<label variable="page" form="short" strip-periods="true"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-journal">
|
||||
<group delimiter="; " suffix=". ">
|
||||
<group delimiter=" ">
|
||||
<text variable="container-title" suffix=" " form="short" strip-periods="true" font-style="italic"/>
|
||||
<text macro="year-date"/>
|
||||
</group>
|
||||
<group delimiter=": ">
|
||||
<text variable="volume" font-weight="bold"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
||||
<group delimiter=". " suffix=". ">
|
||||
<text variable="container-title" suffix=" " font-style="italic"/>
|
||||
<text macro="year-date"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="webpage">
|
||||
<group suffix=". ">
|
||||
<text variable="container-title" suffix=". " font-style="italic"/>
|
||||
<text variable="URL" suffix=". "/>
|
||||
<date variable="accessed">
|
||||
<date-part prefix="Accessed " name="day" suffix=" "/>
|
||||
<date-part name="month" form="short" suffix=" " strip-periods="true"/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group delimiter=". " suffix=". ">
|
||||
<text variable="container-title" suffix=" " font-style="italic"/>
|
||||
<text macro="year-date"/>
|
||||
<group delimiter=", ">
|
||||
<text variable="genre"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group>
|
||||
<group delimiter=". " suffix=". ">
|
||||
<text variable="container-title" form="short" suffix=" " strip-periods="true" font-style="italic"/>
|
||||
<text macro="year-date"/>
|
||||
<text macro="publisher"/>
|
||||
</group>
|
||||
<group prefix=", " delimiter=": ">
|
||||
<text variable="volume" font-weight="bold"/>
|
||||
<text variable="page"/>
|
||||
</group>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
|
@ -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$
|
|
@ -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
|
|
@ -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"
|
|
@ -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$
|
||||
|
|
@ -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$
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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.
|
||||
|
||||
<signature of Ty Coon>, 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.
|
||||
|
|
@ -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 <dbmiller@dbmiller.org>
|
|
@ -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}
|