[go: up one dir, main page]

Menu

Code Commit Log


Commit Date  
[r9928] by milde

HTML5: use "width" and "height" for unitless image size values.

Fixes [feature-requests:#102]

The HTML `<img>` element supports "width" and "height" attributes to
specify the size or ratio of an image. Values are restricted to
integers (size in pixels).

In Docutils, "width" and "hight" attributes also support a set of CSS
compatible units. Therefore, all size values were passed to HTML via
the common attribute "style".

Using HTML "width" and "hight" attributes for values without unit
provides a means to specify an image's *aspect ratio* without overriding
a size declaration in a CSS style sheet.

This change is not backported to the "html4css1" writer to keep
the output backwards compatible.

The provisional method `HTMLTranslator.image_size()` now returns a
dictionary of attribute values.

2024-09-11 07:20:07 Tree
[r9927] by milde

Fix test samples containing installation-specific path.

Use a relative path in the tests for external MathML converters
to make tests independent of the installation-specific
Docutils project root directory.

2024-09-11 07:19:52 Tree
[r9926] by milde

Fixes for "scale" attribute handling in ODT and LaTeX writer.

Remove redundant code in the ODT writer:
Scale is validated as "non-negative integer" by the parser.
No need to validate again.

Use the "generic" numeral format instead of "float"
in the LaTeX writer (%f -> %g).

2024-09-11 07:19:41 Tree
[r9925] by grubert

late commit to rename .txt to .rst

2024-09-10 18:25:17 Tree
[r9924] by grubert

FIX test_writers html4css when PIL is not installed

2024-09-10 18:17:15 Tree
[r9923] by milde

Documentation update.

Fix/update links, add crosslinks.

Restructure and update content.

2024-09-10 15:30:31 Tree
[r9922] by grubert

FIX change hard coded uris to f-string expansions

2024-09-10 08:01:52 Tree
[r9921] by milde

Revise `HTMLTranslator.prepare_svg()`.

Change oder of method arguments (sort by importance).

Use a dictionary to update the `<svg style="..."> declarations keeping
exisisting declarations intact.

Simplify conversion of "align" attribute.

Add test cases.

2024-09-04 19:33:39 Tree
[r9920] by milde

Refactor `HTMLTranslator.image_size()`.

Use `nodes.parse_measure()` instead of ad-hoc parsing
when scaling size values.
Split "spaghetti code" into auxiliary method `read_size_with_PIL()`.

2024-09-04 19:33:30 Tree
[r9919] by milde

New function `nodes.parse_measure()`. Relax `validate_measure()`.

Allow "arbitrary" units: Check for a run of ASCII-letters or a percent sign.
(The definition of "measure" in docutils.dtd and its description in
doctree.txt do not include a restriction of the valid units.)

2024-09-04 19:33:12 Tree
Older >