Skip to content

Commit 416b5ca

Browse files
committed
Merge branch 'release/3.1.0.0'
2 parents 37ae364 + 3a96519 commit 416b5ca

File tree

14 files changed

+271
-178
lines changed

14 files changed

+271
-178
lines changed

.github/workflows/python-package.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install Hatch
26-
run: pipx install hatch
26+
run: |
27+
pipx install hatch
28+
pipx inject --force hatch hatchling==1.25.0
2729
- name: Install dependencies
2830
run: |
2931
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
@@ -38,15 +40,17 @@ jobs:
3840
strategy:
3941
matrix:
4042
python-version: ['3.12']
41-
pandoc-version: [2.11.4, '2.12', '2.13', 2.14.2, '2.15', 2.16.2, 2.17.1.1, '2.18', 2.19.2, 3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5']
43+
pandoc-version: [3.2.1, '3.3', '3.4', '3.5']
4244
steps:
4345
- uses: actions/checkout@v4
4446
- name: Set up Python ${{ matrix.python-version }}
4547
uses: actions/setup-python@v5
4648
with:
4749
python-version: ${{ matrix.python-version }}
4850
- name: Install Hatch
49-
run: pipx install hatch
51+
run: |
52+
pipx install hatch
53+
pipx inject --force hatch hatchling==1.25.0
5054
- name: Install dependencies
5155
run: |
5256
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
@@ -69,7 +73,9 @@ jobs:
6973
with:
7074
python-version: ${{ matrix.python-version }}
7175
- name: Install Hatch
72-
run: pipx install hatch
76+
run: |
77+
pipx install hatch
78+
pipx inject --force hatch hatchling==1.25.0
7379
- name: Install dependencies
7480
run: |
7581
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
@@ -95,7 +101,9 @@ jobs:
95101
with:
96102
python-version: ${{ matrix.python-version }}
97103
- name: Install Hatch
98-
run: pipx install hatch
104+
run: |
105+
pipx install hatch
106+
pipx inject --force hatch hatchling==1.25.0
99107
- name: Install dependencies
100108
run: |
101109
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb

.github/workflows/python-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install Hatch
25-
run: pipx install hatch
25+
run: |
26+
pipx install hatch
27+
pipx inject --force hatch hatchling==1.25.0
2628
- name: Build and publish
2729
env:
2830
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}

.readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build:
1111
python: '3.11'
1212
commands:
1313
- git fetch --unshallow || true
14+
- pip install hatchling==1.25.0
1415
- pip install hatch
1516
- hatch run docs:build $READTHEDOCS_OUTPUT/html/
1617

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Installation
1616
[![Downloads](https://img.shields.io/pypi/dm/pandoc-latex-tip?logo=pypi&logoColor=white)](https://pepy.tech/project/pandoc-latex-tip)
1717
[![Development Status](https://img.shields.io/pypi/status/pandoc-latex-tip.svg?logo=pypi&logoColor=white)](https://pypi.org/project/pandoc-numbering/)
1818
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-latex-tip.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-latex-tip/)
19-
[![Pandoc version](https://img.shields.io/badge/pandoc-2.11%20|%202.12%20|%202.13%20|%202.14%20|%202.15%20|%202.16%20|%202.17%20|%202.18%20|%202.19%20|%203.0%20|%203.1%20|%203.2%20|%203.3%20|%203.4%20|%203.5-blue.svg?logo=markdown)](https://pandoc.org/)
19+
[![Pandoc version](https://img.shields.io/badge/pandoc-3.2%20|%203.3%20|%203.4%20|%203.5-blue.svg?logo=markdown)](https://pandoc.org/)
2020
[![Latest release](https://img.shields.io/github/release-date/chdemko/pandoc-latex-tip.svg?logo=github)](https://github.com/chdemko/pandoc-latex-tip/releases)
2121
[![Last commit](https://img.shields.io/github/last-commit/chdemko/pandoc-latex-tip/develop?logo=github)](https://github.com/chdemko/pandoc-latex-tip/commit/develop/)
2222
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/pandoc-latex-tip.svg?logo=github)](http://pandoc-latex-tip.readthedocs.io/en/latest/)

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import os
1616
import sys
1717

18+
# noinspection PyCompatibility
1819
import tomllib
1920

2021
sys.path.insert(0, os.path.abspath("../.."))

docs/images/Tux.pdf

66.5 KB
Binary file not shown.
58.7 KB
Binary file not shown.

docs/images/pandoc-latex-tip-sample.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pandoc-latex-tip:
77
- name: fa-warning
88
color: firebrick
99
link: 'http://google.fr'
10+
- image: Tux.pdf
1011
position: outer
1112
- classes: [tip, discussion]
1213
icons:
@@ -102,6 +103,20 @@ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
102103
sunt in culpa qui officia deserunt mollit anim id est laborum.
103104
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
104105

106+
::: {
107+
latex-tip-image=Tux.pdf
108+
latex-tip-size=36
109+
latex-tip-position=right
110+
} :::
111+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
112+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
113+
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
114+
consequat.
115+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
116+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
117+
sunt in culpa qui officia deserunt mollit anim id est laborum.
118+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
119+
105120
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
106121
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
107122
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
112 Bytes
Binary file not shown.

docs/usage.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Each icon is either:
6161
`icons <https://fontawesome.com/search?o=r&m=free&f=brands>`__)
6262
- a YAML object containing
6363

64-
- a ``name`` property (for the icon)
64+
- a ``name`` property (for the icon) or an ``image`` property denoting
65+
an image path
6566
- a ``color`` property taken from the `X11 color
6667
collection <https://www.w3.org/TR/css3-color/#svg-color>`__
6768
- a ``link`` property to make the icon clickable
@@ -74,6 +75,7 @@ It’s also possible to specify a tip for individual elements using
7475
attribute description:
7576

7677
- ``latex-tip-icon``: the name of the icon
78+
- ``latex-tip-image``: the file path of the image
7779
- ``latex-tip-size``: the size of the rendered icon (``18`` by default)
7880
- ``latex-tip-position``: the position of the icon (``left`` by default
7981
or ``right`` or ``inner`` or ``outer``)
@@ -159,6 +161,10 @@ Demonstration: Using
159161
as input gives output file in
160162
`pdf <https://raw.githubusercontent.com/chdemko/pandoc-latex-tip/develop/docs/images/pandoc-latex-tip-sample.pdf>`__.
161163

164+
The `Tux` image is made available under the `Creative Commons CC0 1.0 Universal
165+
Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/deed.en>`__
166+
(https://commons.wikimedia.org/wiki/File:Tux.svg).
167+
162168
.. code-block:: shell-session
163169
164170
$ pandoc --filter pandoc-latex-tip pandoc-latex-tip-sample.txt \

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ name = "pandoc-latex-tip"
88
description = "A pandoc filter for adding icons on specific elements"
99
readme = "README.md"
1010
requires-python = ">=3.10,<3.14"
11-
license = {text = "BSD-3-Clause"}
12-
license-files = {paths = ["LICENSE"]}
11+
license = "BSD-3-Clause"
12+
license-files = ["LICENSE"]
1313
authors = [{name = "Christophe Demko", email = "chdemko@gmail.com"}]
1414
maintainers = [{name = "Christophe Demko", email = "chdemko@gmail.com"}]
1515
keywords = ["pandoc", "filters", "latex", "tip", "Font-Awesome", "icon"]
@@ -43,7 +43,7 @@ dependencies = [
4343
"fonttools~=4.54",
4444
"platformdirs~=4.3",
4545
"PyYAML~=6.0",
46-
"tinycss2~=1.3",
46+
"tinycss2~=1.4",
4747
"cleo~=2.1"
4848
]
4949

@@ -52,6 +52,7 @@ Homepage = "https://github.com/chdemko/pandoc-latex-tip"
5252
Documentation = "https://pandoc-latex-tip.readthedocs.io/"
5353
Repository = "https://github.com/chdemko/pandoc-latex-tip"
5454
Issues = "https://github.com/chdemko/pandoc-latex-tip/issues"
55+
Coverage = "https://coveralls.io/github/chdemko/pandoc-latex-tip"
5556

5657
[project.scripts]
5758
pandoc-latex-tip = "pandoc_latex_tip:app"
@@ -80,16 +81,16 @@ dependencies = [
8081
"black[jupyter]~=24.10",
8182
# Style checkers
8283
"doc8~=1.1",
83-
"mypy~=1.12",
84+
"mypy~=1.13",
8485
"flake8~=7.1",
8586
"flake8-pyproject~=1.2",
8687
"flake8-annotations-complexity~=0.0",
8788
"flake8-black~=0.3",
8889
"flake8-blind-except~=0.2",
89-
"flake8-bugbear~=24.8",
90+
"flake8-bugbear~=24.10",
9091
"flake8-builtins~=2.5",
9192
"flake8-cognitive-complexity~=0.1",
92-
"flake8-comprehensions~=3.15",
93+
"flake8-comprehensions~=3.16",
9394
"flake8-docstrings~=1.7",
9495
"flake8-expression-complexity~=0.0",
9596
"flake8-fixme~=1.1",

0 commit comments

Comments
 (0)