update template
This commit is contained in:
@@ -12,42 +12,46 @@ bibliography: [../BB/Ref.bib, ../BB/localRef.bib]
|
|||||||
csl: _extensions/inst/tex/elsevier-harvard.csl
|
csl: _extensions/inst/tex/elsevier-harvard.csl
|
||||||
format:
|
format:
|
||||||
elsevier-html:
|
elsevier-html:
|
||||||
|
toc: true
|
||||||
css: _extensions/inst/css/style.css
|
css: _extensions/inst/css/style.css
|
||||||
keep-md: true
|
keep-md: true
|
||||||
epub: default
|
epub: default
|
||||||
docx:
|
docx:
|
||||||
reference-doc: _extensions/inst/word/MS.docx
|
reference-doc: _extensions/inst/word/MS.docx
|
||||||
elsevier-pdf:
|
pdf:
|
||||||
keep-tex: false
|
# documentclass: article
|
||||||
|
latex-clean: false # to keep aux
|
||||||
|
citecolor: blue
|
||||||
|
colorlinks: true
|
||||||
|
number-sections: true
|
||||||
|
sansfont: "Gill Sans"
|
||||||
|
papersize: a4paper
|
||||||
|
sansfontoptions:
|
||||||
|
- Color=39729E
|
||||||
|
mainfont: "Source Sans 3" #| Verdana (fontsize: 11pt) # Source Sans 3 | Times New Roman| Helvetica | PT Sans
|
||||||
|
monofont: "JetBrains Mono"
|
||||||
|
mathfont: "Cambria Math"
|
||||||
|
CJKmainfont: SimHei
|
||||||
|
fontsize: 12pt
|
||||||
keep-md: false
|
keep-md: false
|
||||||
include-in-header: "./_extensions/quarto-journals/elsevier/partials/revision.tex"
|
include-in-header: "./_extensions/inst/tex/header.tex"
|
||||||
latex-clean: false
|
|
||||||
header-includes:
|
header-includes:
|
||||||
# - \usepackage{threeparttable}
|
|
||||||
# - \usepackage{fontspec}
|
# - \usepackage{fontspec}
|
||||||
# - \usepackage{endfloat}
|
- \usepackage{endfloat}
|
||||||
- \setmainfont{Calibri}
|
# - \usepackage[UTF8, scheme=plain]{ctex}
|
||||||
- \usepackage[UTF8, scheme=plain]{ctex}
|
|
||||||
- \usepackage{float}
|
- \usepackage{float}
|
||||||
- \usepackage[normalem]{ulem}
|
- \usepackage[normalem]{ulem}
|
||||||
- \usepackage[doublespacing]{setspace}
|
- \usepackage[doublespacing]{setspace}
|
||||||
- \usepackage{lineno}
|
- \usepackage{lineno}
|
||||||
- \linenumbers
|
- \linenumbers
|
||||||
journal:
|
|
||||||
formatting: preprint # preprint | review | doublebind
|
|
||||||
model: 1p
|
|
||||||
cite-style: authoryear
|
|
||||||
# graphical-abstract: ""
|
|
||||||
# highlights:
|
|
||||||
# - A comprehensive model was contructed to evaluate the risk of odor occurrences
|
|
||||||
# - Turbidity distribution determine underwater light and MIB-producing *Planktothrix*
|
|
||||||
# - Increasing flowrate increases turbidity that can control *Planktothrix* and MIB
|
|
||||||
# - Odor control based on flow regulation in source water is "green" and fundamental
|
|
||||||
filters:
|
filters:
|
||||||
- latex-environment
|
- latex-environment
|
||||||
- authors-block
|
- authors-block
|
||||||
lightbox: auto
|
lightbox: auto
|
||||||
commands: [clab]
|
commands: [clab]
|
||||||
|
editor:
|
||||||
|
markdown:
|
||||||
|
wrap: sentence
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +79,7 @@ require(lubridate)
|
|||||||
require(patchwork)
|
require(patchwork)
|
||||||
require(drwateR)
|
require(drwateR)
|
||||||
rmdify::rmd_init()
|
rmdify::rmd_init()
|
||||||
biburl <- "http://drwater.rcees.ac.cn/cloud/s/ref_ming/download/Ref.bib"
|
biburl <- "https://drc.drwater.net/datapool/public/BB/Ref.bib"
|
||||||
if (!isRendering) { download.file(biburl, destfile = "Ref.bib") }
|
if (!isRendering) { download.file(biburl, destfile = "Ref.bib") }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -8,23 +8,32 @@ format:
|
|||||||
css: _extensions/inst/css/style.css
|
css: _extensions/inst/css/style.css
|
||||||
docx:
|
docx:
|
||||||
reference-doc: _extensions/inst/word/MS.docx
|
reference-doc: _extensions/inst/word/MS.docx
|
||||||
elsevier-pdf:
|
pdf:
|
||||||
classoption: [nopreprintline]
|
# documentclass: article
|
||||||
revision: true
|
latex-clean: false # to keep aux
|
||||||
keep-tex: true
|
citecolor: blue
|
||||||
latex-clean: false
|
colorlinks: true
|
||||||
include-in-header: "./_extensions/quarto-journals/elsevier/partials/revision.tex"
|
number-sections: false
|
||||||
|
sansfont: "Gill Sans"
|
||||||
|
papersize: a4paper
|
||||||
|
sansfontoptions:
|
||||||
|
- Color=39729E
|
||||||
|
mainfont: "Source Sans 3" #| Verdana (fontsize: 11pt) # Source Sans 3 | Times New Roman| Helvetica | PT Sans
|
||||||
|
monofont: "JetBrains Mono"
|
||||||
|
mathfont: "Cambria Math"
|
||||||
|
CJKmainfont: SimHei
|
||||||
|
fontsize: 12pt
|
||||||
|
keep-md: false
|
||||||
|
include-in-header: "./_extensions/inst/tex/header.tex"
|
||||||
header-includes:
|
header-includes:
|
||||||
|
- \let\oldsection\section
|
||||||
|
- \renewcommand{\section}{\clearpage\oldsection}
|
||||||
# - \usepackage{threeparttable}
|
# - \usepackage{threeparttable}
|
||||||
# - \usepackage{fontspec}
|
# - \usepackage{fontspec}
|
||||||
# - \usepackage[nomarkers]{endfloat}
|
# - \usepackage{endfloat}
|
||||||
- \usepackage[normalem]{ulem}
|
# - \setmainfont{Calibri}
|
||||||
- \renewcommand{\thetable}{S\arabic{table}}
|
|
||||||
- \renewcommand{\thefigure}{S\arabic{figure}}
|
|
||||||
- \renewcommand{\theequation}{S\arabic{equation}}
|
|
||||||
- \setmainfont{Calibri}
|
|
||||||
# - \usepackage[UTF8, scheme=plain]{ctex}
|
# - \usepackage[UTF8, scheme=plain]{ctex}
|
||||||
# - \usepackage{float}
|
- \usepackage{float}
|
||||||
- \usepackage[normalem]{ulem}
|
- \usepackage[normalem]{ulem}
|
||||||
- \usepackage[doublespacing]{setspace}
|
- \usepackage[doublespacing]{setspace}
|
||||||
- \usepackage{lineno}
|
- \usepackage{lineno}
|
||||||
@@ -32,9 +41,11 @@ format:
|
|||||||
filters:
|
filters:
|
||||||
- latex-environment
|
- latex-environment
|
||||||
- authors-block
|
- authors-block
|
||||||
|
lightbox: auto
|
||||||
commands: [clab]
|
commands: [clab]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
#| label: setup
|
#| label: setup
|
||||||
#| include: false
|
#| include: false
|
||||||
@@ -47,7 +58,7 @@ require(lubridate)
|
|||||||
require(patchwork)
|
require(patchwork)
|
||||||
require(drwateR)
|
require(drwateR)
|
||||||
rmdify::rmd_init()
|
rmdify::rmd_init()
|
||||||
biburl <- "http://drwater.rcees.ac.cn/datapool/public/BB/Ref.bib"
|
biburl <- "https://drc.drwater.net/datapool/public/BB/Ref.bib"
|
||||||
if (!isRendering) { download.file(biburl, destfile = "Ref.bib") }
|
if (!isRendering) { download.file(biburl, destfile = "Ref.bib") }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ $endif$
|
|||||||
\def\hascorr{0}
|
\def\hascorr{0}
|
||||||
\def\haseqc{0}
|
\def\haseqc{0}
|
||||||
% check if corresponding author(s) and equal contributing authors are available
|
% check if corresponding author(s) and equal contributing authors are available
|
||||||
$for(author)$$if(author.correspondence)$\def\hascorr{1}$endif$$if(author.equalcontribution)$\def\haseqc{1}$endif$ $endfor$
|
$for(author)$$if(author.correspondence)$\def\hascorr{1}$endif$$if(author.equal-contributor)$\def\haseqc{1}$endif$ $endfor$
|
||||||
|
|
||||||
\newcommand{\getcorrauthinfo}{
|
\newcommand{\getcorrauthinfo}{
|
||||||
\subsection{Corresponding Author(s)}
|
\subsection{Corresponding Author(s)}
|
||||||
@@ -361,7 +361,7 @@ $endfor$
|
|||||||
\begin{frontmatter}
|
\begin{frontmatter}
|
||||||
|
|
||||||
\title{$title$$if(subtitle)$\\\Large{$subtitle$}$endif$}
|
\title{$title$$if(subtitle)$\\\Large{$subtitle$}$endif$}
|
||||||
$for(author)$\author$if(authorwithinstitute)$[$for(author.institute)$$author.institute$$sep$,$endfor$]$endif${$author.name$$if(author.correspondence)$\corref{corrauth}$endif$$if(author.equalcontribution)$\corref{eqcon}$endif$ $if(author.footnote)$\fnref{$author.footnote$}$endif$}$if(author.email)$\ead{$author.email$}$endif$$endfor$
|
$for(author)$\author$if(authorwithinstitute)$[$for(author.institute)$$author.institute$$sep$,$endfor$]$endif${$author.name$$if(author.correspondence)$\corref{corrauth}$endif$$if(author.equal-contributor)$\corref{eqcon}$endif$ $if(author.footnote)$\fnref{$author.footnote$}$endif$}$if(author.email)$\ead{$author.email$}$endif$$endfor$
|
||||||
$if(authorwithinstitute)$ $for(institute)$ \address[$institute.id$]{$institute.name$} $endfor$ $endif$
|
$if(authorwithinstitute)$ $for(institute)$ \address[$institute.id$]{$institute.name$} $endfor$ $endif$
|
||||||
% generate corresponding authors.
|
% generate corresponding authors.
|
||||||
% \StrBehind is from xstring package
|
% \StrBehind is from xstring package
|
||||||
@@ -373,7 +373,7 @@ $endfor$
|
|||||||
|
|
||||||
% generate equal contributing authors.
|
% generate equal contributing authors.
|
||||||
\ifnum \haseqc=1
|
\ifnum \haseqc=1
|
||||||
\def\eqa{$for(author)$$if(author.equalcontribution)$and $author.name$ $endif$$endfor$}
|
\def\eqa{$for(author)$$if(author.equal-contributor)$and $author.name$ $endif$$endfor$}
|
||||||
\cortext[eqcon]{\StrBehind*{\eqa}{and } are equally contributed to this work.}
|
\cortext[eqcon]{\StrBehind*{\eqa}{and } are equally contributed to this work.}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
|||||||
Executable
+74
@@ -0,0 +1,74 @@
|
|||||||
|
\usepackage{enumitem}
|
||||||
|
\usepackage{fontspec}
|
||||||
|
\usepackage{float}
|
||||||
|
\usepackage[normalem]{ulem}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\usepackage{nameref} %needed by zref-xr
|
||||||
|
\usepackage{zref-xr,zref-hyperref,zref-user}
|
||||||
|
\usepackage{xr-hyper}
|
||||||
|
|
||||||
|
|
||||||
|
\setkomafont{author}{\normalsize}
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
\renewcommand{\title}[1]{\gdef\@title{\large\textbf{#1}}} % Adjust \Huge or other font commands
|
||||||
|
% \renewcommand{\author}[1]{\gdef\@author{\normalsize\textrm{#1}}} % Adjust \Huge or other font commands
|
||||||
|
% \renewcommand{\author}[1]{\normalsize\textit{#1}} % Use \normalsize and \textit for customization
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
\usepackage{adjustbox}
|
||||||
|
% \usepackage{xcolor}
|
||||||
|
\usepackage{mdframed}
|
||||||
|
\newmdenv[topline=false,
|
||||||
|
leftline=true,
|
||||||
|
bottomline=false,
|
||||||
|
rightline=false,
|
||||||
|
linewidth=3pt,
|
||||||
|
%backgroundcolor=lightgray,
|
||||||
|
linecolor=gray!30,
|
||||||
|
backgroundcolor=gray!5,
|
||||||
|
skipabove=\topsep,
|
||||||
|
skipbelow=\topsep,
|
||||||
|
leftmargin=0pt,
|
||||||
|
rightmargin=0pt,
|
||||||
|
innertopmargin=0pt,
|
||||||
|
innerbottommargin=0pt
|
||||||
|
]{refquote}
|
||||||
|
\newmdenv[topline=false,
|
||||||
|
leftline=true,
|
||||||
|
bottomline=false,
|
||||||
|
rightline=false,
|
||||||
|
linewidth=3pt,
|
||||||
|
%backgroundcolor=lightgray,
|
||||||
|
backgroundcolor=red!3!white,
|
||||||
|
linecolor=red!30!white,
|
||||||
|
skipabove=\topsep,
|
||||||
|
skipbelow=\topsep,
|
||||||
|
leftmargin=0pt,
|
||||||
|
rightmargin=0pt,
|
||||||
|
innertopmargin=10pt,
|
||||||
|
innerbottommargin=10pt
|
||||||
|
]{question}
|
||||||
|
% setup hyperlink for page and line number
|
||||||
|
\def\msname{MS}
|
||||||
|
\def\smname{SM}
|
||||||
|
\setenumerate{labelsep=*, leftmargin=1.0pc}
|
||||||
|
%\zexternaldocument*{ManuscriptNew\veraa}
|
||||||
|
\zexternaldocument*{\msname}
|
||||||
|
\zexternaldocument*{\smname}
|
||||||
|
\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{
|
||||||
|
\linelabel{line:#1}}}
|
||||||
|
%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf]
|
||||||
|
\makeatletter
|
||||||
|
\newcommand{\clab}[2][]{
|
||||||
|
\protected@write\@auxout{\let\clab\@secondoftwo}{
|
||||||
|
\string\newlabel{r:#1}{{#2}{}}}%
|
||||||
|
\hlabel{#1}#2\hlabel{#1end}}
|
||||||
|
\makeatother
|
||||||
|
\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line
|
||||||
|
\zref{line:#1}--\zref{line:#1end}:}\\}}
|
||||||
|
\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}}
|
||||||
|
% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\}
|
||||||
|
\renewenvironment{quote}{\begin{question}}{\end{question}}
|
||||||
|
% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}}
|
||||||
|
|
||||||
@@ -19,25 +19,21 @@ THIS SOFTWARE.
|
|||||||
|
|
||||||
-- from @kapsner
|
-- from @kapsner
|
||||||
-- [import]
|
-- [import]
|
||||||
local from_utils = require "utils"
|
local from_utils = require("utils")
|
||||||
local has_key = from_utils.has_key
|
local has_key = from_utils.has_key
|
||||||
-- [/import]
|
-- [/import]
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
local List = require 'pandoc.List'
|
local List = require("pandoc.List")
|
||||||
local utils = require 'pandoc.utils'
|
local utils = require("pandoc.utils")
|
||||||
local stringify = utils.stringify
|
local stringify = utils.stringify
|
||||||
|
|
||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
local default_marks
|
local default_marks
|
||||||
local default_marks = {
|
local default_marks = {
|
||||||
corresponding_author = FORMAT == 'latex'
|
corresponding_author = FORMAT == "latex" and { pandoc.RawInline("latex", "*") } or { pandoc.Str("✉") },
|
||||||
and {pandoc.RawInline('latex', '*')}
|
equal_contributor = FORMAT == "latex" and { pandoc.RawInline("latex", "†") } or { pandoc.Str("†") },
|
||||||
or {pandoc.Str '✉'},
|
|
||||||
equal_contributor = FORMAT == 'latex'
|
|
||||||
and {pandoc.RawInline('latex', '$\\dagger{}$')}
|
|
||||||
or {pandoc.Str '*'},
|
|
||||||
}
|
}
|
||||||
M.default_marks = default_marks
|
M.default_marks = default_marks
|
||||||
|
|
||||||
@@ -58,18 +54,17 @@ local function create_equal_contributors_block(authors, mark)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local contributors = {
|
local contributors = {
|
||||||
pandoc.Superscript(mark'equal_contributor'),
|
pandoc.Superscript(mark("equal_contributor")),
|
||||||
pandoc.Space(),
|
pandoc.Space(),
|
||||||
pandoc.Str 'These authors contributed equally to this work.'
|
pandoc.Str("These authors contributed equally to this work."),
|
||||||
}
|
}
|
||||||
return List:new{pandoc.Para(contributors)}
|
return List:new({ pandoc.Para(contributors) })
|
||||||
end
|
end
|
||||||
M.create_equal_contributors_block = create_equal_contributors_block
|
M.create_equal_contributors_block = create_equal_contributors_block
|
||||||
|
|
||||||
|
|
||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
local function intercalate(lists, elem)
|
local function intercalate(lists, elem)
|
||||||
local result = List:new{}
|
local result = List:new({})
|
||||||
for i = 1, (#lists - 1) do
|
for i = 1, (#lists - 1) do
|
||||||
result:extend(lists[i])
|
result:extend(lists[i])
|
||||||
result:extend(elem)
|
result:extend(elem)
|
||||||
@@ -95,65 +90,68 @@ M.is_corresponding_author = is_corresponding_author
|
|||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
--- Generate a block element containing the correspondence information
|
--- Generate a block element containing the correspondence information
|
||||||
local function create_correspondence_blocks(authors, mark)
|
local function create_correspondence_blocks(authors, mark)
|
||||||
local corresponding_authors = List:new{}
|
local corresponding_authors = List:new({})
|
||||||
for _, author in ipairs(authors) do
|
for _, author in ipairs(authors) do
|
||||||
if is_corresponding_author(author) then
|
if is_corresponding_author(author) then
|
||||||
local mailto = 'mailto:' .. utils.stringify(author.email)
|
local mailto = "mailto:" .. utils.stringify(author.email)
|
||||||
local author_with_mail = List:new(
|
local author_with_mail = List:new(
|
||||||
-- modified by @kapsner
|
-- modified by @kapsner
|
||||||
author.name.literal .. List:new{pandoc.Space(), pandoc.Str '<'} ..
|
author.name.literal
|
||||||
author.email .. List:new{pandoc.Str '>'}
|
.. List:new({ pandoc.Space(), pandoc.Str("<") })
|
||||||
|
.. author.email
|
||||||
|
.. List:new({ pandoc.Str(">") })
|
||||||
)
|
)
|
||||||
local link = pandoc.Link(author_with_mail, mailto)
|
local link = pandoc.Link(author_with_mail, mailto)
|
||||||
table.insert(corresponding_authors, {link})
|
table.insert(corresponding_authors, { link })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #corresponding_authors == 0 then
|
if #corresponding_authors == 0 then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local correspondence = List:new{
|
local correspondence = List:new({
|
||||||
pandoc.Superscript(mark'corresponding_author'),
|
pandoc.Superscript(mark("corresponding_author")),
|
||||||
pandoc.Space(),
|
pandoc.Space(),
|
||||||
pandoc.Str'Correspondence:',
|
pandoc.Str("Correspondence:"),
|
||||||
pandoc.Space()
|
pandoc.Space(),
|
||||||
}
|
})
|
||||||
local sep = List:new{pandoc.Str',', pandoc.Space()}
|
local sep = List:new({ pandoc.Str(","), pandoc.Space() })
|
||||||
return {
|
return {
|
||||||
pandoc.Para(correspondence .. intercalate(corresponding_authors, sep))
|
pandoc.Para(correspondence .. intercalate(corresponding_authors, sep)),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
M.create_correspondence_blocks = create_correspondence_blocks
|
M.create_correspondence_blocks = create_correspondence_blocks
|
||||||
|
|
||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
--- Create inlines for a single author (includes all author notes)
|
--- Create inlines for a single author (includes all author notes)
|
||||||
local function author_inline_generator (get_mark)
|
local function author_inline_generator(get_mark)
|
||||||
return function (author)
|
return function(author)
|
||||||
local author_marks = List:new{}
|
local author_marks = List:new({})
|
||||||
-- modified by @kapsner
|
-- modified by @kapsner
|
||||||
if has_key(author, "attributes") then
|
if has_key(author, "attributes") then
|
||||||
if author.attributes["equal-contributor"] then
|
if author.attributes["equal-contributor"] then
|
||||||
author_marks[#author_marks + 1] = get_mark 'equal_contributor'
|
author_marks[#author_marks + 1] = get_mark("equal_contributor")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local idx_str
|
local idx_str
|
||||||
for _, idx in ipairs(author.affiliations) do
|
for _, idx in ipairs(author.affiliations) do
|
||||||
if type(idx) ~= 'table' then
|
if type(idx) ~= "table" then
|
||||||
idx_str = tostring(idx)
|
idx_str = tostring(idx)
|
||||||
else
|
else
|
||||||
idx_str = stringify(idx)
|
idx_str = stringify(idx)
|
||||||
end
|
end
|
||||||
author_marks[#author_marks + 1] = {pandoc.Str(idx_str)}
|
author_marks[#author_marks + 1] = { pandoc.Str(idx_str) }
|
||||||
end
|
end
|
||||||
if is_corresponding_author(author) then
|
if is_corresponding_author(author) then
|
||||||
author_marks[#author_marks + 1] = get_mark 'corresponding_author'
|
author_marks[#author_marks + 1] = get_mark("corresponding_author")
|
||||||
end
|
end
|
||||||
-- modified by @kapsner
|
-- modified by @kapsner
|
||||||
if FORMAT:match 'latex' then
|
if FORMAT:match("latex") then
|
||||||
author.name.literal[#author.name.literal + 1] = pandoc.Superscript(intercalate(author_marks, {pandoc.Str ','}))
|
author.name.literal[#author.name.literal + 1] =
|
||||||
|
pandoc.Superscript(intercalate(author_marks, { pandoc.Str(",") }))
|
||||||
return author
|
return author
|
||||||
else
|
else
|
||||||
local res = List.clone(author.name.literal)
|
local res = List.clone(author.name.literal)
|
||||||
res[#res + 1] = pandoc.Superscript(intercalate(author_marks, {pandoc.Str ','}))
|
res[#res + 1] = pandoc.Superscript(intercalate(author_marks, { pandoc.Str(",") }))
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -165,13 +163,13 @@ M.author_inline_generator = author_inline_generator
|
|||||||
local function create_authors_inlines(authors, mark)
|
local function create_authors_inlines(authors, mark)
|
||||||
local inlines_generator = author_inline_generator(mark)
|
local inlines_generator = author_inline_generator(mark)
|
||||||
local inlines = List:new(authors):map(inlines_generator)
|
local inlines = List:new(authors):map(inlines_generator)
|
||||||
local and_str = List:new{pandoc.Space(), pandoc.Str'and', pandoc.Space()}
|
local and_str = List:new({ pandoc.Space(), pandoc.Str("and"), pandoc.Space() })
|
||||||
|
|
||||||
local last_author = inlines[#inlines]
|
local last_author = inlines[#inlines]
|
||||||
inlines[#inlines] = nil
|
inlines[#inlines] = nil
|
||||||
local result = intercalate(inlines, {pandoc.Str ',', pandoc.Space()})
|
local result = intercalate(inlines, { pandoc.Str(","), pandoc.Space() })
|
||||||
if #authors > 1 then
|
if #authors > 1 then
|
||||||
result:extend(List:new{pandoc.Str ","} .. and_str)
|
result:extend(List:new({ pandoc.Str(",") }) .. and_str)
|
||||||
end
|
end
|
||||||
result:extend(last_author)
|
result:extend(last_author)
|
||||||
return result
|
return result
|
||||||
@@ -181,16 +179,14 @@ M.create_authors_inlines = create_authors_inlines
|
|||||||
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
|
||||||
--- Generate a block list all affiliations, marked with arabic numbers.
|
--- Generate a block list all affiliations, marked with arabic numbers.
|
||||||
local function create_affiliations_blocks(affiliations)
|
local function create_affiliations_blocks(affiliations)
|
||||||
local affil_lines = List:new(affiliations):map(
|
local affil_lines = List:new(affiliations):map(function(affil, i)
|
||||||
function (affil, i)
|
local num_inlines = List:new({
|
||||||
local num_inlines = List:new{
|
pandoc.Superscript({ pandoc.Str(affil.number) }),
|
||||||
pandoc.Superscript{pandoc.Str(affil.number)},
|
pandoc.Space(),
|
||||||
pandoc.Space()
|
})
|
||||||
}
|
|
||||||
return num_inlines .. affil.name
|
return num_inlines .. affil.name
|
||||||
end
|
end)
|
||||||
)
|
return { pandoc.Para(intercalate(affil_lines, { pandoc.LineBreak() })) }
|
||||||
return {pandoc.Para(intercalate(affil_lines, {pandoc.LineBreak()}))}
|
|
||||||
end
|
end
|
||||||
M.create_affiliations_blocks = create_affiliations_blocks
|
M.create_affiliations_blocks = create_affiliations_blocks
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
\usepackage{zref-xr,zref-hyperref,zref-user}
|
\usepackage{zref-xr,zref-hyperref,zref-user}
|
||||||
\usepackage{xr-hyper}
|
\usepackage{xr-hyper}
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
\renewcommand{\title}[1]{\gdef\@title{\Large\textbf{#1}}} % Adjust \Huge or other font commands
|
||||||
|
% \renewcommand{\author}[1]{\gdef\@author{\normalsize\textrm{#1}}} % Adjust \Huge or other font commands
|
||||||
|
% \renewcommand{\author}[1]{\normalsize\textit{#1}} % Use \normalsize and \textit for customization
|
||||||
|
\makeatother
|
||||||
|
|
||||||
\usepackage{adjustbox}
|
\usepackage{adjustbox}
|
||||||
% \usepackage{xcolor}
|
% \usepackage{xcolor}
|
||||||
|
|||||||
+6
-6
@@ -8,7 +8,7 @@ author:
|
|||||||
- name: Ming Su
|
- name: Ming Su
|
||||||
email: mingsu@rcees.ac.cn
|
email: mingsu@rcees.ac.cn
|
||||||
orcid: 0000-0001-9821-1268
|
orcid: 0000-0001-9821-1268
|
||||||
url: https://drwater.rcees.ac.cn
|
url: https://drwater.net/team/ming-su/
|
||||||
affiliations:
|
affiliations:
|
||||||
- ref: skleac
|
- ref: skleac
|
||||||
- ref: ucas
|
- ref: ucas
|
||||||
@@ -110,11 +110,11 @@ project:
|
|||||||
website:
|
website:
|
||||||
title: "Version: {{< var branch >}}"
|
title: "Version: {{< var branch >}}"
|
||||||
reader-mode: true
|
reader-mode: true
|
||||||
site-url: https://drwater.rcees.ac.cn/{{< var pubtype >}}/{{< var projtype >}}/{{< var reponame >}}/@{{< var branch >}}
|
site-url: https://drc.drwater.net/{{< var pubtype >}}/{{< var projtype >}}/{{< var reponame >}}/{{< var branch >}}
|
||||||
repo-url: https://drwater.rcees.ac.cn/git/{{< var projtype >}}/{{< var reponame >}}
|
repo-url: https://git.drwater.net/{{< var projtype >}}/{{< var reponame >}}
|
||||||
repo-actions: [edit, source, issue]
|
repo-actions: [edit, source, issue]
|
||||||
page-navigation: true
|
page-navigation: true
|
||||||
page-footer: "Copyright 2023, [Ming Su](https://drwater.rcees.ac.cn)"
|
page-footer: "Copyright 2024, [Dr. Water](https://drwater.net)"
|
||||||
navbar:
|
navbar:
|
||||||
background: "grey"
|
background: "grey"
|
||||||
search: true
|
search: true
|
||||||
@@ -145,9 +145,9 @@ website:
|
|||||||
- icon: git
|
- icon: git
|
||||||
menu:
|
menu:
|
||||||
- text: Edit
|
- text: Edit
|
||||||
url: https://drwater.rcees.ac.cn/git/{{< var projtype >}}/{{< var reponame >}}/src/branch/{{< var branch >}}
|
url: https://git.drwater.net/{{< var projtype >}}/{{< var reponame >}}/src/branch/{{< var branch >}}
|
||||||
- text: Issue
|
- text: Issue
|
||||||
url: https://drwater.rcees.ac.cn/git/manuscript/{{< var reponame >}}/issues
|
url: https://git.drwater.net/manuscript/{{< var reponame >}}/issues
|
||||||
comments:
|
comments:
|
||||||
hypothesis:
|
hypothesis:
|
||||||
theme: clean
|
theme: clean
|
||||||
|
|||||||
Reference in New Issue
Block a user