Skip to content

A Pelican plugin providing a referencing-system for figures, like that in LaTeX.

License

Notifications You must be signed in to change notification settings

cmacmackin/figure-ref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

figure-ref

Provides a system to reference figures using labels, as happens in LaTeX.

Requirements

figure-ref requires BeautifulSoup4.

pip install BeautifulSoup4

How to Use

This plugin will search for labels within <figcaption> tags. Figures and figcaptions can be inserted via Restructured Text or using the figureAltCaption plugin with Markdown. Labelled figures take the form:

<figure>
  <img src="path/to/image.png">
  <figcaption>
  labelname :: This is the label text.
  </figcaption>
</figure>

In Markdown, using the aforementioned plugin, you can create such a figure with the syntax ![labelname :: This is the label text.](path/to/image.png).

This would be traslated to

<figure id="figref-labelname">
  <img src="path/to/image.png">
  <figcaption>
  <strong>Figure 1:</strong> This is the label text.
  </figcaption>
</figure>

This figure can be referenced in a paragraph using the syntax {#labelname}. This will then be replaced by the figure number, which will act as a link to the figure.

About

A Pelican plugin providing a referencing-system for figures, like that in LaTeX.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages