Skip to content

Commit

Permalink
refine readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Dec 17, 2024
1 parent 72d81fd commit b587a44
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ When a name consists of more than two words, refer to the [BibTex
documentation][bibtex].
> examples:
> `Juan Carlos Nieves` -> `J. Nieves`
> `Manuel {Ojeda Aciego}` -> `M. {Ojeda Aciego}`
> `John von Neumann` -> `J. von Neumann`
> `Allen {V}an Gelder` -> `A. {V}an Gelder`
> `Luis Fari{\~{n}}as del Cerro` -> `L. {Fari{\~{n}}as del Cerro}`
> `Marcello D'Agostino` -> `M. {D}'\relax Agostino`
>
> - `Juan Carlos Nieves` -> `J. Nieves`
> - `Manuel {Ojeda Aciego}` -> `M. {Ojeda Aciego}`
> - `John von Neumann` -> `J. von Neumann`
> - `Allen {V}an Gelder` -> `A. {V}an Gelder`
> - `Luis Fari{\~{n}}as del Cerro` -> `L. {Fari{\~{n}}as del Cerro}`
> - `Marcello D'Agostino` -> `M. {D}'\relax Agostino`
In the `title` field, **enclose capital letters** (other than the first letter)
that must not be converted to lowercase letters by `{` and `}`.
Expand Down Expand Up @@ -156,13 +157,20 @@ The bibliography style and BibTeX will sort it out uniformly.
Always run the [bibfmt] script to format entries:
```sh
./bibfmt.py format
python bibfmt.py format-names
# check result!
python bibfmt.py format
# check result!
```
The script takes care of sorting, indenting, replacing Unicode characters, and
spacing. Nevertheless, **always** check the result of the script. Especially,
when pasting contents from external sources (like titles of PDFs) make sure
that special characters like ligatures were replaced correctly.
The `format-names` subcommand tries to autoformat names in the bibliography.
**Always** check the result of the script. To facilitate the editing process,
the script does not sort entries and should be followed by subcommand `format`.

The `format` subcommand takes care of sorting, indenting, replacing Unicode
characters, and spacing. Nevertheless, **always** check the result of the
script. Especially, when pasting contents from external sources (like titles of
PDFs) make sure that special characters like ligatures were replaced correctly.

The script requires at least Python 3.10 and the [bibtexparser] 1.3 module.
It is quite easy to setup with anaconda:
Expand All @@ -171,9 +179,6 @@ It is quite easy to setup with anaconda:
# install anaconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
# I recommend not to let the installer modify the bashrc but rather add a line
# like this manually:
# source <install-prefix>/conda/etc/profile.d/conda.sh

# setup environment
conda create -n bib python=3.10 pip
Expand All @@ -182,16 +187,8 @@ pip install bibtexparser

# run bibfmt
conda activate bib
python bibfmt.py format-names
# check result!
python bibfmt.py format
# check result!
```

The `format-names` subcommand tries to autoformat names in the bibliography.
**Always** check the result of the script. To facilitate the editing process,
the script does not sort entries and should be followed by subcommand `format`.

[krr.bib]: krr.bib
[procs.bib]: procs.bib
[bibfmt]: bibfmt.py
Expand Down

0 comments on commit b587a44

Please sign in to comment.