[NTG-context] Quick question about dual output pdf and epub
Christoph Hintermüller
christoph at out-world.com
Sun Mar 1 14:05:13 CET 2020
Hi Hans
[Inline Response to message by Hans Hagen, Fr, 2020-02-28 22:39 +0100:
Answers and comments below corresponding cited paragraphs.]
> It depends a bit. One can for instance make the mp images
> independent
> (include mp code from a file) and then also make small independent
> pdf
> files from them that then can be converted to svg using mutool /
> mudraw.
What is i already do as MP images are created from Inkscape SVG images
by exporting them to EPS. which are further converted to MP using
pstoedit with some minor sed based postprocessing (removing defaultfont
instruction, modifying showtext macro to daw textetx).
This works pleasingly well. I find it quite annoying if ebooks try to
enforce a specific branded font and font size, disallowing handicapped
readers for example to use the Dyslexic font or alike, set a wider
spacing of glyphs or use big fontsizes for better reading experience.
Thus i would be ok directly using the Inkscape SVG images or a
canonicalized version thereof unsing different font than set for the
rest of the document.
Thus as a first solution it would be ok for me switching between MP and
SVG image using \startmode \stopmode.
> You can try that concept with
>
> \startMPpage
> some mp code
> \stopMPage
>
> If we're only talking of 'kind of stand alone images' (not
> backgrounds
> behind texts and other ornamental mp images) I can think about some
> mechanism that does that automatic. In the end much is possible
> (given
> time and reason) and often not even that hard to do.
>
Hm as said above I already take the opposit route to obtain MP images
cause of using same fonts on images as in the rest of the document
through texttext macro. Thus it is rather strange to than backconvert
the MP image again into an SVG. The resulting SVG has the same fonts as
as i set for the pdfdocument but when users switch fonts on their reader or fontsize the fonts in the images will not change too so, having matching fonts as of now is of not much use. And it is questionable whether it ever will be unless minimum image size would automatically scaleup with fontsize and spacing too. And than it would require to strip the texts from the original SVG and overtype them using context/tex commands only. The latter would call for a context specific Exportmodule for Inkscape and others which would have to be coded first.
Best
Xristoph
More information about the ntg-context
mailing list