tidy all extensions
|
@ -1,280 +0,0 @@
|
|||
% Options for packages loaded elsewhere
|
||||
% Options for packages loaded elsewhere
|
||||
\PassOptionsToPackage{unicode}{hyperref}
|
||||
\PassOptionsToPackage{hyphens}{url}
|
||||
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
|
||||
%
|
||||
\documentclass[
|
||||
english,
|
||||
12pt,
|
||||
letterpaper,
|
||||
DIV=11,
|
||||
numbers=noendperiod]{scrartcl}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
|
||||
\usepackage{iftex}
|
||||
\ifPDFTeX
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{textcomp} % provide euro and other symbols
|
||||
\else % if luatex or xetex
|
||||
\usepackage{unicode-math} % this also loads fontspec
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
||||
\fi
|
||||
\usepackage{lmodern}
|
||||
\ifPDFTeX\else
|
||||
% xetex/luatex font selection
|
||||
\fi
|
||||
% Use upquote if available, for straight quotes in verbatim environments
|
||||
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
||||
\IfFileExists{microtype.sty}{% use microtype if available
|
||||
\usepackage[]{microtype}
|
||||
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
||||
}{}
|
||||
\makeatletter
|
||||
\@ifundefined{KOMAClassName}{% if non-KOMA class
|
||||
\IfFileExists{parskip.sty}{%
|
||||
\usepackage{parskip}
|
||||
}{% else
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
|
||||
}{% if KOMA class
|
||||
\KOMAoptions{parskip=half}}
|
||||
\makeatother
|
||||
% Make \paragraph and \subparagraph free-standing
|
||||
\makeatletter
|
||||
\ifx\paragraph\undefined\else
|
||||
\let\oldparagraph\paragraph
|
||||
\renewcommand{\paragraph}{
|
||||
\@ifstar
|
||||
\xxxParagraphStar
|
||||
\xxxParagraphNoStar
|
||||
}
|
||||
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
|
||||
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
|
||||
\fi
|
||||
\ifx\subparagraph\undefined\else
|
||||
\let\oldsubparagraph\subparagraph
|
||||
\renewcommand{\subparagraph}{
|
||||
\@ifstar
|
||||
\xxxSubParagraphStar
|
||||
\xxxSubParagraphNoStar
|
||||
}
|
||||
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
|
||||
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
|
||||
\fi
|
||||
\makeatother
|
||||
|
||||
|
||||
\usepackage{longtable,booktabs,array}
|
||||
\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}
|
||||
\usepackage{graphicx}
|
||||
\makeatletter
|
||||
\newsavebox\pandoc@box
|
||||
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
|
||||
\sbox\pandoc@box{#1}%
|
||||
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
|
||||
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
|
||||
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
|
||||
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
|
||||
\else\usebox{\pandoc@box}%
|
||||
\fi%
|
||||
}
|
||||
% Set default figure placement to htbp
|
||||
\def\fps@figure{htbp}
|
||||
\makeatother
|
||||
|
||||
|
||||
|
||||
\ifLuaTeX
|
||||
\usepackage[bidi=basic]{babel}
|
||||
\else
|
||||
\usepackage[bidi=default]{babel}
|
||||
\fi
|
||||
% get rid of language-specific shorthands (see #6817):
|
||||
\let\LanguageShortHands\languageshorthands
|
||||
\def\languageshorthands#1{}
|
||||
\ifLuaTeX
|
||||
\usepackage[english]{selnolig} % disable illegal ligatures
|
||||
\fi
|
||||
|
||||
|
||||
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
||||
|
||||
\providecommand{\tightlist}{%
|
||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\KOMAoption{captions}{tableheading}
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{sfg}{h}{lost}}{\newfloat{sfg}{h}{lost}[chapter]}
|
||||
\floatname{sfg}{Supplementary Fig.}
|
||||
\newcommand*\listofsfgs{\listof{sfg}{List of Supplementary Figures}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{stb}{h}{lost}}{\newfloat{stb}{h}{lost}[chapter]}
|
||||
\floatname{stb}{Supplementary Table}
|
||||
\newcommand*\listofstbs{\listof{stb}{List of Supplementary Tables}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{seq}{h}{lost}}{\newfloat{seq}{h}{lost}[chapter]}
|
||||
\floatname{seq}{Supplementary Eq.}
|
||||
\newcommand*\listofseqs{\listof{seq}{List of Supplementary Equations}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{rfg}{h}{lost}}{\newfloat{rfg}{h}{lost}[chapter]}
|
||||
\floatname{rfg}{Fig. R}
|
||||
\newcommand*\quartorfgref[1]{Fig. \hyperref[#1]{R\ref{#1}}}
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\DeclareCaptionLabelFormat{quartorfgreflabelformat}{#1#2}
|
||||
\captionsetup[rfg]{labelformat=quartorfgreflabelformat}
|
||||
\newcommand*\listofrfgs{\listof{rfg}{List of Revision Figures}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{rtb}{h}{lost}}{\newfloat{rtb}{h}{lost}[chapter]}
|
||||
\floatname{rtb}{Table R}
|
||||
\newcommand*\quartortbref[1]{Table \hyperref[#1]{R\ref{#1}}}
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\DeclareCaptionLabelFormat{quartortbreflabelformat}{#1#2}
|
||||
\captionsetup[rtb]{labelformat=quartortbreflabelformat}
|
||||
\newcommand*\listofrtbs{\listof{rtb}{List of Revision Tables}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{plain}
|
||||
\@ifundefined{c@chapter}{\newfloat{req}{h}{lost}}{\newfloat{req}{h}{lost}[chapter]}
|
||||
\floatname{req}{Eq R}
|
||||
\newcommand*\quartoreqref[1]{Eq \hyperref[#1]{R\ref{#1}}}
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\DeclareCaptionLabelFormat{quartoreqreflabelformat}{#1#2}
|
||||
\captionsetup[req]{labelformat=quartoreqreflabelformat}
|
||||
\newcommand*\listofreqs{\listof{req}{List of Revision Equations}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\AtBeginDocument{%
|
||||
\ifdefined\contentsname
|
||||
\renewcommand*\contentsname{Table of contents}
|
||||
\else
|
||||
\newcommand\contentsname{Table of contents}
|
||||
\fi
|
||||
\ifdefined\listfigurename
|
||||
\renewcommand*\listfigurename{List of Figures}
|
||||
\else
|
||||
\newcommand\listfigurename{List of Figures}
|
||||
\fi
|
||||
\ifdefined\listtablename
|
||||
\renewcommand*\listtablename{List of Tables}
|
||||
\else
|
||||
\newcommand\listtablename{List of Tables}
|
||||
\fi
|
||||
\ifdefined\figurename
|
||||
\renewcommand*\figurename{Fig.}
|
||||
\else
|
||||
\newcommand\figurename{Fig.}
|
||||
\fi
|
||||
\ifdefined\tablename
|
||||
\renewcommand*\tablename{Table}
|
||||
\else
|
||||
\newcommand\tablename{Table}
|
||||
\fi
|
||||
}
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{ruled}
|
||||
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
|
||||
\floatname{codelisting}{Listing}
|
||||
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
|
||||
\captionsetup{labelsep=colon}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
|
||||
\makeatother
|
||||
\usepackage{bookmark}
|
||||
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
||||
\urlstyle{same}
|
||||
\hypersetup{
|
||||
pdftitle={MANUSCRIPT TITLE},
|
||||
pdfauthor={, , and },
|
||||
pdflang={en},
|
||||
colorlinks=true,
|
||||
linkcolor={blue},
|
||||
filecolor={Maroon},
|
||||
citecolor={Blue},
|
||||
urlcolor={Blue},
|
||||
pdfcreator={LaTeX via pandoc}}
|
||||
|
||||
|
||||
\title{MANUSCRIPT TITLE}
|
||||
\usepackage{etoolbox}
|
||||
\makeatletter
|
||||
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
|
||||
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
|
||||
}
|
||||
\makeatother
|
||||
\subtitle{Supplementary Information}
|
||||
\author{Xxxxx Yyyy\textsuperscript{a,\#} \and Ming
|
||||
Su\textsuperscript{a,b,\#,*} \and Min Yang\textsuperscript{a,b,*}}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
|
||||
\textsuperscript{\#} These authors contributed equally to this work.
|
||||
|
||||
\textsuperscript{a} State Key Laboratory of Environmental Aquatic
|
||||
Chemistry, Research Center for Eco-Environmental Sciences, Chinese
|
||||
Academy of Sciences, Beijing 100085, China.\\
|
||||
\textsuperscript{b} University of Chinese Academy of Sciences, Beijing
|
||||
100049, China.
|
||||
|
||||
\textsuperscript{*} Corresponding to:
|
||||
\href{mailto:mingsu@rcees.ac.cn}{Ming Su (mingsu@rcees.ac.cn)},
|
||||
\href{mailto:yangmin@rcees.ac.cn}{Min Yang (yangmin@rcees.ac.cn)}
|
||||
|
||||
\newpage{}
|
||||
|
||||
\section*{Abstract}\label{abstract}
|
||||
\addcontentsline{toc}{section}{Abstract}
|
||||
|
||||
\newpage{}
|
||||
|
||||
\newpage{}
|
||||
|
||||
\section*{References}\label{references}
|
||||
\addcontentsline{toc}{section}{References}
|
||||
|
||||
\phantomsection\label{refs}
|
||||
|
||||
\newpage{}
|
||||
|
||||
|
||||
|
||||
|
||||
\end{document}
|
|
@ -1,16 +0,0 @@
|
|||
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 @@
|
|||
_extensions/drwater/authoraffil/_extension.yaml
|
|
@ -1,75 +0,0 @@
|
|||
--[[
|
||||
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 @@
|
|||
_extensions/drwater/authoraffil/authoraffil.lua
|
|
@ -1,297 +0,0 @@
|
|||
--[[
|
||||
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 @@
|
|||
_extensions/drwater/authoraffil/from_author_info_blocks.lua
|
|
@ -1,51 +0,0 @@
|
|||
--[[
|
||||
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 @@
|
|||
_extensions/drwater/authoraffil/from_scholarly_metadata.lua
|
|
@ -72,7 +72,7 @@ format:
|
|||
pdf:
|
||||
fontsize: 12pt
|
||||
keep-md: false
|
||||
keep-tex: true
|
||||
keep-tex: false
|
||||
filters:
|
||||
# - latex-environment
|
||||
- authoraffil
|
|
@ -1,49 +0,0 @@
|
|||
--[[
|
||||
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 @@
|
|||
_extensions/drwater/authoraffil/utils.lua
|
|
@ -1,47 +0,0 @@
|
|||
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 @@
|
|||
_extensions/drwater/dwbk/_extension.yml
|
|
@ -101,7 +101,7 @@
|
|||
% 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/dwbk/rceeslogo.png}
|
||||
\color{light}\includegraphics[width=1.5cm]{_extensions/drwater/dwbk/inst/rceeslogo.pdf}
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslogo.pdf
|
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslogo.svg
|
Before Width: | Height: | Size: 80 KiB |
105
dwbk/header.tex
|
@ -1,105 +0,0 @@
|
|||
% -----------------------
|
||||
% 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/dwbk/rceeslogo.png}
|
||||
}%
|
||||
}%
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
_extensions/drwater/dwbk/header.tex
|
|
@ -0,0 +1 @@
|
|||
_extensions/drwater/dwbk/partials
|
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 9.7 KiB |
|
@ -1,12 +0,0 @@
|
|||
.Rproj.user
|
||||
.Rhistory
|
||||
.RData
|
||||
.Ruserdata
|
||||
site_libs/
|
||||
/.quarto/
|
||||
site_libs/
|
||||
BB/Ref.bib
|
||||
_variables.yml
|
||||
_freeze/
|
||||
www/
|
||||
.source_state
|
|
@ -1,15 +0,0 @@
|
|||
title: PrettyPDF
|
||||
author: Nicola Rennie
|
||||
version: 0.0.5
|
||||
contributes:
|
||||
formats:
|
||||
pdf:
|
||||
documentclass: scrbook
|
||||
include-in-header:
|
||||
- "header.tex"
|
||||
include-before-body:
|
||||
- "partials/before-body.tex"
|
||||
toc: false
|
||||
code-block-bg: light
|
||||
linkcolor: highlight
|
||||
urlcolor: highlight
|
|
@ -1,15 +0,0 @@
|
|||
title: PrettyPDF
|
||||
author: Nicola Rennie
|
||||
version: 0.0.5
|
||||
contributes:
|
||||
formats:
|
||||
pdf:
|
||||
documentclass: scrbook
|
||||
include-in-header:
|
||||
- "header.tex"
|
||||
include-before-body:
|
||||
- "partials/before-body.tex"
|
||||
toc: false
|
||||
code-block-bg: light
|
||||
linkcolor: highlight
|
||||
urlcolor: highlight
|
|
@ -1,69 +0,0 @@
|
|||
\usepackage{geometry}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{eso-pic}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{tikz}
|
||||
\usepackage{fontspec}
|
||||
\usepackage{microtype}
|
||||
\usepackage{etoolbox}
|
||||
|
||||
% 修复spacefactor问题的关键补丁
|
||||
\makeatletter
|
||||
\patchcmd{\@makechapterhead}
|
||||
{\vspace\@tempskipa}
|
||||
{\vspace\@tempskipa\par\nobreak}
|
||||
{}{}
|
||||
\makeatother
|
||||
|
||||
% 页面布局设置
|
||||
\geometry{
|
||||
left=30mm,
|
||||
right=30mm,
|
||||
top=25mm,
|
||||
bottom=25mm,
|
||||
headheight=15pt
|
||||
}
|
||||
|
||||
% 颜色定义
|
||||
\definecolor{light}{HTML}{ECF1EC}
|
||||
\definecolor{highlight}{HTML}{800080}
|
||||
\definecolor{dark}{HTML}{330033}
|
||||
\definecolor{coverbg}{HTML}{F0F0F0}
|
||||
|
||||
% 安全的封面设计
|
||||
\renewcommand{\maketitle}{%
|
||||
\begin{titlepage}
|
||||
\AddToShipoutPictureBG*{%
|
||||
\AtPageLowerLeft{%
|
||||
\begin{tikzpicture}[remember picture, overlay]
|
||||
\fill[color=coverbg] (0,0) rectangle (\paperwidth,\paperheight);
|
||||
\node[anchor=north east, xshift=-15mm, yshift=-15mm]
|
||||
at (current page.north east)
|
||||
{\includegraphics[width=8cm]{logo.png}};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
}
|
||||
\vspace*{3cm}
|
||||
\begin{center}
|
||||
{\fontsize{28}{36}\selectfont\bfseries\color{dark}\@title}\\[2cm]
|
||||
{\LARGE\@subtitle}\\[3cm]
|
||||
{\Large\@author}\\[2cm]
|
||||
{\large\@date}
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
}
|
||||
|
||||
% 页眉页脚设置
|
||||
\fancypagestyle{mainstyle}{%
|
||||
\fancyhf{}
|
||||
\fancyhead[RE]{\normalfont\small\leftmark}
|
||||
\fancyhead[LO]{\normalfont\small\rightmark}
|
||||
\fancyfoot[C]{\thepage}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
}
|
||||
|
||||
% 应用样式
|
||||
\pagestyle{mainstyle}
|
||||
\addtokomafont{chapter}{\color{dark}\Huge\bfseries}
|
||||
\addtokomafont{section}{\color{dark}\Large\bfseries}
|
||||
\addtokomafont{subsection}{\color{dark}\large\bfseries}
|
Before Width: | Height: | Size: 81 KiB |
|
@ -1 +0,0 @@
|
|||
\pagestyle{mystyle}
|
14
dwbken/a.aux
|
@ -1,14 +0,0 @@
|
|||
\relax
|
||||
\providecommand*\new@tpo@label[2]{}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {0.1}Zbirka vaj fizike za studente gradbenistva}{3}{}\protected@file@percent }
|
||||
\newlabel{sec:zbirka-vaj-fizike}{{0.1}{3}{Zbirka vaj fizike za studente gradbenistva}{section.0.1}{}}
|
||||
\newlabel{k-umm}{{0.1}{3}{Zbirka vaj fizike za studente gradbenistva}{equation.0.1}{}}
|
||||
\newlabel{k-uamm1}{{0.2}{3}{Zbirka vaj fizike za studente gradbenistva}{equation.0.2}{}}
|
||||
\newlabel{k-uamm2}{{0.3}{3}{Zbirka vaj fizike za studente gradbenistva}{equation.0.3}{}}
|
||||
\newlabel{k-uamm3}{{0.4}{3}{Zbirka vaj fizike za studente gradbenistva}{equation.0.4}{}}
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Poševni met}}{3}{}\protected@file@percent }
|
||||
\newlabel{k-prsx}{{0.5}{4}{Zbirka vaj fizike za studente gradbenistva}{equation.0.5}{}}
|
||||
\newlabel{k-prsy}{{0.6}{4}{Zbirka vaj fizike za studente gradbenistva}{equation.0.6}{}}
|
||||
\newlabel{k-prvx}{{0.7}{4}{Zbirka vaj fizike za studente gradbenistva}{equation.0.7}{}}
|
||||
\newlabel{k-prvy}{{0.8}{4}{Zbirka vaj fizike za studente gradbenistva}{equation.0.8}{}}
|
||||
\gdef \@abspage@last{2}
|
BIN
dwbken/a.pdf
81
dwbken/a.tex
|
@ -1,81 +0,0 @@
|
|||
\documentclass[12pt,parskip=half, DIV=calc, BCOR=10mm, x11names]{scrbook}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{lmodern, libertine}
|
||||
\usepackage{amsmath, xcolor, tcolorbox, empheq}
|
||||
\usepackage[ilines, headsepline]{scrpage2}
|
||||
\setheadwidth[0pt]{textwithmarginpar}
|
||||
|
||||
%\input{slike_1} % TikZ pictures
|
||||
\clearscrheadfoot
|
||||
\ihead{\headmark}
|
||||
\ohead{\pagemark}
|
||||
|
||||
\setcounter{page}{3}
|
||||
|
||||
\addtokomafont{pagenumber}{\bfseries\Large\color{LightBlue4}}
|
||||
\addtokomafont{pagehead}{\color{LightBlue4}}
|
||||
|
||||
\renewcommand{\textit}[1]{\textcolor{LightBlue4}{\emph{#1}}}
|
||||
%\tcbuselibrary{skins,breakable}
|
||||
\tcbuselibrary{theorems}
|
||||
\tcbset{colback=blue!60!green!10!white,
|
||||
colframe=LightBlue4!50!black, ams nodisplayskip}
|
||||
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
\pagestyle{scrheadings}
|
||||
|
||||
\section{Zbirka vaj fizike za studente gradbenistva}
|
||||
\label{sec:zbirka-vaj-fizike}
|
||||
|
||||
|
||||
\textit{Enakomerno večdimenzionalno gibanje} označuje gibanje, pri katerem je vektor hitrosti konstanten. Gibanje tem primeru opisuje enačba, ki je posplošitev enačbe~(...)
|
||||
%
|
||||
|
||||
\begin{equation}
|
||||
\tcboxmath{\vec{r} = \vec{v} t + \vec{r}_0,\label{k-umm}}
|
||||
\end{equation}
|
||||
|
||||
|
||||
%
|
||||
kjer $\vec{r}$ označuje trenutni, $\vec{r}_0$ pa začetni položaj telesa. Vektorju $\text{r}$, ki označuje položaj telesa, pravimo tudi \textit{krajevni vektor}.
|
||||
|
||||
\textit{Enakomerno pospešeno večdimenzionalno gibanje} označuje gibanje, pri katerem je vektor pospeška~$\vec{a}$ konstanten. Gibanje v tem primeru opisujejo enačbe, ki so posplošitve enačb~(...)
|
||||
%
|
||||
|
||||
\begin{empheq}[box={\tcbhighmath[colback=blue!60!green!10!white,
|
||||
colframe=LightBlue4!50!black]}]{align}
|
||||
\vec{r} &= \tfrac{1}{2} \vec{a} t^2 + \vec{v}_0 t + \vec{r}_0\label{k-uamm1}\\
|
||||
\vec{v} &= \vec{a} t + \vec{v}_0 \label{k-uamm2}\\
|
||||
v^2 &= v_0^2 + 2 \vec{a} \cdot (\vec{r} - \vec{r}_0) \label{k-uamm3}
|
||||
\end{empheq}
|
||||
|
||||
|
||||
%
|
||||
kjer so $\vec{r}$ trenutni in $\vec{r}_0$ začetni krajevni vektor telesa, ter $\vec{v}$ trenutni in $\vec{v}_0$ začetni vektor hitrosti telesa. Pri tem je tretja enačba izpeljana iz prvih dveh.
|
||||
|
||||
\begin{figure}[!ht]
|
||||
\centering
|
||||
%\Tpro
|
||||
\caption{Poševni met}
|
||||
\end{figure}
|
||||
|
||||
Če se telo nahaja v bližini Zemeljske površine, nanj deluje konstantni pospešek prostega pada $g = 10$~m/s$^2$ navpično navzdol. Vsako tako gibanje telesa je dejansko \textit{dvo}-dimenzionalno, saj se telo giblje po navpični ravnini. Po dogovoru $y$~os usmerimo navpično navzgor, torej nasproti smeri pospeška prostega pada ($\vec{a} = - g \vec{j}$), $x$~os pa tako, da začetna hitrost leži v $xy$ ravnini $\vec{v}_0 = v_{x0} \vec{i} + v_{y0} \vec{j}$. Potem lahko vsako od enačb~(...) razstavimo na \textit{dve} skalarni enačbi in dobimo
|
||||
%
|
||||
|
||||
\begin{empheq}[box={\tcbhighmath[colback=blue!60!green!10!white,
|
||||
colframe=LightBlue4!50!black]}]{align}
|
||||
x(t) &= v_{x0} t + x_0, \label{k-prsx}\\
|
||||
y(t) &= -\tfrac{1}{2} g t^2 + v_{y0} t + y_0, \label{k-prsy}\\
|
||||
v_x(t) &= v_{x0}, \label{k-prvx}\\
|
||||
v_y(t) &= -g t + v_{y0}. \label{k-prvy}
|
||||
\end{empheq}
|
||||
|
||||
|
||||
|
||||
Pri tem smo upoštevali, da je pospešek v $x$~smeri enak $a_x = 0$, pospešek v $y$~smeri pa $a_y = -g$, kar pomeni, da imamo v $x$~smeri enakomerno gibanje, v $y$~smeri pa enakomerno pospešeno gibanje.
|
||||
|
||||
\end{document}
|
|
@ -1,3 +0,0 @@
|
|||
\contentsline {chapter}{\numberline {1}引言}{1}{}%
|
||||
\contentsline {section}{\numberline {1.1}研究背景}{1}{}%
|
||||
\providecommand \tocbasic@end@toc@file {}\tocbasic@end@toc@file
|
|
@ -1,69 +0,0 @@
|
|||
\usepackage{geometry}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{eso-pic}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{tikz}
|
||||
\usepackage{fontspec}
|
||||
\usepackage{sectsty}
|
||||
\usepackage{titlesec}
|
||||
|
||||
% 设置页面布局
|
||||
\geometry{a4paper,
|
||||
total={170mm,257mm},
|
||||
left=30mm,
|
||||
top=25mm,
|
||||
bottom=25mm,
|
||||
right=30mm,
|
||||
headheight=15pt}
|
||||
|
||||
% 定义颜色
|
||||
\definecolor{light}{HTML}{ECF1EC}
|
||||
\definecolor{highlight}{HTML}{800080}
|
||||
\definecolor{dark}{HTML}{330033}
|
||||
\definecolor{coverbg}{HTML}{F0F0F0} % 封面背景灰
|
||||
|
||||
% 封面设计
|
||||
\AddToShipoutPictureBG*{% 仅作用于封面
|
||||
\AtPageLowerLeft{
|
||||
\begin{tikzpicture}[remember picture, overlay]
|
||||
\fill[color=coverbg] (0,0) rectangle (\paperwidth,\paperheight);
|
||||
\node[anchor=north east] at (0.95\paperwidth,0.9\paperheight)
|
||||
{\includegraphics[width=8cm]{logo.png}};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
}
|
||||
|
||||
% 正文页眉页脚
|
||||
\fancypagestyle{mainstyle}{
|
||||
\fancyhf{}
|
||||
\fancyhead[RE]{\normalfont\small\leftmark} % 偶数页章标题
|
||||
\fancyhead[LO]{\normalfont\small\rightmark} % 奇数页节标题
|
||||
\fancyfoot[C]{\thepage}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0pt}
|
||||
}
|
||||
|
||||
% 章节标题样式
|
||||
\addtokomafont{chapter}{\color{dark}\Huge\bfseries}
|
||||
\addtokomafont{section}{\color{dark}\Large\bfseries}
|
||||
\addtokomafont{subsection}{\color{dark}\large\bfseries}
|
||||
|
||||
% 标题格式调整
|
||||
\RedeclareSectionCommand[
|
||||
beforeskip=-1sp,
|
||||
afterskip=1sp
|
||||
]{chapter}
|
||||
|
||||
% 自定义标题页
|
||||
\renewcommand{\maketitle}{%
|
||||
\begin{titlepage}
|
||||
\ThisCenterWallPaper{1.0}{logo.png} % 封面背景图
|
||||
\vspace*{3cm}
|
||||
\begin{center}
|
||||
{\fontsize{28}{36}\selectfont\bfseries\color{dark} \@title}\\[2cm]
|
||||
{\LARGE \@subtitle}\\[3cm]
|
||||
{\Large \@author}\\[2cm]
|
||||
{\large \@date}
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
}
|
BIN
dwbken/logo.png
Before Width: | Height: | Size: 81 KiB |
|
@ -1 +0,0 @@
|
|||
\pagestyle{mystyle}
|
|
@ -1,4 +0,0 @@
|
|||
\relax
|
||||
\providecommand*\new@tpo@label[2]{}
|
||||
\providecommand\hyper@newdestlabel[2]{}
|
||||
\providecommand*\HyPL@Entry[1]{}
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
title: "Pretty PDFs with Quarto"
|
||||
author: Ming Su
|
||||
format:
|
||||
dwbken-pdf: default
|
||||
---
|
||||
|
||||
# Quarto
|
||||
|
||||
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
|
||||
|
||||
## Running Code
|
||||
|
||||
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
|
||||
|
||||
```{r}
|
||||
1 + 1
|
||||
```
|
||||
|
||||
You can add options to executable code like this
|
||||
|
||||
```{r}
|
||||
#| echo: false
|
||||
2 * 2
|
||||
```
|
||||
|
||||
The `echo: false` option disables the printing of code (only output is displayed).
|
|
@ -1,329 +0,0 @@
|
|||
% Options for packages loaded elsewhere
|
||||
% Options for packages loaded elsewhere
|
||||
\PassOptionsToPackage{unicode}{hyperref}
|
||||
\PassOptionsToPackage{hyphens}{url}
|
||||
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
|
||||
%
|
||||
\documentclass[
|
||||
]{scrbook}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\setcounter{secnumdepth}{5}
|
||||
\usepackage{iftex}
|
||||
\ifPDFTeX
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{textcomp} % provide euro and other symbols
|
||||
\else % if luatex or xetex
|
||||
\usepackage{unicode-math} % this also loads fontspec
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
||||
\fi
|
||||
\usepackage{lmodern}
|
||||
\ifPDFTeX\else
|
||||
% xetex/luatex font selection
|
||||
\fi
|
||||
% Use upquote if available, for straight quotes in verbatim environments
|
||||
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
||||
\IfFileExists{microtype.sty}{% use microtype if available
|
||||
\usepackage[]{microtype}
|
||||
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
||||
}{}
|
||||
\makeatletter
|
||||
\@ifundefined{KOMAClassName}{% if non-KOMA class
|
||||
\IfFileExists{parskip.sty}{%
|
||||
\usepackage{parskip}
|
||||
}{% else
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
|
||||
}{% if KOMA class
|
||||
\KOMAoptions{parskip=half}}
|
||||
\makeatother
|
||||
% Make \paragraph and \subparagraph free-standing
|
||||
\makeatletter
|
||||
\ifx\paragraph\undefined\else
|
||||
\let\oldparagraph\paragraph
|
||||
\renewcommand{\paragraph}{
|
||||
\@ifstar
|
||||
\xxxParagraphStar
|
||||
\xxxParagraphNoStar
|
||||
}
|
||||
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
|
||||
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
|
||||
\fi
|
||||
\ifx\subparagraph\undefined\else
|
||||
\let\oldsubparagraph\subparagraph
|
||||
\renewcommand{\subparagraph}{
|
||||
\@ifstar
|
||||
\xxxSubParagraphStar
|
||||
\xxxSubParagraphNoStar
|
||||
}
|
||||
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
|
||||
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
|
||||
\fi
|
||||
\makeatother
|
||||
|
||||
\usepackage{color}
|
||||
\usepackage{fancyvrb}
|
||||
\newcommand{\VerbBar}{|}
|
||||
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
|
||||
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
|
||||
% Add ',fontsize=\small' for more characters per line
|
||||
\usepackage{framed}
|
||||
\definecolor{shadecolor}{RGB}{241,243,245}
|
||||
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
|
||||
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
|
||||
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}}
|
||||
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
|
||||
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
|
||||
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
|
||||
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
|
||||
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
|
||||
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}}
|
||||
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
|
||||
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
|
||||
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}}
|
||||
\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}}
|
||||
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
|
||||
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}}
|
||||
\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
|
||||
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
|
||||
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
|
||||
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
|
||||
\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
|
||||
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
|
||||
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
|
||||
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
|
||||
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}}
|
||||
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
|
||||
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
|
||||
|
||||
\usepackage{longtable,booktabs,array}
|
||||
\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}
|
||||
\usepackage{graphicx}
|
||||
\makeatletter
|
||||
\newsavebox\pandoc@box
|
||||
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
|
||||
\sbox\pandoc@box{#1}%
|
||||
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
|
||||
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
|
||||
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
|
||||
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
|
||||
\else\usebox{\pandoc@box}%
|
||||
\fi%
|
||||
}
|
||||
% Set default figure placement to htbp
|
||||
\def\fps@figure{htbp}
|
||||
\makeatother
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
||||
|
||||
\providecommand{\tightlist}{%
|
||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\usepackage{geometry}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{eso-pic}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{tikz}
|
||||
\usepackage{fontspec}
|
||||
\usepackage{microtype}
|
||||
\usepackage{etoolbox}
|
||||
|
||||
% 修复spacefactor问题的关键补丁
|
||||
\makeatletter
|
||||
\patchcmd{\@makechapterhead}
|
||||
{\vspace\@tempskipa}
|
||||
{\vspace\@tempskipa\par\nobreak}
|
||||
{}{}
|
||||
\makeatother
|
||||
|
||||
% 页面布局设置
|
||||
\geometry{
|
||||
left=30mm,
|
||||
right=30mm,
|
||||
top=25mm,
|
||||
bottom=25mm,
|
||||
headheight=15pt
|
||||
}
|
||||
|
||||
% 颜色定义
|
||||
\definecolor{light}{HTML}{ECF1EC}
|
||||
\definecolor{highlight}{HTML}{800080}
|
||||
\definecolor{dark}{HTML}{330033}
|
||||
\definecolor{coverbg}{HTML}{F0F0F0}
|
||||
|
||||
% 安全的封面设计
|
||||
\renewcommand{\maketitle}{%
|
||||
\begin{titlepage}
|
||||
\AddToShipoutPictureBG*{%
|
||||
\AtPageLowerLeft{%
|
||||
\begin{tikzpicture}[remember picture, overlay]
|
||||
\fill[color=coverbg] (0,0) rectangle (\paperwidth,\paperheight);
|
||||
\node[anchor=north east, xshift=-15mm, yshift=-15mm]
|
||||
at (current page.north east)
|
||||
{\includegraphics[width=8cm]{logo.png}};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
}
|
||||
\vspace*{3cm}
|
||||
\begin{center}
|
||||
{\fontsize{28}{36}\selectfont\bfseries\color{dark}\@title}\\[2cm]
|
||||
{\LARGE\@subtitle}\\[3cm]
|
||||
{\Large\@author}\\[2cm]
|
||||
{\large\@date}
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
}
|
||||
|
||||
% 页眉页脚设置
|
||||
\fancypagestyle{mainstyle}{%
|
||||
\fancyhf{}
|
||||
\fancyhead[RE]{\normalfont\small\leftmark}
|
||||
\fancyhead[LO]{\normalfont\small\rightmark}
|
||||
\fancyfoot[C]{\thepage}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
}
|
||||
|
||||
% 应用样式
|
||||
\pagestyle{mainstyle}
|
||||
\addtokomafont{chapter}{\color{dark}\Huge\bfseries}
|
||||
\addtokomafont{section}{\color{dark}\Large\bfseries}
|
||||
\addtokomafont{subsection}{\color{dark}\large\bfseries}
|
||||
\makeatletter
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\AtBeginDocument{%
|
||||
\ifdefined\contentsname
|
||||
\renewcommand*\contentsname{Table of contents}
|
||||
\else
|
||||
\newcommand\contentsname{Table of contents}
|
||||
\fi
|
||||
\ifdefined\listfigurename
|
||||
\renewcommand*\listfigurename{List of Figures}
|
||||
\else
|
||||
\newcommand\listfigurename{List of Figures}
|
||||
\fi
|
||||
\ifdefined\listtablename
|
||||
\renewcommand*\listtablename{List of Tables}
|
||||
\else
|
||||
\newcommand\listtablename{List of Tables}
|
||||
\fi
|
||||
\ifdefined\figurename
|
||||
\renewcommand*\figurename{Figure}
|
||||
\else
|
||||
\newcommand\figurename{Figure}
|
||||
\fi
|
||||
\ifdefined\tablename
|
||||
\renewcommand*\tablename{Table}
|
||||
\else
|
||||
\newcommand\tablename{Table}
|
||||
\fi
|
||||
}
|
||||
\@ifpackageloaded{float}{}{\usepackage{float}}
|
||||
\floatstyle{ruled}
|
||||
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
|
||||
\floatname{codelisting}{Listing}
|
||||
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{caption}{}{\usepackage{caption}}
|
||||
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifpackageloaded{tcolorbox}{}{\usepackage[skins,breakable]{tcolorbox}}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifundefined{shadecolor}{\definecolor{shadecolor}{rgb}{.97, .97, .97}}{}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\@ifundefined{codebgcolor}{\definecolor{codebgcolor}{named}{light}}{}
|
||||
\makeatother
|
||||
\makeatletter
|
||||
\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[frame hidden, sharp corners, boxrule=0pt, enhanced, colback={codebgcolor}, breakable]}{\end{tcolorbox}}\fi
|
||||
\makeatother
|
||||
\usepackage{bookmark}
|
||||
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
||||
\urlstyle{same}
|
||||
\hypersetup{
|
||||
pdftitle={Pretty PDFs with Quarto},
|
||||
pdfauthor={Ming Su},
|
||||
colorlinks=true,
|
||||
linkcolor={highlight},
|
||||
filecolor={Maroon},
|
||||
citecolor={Blue},
|
||||
urlcolor={highlight},
|
||||
pdfcreator={LaTeX via pandoc}}
|
||||
|
||||
|
||||
\title{Pretty PDFs with Quarto}
|
||||
\author{Ming Su}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\frontmatter
|
||||
\maketitle
|
||||
|
||||
\pagestyle{mystyle}
|
||||
|
||||
|
||||
\mainmatter
|
||||
\chapter{Quarto}\label{quarto}
|
||||
|
||||
Quarto enables you to weave together content and executable code into a
|
||||
finished document. To learn more about Quarto see
|
||||
\url{https://quarto.org}.
|
||||
|
||||
\section{Running Code}\label{running-code}
|
||||
|
||||
When you click the \textbf{Render} button a document will be generated
|
||||
that includes both content and the output of embedded code. You can
|
||||
embed code like this:
|
||||
|
||||
\begin{Shaded}
|
||||
\begin{Highlighting}[]
|
||||
\DecValTok{1} \SpecialCharTok{+} \DecValTok{1}
|
||||
\end{Highlighting}
|
||||
\end{Shaded}
|
||||
|
||||
\begin{verbatim}
|
||||
[1] 2
|
||||
\end{verbatim}
|
||||
|
||||
You can add options to executable code like this
|
||||
|
||||
\begin{verbatim}
|
||||
[1] 4
|
||||
\end{verbatim}
|
||||
|
||||
The \texttt{echo:\ false} option disables the printing of code (only
|
||||
output is displayed).
|
||||
|
||||
|
||||
\backmatter
|
||||
|
||||
|
||||
\end{document}
|
|
@ -1,17 +0,0 @@
|
|||
title: Academic Letter Template
|
||||
authors:
|
||||
- name: Ming Su
|
||||
affiliation: drwater
|
||||
version: 0.1.0
|
||||
quarto-required: ">=1.3.0"
|
||||
resources:
|
||||
- dwcl.tex
|
||||
contributes:
|
||||
formats:
|
||||
html:
|
||||
css: style.css
|
||||
pdf:
|
||||
latex_engine: xelatex
|
||||
template: dwcl.tex
|
||||
keep-tex: false
|
||||
keep-md: false
|
|
@ -0,0 +1 @@
|
|||
_extensions/drwater/dwcl/_extension.yaml
|
|
@ -6,11 +6,8 @@ version: 0.1.0
|
|||
quarto-required: ">=1.3.0"
|
||||
resources:
|
||||
- dwcl.tex
|
||||
- style.css
|
||||
contributes:
|
||||
formats:
|
||||
html:
|
||||
css: style.css
|
||||
pdf:
|
||||
latex_engine: xelatex
|
||||
template: dwcl.tex
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslogo.pdf
|
Before Width: | Height: | Size: 81 KiB |
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslogo.svg
|
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslonglogo.pdf
|
Before Width: | Height: | Size: 222 KiB |
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/rceeslonglogo.svg
|
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/signms.pdf
|
Before Width: | Height: | Size: 250 KiB |
|
@ -0,0 +1 @@
|
|||
../../../../../dwinst/signmy.pdf
|
Before Width: | Height: | Size: 150 KiB |
|
@ -1,109 +0,0 @@
|
|||
.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
|
||||
}
|
||||
|
240
dwcl/dwcl.tex
|
@ -1,240 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% 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}
|
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 150 KiB |
109
dwcl/style.css
|
@ -1,109 +0,0 @@
|
|||
.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
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
.Rproj.user
|
||||
.Rhistory
|
||||
.RData
|
||||
.Ruserdata
|
||||
site_libs/
|
||||
/.quarto/
|
||||
site_libs/
|
||||
BB/Ref.bib
|
||||
_variables.yml
|
||||
_freeze/
|
||||
www/
|
||||
.source_state
|
|
@ -1,15 +0,0 @@
|
|||
title: PrettyPDF
|
||||
author: Nicola Rennie
|
||||
version: 0.0.5
|
||||
contributes:
|
||||
formats:
|
||||
pdf:
|
||||
documentclass: scrartcl
|
||||
include-in-header:
|
||||
- "header.tex"
|
||||
include-before-body:
|
||||
- "partials/before-body.tex"
|
||||
toc: false
|
||||
code-block-bg: light
|
||||
linkcolor: highlight
|
||||
urlcolor: highlight
|
|
@ -1,15 +0,0 @@
|
|||
title: PrettyPDF
|
||||
author: Nicola Rennie
|
||||
version: 0.0.5
|
||||
contributes:
|
||||
formats:
|
||||
pdf:
|
||||
documentclass: scrartcl
|
||||
include-in-header:
|
||||
- "header.tex"
|
||||
include-before-body:
|
||||
- "partials/before-body.tex"
|
||||
toc: false
|
||||
code-block-bg: light
|
||||
linkcolor: highlight
|
||||
urlcolor: highlight
|
|
@ -1,59 +0,0 @@
|
|||
% 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}
|
||||
|
||||
\AddToShipoutPicture{%
|
||||
% Add right sidebar
|
||||
\AtPageLowerLeft{%
|
||||
\put(\LenToUnit{\dimexpr\paperwidth-3cm},0){%
|
||||
\color{light}\rule{3cm}{\paperheight}%
|
||||
}%
|
||||
}%
|
||||
% Add logo
|
||||
\AtPageLowerLeft{%
|
||||
\put(\LenToUnit{\dimexpr\paperwidth-2.25cm},\LenToUnit{27.2cm}){%
|
||||
\includegraphics[width=1.5cm]{_extensions/drwater/dwen/rceeslogo.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
|
||||
|
|
@ -1 +0,0 @@
|
|||
\pagestyle{mystyle}
|
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 9.7 KiB |
|
@ -1,59 +0,0 @@
|
|||
% 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}
|
||||
|
||||
\AddToShipoutPicture{%
|
||||
% Add right sidebar
|
||||
\AtPageLowerLeft{%
|
||||
\put(\LenToUnit{\dimexpr\paperwidth-3cm},0){%
|
||||
\color{light}\rule{3cm}{\paperheight}%
|
||||
}%
|
||||
}%
|
||||
% Add logo
|
||||
\AtPageLowerLeft{%
|
||||
\put(\LenToUnit{\dimexpr\paperwidth-2.25cm},\LenToUnit{27.2cm}){%
|
||||
\includegraphics[width=1.5cm,bb=0 0 100 100]{_extensions/drwater/dwen/rceeslogo.svg}
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
%% 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
|
||||
|
BIN
dwen/logo.png
Before Width: | Height: | Size: 81 KiB |
|
@ -1 +0,0 @@
|
|||
\pagestyle{mystyle}
|
Before Width: | Height: | Size: 9.7 KiB |
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
title: "Pretty PDFs with Quarto"
|
||||
author: Ming Su
|
||||
format:
|
||||
dwen-pdf: default
|
||||
---
|
||||
|
||||
# Quarto
|
||||
|
||||
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
|
||||
|
||||
## Running Code
|
||||
|
||||
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
|
||||
|
||||
```{r}
|
||||
1 + 1
|
||||
```
|
||||
|
||||
You can add options to executable code like this
|
||||
|
||||
```{r}
|
||||
#| echo: false
|
||||
2 * 2
|
||||
```
|
||||
|
||||
The `echo: false` option disables the printing of code (only output is displayed).
|
|
@ -1,7 +0,0 @@
|
|||
title: eisvogel template for drwater
|
||||
author: Ming Su
|
||||
version: 0.0.1
|
||||
contributes:
|
||||
formats:
|
||||
pdf:
|
||||
template: dweisvogel.tex
|
|
@ -0,0 +1 @@
|
|||
_extensions/drwater/dwev/_extension.yml
|
|
@ -0,0 +1 @@
|
|||
../../../../dwinst
|
1323
dwev/dweisvogel.tex
|
@ -0,0 +1 @@
|
|||
_extensions/drwater/dwev/dweisvogel.tex
|
|
@ -1 +0,0 @@
|
|||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings
|
|
@ -1,57 +0,0 @@
|
|||
---
|
||||
title: "Example PDF"
|
||||
author: [Author]
|
||||
date: "2017-02-20"
|
||||
subject: "Markdown"
|
||||
keywords: [Markdown, Example]
|
||||
lang: "en"
|
||||
...
|
||||
|
||||
# Vinaque sanguine metuenti cuiquam Alcyone fixus
|
||||
|
||||
## Aesculeae domus vincemur et Veneris adsuetus lapsum
|
||||
|
||||
Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
|
||||
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
|
||||
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
|
||||
hamos ire arceor mandere spicula, in licet aliquando.
|
||||
|
||||
```java
|
||||
public class Example implements LoremIpsum {
|
||||
public static void main(String[] args) {
|
||||
if(args.length < 2) {
|
||||
System.out.println("Lorem ipsum dolor sit amet");
|
||||
}
|
||||
} // Obscura atque coniuge, per de coniunx
|
||||
}
|
||||
```
|
||||
|
||||
Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur.
|
||||
Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota
|
||||
destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente
|
||||
Pirithoi abstulit, lapides.
|
||||
|
||||
## Lydia caelo recenti haerebat lacerum ratae at
|
||||
|
||||
Te concepit pollice fugit vias alumno **oras** quam potest
|
||||
[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis,
|
||||
vel pede inter si.
|
||||
|
||||
1. De neque iura aquis
|
||||
2. Frangitur gaudia mihi eo umor terrae quos
|
||||
3. Recens diffudit ille tantum
|
||||
|
||||
\begin{equation}\label{eq:neighbor-propability}
|
||||
p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)}
|
||||
\end{equation}
|
||||
|
||||
Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae
|
||||
adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me.
|
||||
|
||||
> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et
|
||||
[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas
|
||||
nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque
|
||||
dura.
|
||||
|
||||
- Permulcens flebile simul
|
||||
- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum.
|
Before Width: | Height: | Size: 227 KiB |
|
@ -1 +0,0 @@
|
|||
pandoc "document.md" -o "document.pdf" --from markdown --to beamer --template "../../eisvogel.tex" --listings
|
|
@ -1,52 +0,0 @@
|
|||
---
|
||||
title: "Example PDF"
|
||||
author: [Author]
|
||||
date: "2019-06-16"
|
||||
subject: "Markdown"
|
||||
keywords: [Markdown, Example]
|
||||
lang: "en"
|
||||
...
|
||||
|
||||
# Vinaque sanguine metuenti cuiquam Alcyone fixus
|
||||
|
||||
Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
|
||||
esse, obstat gravitate.
|
||||
|
||||
```java
|
||||
public class Example implements LoremIpsum {
|
||||
public static void main(String[] args) {
|
||||
if(args.length < 2) {
|
||||
System.out.println("Lorem ipsum dolor sit amet");
|
||||
}
|
||||
} // Obscura atque coniuge, per de coniunx
|
||||
}
|
||||
```
|
||||
|
||||
# Obscura atque coniuge, per de coniunx
|
||||
|
||||
- Vertitur iura tum nepotis causa motus.
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>This is the title of the page.</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="./image.jpg" alt="This is an image.">
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
# Scyrumve spiro subitusque mente
|
||||
|
||||
```{.sql caption="Pallas nuper longusque cratere habuisse sepulcro pectore fertur."}
|
||||
CREATE TYPE person_t AS (
|
||||
firstName VARCHAR(50) NOT NULL,
|
||||
lastName VARCHAR(50) NOT NULL
|
||||
);
|
||||
|
||||
CREATE Or REPLACE FUNCTION getFormattedName(person) RETURNS text AS
|
||||
$$ SELECT 'P: ' || initcap($1.firstName); $$
|
||||
LANGUAGE SQL;
|
||||
```
|
Before Width: | Height: | Size: 177 KiB |
|
@ -1 +0,0 @@
|
|||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings --top-level-division="chapter"
|
|
@ -1,104 +0,0 @@
|
|||
---
|
||||
title: "Example PDF"
|
||||
author: [Author]
|
||||
date: "2017-02-20"
|
||||
subject: "Markdown"
|
||||
keywords: [Markdown, Example]
|
||||
book: true
|
||||
classoption: [oneside]
|
||||
...
|
||||
|
||||
# Crinis mixtaque factisque ille
|
||||
|
||||
## Aut nunc furori ad latarumque Philomela
|
||||
|
||||
Lorem markdownum includite volenti monticolae videre vocem hac sparsit puta
|
||||
gelidis vestros egressus sex. Undis eris per auguris armis. Est saevior pater.
|
||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||
|
||||
## Gaudet Silenus iuvenis
|
||||
|
||||
Mulciber denique faces ingratus, in umeros umeri cum, iram ira custos non.
|
||||
Pariterque admissa nubes, in ait ecce setae summis sacrorum me gaudete tellus.
|
||||
Ille tu perire ille, artificis caede.
|
||||
|
||||
```scala
|
||||
def sumLeaves(t: Tree): Int = t match {
|
||||
case Branch(l, r) => sumLeaves(l) + sumLeaves(r)
|
||||
case Leaf(x) => x
|
||||
}
|
||||
```
|
||||
|
||||
Cephea rector minorque, quem corpora,
|
||||
Argus. Superi hoc tenuavit timebant ossibus totque non serpere animo corpore
|
||||
superas gelidae, comitate deus Iunonigenaeque
|
||||
pectora.
|
||||
|
||||
- Tuis Cereris armiferae fugiunt suus derepta vel
|
||||
- Veniam mea cum sollertior arbore flore
|
||||
- Ceae saecula
|
||||
- Tamen est
|
||||
|
||||
## Dies tunc in enim
|
||||
|
||||
Gerunt urimur violaeque agricolis iussa locis puppis
|
||||
simul cognita, vertentia Romana
|
||||
obprobrium pignora superem est certe nondum suffuderat. Nox Pasiphaeia domo:
|
||||
**abiit** catenas utro crimine gramina ingemuere mixtae. Quem trabibus etiamnum
|
||||
orbe addita, eiaculatur videri cervo artus. Nutritur cupidine silentia Maeoniam
|
||||
aere enim gemuit adgreditur, telasque *annis* nos cum Arctonque ingens lateri
|
||||
cum iaculoque ferus.
|
||||
|
||||
## Et dextra utque per lenius portus eburnae
|
||||
|
||||
Cui vittas aris ibi putat dicere; factum sedere antiqua? Cognita Lyncides iuste
|
||||
insuetum lacerum in sinamus arces; aves aevum spatiumque de utrumque moveret in?
|
||||
Tertia ordine, Epidaurius, *has sed et* et novat: quod superare concubitusque
|
||||
retia quoque, ne totiens.
|
||||
|
||||
Est paenitet Cerealia sparsit; carne insignia in maris; tibi Nec, que Peleu meum
|
||||
buxus. Propoetides formae magna auro ad gerat cohibentur facienda partem at
|
||||
nunc, foret? **Ad stirpe**! Ut latius pararet: vestibus cumque pedibus ficta
|
||||
prior summas cancer ipsa Marte Buten es
|
||||
terruit. Opifex dixit oculos Oete quoque, quot silvarum abrepti nutrix concita
|
||||
obsidis consistere fibula saxum, Antigonen minabitur tota.
|
||||
|
||||
# Vagata eiectatamque sidera satis reducet
|
||||
|
||||
## Talem ex aliquo ingemuit
|
||||
|
||||
Lorem markdownum solus miserabile sitae. Tantum Syron limenque cupidine: litore
|
||||
modo coniuge: in huc, illo crimen novena, vocisque gratia, quae. Sua manusque
|
||||
patris nec meritorum pedibus hominis virgine, ruere tamen virtus aliter. Tunc
|
||||
ego. Solitaque remittant fagus omnia eat.
|
||||
|
||||
$$r_d^i(t+1) = \min\{r_s,\max\{0, r_d^i(t) + \beta(n_t - \lvert N_i(t)\rvert)\}\}$$
|
||||
|
||||
Obstitit silentia et novi non, huic metitur, coronantur lucos. Bracchia aura;
|
||||
donis quod volucris illi futurae, ut
|
||||
*venturorumque tellus* arma: saxumque.
|
||||
|
||||
## Vera tum est putes adspicit noxque
|
||||
|
||||
Hora et vidit figere tangi! Omni bis *prior nunc* capilli, pulsat tuam Pallante,
|
||||
*suis*. Solae decore ipso armorum coitusque paro audita *viveret tibi* apparuit
|
||||
flammasque lapides. Cursu anas usus eundo anticipata, intabescere quae concita
|
||||
fallit. Dea corpore fabrae: nec Neptunus membris, falsa murice; fac Marte quam
|
||||
in.
|
||||
|
||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et.
|
||||
|
||||
## Arachnes deus tum penetralia tempore aurea populante
|
||||
|
||||
Lentae spissisque *carne*. Fixit inquit cautes et iugis novus sim quisquam nisi
|
||||
haesurum vel deorum fetibus virgo.
|
||||
|
||||
Sub nautae, tegebat clamat. Credas Parrhasio. Commemorat nescio liceatque
|
||||
excipit! Uris clipeo ego visa amplexas meos ibitis condidit Taenaria, si. Tua
|
||||
ora tempus patrio revulsos, tellus curru facies, Gange gemit agitata!
|
||||
|
||||
Ruinam ipsaque sibi ovis Teucer Iovis tibi; erat versus neque victa attonitus
|
||||
doque, quod! Dixit carmina, eo, per capillis quid lina, qua, ille. Siqua
|
||||
caelestum flammas ferre super et saevissime inmisit quoque suis sic aspergine
|
||||
vis praerupit. Et puellae summa eventu.
|
||||
Placeat ut medio *plectrumque inferni* Talia; pertimui opem.
|
Before Width: | Height: | Size: 555 KiB |
|
@ -1 +0,0 @@
|
|||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings
|
|
@ -1,130 +0,0 @@
|
|||
---
|
||||
title: "Boxes with pandoc-latex-environment and awesomebox"
|
||||
author: [Author]
|
||||
date: "2020-01-01"
|
||||
subject: "Markdown"
|
||||
keywords: [Markdown, Example]
|
||||
lang: "en"
|
||||
colorlinks: true
|
||||
header-includes:
|
||||
- |
|
||||
```{=latex}
|
||||
\usepackage{awesomebox}
|
||||
```
|
||||
pandoc-latex-environment:
|
||||
noteblock: [note]
|
||||
tipblock: [tip]
|
||||
warningblock: [warning]
|
||||
cautionblock: [caution]
|
||||
importantblock: [important]
|
||||
...
|
||||
|
||||
# Boxes with `pandoc-latex-environment` and `awesomebox`
|
||||
|
||||
This example demonstrates the use of the filter [`pandoc-latex-environments`] to create custom boxes with the [`awesomebox`] package. *pandoc-latex-environment* is a pandoc filter for adding LaTeX environment on specific HTML div tags.
|
||||
|
||||
|
||||
## Box Types
|
||||
|
||||
For a list of all available boxes and options visit the [`awesomebox` documentation](https://ctan.org/pkg/awesomebox).
|
||||
|
||||
```markdown
|
||||
::: note
|
||||
Lorem ipsum dolor ...
|
||||
:::
|
||||
```
|
||||
|
||||
::: note
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
|
||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
||||
:::
|
||||
|
||||
```markdown
|
||||
::: tip
|
||||
Lorem ipsum dolor ...
|
||||
:::
|
||||
```
|
||||
|
||||
::: tip
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
|
||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
||||
:::
|
||||
|
||||
```markdown
|
||||
::: warning
|
||||
Lorem ipsum dolor ...
|
||||
:::
|
||||
```
|
||||
|
||||
::: warning
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
|
||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
||||
:::
|
||||
|
||||
```markdown
|
||||
::: caution
|
||||
Lorem ipsum dolor ...
|
||||
:::
|
||||
```
|
||||
|
||||
::: caution
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
|
||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
||||
:::
|
||||
|
||||
```markdown
|
||||
::: important
|
||||
Lorem ipsum dolor ...
|
||||
:::
|
||||
```
|
||||
|
||||
::: important
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
|
||||
Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum
|
||||
felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl.
|
||||
:::
|
||||
|
||||
One can also use raw HTML `div` tags to create the custom environments.
|
||||
|
||||
```markdown
|
||||
<div class="important">
|
||||
Lorem ipsum dolor ...
|
||||
</div>
|
||||
```
|
||||
|
||||
<div class="important">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero
|
||||
quis lectus elementum fermentum.
|
||||
</div>
|
||||
|
||||
Markdown formatting inside the environments is supported.
|
||||
|
||||
::: important
|
||||
**Lorem ipsum dolor** sit amet, `consectetur adipiscing` elit.
|
||||
|
||||
```
|
||||
if(args.length < 2) {
|
||||
System.out.println("Lorem ipsum dolor sit amet");
|
||||
}
|
||||
```
|
||||
|
||||
*Nam aliquet libero
|
||||
quis lectus elementum fermentum.*
|
||||
:::
|
||||
|
||||
[`pandoc-latex-environments`]: https://github.com/chdemko/pandoc-latex-environment/
|
||||
[`awesomebox`]: https://ctan.org/pkg/awesomebox
|