From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26604 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Re: image that resizes automatically to screen size in epub Date: Wed, 28 Oct 2020 11:31:53 -0700 (PDT) Message-ID: <04e6652d-6db6-4090-b2f1-db7acc33edd2n@googlegroups.com> References: <220286f4-8dab-4a80-9ad6-4794e15f1961o@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_492_886162530.1603909913345" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21002"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD4675FCS4BBBGXS436AKGQE6NITZRY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Oct 28 19:31:58 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f55.google.com ([209.85.161.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kXqEn-0005Ku-Oz for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 28 Oct 2020 19:31:57 +0100 Original-Received: by mail-oo1-f55.google.com with SMTP id r13sf53615ooi.3 for ; Wed, 28 Oct 2020 11:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=KJinsKtmuJU1B31ZqkMkK7MYxEwPy3OPy0IPfdhyYN0=; b=j4eBFP61pjuCpFRYyArfi8jd5srEL4uougsVQo+50jUPWUJs9a3w2M79AN2OM/DNqD mDh/Ej7U+KBxLTBoksQXIL6l0lFaEUDIC93yp28AUe1nB8TgyGM52Y+mQ67knrWo6/8y ka4H1KR227YzYUDGpY9GNNwcjqdgEoFIGjkApjs4Bm4D0Q6z2ElPeSvcyRkTRaJcRVNQ Cqf671OWVnDE7Fufq6fptu0P33ZPttDkEiIwpm6zmmh+sAHEWEcxuHDETHZLc+cIm/7P M1JNua9j1TES1SXo61BIIVqqoPG5ps8PGJpNSj2501iecPMdTztT+EWDeIJVXb83Su/h N69Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=KJinsKtmuJU1B31ZqkMkK7MYxEwPy3OPy0IPfdhyYN0=; b=HKSsv/J3fu+Fj4UXcbGDbqPizTcjMiEYhLmUzMf2+2M1mavTe53l5MQkSCWsQkxLwc RjcVuOUvv2kumPxEtpFm7EpLgDJbQUUSulrQFgx6cl76+H8PlBMKMwR0QJRlATJkst2E fYJm3A2sAKcBJjeS9gT/N4fhdRzNeyaI+BtLDy787WCh5VlkjX48c1U0cK5lFeBoc6XD sRve8zMvNU84jpbajDgwij38k7TShJZ5hnP0YbK8YvEjfxvq9PRFdY3w3OTZQkaFcWtU URiY0eM+WejxVl1ogFjZnpKCZZr2dtmLljB954SI5HcDvgt8sUeqhvDU0N+R9r+hN4r1 YDJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=KJinsKtmuJU1B31ZqkMkK7MYxEwPy3OPy0IPfdhyYN0=; b=lIefNU/DFtUJ0ySp/myWpBVgqkSIGyXzhcmGf1njcKnTX/ZYzGK0jm+x+IuWM5oH6F 0WaxUKSh7eO3D16tCFe/gQUlH9CUn1p4Dg3q3xWVmjHQNf2QwUxo3XYc8UH2ESFm1GQp Qr2ZfCIJ+3UuezbLC7XjwfgB2Sjn9RHDsNa6FsqJSd5YZj81BgUGVmAwPZ3NwTrastTA dcIteCdVZdY8OW94lcaTMoLAwgZ0qyWE1naimn9yGVqCn+2vz95+MUZOcwDrwKlbBrot ftgn0Lyfy2SQpbB61Ol+qOMyric7dXvtVsOc0iYp4CpTeAkXiHCGGDamw/kyHQKSBMyn dkGQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532Fou8w+7OSjRxOd4xdiyNOKW5ePZLvtLbQg4My16VfP0VOoZTV TIeo62NHB6lQ1GLkXPfyuzY= X-Google-Smtp-Source: ABdhPJzZehxUVbBrZDcOYGtz8twcn6YtNLfKt5VXxHeSrkV4Vx8yxiM0OW3MW8PetgcSwc9WJicMJg== X-Received: by 2002:aca:be56:: with SMTP id o83mr232020oif.1.1603909916707; Wed, 28 Oct 2020 11:31:56 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:4713:: with SMTP id u19ls17485oia.0.gmail; Wed, 28 Oct 2020 11:31:54 -0700 (PDT) X-Received: by 2002:aca:5c82:: with SMTP id q124mr216341oib.33.1603909914240; Wed, 28 Oct 2020 11:31:54 -0700 (PDT) In-Reply-To: X-Original-Sender: cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:26604 Archived-At: ------=_Part_492_886162530.1603909913345 Content-Type: multipart/alternative; boundary="----=_Part_493_1542951082.1603909913345" ------=_Part_493_1542951082.1603909913345 Content-Type: text/plain; charset="UTF-8" Here's the code:
The jpg image is invoked via "xlink:href=" Unless I'm getting confused with the relative path the nightly version still does not pull the referenced file: it's nowhere to be found either in the EPUB/content.opf manifest nor does it get copied over to EPUB/media/* On the other hand pandoc does understand the tag: in the content.opf manifest of the resulting EPUB the description of the ch001.xhtml that contains the above code includes the "properties=svg" attribute. My guess is that pandoc does not understand the "xlink:ref=" syntax. CJ On Monday, October 26, 2020 at 5:17:42 PM UTC-4 John MacFarlane wrote: > Chris Jones writes: > > > What I see is the following processing of raw HTML when creating an EPUB: > > > > 1. Tags of the form: > > > >

> > > > are processed to some extent insofar as the description of the file is > > added to the resulting content.opf manifest and the image is copied to > the > > EPUB/media/ directory > > > > 2. tabs are also partially processed: their presence in a > file > > (book chapter) automatically causes pandoc to add "properties=svg" > > qualifier to the file's description in the manifest. On the other hand > what > > lives inside the svg wrapper is ignored. > > I believe this was just fixed a couple days ago: > > commit 4bf171e11dd324f5c65e15da17717b701e961b17 > Author: John MacFarlane > Date: Fri Oct 23 21:56:12 2020 -0700 > > HTML reader: parse inline svg as image... > > ...unless `raw_html` is set in the reader (in which case > the svg is passed through as raw HTML). > > Closes #6770. > > You can try with a nightly. > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/04e6652d-6db6-4090-b2f1-db7acc33edd2n%40googlegroups.com. ------=_Part_493_1542951082.1603909913345 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Here's the code:

<div id=3D"pl01">
= <svg xmlns=3D"http://www.w3.org/2000/svg" xmlns:xlink=3D"http://www.w3.o= rg/1999/xlink" version=3D"1.1" width=3D"100%" height=3D"100%" viewBox=3D"0 = 0 900 1200" preserveAspectRatio=3D"none">
<image width=3D"9= 00" height=3D"1200" xlink:href=3D"../media/pl001.jpg" />
</= svg>
</div>

The jpg image is in= voked via "xlink:href=3D" 

Unless I'm getting= confused with the relative path the nightly version still does not pull th= e referenced file: it's nowhere to be found either in the EPUB/content.opf = manifest nor does it get copied over to EPUB/media/*

On the other hand pandoc does understand the <svg></svg> tag= : in the content.opf manifest of the resulting EPUB the description of the = ch001.xhtml that contains the above code includes the "properties=3Dsvg" at= tribute.
  
My guess is that pandoc does = not understand the "xlink:ref=3D"  syntax.

CJ=  



On Monday, October 26, 2020 at 5= :17:42 PM UTC-4 John MacFarlane wrote:
Chris Jones <cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> What I see is the following processing of raw HTML when creating a= n EPUB:
>
> 1. Tags of the form:
>
> <p><img src=3Dmenus/jpg/01.jpg style=3D"height:100.0= %" /></p>
>
> are processed to some extent insofar as the description of the= file is=20
> added to the resulting content.opf manifest and the image is copie= d to the=20
> EPUB/media/ directory
>
> 2. <svg></svg> tabs are also partially processed: thei= r presence in a file=20
> (book chapter) automatically causes pandoc to add "properties= =3Dsvg"=20
> qualifier to the file's description in the manifest. On the ot= her hand what=20
> lives inside the svg wrapper is ignored.

I believe this was just fixed a couple days ago:

commit 4bf171e11dd324f5c65e15da17717b701e961b17
Author: John MacFarlane <= j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
Date: Fri Oct 23 21:56:12 2020 -0700

HTML reader: parse inline svg as image...
=20
...unless `raw_html` is set in the reader (in which case
the svg is passed through as raw HTML).
=20
Closes #6770.

You can try with a nightly.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/04e6652d-6db6-4090-b2f1-db7acc33edd2n%40googlegroups.= com.
------=_Part_493_1542951082.1603909913345-- ------=_Part_492_886162530.1603909913345--