Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
_ddom
imdea-se-bib
Commits
abf8c33e
Commit
abf8c33e
authored
Apr 18, 2018
by
Alessandra Gorla
Browse files
added script to make conference proceedings really short. Updated the documentation
parent
6a92baf7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
abf8c33e
...
...
@@ -5,12 +5,12 @@
BIB_ABBREVIATE
?=
./bib-abbreviate.pl
# TODO: reinstate bibstring-crossrefs-abbrev.bib
all
:
bibstring-unabbrev.bib bibstring-abbrev.bib bibroot crossrefs-abbrevv.bib docs/index.html
all
:
bibstring-unabbrev.bib bibstring-abbrev.bib bibroot crossrefs-abbrevv.bib
crossrefs-super-abbrev.bib
docs/index.html
BIBFILES
:=
$(
shell
ls
*
.bib |
grep
-v
bibstring-unabbrev.bib |
grep
-v
bibstring-abbrev.bib
)
clean
:
bibtest-aux-clean
rm
-f
bibstring-unabbrev.bib bibstring-abbrev.bib bibroot bibtest.tex crossrefs-abbrev.bib crossrefs-abbrevv.bib
rm
-f
bibstring-unabbrev.bib bibstring-abbrev.bib bibroot bibtest.tex crossrefs-abbrev.bib crossrefs-abbrevv.bib
crossrefs-super-abbrev.bib
docs/index.html
:
README.md
asciidoctor
$<
--out-file
=
$@
...
...
@@ -27,17 +27,21 @@ bibstring-abbrev.bib: bibstring-master.bib $(BIB_ABBREVIATE)
crossrefs-abbrev.bib
:
crossrefs.bib
@
rm
-f
$@
awk
'!/address =/'
$<
>
temp
awk
'!/month
=/'
temp
>
$@
rm
temp
<crossrefs.bib
sed
\
-e
'/address
=/
d
'
\
-e
'/month =/d'
>
$@
crossrefs-abbrevv.bib
:
crossrefs-abbrev.bib
@
rm
-f
$@
sed
'/title =/s/Proceedings/Proc./g'
$<
>
temp
sed
'/booktitle =/s/Proceedings/Proc./g'
<temp
>
temp1
sed
's/International/Intl./g'
<temp1
>
temp2
sed
's/Conference/Conf./g'
< temp2
>
$@
rm
temp
*
<crossrefs-abbrev.bib
sed
\
-e
'/title =/s/Proceedings/Proc./g'
\
-e
'/booktitle =/s/Proceedings/Proc./g'
\
-e
's/International/Intl./g'
\
-e
's/Conference/Conf./g'
>
$@
crossrefs-super-abbrev.bib
:
crossrefs-abbrev.bib
@
rm
-f
$@
python cref-abbrev.py
## TODO: write a new abbreviaton script, only for [book]titles
# bibstring-crossrefs-abbrev.bib: bibstring-crossrefs-master.bib $(BIB_ABBREVIATE)
...
...
README.md
View file @
abf8c33e
...
...
@@ -50,10 +50,33 @@ USAGE
To choose the abbreviated (short) or unabbreviated (long) version of the
bibliography strings, use one of these commands in your LaTeX file:
\bibliography{bibstring-abbrev,...,crossrefs-abbrevv}
\bibliography{bibstring-abbrev,...,crossrefs-abbrev}
Most complete option. It will use full strings for journals
(
`bibstring-unabbrev`
) and full proceedings info for conferences
(
`crossrefs`
).
\bibliography{bibstring-unabbrev,...,crossrefs}
No month and address option. It will use short strings for journals
(
`bibstring-abbrev`
) and full proceedings info for conferences, but
omitting months and addresses. (
`crossrefs-abbrev`
).
\bibliography{bibstring-abbrev,...,crossrefs-abbrev}
Abbreviations option. It will use short strings for journals
(
`bibstring-abbrev`
) and will shorten some words in the proceedings
info for conferences (e.g. Proceedings --> Proc., Conference -->
Conf.) as in
`crossrefs-abbrevv`
.
\bibliography{bibstring-abbrev,...,crossrefs-abbrevv}
Super-compressed option. It will use short strings for journals
(
`bibstring-abbrev`
) and will shorten proceedings for conferences
leaving only acronyms. (e.g. ICSE 2017: Proceedings of the
International Conference...--> ICSE 2017), as in
`crossrefs-super-abbrev`
.
\bibliography{bibstring-abbrev,...,crossrefs-super-abbrev}
When using the bibliographies, add near the top of your LaTeX document:
\usepackage{url}
...
...
cref-abbrev.py
0 → 100644
View file @
abf8c33e
'''This script was written by Alessandra Gorla to create a super
abbreviated version of the crossref bibliography. Given
crossrefs-abbrev.bib, which already excludes month and address, this
script keeps only the acronyms of the conferences, which are assumed
to be before the ":".
Thus, "ICSE 2017: Proceedings of the International Conference ..."
will be reduced to "ICSE 2017".
If title and booktitle do not include any ":" the script keeps the
strings as they are.
'''
import
re
with
open
(
'crossrefs-super-abbrev.bib'
,
'w'
)
as
out_file
:
with
open
(
'crossrefs-abbrev.bib'
)
as
cref_file
:
for
l
in
cref_file
.
readlines
():
# this is the first line of title or booktitle, and we
# need to remove what comes after the :
if
(
"title ="
in
l
):
s
=
re
.
sub
(
':.*$'
,
'",'
,
l
)
out_file
.
write
(
s
)
# this is either another field that we should keep
# entirely (e.g. year =) or the first line of the entry @Proceedings
elif
(
"="
in
l
or
"@"
in
l
):
out_file
.
write
(
l
)
# this is the last line with only } and possible spaces
elif
(
re
.
match
(
' *} *'
,
l
)):
out_file
.
write
(
l
+
"
\n
"
)
# if the line does not fall in previous cases it means
# that it is a continuation of title/booktitle that should
# be discarded
crossrefs-abbrev.bib
View file @
abf8c33e
...
...
@@ -3416,10 +3416,10 @@
}
@Proceedings
{
LFP92
,
title
=
"LFP '92: Proceedings 1992 ACM Conf
.
on Lisp and
Functional
Programming"
,
booktitle
=
"LFP '92: Proceedings 1992 ACM Conf
.
on Lisp and
Functional
Programming"
,
title
=
"LFP '92: Proceedings 1992 ACM Conf
erence
on Lisp and
Functional
Programming"
,
booktitle
=
"LFP '92: Proceedings 1992 ACM Conf
erence
on Lisp and
Functional
Programming"
,
year
=
1992
,
}
...
...
crossrefs-abbrevv.bib
View file @
abf8c33e
...
...
@@ -3416,10 +3416,10 @@
}
@Proceedings
{
LFP92
,
title
=
"LFP '92: Proc. 1992 ACM Conf. on Lisp and
Functional
Programming"
,
booktitle
=
"LFP '92: Proc. 1992 ACM Conf. on Lisp and
Functional
Programming"
,
title
=
"LFP '92: Proc. 1992 ACM Conf. on Lisp and
Functional
Programming"
,
booktitle
=
"LFP '92: Proc. 1992 ACM Conf. on Lisp and
Functional
Programming"
,
year
=
1992
,
}
...
...
crossrefs-super-abbrev.bib
0 → 100644
View file @
abf8c33e
This diff is collapsed.
Click to expand it.
docs/index.html
View file @
abf8c33e
...
...
@@ -499,11 +499,47 @@ rather than one for each paper you write.</p>
<p>
To choose the abbreviated (short) or unabbreviated (long) version of the
bibliography strings, use one of these commands in your LaTeX file:
</p>
</div>
<div
class=
"paragraph"
>
<p>
Most complete option. It will use full strings for journals
(
<code>
bibstring-unabbrev
</code>
) and full proceedings info for conferences
(
<code>
crossrefs
</code>
).
</p>
</div>
<div
class=
"literalblock"
>
<div
class=
"content"
>
<pre>
\bibliography{bibstring-unabbrev,...,crossrefs}
</pre>
</div>
</div>
<div
class=
"paragraph"
>
<p>
No month and address option. It will use short strings for journals
(
<code>
bibstring-abbrev
</code>
) and full proceedings info for conferences, but
omitting months and addresses. (
<code>
crossrefs-abbrev
</code>
).
</p>
</div>
<div
class=
"literalblock"
>
<div
class=
"content"
>
<pre>
\bibliography{bibstring-abbrev,...,crossrefs-abbrev}
</pre>
</div>
</div>
<div
class=
"paragraph"
>
<p>
Abbreviations option. It will use short strings for journals
(
<code>
bibstring-abbrev
</code>
) and will shorten some words in the proceedings
info for conferences (e.g. Proceedings -
→
Proc., Conference -
→
Conf.) as in
<code>
crossrefs-abbrevv
</code>
.
</p>
</div>
<div
class=
"literalblock"
>
<div
class=
"content"
>
<pre>
\bibliography{bibstring-abbrev,...,crossrefs-abbrevv}
</pre>
</div>
</div>
<div
class=
"paragraph"
>
<p>
Super-compressed option. It will use short strings for journals
(
<code>
bibstring-abbrev
</code>
) and will shorten proceedings for conferences
leaving only acronyms. (e.g. ICSE 2017: Proceedings of the
International Conference
…​
-
→
ICSE 2017), as in
<code>
crossrefs-super-abbrev
</code>
.
</p>
</div>
<div
class=
"literalblock"
>
<div
class=
"content"
>
<pre>
\bibliography{bibstring-abbrev,...,crossrefs-abbrevv}
\bibliography{bibstring-abbrev,...,crossrefs-abbrev}
\bibliography{bibstring-unabbrev,...,crossrefs}
</pre>
<pre>
\bibliography{bibstring-abbrev,...,crossrefs-super-abbrev}
</pre>
</div>
</div>
<div
class=
"paragraph"
>
...
...
@@ -683,7 +719,7 @@ example:</p>
</div>
<div
id=
"footer"
>
<div
id=
"footer-text"
>
Last updated 2018-0
3
-1
1
1
5:37
:1
2
CET
Last updated 2018-0
4
-1
8
1
9:51
:1
7
CE
S
T
</div>
</div>
</body>
...
...
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