From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23727 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Setting the document language on the HTML tag in epub3 Date: Wed, 30 Oct 2019 15:00:53 +0100 Message-ID: References: <92867006-1219-4139-9aff-1bc7345c09c5@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000b9fd70596212ae4" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="235840"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDIY76M674FRBJFP43WQKGQEXBSXX7Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Oct 30 15:01:11 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pg1-f183.google.com ([209.85.215.183]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iPoX8-000z7U-Hk for gtp-pandoc-discuss@m.gmane.org; Wed, 30 Oct 2019 15:01:10 +0100 Original-Received: by mail-pg1-f183.google.com with SMTP id u11sf1649347pgm.20 for ; Wed, 30 Oct 2019 07:01:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572444068; cv=pass; d=google.com; s=arc-20160816; b=iC3FCMCqRHaqqQtCyjuNSv5Xt29Qkbmo3RQVUm/HKuc7B1GR8iIjtJv/5kVj9C4H// 2FFvWoy9Io9bbQ/SAGtjJpjXLksUSDfcdbhXIj5XqH0EaoZq3NerFZ9pl9WeFHZvabIh RXxZoropvZZfLTuWdi8KXnNBNmiRc0fy+X3M+Tjgz2H3prhwTM36eBr9LTBb8YnUzwvg i200qsXjnpjZrFUsj6QYxcLeigoL7vPIizxJuySoiYdEaHnVrMJUW/GWMkXi7YBtUe1J BZLFAq9Efs89lcPYnOfSMvdOqY0GBLAgsDnRw9OH97YrY8SkoVfAmBiV346hnb2uv3uK r+9w== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=QBtf9jWg4ImnW+0yX0dQhdRz97ibuOalqZkJRr4Hfqc=; b=Ar2cnz7uorCZNyZV6aunv80gpK1nd9fmvbeTWSBVLFDelKmTbxVaYWixgUXRTtdQGn pH+Lpz096e5vz4FZFwnJ4+DUdwaqWdIdoiAEQPcFlN8dlBgW1NR1AYHu8v3vzukB/H5t P0SYp2TFBqJ9O3gYjsG63iidtnS4W6x6myrbV1HsgsxflQ/t3qiI9KCsibb+u4h1fNAe UpBhnsg7eto+8KpQVznof62QTwKPiTMFw3VoD6nIqfgrV6/HRyJs5hj1Gv8mWw1uTPli FKBRgaszXMa2kEceQStchq4IDNFNCY9wGSVKb5xwE2sr2LKeoPfC/xCAZ86UWKSMhhJh 0wKA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s98YD0AR; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to: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=QBtf9jWg4ImnW+0yX0dQhdRz97ibuOalqZkJRr4Hfqc=; b=jQpcL1ouCf9bznZmtEc4040vDmu25QJZIfnTHuFkCHHu8k8BigDPbqMR7kk5jWlI77 dwEuW51z4uGNqIqWERmBwNTOAYRuzL7FlY91pjiqNyXP7aPx7rRzX6kSdljC+s+T2Drm tRL21vSKBzrZmXq5FAVaYx+sc4pvV+UlRZ0NczCOIhxLF1uXOh6zG41Q4evuYvlZI1zM acryw4AU4Xet9yuH6OwYWEUDQv9lVMzDpsIYBwXQTRcTiwhfaPH6momzNx9EyWHlGasi qeD1Na5OXTJ6trj1ZaiBh5M5t+qnOyUttjSy6nwD7T3l2Dv6pcKXZMyA+Pm+TpiInIjU AlQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :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=QBtf9jWg4ImnW+0yX0dQhdRz97ibuOalqZkJRr4Hfqc=; b=tiy8sJkZub2qrp8hZcB/MHwTREbnc1OIwL4uf9BRCzqNRSxxNZ/BJu4yv3wUC7EBXR iy651cPVHvMSfFN6LAm2nXipR06xtR+ag/BT5BxdVEYTFpSTiCJvZCeYia6trMMcCnNd FwP5IvTK0peBnATbLzZD6upjkT/pWnVRNSRTIvSFlSzT1PSA7y+LsfTH3Ba/0W6V5JmG TI+XDjp7bzUW3JbvHPfkK4zYCfTzlVcym1GP3JY8Ntv24m22Kt2YKYwH9YRV7grdJdI/ C+L0LxAgjn8pofbXL9e1jWlmQj/1ZVTAAXm+BB8rmIRxOtxinQ5r276z/qC61T8+pwyB tbcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to: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=QBtf9jWg4ImnW+0yX0dQhdRz97ibuOalqZkJRr4Hfqc=; b=NoEckZIaOVQNA+lrqWa0z8cuOf15cVE9uCLenj3TIZZAevA6V5eH6xTHB8OMeifDu/ Z7XcQJE+e33Prx9rvFo6JitfV6iZBPiaYa2Lzs5TQgGfjpwsxAfBodeW5oJsMnlC7X3Y ldy7iliYx1cWx9oMCdqyoXDOyUjdcxffWXp23XWe03OglLMtczmyfZNnflR58DuCfW1X o5xCfbONGUEuiQ6VJmcBlDkEtOgZ7ivCPaIayMNvnwuDjeZlpWKNebFmD8qn7oS++KgB 60vafVe/HPyNQtNL5kqlyJxOr9ryhhIMpm6jV2Afx8RPuco3xVw6xHbC1JGykh0E406H VBbg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAW4V4fgcjZvi++IB7XVnzY5vVHMbuNXS2CD20UegEzoMXTh6B7r Eear5zROjB0k+ktjhWJEyjI= X-Google-Smtp-Source: APXvYqwgayjhrl3eEL/R5UFhKfjF2GzgT90jszGnQzZfRhehtDPA2Q2oaYmgw30e1h/QQvabDSNdew== X-Received: by 2002:a62:5442:: with SMTP id i63mr33530466pfb.220.1572444068801; Wed, 30 Oct 2019 07:01:08 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a62:3687:: with SMTP id d129ls7844157pfa.13.gmail; Wed, 30 Oct 2019 07:01:07 -0700 (PDT) X-Received: by 2002:a63:bc11:: with SMTP id q17mr25350343pge.223.1572444067595; Wed, 30 Oct 2019 07:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572444067; cv=none; d=google.com; s=arc-20160816; b=q5ILKxWQ6UuYhgm5fWxwtd0q7+HUYmUi4ioCPSmknrY+Vn4+Q3KC7es6zeDZWmvr5g pnWW1FMersqFuL0JwtI1RhXvV7S311ciZzKS9/QAEJqeuiX70s0pjFogFf3fCYdA75ur DmpAg7qfRT2byrcpmTsL33Ty35F2mJOnBe9/izOdtEacHI1e7M8x+BiyCw/ME7V2zS/U DOp2ImWAFT0Tbkcbho2m/FRPh9EOK60OgoTXPNjO0FUctfAmV6OMs9j2Pu8k809dJyDv y0/kHy/DxP7htpkq3p1EyoO0T9t5X4DuGStnX59/bK2ZmjsICvyvP4XFMPCObUaLluWv hbsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OLBy6jNKP5X7FbA6NV4cQi8J8tDzxNl9+vhsa0OrMio=; b=kbCtHTNPg41kzjSj6QKI008wsW3yp8zapQnQXiccbanoGwnCH/9deUO06TEHnI8+lj A718dLavElbmbU5TgjDWQsMvH6qdrfxJY7j+FDYP+7Ogk33k1BGSe5h7nmwUnl1iSj5R YX5ARcXYkGOcHNEEwbgNCL4SmeAoBDvtw8lldLxxlSzd5ZbM7fac9uiV82LTHC1rDXjN vicM3yNwzIO9yomAS1D1VgHDO3Hm5LF4f4m4UbiwtAm3kyN6xz/7rQW1V78W6ZO0vvq0 6LBE+07gwPkotU/LBuVB9z8QYAUFXkU/Co3UcnSvYgNxYvNlI0SqTnT0CdfX9vjfUXQ5 AIQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s98YD0AR; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com. [2607:f8b0:4864:20::536]) by gmr-mx.google.com with ESMTPS id s144si23273pfc.5.2019.10.30.07.01.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Oct 2019 07:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) client-ip=2607:f8b0:4864:20::536; Original-Received: by mail-pg1-x536.google.com with SMTP id l3so1540290pgr.8 for ; Wed, 30 Oct 2019 07:01:07 -0700 (PDT) X-Received: by 2002:a63:591d:: with SMTP id n29mr21358389pgb.202.1572444067043; Wed, 30 Oct 2019 07:01:07 -0700 (PDT) In-Reply-To: <92867006-1219-4139-9aff-1bc7345c09c5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s98YD0AR; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:23727 Archived-At: --0000000000000b9fd70596212ae4 Content-Type: text/plain; charset="UTF-8" I have no idea I'm afraid. What operating system are you on, and if it is Windows are you willing to install perl? If you already have perl installed (you do if you are on Linux or MacOS) or are willing to install it it will be fairly easy for me to write a script which inserts the lang attribute everywhere if needed. (It can certainly be done in Python too, but I'm not familiar with the Python libraries for modifying HTML or accessing compressed files.) Den ons 30 okt. 2019 01:39Patrick Kenny skrev: > Thank you for the response. > > When I use > > lang:ja > > Then > > * cover.xhtml > * title_page.xhtml > > get > > xml:lang="ja" > > as expected, but none of the chapter files do. (ch001.xhtml, etc.) Is > this the expected behavior? How can I also modify the chapter files? > > > On Wednesday, October 30, 2019 at 1:42:15 AM UTC+9, BP Jonsson wrote: >> >> The metadata key is exactly like the placeholder in the template, no >> more, no less, i.e. `lang: ja`. This is true generally, and you can easily >> define your own variables in your own templates. That wouldn't work if >> Pandoc meddled with the variable names so that the names used in metadata >> and those used in templates were somehow different. >> >> >> Den tis 29 okt. 2019 15:40Patrick Kenny skrev: >> >>> Going from markdown to epub3, how do I set the language on the HTML tag >>> in the epub? >>> >>> For epub3, the template looks like this: >>> >>> >>> >>> In my YAML metadata block, I have this: >>> >>> language: ja >>> >>> This sets the language in content.opf: >>> >>> ja >>> >>> But it doesn't set the language on the HTML tag. >>> >>> I also tried adding >>> >>> language: ja >>> >>> to the metadata, but this didn't change the value on the HTML tag, >>> either. >>> >>> -- >>> 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-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/c500692e-7472-40fa-991e-378b7ab173d5%40googlegroups.com >>> >>> . >>> >> -- > 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/92867006-1219-4139-9aff-1bc7345c09c5%40googlegroups.com > > . > -- 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/CAFC_yuShZKiXOcyR2A3QPO6R%3D0s2m5SkbYKDwm%3DDP%2BY8pWRwvw%40mail.gmail.com. --0000000000000b9fd70596212ae4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have no idea I'm afraid.

What operating system are you on, and if it is Windows a= re you willing to install perl? If you already have perl installed (you do = if you are on Linux or MacOS) or are willing to install it it will be fairl= y easy for me to write a script which inserts the lang attribute everywhere= if needed. (It can certainly be done in Python too, but I'm not famili= ar with the Python libraries for modifying HTML or accessing compressed fil= es.)

Den ons 30 okt. 2019 01:39Patrick Kenny <ptmkenny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Thank you for the response.

=
When I use
=C2=A0
lang:ja

Then

* cover.xhtml
* titl= e_page.xhtml

get
=C2=A0
= =C2=A0xml:lang=3D"ja"
=

as expected, but none of the chapter files do. = (ch001.xhtml, etc.)=C2=A0 Is this the expected behavior?=C2=A0 How can I al= so modify the chapter files?


On Wednesday, October 30, 2019 at 1= :42:15 AM UTC+9, BP Jonsson wrote:
The metadata key is exactly like the p= laceholder in the template, no more, no less, i.e. `lang: ja`. This is true= generally, and you can easily define your own variables in your own templa= tes. That wouldn't work if Pandoc meddled with the variable names so th= at the names used in metadata and those used in templates were somehow diff= erent.


Den tis 29 okt. 2019 15:40Patrick Kenny <ptmk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Going from markdown to epub3, how do= I set the language on the HTML tag in the epub?

For ep= ub3, the template looks like this:

<html xmlns=3D"ht= tp://www.w3.org/1999/xhtml" xmlns:epub= =3D"http://www.idpf.org/= 2007/ops"$if(lang)$ xml:lang=3D"$lang$"$endif$>

In my YAML metadata block, I have this:=

language:<= span style=3D"color:#000"> ja

<= div>This sets the language in content.opf:

=C2=A0 =C2=A0 <dc:language>= ja</dc:lang= uage>

But it do= esn't set the language on the HTML tag.

I also= tried adding

language: ja
to the metadata, but this didn't change the value on the H= TML tag, either.

--
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 pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c500= 692e-7472-40fa-991e-378b7ab173d5%40googlegroups.com.

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/92867006-1219= -4139-9aff-1bc7345c09c5%40googlegroups.com.

--
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://g= roups.google.com/d/msgid/pandoc-discuss/CAFC_yuShZKiXOcyR2A3QPO6R%3D0s2m5Sk= bYKDwm%3DDP%2BY8pWRwvw%40mail.gmail.com.
--0000000000000b9fd70596212ae4--