From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29279 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: epub : footnote backlink character not rendered by Kobo fonts Date: Wed, 22 Sep 2021 09:39:59 -0700 Message-ID: References: <349480b0-92cd-450f-abc0-f3d65140d23cn@googlegroups.com> <23e0bec1-2642-49d7-b6d5-d440caf74fdcn@googlegroups.com> <68257f93-0fd1-46a1-9e99-46d6045dc4b9n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29304"; mail-complaints-to="usenet@ciao.gmane.io" To: William Lupton , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB3FYVWFAMGQEQ7BNFVI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 22 18:40:15 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pg1-f190.google.com ([209.85.215.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mT5I6-0007RD-Tv for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 22 Sep 2021 18:40:14 +0200 Original-Received: by mail-pg1-f190.google.com with SMTP id v33-20020a634821000000b002530e4cca7bsf2022165pga.10 for ; Wed, 22 Sep 2021 09:40:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632328813; cv=pass; d=google.com; s=arc-20160816; b=OSLVWoKX4NuK5NFV4I0PLqj7q7iSRH/vh4l2E0uL+vqp4uYvauEl2DA0/LybkZRT84 /XsLpbx5LLmlXfkeCUENfVhxsv8JWCkBKsrzpUiAfnE7HQDQpR82Q7oYr/nQl/l7bpM4 I4h+fCy1Tz0lISX8lf1f2iOKzBZTJ2x+YuLRnypTpt8L9+pIwZBXJqyjN4QrlCMDw6PU Dqil7NnBMqu9kso6iXpmLIG9AB4QH4r3pdq62w4oswVJzeX9InpUwLhKpw0gwdAjTpqt FqsW4yYxOeQmhyobLw2xIib1e9VKn/pKfXULZFaDMb1JuolBOiq++VJlitHkcy+zXmCL CZDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=EvZjW1e5y33rrhyFhfpK1aJkcUMI8VNG/N/hQFrE+YY=; b=JzVSfe8fMNsi38IUJUidhCBPKBWL0AunZYEtX8SANN51tYTKBF4WN5c3dLBc42axj2 3QBDCiRYQCvRc2pg5+7wqtggvnnY3zUAQA1W5QaMsr1NpQ/66+y8wJ3WblrPg0Or3JqN niAc6676yWHomNhLxb4173HH2DdqgWdLH2rgXTdhybovLxaEIjGk88D0m4epIOcC5FXU roMnFRL2bDH+H/lG38+4mJ+epV3g8E0CTMRkV5HLSIO8YafD1k74BZObzKkYXAG3DZ7s 9tU9hWBPHkOIMEjtHjl1XyF7giWUq8bFLl2VWtQengQWpySeUYI7LxMoEPNYDbQSFKTQ +tLw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=4atLIMg0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::533 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=EvZjW1e5y33rrhyFhfpK1aJkcUMI8VNG/N/hQFrE+YY=; b=l9He6H1me20YwK4es1SsX7sKzdOYjft80Va5d9sXEOR5KZj69HcX2KCd+eZbmA6AkX ZsK9V6UKvTqdnOGYDDYudfhLdHsNiU0fFOgg4mbZfjvrquN8a0Fa6PRso6zrEEvgFYXb gqE8UzSqnTBfZffxyXBtvbSbZZHYUxmJURP6LlGN1n04a/0RcMyOLPefcfHR0Au1JBWA ncNN8ZNlf7LXU7GOwAITtQexRSg/rWc6Stt/XFwaU/h6stKcYtw8S2cD2wIM6BABvVuH zNR5AfequSXPJNDKiNLbRERTluI4DH/jvGWQ1vCMePrZ+Va8lQ6Hkeoj0yIg5Qpzw3wD f1gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=EvZjW1e5y33rrhyFhfpK1aJkcUMI8VNG/N/hQFrE+YY=; b=elchz0YNTIE1tTTGppFNmkg9eIKLt+c+/gVfxJHo5czDFgpT3V1MJlt4fadqx4jYTm ygBsif9rwB2IGToqbHnIdBhrXtjaY0TINb01aFw/ZYBAEllflX8NLwyMu8k4W1QGgAoL YkcuORYh9J4Hb9uXBmUxLhARKejBdbmdXNt1UT/TkkCGhchh+hZYTdFzqUUWbDzhr4iR NWG+P+7DVAMrLZhxfoWeGS8Xs7k2TxI6YyOmRW7qQ4u6Hn7G2sE0HMfPQVe9UHCKeMQZ FxZrWsxvwd8FD5VoIJxZBnhqqvdWe6XNQJ9wc0qF0VFXcGMerD3ulQredwp05J5Ie5I5 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531FduNs6qruLEgt1W2M4hY+TM4/Q7HrMYoyVZ5VmsTapuAV5n88 h4ZpJ21lLGKQT2fy0Ecy2CI= X-Google-Smtp-Source: ABdhPJyH2Nltx7tF+smc8VfDbIMuMe3Hh4/kEdxMFW9yAHETqDSvb4QX/ilaNHRAXNkJyVX+8tKmsQ== X-Received: by 2002:a62:7cce:0:b0:447:b550:5059 with SMTP id x197-20020a627cce000000b00447b5505059mr352056pfc.58.1632328813635; Wed, 22 Sep 2021 09:40:13 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a62:8855:: with SMTP id l82ls1141544pfd.5.gmail; Wed, 22 Sep 2021 09:40:11 -0700 (PDT) X-Received: by 2002:a63:e243:: with SMTP id y3mr327412pgj.101.1632328811664; Wed, 22 Sep 2021 09:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632328811; cv=none; d=google.com; s=arc-20160816; b=EVG9+t9oPQZbA+JF77Hs89w/CV8Q3StOK/dJizceRwtTKQaPkLOWKT50qHVhfBKm3u BFpDwx7Cp5qkr/M4lEB9u+HTEZgoYbiNEuH0JBhccbDq2KJLP46xIutiBL1l/Hg69f8t Zu7HoXqPQ3WlfjWrSlnOy1zmGUnVg7VFgc7gRUmbpRRqEh9rGCdM7iFLMlo7J4MS6M7y LSP/8LX045ECln+S2+hFwLKK9RzILBNGx0ffdiaJbHJED5mRnHYxnYqia7EUbxh8RfJa 25ihcKERb+RFpz/xkJLRTJ24gcoq4xVy8vvvjbK5+T1nNVGjZOwoSmj91P4mGU0zc+6S Wu4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=xlbOXTqZ2KVNXTTmf65urZ/6RK06KogH8GmBU225VEU=; b=KqjcTFGV+S9InWlWkvFeuMS0bse6rolDnhmVz66B/dBNkJ2wstZqbZQHt2HD4VGtkW sv4VUhdWKKHY/agS/n+W2qe849NNp42RK0EvE2ZL/OPrCauaqqjs68s6e/OXyQHCgYCy 9vt4XG57zCZI/SsdCRueZN8ye8InEgnmVTEd6xCZmExnC6vT7uOm1FrmyxpTqGmf7ksV lzbxghD5AMuLriTyKev5cjn4ieGeZ5MieqhTHCg6IJa5AeSb1zKctaD/nJlWm+eL8E1w 0JF56i6XOCAG81FZeFLvQvEvPhvAiTjOieOfmWpmWepSJYbmIUdU2NLmy5jDjjqpneCQ YRCg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=4atLIMg0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::533 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com. [2607:f8b0:4864:20::533]) by gmr-mx.google.com with ESMTPS id o5si261215pgv.1.2021.09.22.09.40.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 09:40:11 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::533 as permitted sender) client-ip=2607:f8b0:4864:20::533; Original-Received: by mail-pg1-x533.google.com with SMTP id n18so3242473pgm.12 for ; Wed, 22 Sep 2021 09:40:11 -0700 (PDT) X-Received: by 2002:aa7:9a11:0:b0:449:58bc:452e with SMTP id w17-20020aa79a11000000b0044958bc452emr10869pfj.17.1632328810912; Wed, 22 Sep 2021 09:40:10 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id o5sm6329940pjg.40.2021.09.22.09.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 09:40:10 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 6BCEAA1A8; Wed, 22 Sep 2021 12:39:59 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=4atLIMg0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::533 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:29279 Archived-At: A custom writer is probably overkill. It would be easier to write a small script that unzips the epub, does search and replace on the xhtml files, and then zips it back up again. This could be 3 lines of shell script. That said, this is a long standing issue and we might consider using a different character or making it configurable: https://github.com/jgm/pandoc/issues/3149 William Lupton writes: > This probably won't be the answer that you wanted, but you could use a > custom writer, e.g., based on the provided sample.lua. See > https://pandoc.org/MANUAL.html#custom-writers. > > Here's the relevant code (this isn't all the code relating to footnotes, > but it's the bit that has the special character!): > > function Note(s) > local num =3D #notes + 1 > -- insert the back reference right before the final closing tag. > s =3D string.gsub( > s, '(.*) -- add a list item with the note to the note table. > table.insert(notes, '
  • ' .. s .. '
  • ') > -- return the footnote reference, linked to the note. > return ' '">' .. num .. '' > end > > On Tue, 21 Sept 2021 at 13:23, Vin Cent wrote: > >> Ok, after some more reading, I'm still unsure how to proceed ; and I >> actually don't see how I could to that with a filter. >> I have dumped pandoc's native output format ; and the character I need t= o >> replace is not part of it. I guess it is added at the time of pandoc's >> writing the output document. >> I don't know how how I can replace that character. Hopefully there is a >> pandoc setting I can tune so that I won't need to replace it at some lat= e >> stage. >> >> >> >> On Tuesday, September 21, 2021 at 10:42:14 AM UTC+2 Vin Cent wrote: >> >>> Sorry for answering myself. I have RTFMed a bit in the while. >>> I actually hint this can be simply done with a LUA filter. >>> I will try to implement it as a self-exercice and report the result her= e. >>> >>> On Tuesday, September 21, 2021 at 9:34:26 AM UTC+2 Vin Cent wrote: >>> >>>> Hi, >>>> >>>> I am generating epub3 from latex source. >>>> I was wondering why footnotes show a backlink to the original text whe= n >>>> I display the document in calibre, and why they do not when I display = the >>>> document on a kobo reader... >>>> >>>> ... until I found the backlink is indeed well present. It is "just" no= t >>>> displayed by kobo because the character set (by pandoc, I think) has n= o >>>> rendering on their font. >>>> >>>> The backlink character, copied and pasted from the .epub document >>>> itself, seems to be "=E2=86=A9=EF=B8=8E". >>>> >>>> I see two possible tricks here so that the link will appear on kobo : >>>> 1. Change the character to another one that would be rendered by kobo. >>>> 2. Change the default font of the document to one that has rendering f= or >>>> that character. >>>> >>>> I have tried all available fonts on my device. There are actually thre= e >>>> classes of them. >>>> (Listing them all below, this might be of interest to somebody in the >>>> future) >>>> >>>> Avenir Next ; Georgia ; Kobo Nickel : these fonts render absolutely >>>> nothing for that character, leading the human to believe the backlink = does >>>> not exist. It is present, clickable, just not rendered. >>>> >>>> Amasis ; Caecilia ; Gill Sans ; Malabar ; OpenDislexic : these fonts >>>> render "__" for that character. I find it "better" than the first fami= ly, >>>> but still not great. It is not obvious for a non-tehnical human that t= his >>>> is a backlink to the text. >>>> >>>> AR UDJingxihei ; Kobo UD Kakugo ; Kobo Tsukishi Mincho : display >>>> oriental character (I think this is chinese / japanese depending on fo= nt) >>>> for the backlink character. >>>> >>>> >>>> Therefore, I tend to favor the first solution. Do you guys know of a w= ay >>>> to customize the "backlink =E2=86=A9=EF=B8=8E" character set by pandoc= in epub ? >>>> Or is there a third approach ? >>>> >>>> Thanks, >>>> >>>> Vincent >>>> >>> -- >> You received this message because you are subscribed to the Google Group= s >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> 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/68257f93-0fd1-46a1-9e99= -46d6045dc4b9n%40googlegroups.com >> >> . >> > > --=20 > 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/msgi= d/pandoc-discuss/CAEe_xxiSZbwmOYcdd5nKSqySuF8L4tvPbrD%2B-kXDcONXu3n4hQ%40ma= il.gmail.com. --=20 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 e= mail 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/m2r1dg36ow.fsf%40Johns-Air.hsd1.ca.comcast.net.