Skip to content

Commit b337219

Browse files
committed
✨ Add initial version
1 parent b1f4e3f commit b337219

34 files changed

+1014
-1125
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.7", "3.8", "3.9", "3.10"]
17+
python-version: ["3.8", "3.9", "3.10"]
1818
os: [ubuntu-latest]
1919
include:
2020
- os: windows-latest

.readthedocs.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ python:
77
path: .
88
extra_requirements:
99
- docs
10+
- furo
1011

1112
sphinx:
1213
builder: html
1314
fail_on_warning: true
14-
15-
# Also build PDF & ePub
16-
formats:
17-
- epub
18-
- pdf

README.md

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,36 @@
1-
# sphinx-subfigure
1+
# sphinx-timeline
22

33
[![PyPI][pypi-badge]][pypi-link]
44

5-
A [sphinx](https://www.sphinx-doc.org) extension to create figures with multiple images:
6-
7-
- Provides a simple format for complex image layouts.
8-
- Supports HTML fully, with responsive layouts, for different screen sizes
9-
- LaTeX is supported, except for images that span multiple rows.
10-
- degrades gracefully for other formats.
11-
- Supports figure numbering and referencing.
12-
- Supports image sub-captions, via `alt` text.
5+
A [sphinx](https://www.sphinx-doc.org) extension to create timelines.
136

147
## Usage
158

16-
Install `sphinx-subfigure` with `pip install sphinx-subfigure`,
17-
then add `sphinx_subfigure` to your `conf.py` file's `extensions` variable:
9+
Install `sphinx-timeline` with `pip install sphinx-timeline`,
10+
then add `sphinx_timeline` to your `conf.py` file's `extensions` variable:
1811

1912
```python
20-
extensions = ["sphinx_subfigure"]
13+
extensions = ["sphinx_timeline"]
2114

2215
numfig = True # optional
2316
```
2417

25-
Now add a `subfigure` directive to your document:
18+
Now add a `timeline` directive to your document:
2619

2720
```restructuredtext
28-
.. subfigure:: AA|BC
29-
:layout-sm: A|B|C
30-
:subcaptions: above
31-
:name: myfigure
32-
:class-grid: outline
33-
34-
.. image:: imageA.png
35-
:alt: Image A
36-
37-
.. image:: imageB.png
38-
:alt: Image B
39-
40-
.. image:: imageC.png
41-
:alt: Image C
42-
43-
Figure Caption
21+
.. timeline::
22+
- start: 1980-02-03
23+
name: 1st event
24+
- start: 1990-02-03
25+
name: 2nd event
26+
- start: 2000-02-03
27+
name: 3rd event
28+
---
29+
**{{e.start|fdtime}}**:
30+
*{{e.name}}*
31+
32+
Description ...
4433
```
4534

46-
1. Each image is automatically assigned an *area identifier* (A, B, C, etc.).
47-
2. Layouts are formed by composing the areas into a grid, with rows delimited by `|`.
48-
3. Each area must be used exactly once in the layout, and form a single rectangle.
49-
4. "Empty" areas can be designated with `.`
50-
5. Additional layouts can be defined with `:layout-sm:`, `:layout-lg:`, `:layout-xl:`, for different screen sizes (HTML only).
51-
52-
![Responsive sub-figure](subfigure-responsive.gif)
53-
54-
[pypi-badge]: https://img.shields.io/pypi/v/sphinx_subfigure.svg
55-
[pypi-link]: https://pypi.org/project/sphinx_subfigure
35+
[pypi-badge]: https://img.shields.io/pypi/v/sphinx_timeline.svg
36+
[pypi-link]: https://pypi.org/project/sphinx_timeline

docs/_static/A.png

-16 KB
Binary file not shown.

docs/_static/B.png

-14.2 KB
Binary file not shown.

docs/_static/C.png

-15.3 KB
Binary file not shown.

docs/_static/D.png

-13.4 KB
Binary file not shown.

docs/_static/E.png

-9.34 KB
Binary file not shown.

docs/_static/F.png

-8.88 KB
Binary file not shown.

docs/_static/G.png

-16.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)