Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
code-generic
code-webis-cmd
Commits
6753cd44
Commit
6753cd44
authored
Dec 08, 2020
by
Johannes Kiesel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformat_bib sorts fields
parent
9f3fe2d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tools/latex.sh
tools/latex.sh
+6
-0
No files found.
tools/latex.sh
View file @
6753cd44
...
...
@@ -14,11 +14,17 @@ cmd_reformat_bib() {
continue
fi
sort_order
=
$(
grep
'^\s*\w\w*\s*='
"
${
f
}
"
\
|
sed
's/^\s*\(\w\w*\).*/\1/'
\
|
sort
|
uniq
\
|
awk
'{if (NR != 1) {printf " # "}; printf "%s", $1}'
)
logInfo
"Reformatting '
${
f
}
'..."
bibtool
--
'print.align = 24'
--
'print.align.key = 0'
\
--
'print.equal.right = off'
--
'pass.comments = on'
\
--
'print.line.length = 1000'
--
'print.use.tab = off'
\
--
'new.entry.type {Omitted}'
\
--
"sort.order = { * =
${
sort_order
}
}"
\
--
'rewrite.rule = {doi# "https?://.*doi.*\.org/\(10\.[0-9]+/.+\)"# "\1"}'
\
"
$f
"
|
sed
'/./,$!d'
| sponge
"
$f
"
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment