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
{{ message }}
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
There's a specific small image small_image.svg, that I'd like to scale-up to fit into the pdf-width.
(The image source of small_image.svg is included right at the bottom for easy copy-pasting)
Here is sample.adoc that you can test with html5, pdf (via asciidoctor-fopub), pdf (via asciidoctor-pdf)
[depends only of small_image.svg, that you can copy-paste from below]
= Test scaling of small image
:toc:
Here comes the image `small_image.svg`:
image::small_image.svg[]
== Scale the image (to make it easier to view)
image::small_image.svg[Small Image, width=1000]
[[small_image]]
[source,asciidoc]
image::small_image.svg[Small Image, width=1000]
=== Good for html5
The <<small_image,above scaled image>> is rendered nicely for html5
=== Bad for asciidoctor-fopub (docbook)
The <<small_image,above scaled image>> is clipped when rendered to pdf via asciidoctor-fopub
.Render to pdf via asciidoctor-fopub (docbook)
[source]
asciidoctor -b docbook -d book -a data-uri! sample.adoc
~/asciidoc/asciidoctor-fopub/fopub sample.xml
=== OK for asciidoctor-pdf (but always maximally scaled)
The `width`-scaling is ignored by asciidoctor-pdf:
there the <<small_image,image>> is always maximally scaled.
.Render to pdf via asciidoctor-pdf
[source]
asciidoctor-pdf sample.adoc
The scaling does not harmonize nicely between html5 and asciidoctor-fopub.
What fits nicely in html5, is unfortunately cut-off for pdf output
I believe there should be a possibility to scale to fit the width, but preventing cut-off of an image.
Source of image small_image.svg (for copy-pasting):
As I mentioned on Twitter, I'm not working on fopub anymore because I'm focusing my attention on Asciidoctor PDF (because I believe it will give us a much better result). However, if someone wants to make a change to correct this issue, I'd be happy to merge it.
I'm focusing my attention on Asciidoctor PDF (because I believe it will give us a much better result).
OK using asciidoctor-pdf is sweet, but there's a lot of work needed still, to satisfy absolutely fundamental stuff (that can be expected from any good documentation system)
inclusion of vector-graphics image (currently problematic)
harmonization between html5 and pdf backends (e.g. image placement)
index (of figures, tables) and cross-reference generation (jump to glossary term)
extended syntax-decisions for asciidoctor, to realize certain features.
Yep, I recognize there is more work to be done. No one said this was easy, but it's the road I've decided to pursue.
Keep in mind this doesn't mean you can't use the DocBook toolchain. It's always an option. I'm just not going to be working in that space. I'm leaving that for other teams so I can advance Asciidoctor and the ecosystem components as quickly as possible. The more I get sidetracked, the longer it take us to get there...and we don't want that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there!
There's a specific small image
small_image.svg
, that I'd like to scale-up to fit into the pdf-width.(The image source of
small_image.svg
is included right at the bottom for easy copy-pasting)Here is sample.adoc that you can test with html5, pdf (via asciidoctor-fopub), pdf (via asciidoctor-pdf)
[depends only of
small_image.svg
, that you can copy-paste from below]The scaling does not harmonize nicely between html5 and asciidoctor-fopub.
I believe there should be a possibility to scale to fit the width, but preventing cut-off of an image.
Source of image small_image.svg (for copy-pasting):
The text was updated successfully, but these errors were encountered: