You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strict mode already diverges from docling for readability (underscore
un-escaping, code-fence languages). Extend it to tighten stray spaces around
punctuation: `[ 37 , 36 ]` → `[37, 36]`, `( x )` → `(x)`, `*c* .` → `*c*.`.
This cleans up both the PDF backend's glyph-split citation spacing and the space
the legacy emphasis serialization leaves before punctuation.
Default/legacy output is untouched (still byte-for-byte with docling, which
keeps those spaces). Only inline text nodes are affected — code blocks and table
cells are left alone. Regenerated the strict regression fixtures; added a unit
test pinning legacy-spacing vs strict-tightened.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.
20
20
21
-
This is a word document and this is an inline equation: $A= \pi r^{2}$. If instead, I want an equation by line, I can do this:
21
+
This is a word document and this is an inline equation: $A= \pi r^{2}$. If instead, I want an equation by line, I can do this:
Copy file name to clipboardExpand all lines: crates/fleischwolf/tests/data/docx/expected/textbox.docx.strict.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Upon receiving a report from the kindergarten, conduct a preliminary assessment
32
32
Department of Education:
33
33
Collaborate with the Health Bureau in conducting epidemiological investigations and assist Health Bureau personnel in implementing necessary epidemic prevention measures at all school levels.
34
34
35
-
The Health Bureau will handle **reporting and specimen collection**.
35
+
The Health Bureau will handle **reporting and specimen collection**.
Copy file name to clipboardExpand all lines: crates/fleischwolf/tests/data/epub/expected/epub_purvis_poetry.epub.strict.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Poetry
2
2
3
-
By **Sarah Louisa Forten Purvis**.
3
+
By **Sarah Louisa Forten Purvis**.
4
4
5
5
<!-- image -->
6
6
@@ -10,13 +10,13 @@ The Standard Ebooks logo.
10
10
11
11
<!-- image -->
12
12
13
-
This ebook is the product of many hours of hard work by volunteers for [Standard Ebooks](https://standardebooks.org/), and builds on the hard work of other literature lovers made possible by the public domain.
13
+
This ebook is the product of many hours of hard work by volunteers for [Standard Ebooks](https://standardebooks.org/), and builds on the hard work of other literature lovers made possible by the public domain.
14
14
15
-
This particular ebook is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans).
15
+
This particular ebook is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans).
16
16
17
-
The source text and artwork in this ebook are believed to be in the United States public domain; that is, they are believed to be free of copyright restrictions in the United States. They may still be copyrighted in other countries, so users located outside of the United States must check their local laws before using this ebook. The creators of, and contributors to, this ebook dedicate their contributions to the worldwide public domain via the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). For full license information, see the [Uncopyright](uncopyright.xhtml) at the end of this ebook.
17
+
The source text and artwork in this ebook are believed to be in the United States public domain; that is, they are believed to be free of copyright restrictions in the United States. They may still be copyrighted in other countries, so users located outside of the United States must check their local laws before using this ebook. The creators of, and contributors to, this ebook dedicate their contributions to the worldwide public domain via the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). For full license information, see the [Uncopyright](uncopyright.xhtml) at the end of this ebook.
18
18
19
-
Standard Ebooks is a volunteer-driven project that produces ebook editions of public domain literature using modern typography, technology, and editorial standards, and distributes them free of cost. You can download this and other ebooks carefully produced for true book lovers at [standardebooks.org](https://standardebooks.org/).
19
+
Standard Ebooks is a volunteer-driven project that produces ebook editions of public domain literature using modern typography, technology, and editorial standards, and distributes them free of cost. You can download this and other ebooks carefully produced for true book lovers at [standardebooks.org](https://standardebooks.org/).
20
20
21
21
## The Grave of the Slave
22
22
@@ -200,7 +200,7 @@ This bursting heart relief?
200
200
201
201
There's nothing left for me to love
202
202
This earth holds nothing dear,
203
-
Since *he*, my sweet-my gentle one,
203
+
Since *he*, my sweet-my gentle one,
204
204
Is now no longer here.
205
205
206
206
My poor fond heart had counted on
@@ -465,34 +465,34 @@ The Standard Ebooks logo.
465
465
466
466
*Poetry*
467
467
was compiled from poems published between 1831 and 1836 by
The volunteer-driven Standard Ebooks project relies on readers like you to submit typos, corrections, and other improvements. Anyone can contribute at [standardebooks.org](https://standardebooks.org/).
495
+
The volunteer-driven Standard Ebooks project relies on readers like you to submit typos, corrections, and other improvements. Anyone can contribute at [standardebooks.org](https://standardebooks.org/).
496
496
497
497
## Uncopyright
498
498
@@ -504,4 +504,4 @@ Copyright pages exist to tell you that you *can't* do something. Unlike them, th
504
504
505
505
Copyright laws are different all over the world, and the source text or artwork in this ebook may still be copyrighted in other countries. If you're not located in the United States, you must check your local laws before using this ebook. Standard Ebooks makes no representations regarding the copyright status of the source text or artwork in this ebook in any country other than the United States.
506
506
507
-
Non-authorship activities performed on items that are in the public domain-so-called "sweat of the brow" work-don't create a new copyright. That means that nobody can claim a new copyright on an item that is in the public domain for, among other things, work like digitization, markup, or typography. Regardless, the contributors to this ebook release their contributions under the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/) , thus dedicating to the worldwide public domain all of the work they've done on this ebook, including but not limited to metadata, the titlepage, imprint, colophon, this Uncopyright, and any changes or enhancements to, or markup on, the original text and artwork. This dedication doesn't change the copyright status of the source text or artwork. We make this dedication in the interest of enriching our global cultural heritage, to promote free and libre culture around the world, and to give back to the unrestricted culture that has given all of us so much.
507
+
Non-authorship activities performed on items that are in the public domain-so-called "sweat of the brow" work-don't create a new copyright. That means that nobody can claim a new copyright on an item that is in the public domain for, among other things, work like digitization, markup, or typography. Regardless, the contributors to this ebook release their contributions under the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/), thus dedicating to the worldwide public domain all of the work they've done on this ebook, including but not limited to metadata, the titlepage, imprint, colophon, this Uncopyright, and any changes or enhancements to, or markup on, the original text and artwork. This dedication doesn't change the copyright status of the source text or artwork. We make this dedication in the interest of enriching our global cultural heritage, to promote free and libre culture around the world, and to give back to the unrestricted culture that has given all of us so much.
This is a **bold (b)** example and right next to it we have a **strong emphasis (strong)**. Notice that **strong + bold mixed** looks similar but carries additional semantic meaning.
3
+
This is a **bold (b)** example and right next to it we have a **strong emphasis (strong)**. Notice that **strong + bold mixed** looks similar but carries additional semantic meaning.
4
4
5
-
Here is an *italic (i)* word and an *emphasis (em)* example. Sometimes we combine them like *italic + emphasis together*.
5
+
Here is an *italic (i)* word and an *emphasis (em)* example. Sometimes we combine them like *italic + emphasis together*.
6
6
7
-
Now let's look at text that appears crossed out: ~~strikethrough with s~~ and ~~deleted with del~~. You can also mix them: ~~double strikethrough (s + del)~~.
7
+
Now let's look at text that appears crossed out: ~~strikethrough with s~~ and ~~deleted with del~~. You can also mix them: ~~double strikethrough (s + del)~~.
8
8
9
-
To highlight insertions or underlines: underlined with u, inserted with ins. A combination could be: underline + insertion together.
9
+
To highlight insertions or underlines: underlined with u, inserted with ins. A combination could be: underline + insertion together.
10
10
11
-
Subscript and superscript examples: Water is written as H 2 O using sub. The mathematical expression x 2 + y 3 uses sup. They can also be combined: CO 2 *.
11
+
Subscript and superscript examples: Water is written as H 2 O using sub. The mathematical expression x 2 + y 3 uses sup. They can also be combined: CO 2 *.
12
12
13
-
Mixing several: This sentence has ***strong + emphasis***, some **bold + underline**, and a formula like a 2 + b 3.
13
+
Mixing several: This sentence has ***strong + emphasis***, some **bold + underline**, and a formula like a 2 + b 3.
Copy file name to clipboardExpand all lines: crates/fleischwolf/tests/data/html/expected/html_code_snippets.html.strict.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Code snippets
2
2
3
-
The Pythagorean theorem can be written as an equation relating the lengths of the sides *a*, *b* and the hypotenuse *c*.
3
+
The Pythagorean theorem can be written as an equation relating the lengths of the sides *a*, *b* and the hypotenuse *c*.
4
4
5
5
To use Docling, simply install `docling` from your package manager, e.g. pip: `pip install docling`
6
6
7
-
To convert individual documents with python, use `convert()`, for example:
7
+
To convert individual documents with python, use `convert()`, for example:
8
8
9
9
```
10
10
from docling.document_converter import DocumentConverter
@@ -20,5 +20,5 @@ The program will output: `## Docling Technical Report[...]`
20
20
Prefetch the models:
21
21
22
22
- Use the `docling-tools models download` utility:
23
-
- Alternatively, models can be programmatically downloaded using `docling.utils.model_downloader.download_models()`.
23
+
- Alternatively, models can be programmatically downloaded using `docling.utils.model_downloader.download_models()`.
24
24
- Also, you can use download-hf-repo parameter to download arbitrary models from HuggingFace by specifying repo id: `$ docling-tools models download-hf-repo ds4sd/SmolDocling-256M-preview Downloading ds4sd/SmolDocling-256M-preview model from HuggingFace...`
0 commit comments