Skip to content

Commit 570b92d

Browse files
authored
Update README.md
Wrapped each sentences shorter than 72 characters.
1 parent 2857241 commit 570b92d

File tree

1 file changed

+41
-31
lines changed

1 file changed

+41
-31
lines changed

doi2cite/README.md

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,55 @@
11
# pandoc-doi2cite
2-
This pandoc lua filiter helps users to insert references in a document with using DOI(Digital Object Identifier) tags.
3-
With this filter, users do not need to make bibtex file by themselves. Instead, the filter automatically generate .bib file from the DOI tags, and convert the DOI tags into citation keys available by `pandoc-crossref`.
2+
3+
This pandoc lua filiter helps users to insert references in a document
4+
with using DOI(Digital Object Identifier) tags. With this filter, users
5+
do not need to make bibtex file by themselves. Instead, the filter
6+
automatically generate .bib file from the DOI tags, and convert the DOI
7+
tags into citation keys available by `pandoc-crossref`.
48

59
<img src="https://user-images.githubusercontent.com/30950088/117561410-87ec5d00-b0d1-11eb-88be-931f3158ec44.png" width="960">
610

711
What the filter do are as follows:
812

9-
1. Search citations with DOI tags in the document
10-
2. Search corresponding bibtex data from the designated .bib file
11-
3. If not found, get bibtex data of the DOI from http://api.crossref.org
12-
4. Add reference data to a .bib file
13-
5. Check duplications of reference keys
14-
6. Replace DOI tags to the correspoinding citation keys.
13+
1. Search citations with DOI tags in the document
14+
2. Search corresponding bibtex data from the designated .bib file
15+
3. If not found, get bibtex data of the DOI from
16+
http://api.crossref.org
17+
4. Add reference data to a .bib file
18+
5. Check duplications of reference keys
19+
6. Replace DOI tags to the correspoinding citation keys.
1520

1621
# Prerequisites
17-
- Pandoc version 2.0 or newer
18-
- This filter does not need any external dependencies
19-
- This filter must be executed before `pandoc-crossref` or `--citeproc`
22+
23+
- Pandoc version 2.0 or newer
24+
- This filter does not need any external dependencies
25+
- This filter must be executed before `pandoc-crossref` or
26+
`--citeproc`
2027

2128
# DOI tags
29+
2230
Following DOI tags can be used:
23-
* @https://doi.org/
24-
* @doi.org/
25-
* @DOI:
26-
* @doi:
31+
- @https://doi.org/
32+
- @doi.org/
33+
- @DOI:
34+
- @doi:
2735

28-
The first one (@https://doi.org/) may be the most useful because it is same as the accessible URL.
36+
The first one (@https://doi.org/) may be the most useful because it is
37+
same as the accessible URL.
2938

3039
# Specify auto-generated bibliography file path
31-
The path of the auto-generated bibliography file can be designated in the document yaml header.
32-
The yaml key is `from_doi`.
33-
Both of the string and array are acceptable(If it is given as an array, only first item will be used).
34-
Note that users typically should add same file path also in `bibliography`, in order to be recognized by `--citeproc`.
40+
41+
The path of the auto-generated bibliography file can be designated in
42+
the document yaml header. The yaml key is `bib_from_doi`. If the path
43+
not explicitly given, the filepath will be set as `./from_doi.bib` by
44+
default. Both of the string and array are acceptable (If it is given as
45+
an array, only first item will be used). Note that users typically
46+
should add same file path also in `bibliography`, in order to be
47+
recognized by `--citeproc`.
3548

3649
# Example
37-
example1.md:
3850

39-
<pre>
51+
example1.md:
52+
```
4053
---
4154
bibliography:
4255
- "doi_refs.bib"
@@ -47,19 +60,16 @@ bib_from_doi: "doi_refs.bib"
4760
# Introduction
4861
The Laemmli system is one of the most widely used gel systems for the separation of proteins.[@LAEMMLI_1970]
4962
By the way, Einstein is genius.[@https://doi.org/10.1002/andp.19053220607; @doi.org/10.1002/andp.19053220806; @doi:10.1002/andp.19053221004]
63+
```
5064

51-
52-
</pre>
53-
54-
Example command 1 (.md -> .md)
55-
56-
```sh
65+
Example command 1 (.md -\> .md)
66+
``` {.sh}
5767
pandoc --lua-filter=doi2cite.lua --wrap=preserve -s example1.md -o expected1.md
5868
```
5969

60-
Example command 2 (.md -> .pdf with [ACS](https://pubs.acs.org/journal/jacsat) style):
61-
62-
```sh
70+
Example command 2 (.md -\> .pdf with
71+
[ACS](https://pubs.acs.org/journal/jacsat) style):
72+
``` {.sh}
6373
pandoc --lua-filter=doi2cite.lua --filter=pandoc-crossref --citeproc --csl=sample1.csl -s example1.md -o expected1.pdf
6474
```
6575

0 commit comments

Comments
 (0)