ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
443 stars 90 forks source link

last line center-justified when last pargraph is splited to next page. #658

Open benoitrolland opened 2 years ago

benoitrolland commented 2 years ago

We have a text justification problem that only arize when the last paragraph of a page is splited to the next page. + Attribute data-align-last-split-element="justify" is set. It triggers a css that set: text-align-last: justify. Trying to change it like that:

file:css/webpdf/custom.css:

[data-align-last-split-element='justify'] {
    text-align-last: left;
}

doesn't solve the problem ...

Let find how to reproduce it: lastLineJustify.zip

As you can see on the picture, only last line of sentences pertaining to a split paragraphs ar "center-justified", where I excpect it to be left justified as usual. I am still looking for a css workaround.

image

benoitrolland commented 2 years ago

I could override the cases: since it is related to dialog shaped text. I inserted a dialogue class arround quotation marks ""

[.dialogue]#« - how are you ? +
- fine thanks»#

or:

[.dialogue]
--
« - how are you ? +
- fine thanks.»
--

and applied the following style:
.dialogue { font-style: italic; text-align-last: left; }