Re: [NTG-context] Quick question about dual output pdf and epub
On 2/28/2020 2:52 PM, Christoph Hintermüller wrote:
Second am i right that i have to use also startmode and stopmode to include svg image instead of metapost image in epub or is there some other trick to make metapost image in epub. What would be the keywords to use on wiki search.
Or are the two questions currently beyond possibilities of epub support? 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. 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. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
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
participants (2)
-
Christoph Hintermüller
-
Hans Hagen