-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
109 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
SRC_TEX="paper.tex" | ||
|
||
#================================================================================== | ||
# Citations after periods. | ||
# Expected behavior is: | ||
# Before---This citation should appear after the period \cite{multi, citation, here}. | ||
# After----This citation should appear after the period.\cite{multi, citation, here} | ||
#================================================================================== | ||
sed -i 's/\s*\\cite{\([^}]*\)}\./.\\cite{\1}/g' $SRC_TEX #Change \cite{} with periods | ||
|
||
sed -i 's/\s*\\citep{\([^}]*\)}\./.\\citep{\1}/g' $SRC_TEX #same as above, but for \citep | ||
|
||
sed -i 's/\s*\\citealt{\([^}]*\)}\./.\\citep{\1}/g' $SRC_TEX #same as above, but for \citealt | ||
|
||
#================================================================================== | ||
# Citations after commas. | ||
# Expected behavior is: | ||
# Before---This citation \cite{einstein}, should be after the comma. | ||
# After----This citation,\cite{einstein} should be after the comma. | ||
#================================================================================== | ||
sed -i 's/\s*\\cite{\([^}]*\)},/,\\cite{\1}/g' $SRC_TEX #Change \cite{} with commas | ||
|
||
sed -i 's/\s*\\citep{\([^}]*\)},/,\\citep{\1}/g' $SRC_TEX #same as above, but for \citep | ||
|
||
sed -i 's/\s*\\citealt{\([^}]*\)},/,\\citep{\1}/g' $SRC_TEX #same as above, but for \citealt |