===============================================================================
[](https://travis-ci.org/daamien/pandoc-latex-barcode)
[](https://hub.docker.com/r/daamien/pandoc-latex-barcode/)
A pandoc filter to insert barcodes and QR codes in a latex/pdf document
The filter is written in Python with [panflute](http://scorreia.com/software/panflute/)
which I recommend if you want to create your own pandoc filters.
Install
-------------------------------------------------------------------------------
```
sudo pip install pandoc-latex-barcode
```
or
```
docker run -d daamien/pandoc-latex-barcode
```
Quick Start
-------------------------------------------------------------------------------
### 1- Create a specific pandoc template
First you need to the following packages to the latex template :
```latex
\usepackage{pstricks}
\usepackage{pst-barcode}
```
For your convenience, here's a complete one based on the pandoc default latex
template :
[pandoc-latex-barcode.template.tex](pandoc-latex-barcode.template.tex)
### 2- Add a barcode tag to your markdown file
To generate a generic barcode:
```
<div class="barcode">Hello World !</div>
```
To generate an ISBN barcode:
```
<div class="barcode isbn">978-3-86541-114</div>
```
To generate a QR code:
```
<div class="qrcode">http://www.pandoc.org</div>
```
### 3- Enjoy !
```
pandoc --filter pandoc-latex-barcode \
--template ./pandoc_latex_barcode.template.tex \
--latex-engine xelatex \
./pandoc_latex_barcode.sample.md \
-o ./pandoc_latex_barcode.sample.pdf
```
Note : The xelatex engine is mandatory because of pstricks.
Configuration
-------------------------------------------------------------------------------
There's also few parameters you can setup in the document front matter :
```yaml
barcode: {
barcode_width: '50mm',
barcode_height: '30mm',
qrcode_width: '25mm',
qrcode_height: '25mm' ,
isbn: '123-4-56789-111',
}
```
- **barcode_width** and **barcode_height** defines the size of the barcode.
_Default_ : 50mmx30mm
- **qrcode_width** and **qrcode_height** defines the size of the QR code.
_Default_ : 25mmx25mm
- **isbn** : overides the value inside the ``<div>``
__Default__ : ``None``
For more details, please refer to the _pst-barcode_ documentation :
http://texdoc.net/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdf
Example
-------------------------------------------------------------------------------
See [pandoc-latex-barcode.sample.md](pandoc-latex-barcode.sample.md)
and [pandoc-latex-barcode.sample.pdf](pandoc-latex-barcode.sample.pdf)
Contributing & Getting Help
-------------------------------------------------------------------------------
If you have any difficulties with this software, please file an issue here :
https://github.com/daamien/pandoc-latex-barcode/issues
License
-------------------------------------------------------------------------------
This software is available under the BSD 3-Clause Licence.
see [LICENSE](LICENSE)
Metadata
Release files for pandoc-latex-barcode 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandoc-latex-barcode-1.1.1.tar.gz | 4.6 kB | Without provenance | Details for pandoc-latex-barcode-1.1.1.tar.gz |
Release files / pandoc-latex-barcode-1.1.1.tar.gz
| Download URL | pandoc-latex-barcode-1.1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2646e4d74d66c8264e4e035b07113ccd5a3cb7e92969548535f4e656c6628608
|
|
BLAKE2b-256 checksum How to use checksums |
3df8171367ee4ae66ceb87b2344e2350c2d8d950ad49322cb22202f298532ce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pandoc-latex-barcode 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.