Commit 6ecd5d86 authored by Michalis Kokologiannakis's avatar Michalis Kokologiannakis
Browse files

Merge branch 'new-infr' into 'master'

Produce bib with m4

See merge request !1
parents f7508617 7fe2ea42
Pipeline #60606 passed with stage
in 50 seconds
......@@ -3,19 +3,5 @@
*.bak
*.backup
.*.sw[a-z]
*.pfx
*.aux
*.fls
*.log
*.out
*.fdb_latexmk
*.bbl
*.blg
*.toc
*.tof
*.spl
*.snm
*.nav
*.pdf
*.bib
check-bib:
stage: test
script:
- apt-get update && apt-get install -y bibtool
- ./check.sh
<a name="intro">Getting started</a>
-----------------------------------
### Why `biblatex`
- Works with `biber`, so UTF-8 support is provided.
- Aliases for bibliography entries are possible.
- More field, preprocessing, and customization options.
### Switching to `biblatex`
First of all, since for most paper the ACM templates are used, and these templates use
`natbib`, we need to disable that with the following line:
\documentclass[natbib=false]{acmart}
Then, converting from `natbib` is pretty straightforward. The minimal requirements are:
\usepackage[natbib=true]{biblatex}
\bibliography{dotbibfile}
or better yet:
\let\citename\relax
\usepackage[natbib=true, abbreviate=true, dateabbrev=true, isbn=true, doi=true, urldate=comp, url=true, maxbibnames=9, maxcitenames=2, backref=false, backend=biber, style=ACM-Reference-Format, language=american]{biblatex}
\addbibresource{../bib/biblio.bib}
\renewcommand{\bibfont}{\Small}
We can add one or several local `.bib` files
as our database using the `\addbibresource` command. In addition,
`\addbibresource` also allows to load remote resources and other data
types (e.g., `ris`).
Finally, to actually print the bibliography, we can use the following command at the place
where we want it to be printed:
\printbibliography
<a name="usage">Usage</a>
-----------------------------------
### Citation commands
The option `natbib=true` enables `natbib` compatibility in order for
us to be able to use `\citep` and `\citet` as with `natbib`. It will
thus automatically create the relevant aliases for these commands, and
we can use them as before.
If `natbib` compatibility is not desired, we can use `\textcite`
instead of `\citet` and `\autocite` instead of `citep`.
Note that `\autocite` is preferred instead of `\parencite` (the actual
counterpart of `natbib`'s `\citep`), because `\autocite` is a
high-level citation command that will be translated into the low-level
bare citation command appropriate for the chosen style. For example,
it will enclose a citation in parentheses in author-year styles, but
produce a footnote citation in author-title styles. Furthermore, it
will automatically move trailing punctuation.
#### An Example
With `natbib`, a model LaTeX document would look as follows:
\documentclass[<ACMoptions>]{acmart}
\bibliographystyle{<somestyle>}
\begin{document}
A bare citation command: \citep{<key>}.
A citation command for use in the flow of text: As \citet{<key>} said \ldots
\bibliography{<mybibfile>} % Selects .bib file AND prints bibliography
\end{document}
With `biblatex` and its built-in styles, this changes to:
\documentclass[<ACMoptions>,natbib=false]{acmart}
\let\citename\relax
\usepackage[natbib=true, abbreviate=true, dateabbrev=true, isbn=true, doi=true, urldate=comp, url=true, maxbibnames=9, maxcitenames=2, backref=false, backend=biber, style=ACM-Reference-Format, language=american]{biblatex}
% \bibliography{<mybibfile>} % ONLY selects .bib file; syntax for version <= 1.1b
\addbibresource{../bib/biblio.bib} % Syntax for version >= 1.2
\renewcommand{\bibfont}{\Small}
\begin{document}
A bare citation command: \citep{<key>}.
A citation command for use in the flow of text: As \citet{<key>} said \ldots
\balance
\printbibliography[<options for printing>]
\end{document}
### Customization
#### Entry aliases
With `biblatex` an entry can have multiple aliases specified in the
`ids` field.
#### Title Casing
See [here](https://tex.stackexchange.com/questions/20335/proper-casing-in-citation-bibliography-titles-using-biblatex-biber)
#### Changing how words/phrases appear in the bibliography
For instance, one might want to replace "Lecture Notes in Computer Science"
by "LNCS" and "Lecture Notes In Artificial Intelligence" by "LNAI":
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science},
replace={LNCS}]
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence},
replace={LNAI}]
}
}
}
#### Creating appendix entries
To avoid creating an appendix entry for each different paper, an
`appendix` key is provided to make easier referring to appendices.
To change the text that appears for the appendix, you can set
appropriately the `\bibAppendix` and `\bibAppendixAuthor` macros in
the preamble.
#### Changing venue names
In the beginning of the `.bib` file there are macros defined with
names for all conferences and journals used in the bibliography. These
macros can be changed accordingly depending on the desired publishing
style.
#### Suppressing a particular field
Instead of having to manually edit the bibliography, with `biblatex` one
can put a command like the following in the preamble, in order to suppress, e.g.,
the `note` field:
\AtEveryBibitem{%
\clearfield{note}%
}
These [guidelines](https://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles/13076#13076) are extremely useful for customizing the appearance
of a bibliography.
<a name="problems">Troubleshooting</a>
-----------------------------------
### Citation commands do not work properly
If some previous version of the bibliography file had been compiled
using `natbib`, you may need to delete some of the auxiliary files
created by LaTeX and BibTeX (`.aux`, `.bbl`, `.blg`) for it to work
properly.
### Balancing the bibliography
If the bibliography does not turn out balanced, use a `\balance`
command just above the `printbibliography` to make it balanced.
### The names of all the authors are printed when citing a paper
By default, if there are more than one papers by the same authors,
`biblatex` will print the full names when using `\citet`, to avoid
ambiguity in text. This is why the `maxcitenames=2` option is necessary.
.SUFFIXES: .m4 .bib
.PHONY: default clean
export SHELL := /bin/bash
M4=m4
M4FLAGS=
INPUT=biblio.m4
OUTPUT=biblio.bib
default: $(OUTPUT)
biblio.bib: $(INPUT)
$(M4) $(M4FLAGS) $(INPUT) > biblio.bib
clean:
@$(RM) *.bib
@$(RM) *~ \#*\#
......@@ -7,8 +7,7 @@ used in paper writing.
Maintained by: Michalis Kokologiannakis.
* [Dependencies](#deps)
* [Getting started](#intro)
* [Usage](#usage)
* [Building the database](#build)
* [Editing the database](#edit)
* [Troubleshooting](#problems)
......@@ -16,178 +15,28 @@ Maintained by: Michalis Kokologiannakis.
-------------------------------
Since December 2019, the bibliography database assumes `biblatex` is
used instead of `natbib`, and this basically constitutes the only
dependency. Some of the reasons why `biblatex` is preferred are
listed [below](#intro).
used instead of `natbib`, and `bibtool` is necessary for sorting the
database
In case one wants to actually edit the database, `bibtool` can
also be proven very helpful.
Some of the reasons why `biblatex` is preferred as well as useful
commands are listed [here](BIBLATEX.md).
<a name="intro">Getting started</a>
-----------------------------------
<a name="build">Building the database</a>
-----------------------------------------
### Why `biblatex`
Issue `make` to produce the `.bib` file.
- Works with `biber`, so UTF-8 support is provided.
- Aliases for bibliography entries are possible.
- More field, preprocessing, and customization options.
### Switching to `biblatex`
First of all, since for most paper the ACM templates are used, and these templates use
`natbib`, we need to disable that with the following line:
\documentclass[natbib=false]{acmart}
Then, converting from `natbib` is pretty straightforward. The minimal requirements are:
\usepackage[natbib=true]{biblatex}
\bibliography{dotbibfile}
or better yet:
\let\citename\relax
\usepackage[natbib=true, abbreviate=true, dateabbrev=true, isbn=true, doi=true, urldate=comp, url=true, maxbibnames=9, maxcitenames=2, backref=false, backend=biber, style=ACM-Reference-Format, language=american]{biblatex}
\addbibresource{../bib/biblio.bib}
\renewcommand{\bibfont}{\Small}
We can add one or several local `.bib` files
as our database using the `\addbibresource` command. In addition,
`\addbibresource` also allows to load remote resources and other data
types (e.g., `ris`).
Finally, to actually print the bibliography, we can use the following command at the place
where we want it to be printed:
\printbibliography
<a name="usage">Usage</a>
-----------------------------------
### Citation commands
The option `natbib=true` enables `natbib` compatibility in order for
us to be able to use `\citep` and `\citet` as with `natbib`. It will
thus automatically create the relevant aliases for these commands, and
we can use them as before.
If `natbib` compatibility is not desired, we can use `\textcite`
instead of `\citet` and `\autocite` instead of `citep`.
Note that `\autocite` is preferred instead of `\parencite` (the actual
counterpart of `natbib`'s `\citep`), because `\autocite` is a
high-level citation command that will be translated into the low-level
bare citation command appropriate for the chosen style. For example,
it will enclose a citation in parentheses in author-year styles, but
produce a footnote citation in author-title styles. Furthermore, it
will automatically move trailing punctuation.
#### An Example
With `natbib`, a model LaTeX document would look as follows:
\documentclass[<ACMoptions>]{acmart}
\bibliographystyle{<somestyle>}
\begin{document}
A bare citation command: \citep{<key>}.
A citation command for use in the flow of text: As \citet{<key>} said \ldots
\bibliography{<mybibfile>} % Selects .bib file AND prints bibliography
\end{document}
With `biblatex` and its built-in styles, this changes to:
\documentclass[<ACMoptions>,natbib=false]{acmart}
\let\citename\relax
\usepackage[natbib=true, abbreviate=true, dateabbrev=true, isbn=true, doi=true, urldate=comp, url=true, maxbibnames=9, maxcitenames=2, backref=false, backend=biber, style=ACM-Reference-Format, language=american]{biblatex}
% \bibliography{<mybibfile>} % ONLY selects .bib file; syntax for version <= 1.1b
\addbibresource{../bib/biblio.bib} % Syntax for version >= 1.2
\renewcommand{\bibfont}{\Small}
\begin{document}
A bare citation command: \citep{<key>}.
A citation command for use in the flow of text: As \citet{<key>} said \ldots
\balance
\printbibliography[<options for printing>]
\end{document}
### Customization
#### Entry aliases
With `biblatex` an entry can have multiple aliases specified in the
`ids` field.
#### Title Casing
See [here](https://tex.stackexchange.com/questions/20335/proper-casing-in-citation-bibliography-titles-using-biblatex-biber)
#### Changing how words/phrases appear in the bibliography
For instance, one might want to replace "Lecture Notes in Computer Science"
by "LNCS" and "Lecture Notes In Artificial Intelligence" by "LNAI":
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science},
replace={LNCS}]
\step[fieldsource=series,
match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence},
replace={LNAI}]
}
}
}
#### Creating appendix entries
To avoid creating an appendix entry for each different paper, an
`appendix` key is provided to make easier referring to appendices.
To change the text that appears for the appendix, you can set
appropriately the `\bibAppendix` and `\bibAppendixAuthor` macros in
the preamble.
#### Changing venue names
In the beginning of the `.bib` file there are macros defined with
names for all conferences and journals used in the bibliography. These
macros can be changed accordingly depending on the desired publishing
style.
#### Suppressing a particular field
Instead of having to manually edit the bibliography, with `biblatex` one
can put a command like the following in the preamble, in order to suppress, e.g.,
the `note` field:
\AtEveryBibitem{%
\clearfield{note}%
}
These [guidelines](https://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles/13076#13076) are extremely useful for customizing the appearance
of a bibliography.
You can use long names for conferences/journals by setting
`M4FLAGS=-DFULL` when building the database.
<a name="edit">Editing the database</a>
-------------------------------
--------------------------------------
### Styling
The `.bib` file is sorted alphabetically according to the citation
The `.m4` file is sorted alphabetically according to the citation
keys, braces are used for the field values, and the fields are sorted in
a particular fashion.
......@@ -203,31 +52,7 @@ style:
### Inserting new items
In order to make sure that the new item adheres to the guidelines,
you can use `bibtool`, provided that at least the key of the entry
you can use `sort.sh`, provided that at least the key of the entry
is properly set, and the venue name uses the proper macro.
This can be done with the following command:
bibtool -s -r sort.rsc -i <bib_input.bib> -o <bib_output.bib>
This command will also sort the bibliography according to key values
<a name="problems">Troubleshooting</a>
-----------------------------------
### Citation commands do not work properly
If some previous version of the bibliography file had been compiled
using `natbib`, you may need to delete some of the auxiliary files
created by LaTeX and BibTeX (`.aux`, `.bbl`, `.blg`) for it to work
properly.
### Balancing the bibliography
If the bibliography does not turn out balanced, use a `\balance`
command just above the `printbibliography` to make it balanced.
### The names of all the authors are printed when citing a paper
By default, if there are more than one papers by the same authors,
`biblatex` will print the full names when using `\citet`, to avoid
ambiguity in text. This is why the `maxcitenames=2` option is necessary.
`sort.sh` uses `bibtool` to properly format entries.
This diff is collapsed.
#!/bin/bash
# Checks the format of biblio.m4
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you can access it online at
# http://www.gnu.org/licenses/gpl-2.0.html.
#
# Author: Michalis Kokologiannakis <mixaskok@gmail.com>
# current directory
TOP="${TOP:-$PWD}"
input=$(cat $TOP/biblio.m4)
sorted=$($TOP/sort.sh /dev/stdout)
# check whether input is sorted
if [[ "${input}" != "${sorted}" ]]
then
diff <(echo "${input}") <(echo "${sorted}")
echo "Input not sorted! Consider running 'sort.sh'"
exit 1
fi
# check whether venue names are properly set
errors=$(cat biblio.m4 | awk '
BEGIN { proceedings=0; article = 0; }
/@/ { if ($1 ~ /@Article/) article = 1; else article = 0;
if ($1 ~ /Proceedings/) proceedings = 1; else proceedings = 0; }
/booktitle/ { if (proceedings && $3 !~ /CONF_*/) print $0 }
/series/ { if (article && $3 !~ /JNL_*/) print $0 }'
)
if [[ -n "${errors}" ]]
then
echo "${errors}"
echo "Entries not properly set! Consider using CONF_* and JNL_*."
exit 2
fi
define(BIB_APPENDIX_TITLE, ifdef(`APPENDIX_TITLE', APPENDIX_TITLE, Supplementary material for this paper.))dnl
define(BIB_APPENDIX_AUTHOR, ifdef(`APPENDIX_AUTHOR', APPENDIX_AUTHOR, Supplementary material))dnl
define(BIB_ANONYMIZED_TITLE, ifdef(`ANONYMIZED_TITLE', ANONYMIZED_TITLE, Anonymized material for this submission.))dnl
define(BIB_ANONYMIZED_AUTHOR, ifdef(`ANONYMIZED_AUTHOR', ANONYMIZED_AUTHOR, Anonymous author(s)))dnl
define(BIB_CURRENT_YEAR, ifdef(`CURRENT_YEAR', CURRENT_YEAR, 2022))dnl
dnl
define(CONF_ABZ, ifdef(`FULL', ``Abstract State Machines, B and Z'', ABZ))dnl
define(CONF_ACSD, ifdef(`FULL', International Conference on Application of Concurrency to System Design, ACSD))dnl
define(CONF_APLAS, ifdef(`FULL', Asian Symposium on Programming Languages and Systems, APLAS))dnl
define(CONF_APSYS, ifdef(`FULL', Asia Pacific Workshop on Systems, APSys))dnl
define(CONF_ASPLOS, ifdef(`FULL', International Conference on Architectural Support For Programming Languages And Operating Systems, ASPLOS))dnl
define(CONF_ATVA, ifdef(`FULL', International Symposium on Automated Technology for Verification and Analysis, ATVA))dnl
define(CONF_CAV, ifdef(`FULL', International Conference on Computer Aided Verification, CAV))dnl
define(CONF_CC, ifdef(`FULL', International Conference on Compiler Construction, CC))dnl
define(CONF_CGO, ifdef(`FULL', International Symposium on Code Generation and Optimization, CGO))dnl
define(CONF_CONCUR, ifdef(`FULL', International Conference on Concurrency Theory, CONCUR))dnl
define(CONF_DATE, ifdef(`FULL', ``Design, Automation, and Test in Europe'', DATE))dnl
define(CONF_DFRWS, ifdef(`FULL', Digital Forensic Research Workshop, DFRWS))dnl
define(CONF_DISC, ifdef(`FULL', International Symposium on Distributed Computing, DISC))dnl
define(CONF_EC2, ifdef(`FULL', International Workshop on Exploiting Concurrency Efficiently and Correctly, EC{$^2$}))dnl
define(CONF_ECOOP, ifdef(`FULL', European Conference on Object-Oriented Programming, ECOOP))dnl
define(CONF_ESOP, ifdef(`FULL', European Symposium on Programming, ESOP))dnl
define(CONF_FAST, ifdef(`FULL', USENIX Conference on File and Storage Technologies, FAST))dnl
define(CONF_FM, ifdef(`FULL', International Symposium on Formal Methods, FM))dnl
define(CONF_FMCAD, ifdef(`FULL', International Conference on Formal Methods in Computer-Aided Design, FMCAD))dnl
define(CONF_FMCO, ifdef(`FULL', International Conference on Formal Methods for Components and Objects, FMCO))dnl
define(CONF_FORTE, ifdef(`FULL', ``International Conference on Formal Techniques for Distributed Objects, Components, and Systems'', FORTE))dnl
define(CONF_FREENIX, ifdef(`FULL', USENIX Annual Technical Conference (FREENIX Track), USENIX ATC (FREENIX Track)))dnl
define(CONF_ICALP, ifdef(`FULL', ``International Colloquium on Automata, Languages and Programming'', ICALP))dnl
define(CONF_ICCL, ifdef(`FULL', International Conference on Computer Languages, ICCL))dnl
define(CONF_ICDCS, ifdef(`FULL', International Conference on Distributed Computing Systems, ICDCS))dnl
define(CONF_ICFP, ifdef(`FULL', International Conference on Functional Programming, ICFP))dnl
define(CONF_IFIP, ifdef(`FULL', Information Processing, IFIP))dnl
define(CONF_IFM, ifdef(`FULL', International Conference on integrated Formal Methods, IFM))dnl
define(CONF_ISCA, ifdef(`FULL', International Symposium on Computer Architecture, ISCA))dnl
define(CONF_ISP, ifdef(`FULL', International Symposium on Programming, ISP))dnl
define(CONF_ISSTA, ifdef(`FULL', International Symposium on Software Testing and Analysis, ISSTA))dnl
define(CONF_ITP, ifdef(`FULL', International Conference on Interactive Theorem Proving, ITP))dnl
define(CONF_JMLC, ifdef(`FULL', Joint Modular Languages Conference, JMLC))dnl
define(CONF_LICS, ifdef(`FULL', Symposium on Logic in Computer Science, LICS))dnl
define(CONF_LINUXEXPO, ifdef(`FULL', LinuxExpo, LinuxExpo))dnl
define(CONF_LOLA, ifdef(`FULL', Syntax and Semantics of Low-Level Languages, LOLA))dnl
define(CONF_MSPC, ifdef(`FULL', Workshop on Memory Systems Performance and Correctness, MSPC))dnl
define(CONF_NETYS, ifdef(`FULL', International Conference on Networked Systems, NETYS))dnl
define(CONF_OLS, ifdef(`FULL', Ottawa Linux Symposium, OLS))dnl
define(CONF_OOPSLA, ifdef(`FULL', ``Conference on Object-Oriented Programming Systems, Languages,and Applications'', OOPSLA))dnl
define(CONF_OPODIS, ifdef(`FULL', International Conference on Principles of Distributed Systems, OPODIS))dnl
define(CONF_OSDI, ifdef(`FULL', USENIX Symposium on Operating Systems Design and Implementation, OSDI))dnl
define(CONF_PLDI, ifdef(`FULL', Programming Language Design and Implementation, PLDI))dnl
define(CONF_PLOS, ifdef(`FULL', Workshop on Programming Languages and Operating Systems, PLOS))dnl
define(CONF_PLS, ifdef(`FULL', International Conference on PLS and Related Methods, PLS))dnl
define(CONF_PNAROMC, ifdef(`FULL', Petri Nets: Applications and Relationships to Other Models of Concurrency, PNAROMC))dnl
define(CONF_PODC, ifdef(`FULL', Principles of Distributed Computing, PODC))dnl
define(CONF_POPL, ifdef(`FULL', Symposium on Principles of Programming Languages, POPL))dnl
define(CONF_POST, ifdef(`FULL', Conference on Principles of Security and Trust, POST))dnl
define(CONF_PPDP, ifdef(`FULL', International Symposium on Principles and Practice of Declarative Programming, PPDP))dnl
define(CONF_PPOPP, ifdef(`FULL', Principles and Practice of Parallel Programming, PPoPP))dnl
define(CONF_SAS, ifdef(`FULL', Static Analysis Symposium, SAS))dnl
define(CONF_SOSP, ifdef(`FULL', Symposium on Operating Systems Principles, SOSP))dnl
define(CONF_SPAA, ifdef(`FULL', Symposium on Parallelism in Algorithms and Architectures, SPAA))dnl
define(CONF_SP, ifdef(`FULL', Symposium on Security and Privacy, SP))dnl
define(CONF_SPIN, ifdef(`FULL', International SPIN Symposium on Model Checking of Software, SPIN))dnl
define(CONF_TACAS, ifdef(`FULL', International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS))dnl
define(CONF_TASE, ifdef(`FULL', Theoretical Aspects of Software Engineering, TASE))dnl
define(CONF_TFP, ifdef(`FULL', International Symposium on Trends in Functional Programming 2012, TFP))dnl
define(CONF_TLCA, ifdef(`FULL', Conference on Typed Lambda Calculi and Applications, TLCA))dnl
define(CONF_TLDI, ifdef(`FULL', Workshop on Types in Language Design and Implementation, TLDI))dnl
define(CONF_TPHOLS, ifdef(`FULL', International Conference on Theorem Proving in Higher Order Logics, TPHOLs))dnl
define(CONF_USENIX, ifdef(`FULL', Usenix Annual Technical Conference, USENIX ATC))dnl
define(CONF_VMCAI, ifdef(`FULL', ``International Conference on Verification, Model Checking, and Abstract Interpretation'', VMCAI))dnl
define(CONF_VSTTE, ifdef(`FULL', ``Verified Software: Theories, Tools and Experiments'', VSTTE))dnl
define(CONF_WPTE, ifdef(`FULL', International Workshop on Rewriting Techniques for Program Transformations and Evaluation, WPTE))dnl
dnl
define(JNL_ACMCS, ifdef(`FULL', ACM Computing Surveys, {ACM} Comput. Surv.))dnl
define(JNL_ACMTCS, ifdef(`FULL', ACM Transactions on Computer Systems, {ACM} Trans. Comput. Syst.))dnl
define(JNL_AI, ifdef(`FULL', Acta Informatica, Act. Inform.))dnl
define(JNL_ASE, ifdef(`FULL', Automated Software Engineering, Autom. Softw. Eng.))dnl
define(JNL_CAN, ifdef(`FULL', ACM SIGARCH Computer Architecture News, {SIGARCH} Comput. Archit. News))dnl
define(JNL_CACM, ifdef(`FULL', Communications of the ACM, Commun. {ACM}))dnl
define(JNL_COMPUTER, ifdef(`FULL', IEEE Computer, {IEEE} Comput.))dnl
define(JNL_CORR, ifdef(`FULL', Computing Research Repository, {CoRR}))dnl
define(JNL_DC, ifdef(`FULL', Distributed Computing, Distrib. Comput.))dnl
define(JNL_ENTCS, ifdef(`FULL', Electronic Notes in Theoretical Computer Science, Elect. Not. Theor. Comput. Sci.))dnl
define(JNL_FAC, ifdef(`FULL', Formal Aspects of Computing, Formal Asp. Comput.))dnl
define(JNL_FMSD, ifdef(`FULL', Formal Methods in System Design, Form. Meth. Syst. Des.))dnl
define(JNL_HAL, ifdef(`FULL', Archive ouverte HAL, {HAL}))dnl
define(JNL_JACM, ifdef(`FULL', Journal of the ACM, J. {ACM}))dnl
define(JNL_JCOMP, ifdef(`FULL', SIAM Journal on Computing, {SIAM} J. Comput.))dnl
define(JNL_JFP, ifdef(`FULL', Journal of Functional Programming, J. {FP}))dnl
define(JNL_JPDC, ifdef(`FULL', Journal of Parallel and Distributed Computing, J. Parallel Distrib. Comput.))dnl
define(JNL_PACMPL, ifdef(`FULL', Proceedings of the ACM on Programming Languages, Proc. ACM Program. Lang.))dnl
define(JNL_SCP, ifdef(`FULL', Science of Computer Programming, Sci. Comput. Program.))dnl
define(JNL_SIGACTNEWS, ifdef(`FULL', {SIGACT} News, {SIGACT} News))dnl
define(JNL_SN, ifdef(`FULL', {SIGPLAN} Notices, {SIGPLAN} Not.))dnl
define(JNL_SOSR, ifdef(`FULL', ACM SIGOPS Operating Systems Review, {SIGOPS} Oper. Syst. Rev.))dnl
define(JNL_STTT, ifdef(`FULL', International Journal on Software Tools for Technology Transfer, Int. J. Soft. Tool. Tech. Transf.))dnl
define(JNL_TCOMPUT, ifdef(`FULL', IEEE Transactions on Computers, {IEEE} Trans. Computers))dnl
define(JNL_TCOMPUTS, ifdef(`FULL', ACM Transactions on Computer Systems, {ACM} Trans. Comput. Syst.))dnl
define(JNL_TCS, ifdef(`FULL', Theoretical Computer Science, Theor. Comput. Sci.))dnl
define(JNL_TINYTOCS, ifdef(`FULL', Tiny Transactions on Computer Science, Tin. Trans. Comput. Sci.))dnl
define(JNL_TOPLAS, ifdef(`FULL', {ACM} Transactions on Programming Languages and Systems, {ACM} Trans. Program. Lang. Syst.))dnl
define(JNL_TPDS, ifdef(`FULL', {IEEE} Transactions on Parallel and Distributed Systems, {IEEE} Trans. Parallel Distrib. Syst.))dnl
define(JNL_TS, ifdef(`FULL', {ACM} Transactions on Storage, {ACM} Trans. Storage))dnl
define(JNL_TSE, ifdef(`FULL', {IEEE} Transactions on Software Engineering, {IEEE} Trans. Software Eng.))dnl
#!/bin/sh
# Sorts biblio.m4 using bibtool.
#
# Usage:
# sort.sh [output]
#
# NOTE: Overwrites biblio.m4 if no output is provided
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you can access it online at
# http://www.gnu.org/licenses/gpl-2.0.html.
#
# Author: Michalis Kokologiannakis <mixaskok@gmail.com>
# current directory
TOP="${TOP:-$PWD}"
OUT="${1:-$TOP/biblio.m4}"
# quit on error
set -e
# get current head before sorting (bibtool removes comments)