Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/build-latex-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
build_latex:
build_latex_diff:
runs-on: ubuntu-latest
env:
PAPER: ${{ github.event.repository.name }}
Expand All @@ -18,27 +22,28 @@ jobs:
id: compileLaTeXdiff
uses: xu-cheng/latex-action@v3
with:
texlive_version: 2023
root_file: |
${{ env.PAPER }}-diff${{ env.MAIN }}.tex
working_directory: paper
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace && latexdiff-vc --git --flatten --disable-auto-mbox --exclude-safecmd="Cref,Cref\*,hspace" -r ${{ env.MAIN }} ${{ env.PAPER }}.tex
pre_compile: git config --global --add safe.directory /github/workspace && latexdiff-vc --git --flatten --disable-auto-mbox --exclude-safecmd="Cref,Cref\*,hspace" --allow-spaces --no-links -r ${{ env.MAIN }} ${{ env.PAPER }}.tex
env:
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
continue-on-error: true
- name: Upload PDF
if: steps.compileLaTeXdiff.outcome == 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Success--Here-is-the-Diff-PDF
path: |
paper/${{ env.PAPER }}-diff${{ env.MAIN }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdiff.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Diff-Build-Failed--Here-are-the-Logs
path: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/build-latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
build_latex:
runs-on: ubuntu-latest
Expand All @@ -21,6 +25,7 @@ jobs:
id: compileLaTeXdocument
uses: xu-cheng/latex-action@v3
with:
texlive_version: 2023
root_file: |
${{ env.PAPER }}.tex
working_directory: paper
Expand All @@ -33,15 +38,15 @@ jobs:
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
continue-on-error: true
- name: Upload PDF
if: steps.compileLaTeXdocument.outcome == 'success' && github.event_name != 'push'
uses: actions/upload-artifact@v3
if: steps.compileLaTeXdocument.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: Success--Here-is-the-PDF
path: |
paper/${{ env.PAPER }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdocument.outcome == 'failure' && github.event_name != 'push'
uses: actions/upload-artifact@v3
if: steps.compileLaTeXdocument.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: Build-Failed--Here-are-the-Logs
path: |
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/build-referee-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build response-to-referees
on:
push:
branches:
- master
- main
paths: ['paper/response-to-referees.tex']
pull_request:
types: [opened, synchronize, reopened]
paths: ['paper/response-to-referees.tex']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# ok to cancel concurrent builds on main; this pdf is not part of releases
cancel-in-progress: true

jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compile LaTeX document
id: compileLaTeXdocument
uses: xu-cheng/latex-action@v3
with:
root_file: |
response-to-referees.tex
working_directory: paper
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace
- name: Upload PDF
if: steps.compileLaTeXdocument.outcome == 'success' && github.event_name != 'push'
uses: actions/upload-artifact@v4
with:
name: Success--Here-is-the-response-to-referees-PDF
path: |
paper/response-to-referees.pdf
- name: Upload build logs
if: steps.compileLaTeXdocument.outcome == 'failure' && github.event_name != 'push'
uses: actions/upload-artifact@v4
with:
name: Build-Response-Failed--Here-are-the-Logs
path: |
**/*.log
- name: Fail job if build failed
if: steps.compileLaTeXdocument.outcome == 'failure'
run: exit 1
37 changes: 37 additions & 0 deletions .github/workflows/indent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: indent

on:
push:
branches:
- 'main'
- 'master'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
indent:
runs-on: macos-latest
steps:
- name: Checking out repository
uses: actions/checkout@v4
- name: Install latexindent and bibtool
run: brew install latexindent bib-tool
- name: Run latexindent
id: run-latexindent
run: |
shopt -s nullglob # allow empty loops below
for f in *.tex; do latexindent -l ./localSettings.yaml -m -r -w $f; done
rm -f *.bak[0-9] indent.log
- name: Run bibtool
id: run-bibtool
run: |
shopt -s nullglob # allow empty loops below
cd paper
for f in *.bib; do
bibtool -R -r braces.rsc -r field.rsc -r improve.rsc -r sort_fld.rsc -r ./local.rsc -i $f -o _out_$f
mv _out_$f $f
done
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
26 changes: 0 additions & 26 deletions .github/workflows/latexindent.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- master
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -24,7 +28,7 @@ jobs:
result-encoding: string
script: |
const fs = require('fs');
return "<details>\n<summary>Chktex output</summary>\n\n```\n" + fs.readFileSync("${{ github.workspace }}/chktex_output.txt", "utf8").toString() + "\n```\n</details>";
return "Chktex output: \n```\n" + fs.readFileSync("${{ github.workspace }}/chktex_output.txt", "utf8").toString() + "```";
- name: Comment in PR
uses: thollander/actions-comment-pull-request@v2
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: add artifact links to pr
on:
workflow_run:
workflows: ["Build LaTeX document", "Build LaTeX diff document"]
workflows: ["Build LaTeX document", "Build LaTeX diff document", "Build response-to-referees"]
types: [completed]

jobs:
Expand All @@ -10,8 +10,7 @@ jobs:
runs-on: [ubuntu-latest]
steps:
- name: add artifact links to pull request and related issues step
if: github.event_name != 'push'
uses: veitbjarsch/artifacts-url-comments@v1.1.0
uses: veitbjarsch/artifacts-url-comments@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
109 changes: 109 additions & 0 deletions paper/response-to-referees.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
\documentclass[11pt]{article}

\usepackage{microtype}
\usepackage{amsmath,amssymb}
\usepackage{mathtools,bbm}
\usepackage[hidelinks]{hyperref}
\usepackage[svgnames]{xcolor}
\usepackage{enumitem}
\usepackage[margin=1.2in]{geometry}
\usepackage{mdframed}

\newmdenv[
linecolor=black,
topline=false,bottomline=false,rightline=true,
linewidth=2pt,
backgroundcolor=gray!10!white
]{answer}

\usepackage[textwidth=.95\marginparwidth,
backgroundcolor=lightgray,
linecolor=orange,
textsize=scriptsize]{todonotes}

\makeatletter
\@mparswitchfalse % Place todo notes in wide margin.
\def\listtodoname{Todo List}
\def\listoftodos{%
\section*{\listtodoname}\mbox{~}\par
\@starttoc{tdo}
}
\makeatother

\newcommand{\smarttodo}[2][]{%
\todo[caption={\protect\hypertarget{todo}{} #2}, #1]{\hyperlink{todo}{#2}
}}

% \usepackage[number]{natbib}
% \bibpunct{(}{)}{;}{a}{,}{,}
% \newcommand*{\doi}[1]{DOI: \href{http://dx.doi.org/\detokenize{#1}}{\detokenize{#1}}}
% \renewcommand*{\url}[1]{\href{\detokenize{#1}}{\texttt{\detokenize{#1}}}}

\begin{document}

\begin{center} \Large
Title line 1
\\ Title line 2
\\[6pt] \large Author1, Author2
\\[6pt] \today
\\[12pt]\Large \bf Response to reviewers
\end{center}

\noindent We thank the reviewers for their careful reading of our manuscript and their insightful and constructive comments. We followed the suggestions in almost every instance. Our responses are summarized below.

\section*{Reviewer 1 comments}

\begin{enumerate}[label={\color{black}R1.\arabic*}]
\item\label{R1:comment1} Referee comment.

\begin{answer}
Our answer.
\end{answer}

\item Referee comment.

\begin{answer}
Our answer can refer to~\ref{R1:comment1}.
\end{answer}

\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{Reviewer 2 comments}

\begin{enumerate}[label={\color{black}R2.\arabic*}]

\item\label{R2:comment1} Referee comment.

\begin{answer}
Our answer.
\end{answer}

\item Referee comment.

\begin{answer}
Our answer can refer to~\ref{R2:comment1}.
\end{answer}

\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section*{Other changes}

\begin{enumerate}[label={\color{black}O.\arabic*}]

\item Description of other change.

\end{enumerate}

% \frenchspacing
% \bibliographystyle{abbrvnat}
% \bibliography{abbrv}

\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: