This commit is contained in:
2025-07-29 00:59:37 +08:00
parent ed607c70f0
commit 63e372e81d
12 changed files with 124 additions and 465 deletions
+9
View File
@@ -0,0 +1,9 @@
/figure/
/*.spl
/*.log
/*.blg
/*.bbl
/*.toc
/.DS_Store
/*.tex
+25
View File
@@ -0,0 +1,25 @@
\relax
\providecommand\zref@newlabel[2]{}
\providecommand \babel@aux [2]{\global \let \babel@toc \@gobbletwo }
\@nameuse{bbl@beforestart}
\providecommand\hyper@newdestlabel[2]{}
\providecommand*\HyPL@Entry[1]{}
\HyPL@Entry{0<</S/D>>}
\babel@aux{english}{}
\newlabel{abstract}{{}{2}{}{Doc-Start}{}}
\@writefile{toc}{\contentsline {section}{Abstract}{2}{Doc-Start}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{Main}{3}{Doc-Start}\protected@file@percent }
\newlabel{main}{{}{3}{Main}{Doc-Start}{}}
\newlabel{r:r1q0101}{{This is something useful according to Reviewer 1.}{}}
\newlabel{r1q0101}{{}{3}{Main}{Doc-Start}{}}
\newlabel{r1q0101end}{{}{3}{Main}{Doc-Start}{}}
\newlabel{line:r1q0101}{{11}{3}{}{}{}}
\newlabel{line:r1q0101end}{{11}{3}{}{}{}}
\@writefile{toc}{\contentsline {section}{Methods}{3}{Doc-Start}\protected@file@percent }
\newlabel{methods}{{}{3}{Methods}{Doc-Start}{}}
\@writefile{toc}{\contentsline {section}{Results}{3}{Doc-Start}\protected@file@percent }
\newlabel{results}{{}{3}{Results}{Doc-Start}{}}
\newlabel{references}{{}{4}{}{Doc-Start}{}}
\@writefile{toc}{\contentsline {section}{References}{4}{Doc-Start}\protected@file@percent }
\newlabel{refs}{{}{4}{}{section*.1}{}}
\gdef \@abspage@last{4}
+8 -15
View File
@@ -1,29 +1,23 @@
---
msname: MS
smname: SM
# abstract: ""
# keywords:
# - KEYWORD1;
# date: last-modified
highlights: ""
isMS: true
date: ""
bibliography: [../BB/Ref.bib, ../BB/localRef.bib]
csl: _extensions/drwater/dwinst/nature.csl
# titlegraphical: "../figures/GA.pdf"
latex-clean: false # to keep aux
endfloat: true
doublespacing: true
linenumber: true
format:
dwms-html: default
dwms-docx: default
dwms-pdf:
fontsize: 12pt
keep-md: false
keep-tex: true
header-includes:
- \usepackage{endfloat}
- \doublespacing
- \linenumbers
dwms-pdf: default
filters:
- latex-environment
- authoraffil
lightbox: auto
commands: [clab]
---
@@ -45,7 +39,6 @@ dwfun::init()
# Abstract {-}
{{< pagebreak >}}
{{< include MS_main.qmd >}}
-419
View File
@@ -1,419 +0,0 @@
% Options for packages loaded elsewhere
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
\PassOptionsToPackage{space}{xeCJK}
%
\documentclass[
english,
12pt,
letterpaper,
]{article}
\usepackage{xcolor}
\usepackage[margin=1in]{geometry}
\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
\setmainfont[]{Source Sans 3}
\setsansfont[Color=39729E]{Gill Sans}
\setmonofont[]{JetBrains Mono}
\setmathfont[]{Cambria Math}
\ifXeTeX
\usepackage{xeCJK}
\setCJKmainfont[]{SimHei}
\fi
\ifLuaTeX
\usepackage[]{luatexja-fontspec}
\setmainjfont[]{SimHei}
\fi
\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
\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
\ifPDFTeX
\else
\babelfont{rm}[]{Source Sans 3}
\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}}
% -----------------------
% CUSTOM PREAMBLE STUFF
% -----------------------
\usepackage{enumitem}
\usepackage{fontspec}
\usepackage{float}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\usepackage{nameref} %needed by zref-xr
\usepackage{zref-xr,zref-hyperref,zref-user}
\usepackage{xr-hyper}
\usepackage[normalem]{ulem}
\usepackage{setspace}
\usepackage{lineno}
\usepackage{caption}
\captionsetup{singlelinecheck=off}
\usepackage[UTF8, scheme=plain]{ctex}
\usepackage{orcidlink}
% \setkomafont{author}{\normalsize}
% for revision
\usepackage{adjustbox}
% \usepackage{xcolor}
\usepackage{mdframed}
\newmdenv[topline=false,
leftline=true,
bottomline=false,
rightline=false,
linewidth=3pt,
%backgroundcolor=lightgray,
linecolor=gray!30,
backgroundcolor=gray!5,
skipabove=\topsep,
skipbelow=\topsep,
leftmargin=0pt,
rightmargin=0pt,
innertopmargin=0pt,
innerbottommargin=0pt
]{refquote}
\newmdenv[topline=false,
leftline=true,
bottomline=false,
rightline=false,
linewidth=3pt,
%backgroundcolor=lightgray,
backgroundcolor=red!3!white,
linecolor=red!30!white,
skipabove=\topsep,
skipbelow=\topsep,
leftmargin=0pt,
rightmargin=0pt,
innertopmargin=10pt,
innerbottommargin=10pt
]{question}
% setup hyperlink for page and line number
\def\msname{MS}
\def\smname{SM}
\setenumerate{labelsep=*, leftmargin=1.0pc}
%\zexternaldocument*{ManuscriptNew\veraa}
\zexternaldocument*{\msname}
\zexternaldocument*{\smname}
\newcommand{\hlabel}[1]{\label{#1}\hypertarget{#1}{
\linelabel{line:#1}}}
%\externaldocument[si-]{\smname\veraa}[\smname\veraa.pdf]
\makeatletter
\newcommand{\clab}[2][]{
\protected@write\@auxout{\let\clab\@secondoftwo}{
\string\newlabel{r:#1}{{#2}{}}}%
\hlabel{#1}#2\hlabel{#1end}}
\makeatother
\newcommand{\zhypera}[1]{\href[pdfnewwindow]{\msname.pdf\##1}{\\[1ex]\textbf{Page \zpageref{#1}, Line
\zref{line:#1}--\zref{line:#1end}:}\\}}
\newcommand{\cref}[1]{\begin{refquote}\zhypera{#1}{\zref{r:#1}}\\[-0.5ex]\end{refquote}}
% \newenvironment{ra}[1][\unskip]{\par \noindent \\[-1ex] \textbf{Response/Action:}\par\bf}{\ \\}
\renewenvironment{quote}{\begin{question}}{\end{question}}
% \renewenvironment{verbatim}{\begin{ra}}{\end{ra}}
% -----------------
% Title block stuff
% -----------------
% Title
\makeatletter
\renewcommand{\title}[1]{\gdef\@title{\large\textbf{#1}}} % Adjust \Huge or other font commands
\makeatother
% ------------------
% Section headings
% ------------------
\usepackage{titlesec}
\titleformat*{\section}{\Large\sffamily\bfseries\raggedright}
\titleformat*{\subsection}{\large\sffamily\bfseries\raggedright}
\titleformat*{\subsubsection}{\normalsize\sffamily\bfseries\raggedright}
\titleformat*{\paragraph}{\small\sffamily\bfseries\raggedright}
%\titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
% Starred version removes indentation in following paragraph
\titlespacing*{\section}{0em}{2em}{0.1em}
\titlespacing*{\subsection}{0em}{1.25em}{0.1em}
\titlespacing*{\subsubsection}{0em}{0.75em}{0em}
% ------------------
% Headers/Footers
% ------------------
% \usepackage{fancyhdr}
% \pagestyle{fancy}
% \fancyhf{}
% \fancyhead[L,C,R]{}
% \fancyfoot[L,C]{}
% \fancyfoot[R]{\thepage}
% \renewcommand{\headrulewidth}{1pt}
% \fancypagestyle{plain}{%
% \renewcommand{\headrulewidth}{0pt}%
% \fancyhf{}%
% \fancyfoot[R]{\thepage}%
% }
% \renewcommand\footnoterule{\rule{\linewidth}{0.1pt}\vspace{5pt}}
% ------------------
% Captions
% ------------------
\usepackage[labelfont=bf,labelsep=period]{caption}
\captionsetup[figure]{font=footnotesize,justification=raggedright,singlelinecheck=false,format=hang}
% ---------------------------
% END CUSTOM PREAMBLE STUFF
% ---------------------------
\usepackage{endfloat}
\doublespacing
\linenumbers
\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}
\author{\footnotesize Xxxxx
Yyyy\textsuperscript{a,\#} \and \footnotesize Ming
Su\textsuperscript{\orcidlink{0000000198211268},a,b,\#,*} \and \footnotesize Min
Yang\textsuperscript{a,b,*}}
\date{}
\begin{document}
% for some reason this does not work in header
\renewcommand{\abstractname}{Abstract.}
% add the short title to the fancy header
\maketitle
%\noindent \rule{\linewidth}{.5pt}
%\noindent \rule{\linewidth}{.5pt}
\textsuperscript{\#} These authors contributed equally to this work.
\textsuperscript{a} Key Laboratory of Environmental Aguatic Chemistry,
State Key Laboratory of Regional Environment and Sustainability,
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{}
\section{Main}\label{main}
\section{Methods}\label{methods}
\section{Results}\label{results}
\newpage{}
\section*{References}\label{references}
\addcontentsline{toc}{section}{References}
\phantomsection\label{refs}
\newpage{}
\end{document}
+3
View File
@@ -1,2 +1,5 @@
# Main
This is a nice paragraph. [This is something useful according to Reviewer 1.]{.clab options="r1q0101"}
Figure from SM.pdf, see `r zref("sfg-demo")`.
+29 -9
View File
@@ -2,7 +2,7 @@
subtitle: "Revision Note"
msname: MS
smname: SM
# date: last-modified
isRN: true
bibliography: [../BB/Ref.bib, ../BB/localRef.bib]
csl: _extensions/drwater/dwinst/nature.csl
format:
@@ -10,16 +10,10 @@ format:
dwms-docx: default
dwms-pdf:
number-sections: true
latex-clean: true
header-includes:
- \renewcommand{\thetable}{R\arabic{table}}
- \renewcommand{\thefigure}{R\arabic{figure}}
- \renewcommand{\theequation}{R\arabic{equation}}
- \renewcommand{\figurename}{Figure}
- \renewcommand{\tablename}{Table}
filters:
- latex-environment
- authoraffil
lightbox: auto
---
```{r}
@@ -44,7 +38,7 @@ Thank you.
# Reviewer #1:
> 0. COMMENT 1
> 0. COMMENT 0
**Response/Action:**
@@ -52,3 +46,29 @@ Thank you very much for your revision. We made changes as shown below.
`r cref("r1q0101")`
> 1. COMMENT 1
**Response/Action:**
Thank you very much for your revision. We added a figure like below.
::: {#rfg-figr1}
```{r}
plot(1)
```
Figure in RN to clarify.
:::
# Reviewer #2
> 1. COMMENT 1
**Response/Action:**
Thank you very much for your revision. We made changes as shown below.
`r cref("r2q0101")`
+7
View File
@@ -6,6 +6,13 @@
\providecommand*\HyPL@Entry[1]{}
\HyPL@Entry{0<</S/D>>}
\babel@aux{english}{}
\@writefile{toc}{\contentsline {section}{Supplementary Fig.~\ref {sfg-demo}}{3}{Doc-Start}\protected@file@percent }
\newlabel{sfg-demo}{{}{3}{\texorpdfstring {Supplementary Fig.~\ref {sfg-demo}}{Supplementary Fig.~}}{Doc-Start}{}}
\newlabel{r:r2q0101}{{A new supplementary figure.}{}}
\newlabel{r2q0101}{{}{3}{\texorpdfstring {Supplementary Fig.~\ref {sfg-demo}}{Supplementary Fig.~}}{Doc-Start}{}}
\newlabel{r2q0101end}{{}{3}{\texorpdfstring {Supplementary Fig.~\ref {sfg-demo}}{Supplementary Fig.~}}{Doc-Start}{}}
\newlabel{line:r2q0101}{{14}{3}{}{}{}}
\newlabel{line:r2q0101end}{{14}{3}{}{}{}}
\@writefile{lost}{\contentsline {sfg}{\numberline {1}{\ignorespaces Caption of demo figure}}{3}{sfg.1}\protected@file@percent }
\newlabel{sfg-demo}{{1}{3}{Caption of demo figure}{sfg.1}{}}
\gdef \@abspage@last{3}
+12 -17
View File
@@ -1,27 +1,24 @@
---
msname: MS
smname: SM
bibliography: [../BB/Ref.bib, ../BB/localRef.bib]
csl: _extensions/drwater/dwinst/nature.csl
isSM: true
# bibliography: [../BB/Ref.bib, ../BB/localRef.bib]
# csl: _extensions/drwater/dwinst/nature.csl
subtitle: "Supplementary Information"
date: ""
keep-tex: true
latex-clean: false # to keep aux
linenumber: true
format:
dwms-html: default
dwms-docx: default
dwms-pdf:
latex-clean: false # to keep aux
keep-md: false
keep-tex: true
header-includes:
- \doublespacing
- \linenumbers
- \let\oldsection\section
- \renewcommand{\section}{\clearpage\oldsection}
- \let\oldsubsection\subsection
- \renewcommand{\subsection}{\clearpage\oldsubsection}
toc: false # 手动设置了
filters:
- latex-environment
- authoraffil
lightbox: auto
commands: [clab]
---
\thispagestyle{empty}
@@ -39,11 +36,9 @@ require(drwateR)
rmdify::rmd_init()
```
Figures and/or tables are provided below as the supplementary evidences to the main text.
{{< pagebreak >}}
```{=latex}
\clearpage
@@ -54,9 +49,9 @@ Figures and/or tables are provided below as the supplementary evidences to the m
}
```
# [@sfg-demo]
{{< pagebreak >}}
[A new supplementary figure.]{.clab options="r2q0101"}
::: {#sfg-demo}
Binary file not shown.
Submodule _extensions/drwater updated: 5c1144f28b...7870d6b57b
+1 -1
View File
@@ -137,7 +137,7 @@ project:
- MS/RP.qmd
- TC/index.qmd
- SD/
# - MS/RN.qmd
- MS/RN.qmd
# - MS/AC.qmd
- RP/
website:
+28 -2
View File
@@ -13,7 +13,33 @@ dwfun::ggsavep("./figures/GA20240729.pdf", loadit = TRUE)
```{r}
#| echo: false
#| cache: false
#| output: asis
cat(system("grep '^abstract: ' ./MS/MS.qmd | sed -e 's/^abstract: \"*\\(.*\\).$/\\1/g'", intern = TRUE))
# function
extract_abstract <- function(file) {
content <- readLines(file, warn = FALSE)
abstract_line <- grep("^# Abstract[^:]", content, ignore.case = TRUE)[1]
if (length(abstract_line) == 0) return(NA)
start <- abstract_line + 1
while (start <= length(content) && trimws(content[start]) == "") {
start <- start + 1
}
if (start > length(content)) return(NA)
end <- start
while (
end <= length(content) &&
trimws(content[end]) != "" &&
!grepl("^#", content[end])
) {
end <- end + 1
}
paste(content[start:(end - 1)], collapse = " ")
}
# extract
file <- "./MS/MS.qmd"
abstract <- rmarkdown::yaml_front_matter(file)$abstract
if (is.null(abstract)) {
abstract <- extract_abstract(file)
}
cat(abstract)
```