Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martisak/pandoc-shortcaption
Adds pandoc filter for short LaTeX captions.
https://github.com/martisak/pandoc-shortcaption
Last synced: 3 months ago
JSON representation
Adds pandoc filter for short LaTeX captions.
- Host: GitHub
- URL: https://github.com/martisak/pandoc-shortcaption
- Owner: martisak
- License: gpl-3.0
- Created: 2017-01-11T17:06:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-23T00:23:19.000Z (over 7 years ago)
- Last Synced: 2024-05-19T23:36:52.698Z (6 months ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pandoc-shortcaption filter
[![Build Status](https://travis-ci.org/martisak/pandoc-shortcaption.svg?branch=master)](https://travis-ci.org/martisak/pandoc-shortcaption) [![PyPI version](https://badge.fury.io/py/pandoc-shortcaption.svg)](https://badge.fury.io/py/pandoc-shortcaption)
`pandoc-shortcaption` is a [pandoc](http://pandoc.org/) filter for adding short captions to images in LaTeX output, i.e. `\caption[Short caption]{Long caption}`.
## Installation
~~~
pip install pandoc-shortcaption
~~~or
~~~
python setup.py install
~~~## Basic usage
~~~
![This is a long image caption](img.png "Image Short Caption")
~~~Compile with
~~~
pandoc -f markdown -t latex --filter pandoc-shortcaption test.md
~~~If you would like to use with [pandoc-crossref](https://github.com/lierdakil/pandoc-crossref), then add that filter afterwards.
~~~
![long caption again](img.png "short caption"){#fig:myfig2}Here is a reference to @fig:myfig2.
~~~You can also add a width in percent (no other units supported as of now).
~~~
![long caption again](img.png "short caption"){#fig:myfig2 width=60%}
~~~Compile with
~~~
pandoc -f markdown -t latex --filter pandoc-shortcaption --filter pandoc-crossref test.md
~~~## Acknowledgments and references
Inspired by [Template for writing a PhD thesis in Markdown](https://github.com/tompollard/phd_thesis_markdown).
* [Python Apps the Right Way: entry points and scripts](https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/)
* [pandocfilters](https://github.com/jgm/pandocfilters)