From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23729 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Benct Philip Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Setting the document language on the HTML tag in epub3 Date: Wed, 30 Oct 2019 16:13:20 +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: text/plain; charset="UTF-8"; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34951"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBE6R43WQKGQED23RG7Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Oct 30 16:13:24 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ed1-f57.google.com ([209.85.208.57]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iPpf2-0008vM-5c for gtp-pandoc-discuss@m.gmane.org; Wed, 30 Oct 2019 16:13:24 +0100 Original-Received: by mail-ed1-f57.google.com with SMTP id e24sf1845011edy.18 for ; Wed, 30 Oct 2019 08:13:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572448403; cv=pass; d=google.com; s=arc-20160816; b=Xda5hsaIxmtU86zIPpw/e8cjLhHN8VTJmXvQUK5eWhFoBtMi1RTf6BZQZ9wjMm3t6O m1cfV/ieOvJsd59ZUROxu0QLw1HJzBI+Ip/qL/qbOhm/B7Gx1cnDQgyYnAvaeNEnqM1B 9txRR/8moeNoeBjCgAQd4jq46akNeJirpzrCsRo7ZZFYd2wvRidK9Gu1maSaIZIMuWQH A8a82cCq7yGKcNbKrVQE8ZY6YJiG/oaVMoRVYKHO4BhGcsItcPyB79cqjVKfXYZYgnhi udhiXlCyWt+ll5CtoYPC9Y08pyDL4ZSbuazIqD2e9kXtatCmMggFD017r4dFhWHYeoDF BVIg== 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-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:sender:dkim-signature:dkim-signature; bh=jcKB0YMzXLQmqbnOwRepgRhJ4HKDPoKgJdJ2ecJ74WI=; b=YJ8rMb46Apb+X4zOPeMXddMhnaEos9rFNu1zvxTz7MTK0UXzTEQuaiEGV0dGowk//+ 4DgkoJhkRC6KSUM968XReyCGdr2YdM6o0GbxX1F03NZYcNYj9/G/7xXDU/SRKmODssy/ q0PDVw6SAxQU5Z9vnaRC+Qs3M/JFr/eLHMDbdGMj6K9N4kdkKJPnDBsFms4aTzhZpRVi tlqh09GO39MnX+BIwfarDZ0w97X4z0CUAMJ7gVQOfNw5B+SmVualNhTabeM7ypA6SLkv DYNxTyIkyPja9Zj9DXAQvwF6Vkx5oiUXFWXyujo2wMHaezGDOhO7dfUckHwblMEHTwBO U7Iw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hc9OXRmg; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::335 as permitted sender) smtp.mailfrom=melroch-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:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language: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=jcKB0YMzXLQmqbnOwRepgRhJ4HKDPoKgJdJ2ecJ74WI=; b=o72TxUixps3IPJ4LSeBaFI6ttUM7Kv9OY83/+9y5fb8osLYJCf77S21ZlGzkPo4Bpr 8GWD+fB5jJhkE2AQ7TN8L1dBorGiBAGnAX/8KbSLR9bI/cmbleqCbMxJEWYZQQhizH79 hG5mmRvhRwf1kcV8ItZAwudCvO/P28d8ZfHazATik/cGZ4WWruzirMIUI+ZQurYWEvbX GZEvCTFX1wMjtIe6LX2qPC8th3YHGFqMQHNs0jXCAfApuDe7Fove1/OedYX+lemgjhmc YJyKO3pdhrQOZhYddlk6c7BYa++T0FIL6N3F15hfe40cOa1r/ftyiOYyFS9hcPVdIhFs MS9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language: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=jcKB0YMzXLQmqbnOwRepgRhJ4HKDPoKgJdJ2ecJ74WI=; b=FKK/X7QH1WE5pF7cHhh6NSYs+VNNamcXpLcWWDBDyL8RwTrFL408UsEhqdp7pcow3T pjDKeLs5M2wLlLzc3NS/GMI6d5VGkpjxdBTWqx9kDpd0LwRzL3FbRMtHWFOjatziJRbw 5imPNVuuMtT5qPNz0q9mXRuiIfqmlBHj748Qqq24mD+UjHEIX17SO98H9JURZOQ/r4oa jI+ZTJ5LiRU15dRNudqInUOVfLe+fjNR5vqKRGXFGJmpOe4ppvLuJG1PUyjYQwaUdcqZ ANXFWSh6MgeF/gU6woFTZneUooShwD8v3OJZWhpRAx5mfOPNTv8xBTOnqHrU/fM4VTxN 307w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :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=jcKB0YMzXLQmqbnOwRepgRhJ4HKDPoKgJdJ2ecJ74WI=; b=ksQ5pbY0cgKgao/JBn4yMiD5nenHTwU5EFz3KkcEtmBNQH3JhHyTipV5DgdFdK3dWR SEDp8rKCHOO4VJRxObGlHVGuXBFMJSILNao9eYyqVzz0tUAwedkWBTvamIQObDAV27D7 DuLcz+0rGRzpaovr8qVrWhO1ylf2SC0eX4SOaz0KVaCup+9Mbu6fyIdXU1kdypoKak19 smy8T44snbpkL5nNyIjYy+jcixHTIvLdagkztDD2gtbO95IqVr4Dugl8EaIFQH4jjoLF 8BVmIitlZMu4ZM8aO9cLURk0bz/jcTy/X4sm/cXDL+gfHLwCDy01Ci3f9Q/GygTmDur6 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAXEDL8qPmVeBrdMJ1gYxVzZF6qgsbGSNCnvvy02XVzi26lDph0U HUeVxlHJ0sXBjyWKg76zeRI= X-Google-Smtp-Source: APXvYqyhCObVlzMq9jgCmaf2z6ZJwAxXlirrIHiP7gdW7VUMZKr3VsFHaI8tDlQPvkIiPZFEoozPsQ== X-Received: by 2002:a17:906:218a:: with SMTP id 10mr39258eju.38.1572448403466; Wed, 30 Oct 2019 08:13:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:906:b788:: with SMTP id dt8ls3283824ejb.8.gmail; Wed, 30 Oct 2019 08:13:22 -0700 (PDT) X-Received: by 2002:a17:906:694e:: with SMTP id c14mr22365ejs.122.1572448402670; Wed, 30 Oct 2019 08:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572448402; cv=none; d=google.com; s=arc-20160816; b=U62+9pGXuWoKwv6T6wu3okg6nQBmaAZg/2kfMnnyZ8m2zbhHbvpgk0vPrdK4AYC11t J44/jzAY/dIy56zyUyH2zT2D5StQSUiZ82sKCgX6xHhw8b2cSJzKlsSqo3VUVCzEZAUJ KCggaasNdAFD/Sagh0//mGyRa28JN8mG44B5CfNzAPEkpqRcED32KAgZ9PvIeOM6p+s/ EjS9N+XuQ3+swmDxUcEqxgd1YRAx5LVmpm2ePd7KHH0iA+ewjUYRwtKhZakPlBvdwxbp CWsgkn5NqaUtwtjudI97NA2vBzusANHm1YGAeObLhMhRWpCfCKW//BANsXYLLLyEzby+ WJig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :dkim-signature; bh=QZG2jqa8Nat73guk3FgGOL2G1IObHWIjwim5rzW8qrs=; b=IGvgWV1sQqpibSBFxpb3TUZ4qGHKghxJezHDUd1ywjYFdXKduFAGXBQ+UAhXJNgCBg g1mkRMkg2NTzdomFo7oGfWgwnEPg+n6oFcKrS85GGFaJM82JFiagPI0sLBJrfQkFEPIX A6fAPR1DKdAtLCyhKY+d1JrawwlkuvSAvWz0gVngrxPhTypb57VboL8v0uaZSYf8w4m0 tfzp4CiGWuGCi6PU5sVDJndC1gAow08s3GhrVKA/lsHLCzkQwb1O87DkWkCyeYKFWcWU AIlsgJTKtPTV8Cv560E6rnBY+WIGsdNPY3jOOmXoBrAOcR/K8K+I5JrwosC7n8HSJQPq iKxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hc9OXRmg; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::335 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com. [2a00:1450:4864:20::335]) by gmr-mx.google.com with ESMTPS id z18si100389edd.5.2019.10.30.08.13.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Oct 2019 08:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::335 as permitted sender) client-ip=2a00:1450:4864:20::335; Original-Received: by mail-wm1-x335.google.com with SMTP id g19so2586129wmh.4 for ; Wed, 30 Oct 2019 08:13:22 -0700 (PDT) X-Received: by 2002:a05:600c:2487:: with SMTP id 7mr9770697wms.164.1572448402073; Wed, 30 Oct 2019 08:13:22 -0700 (PDT) Original-Received: from [192.168.1.122] (user141.77-105-220.netatonce.net. [77.105.220.141]) by smtp.gmail.com with ESMTPSA id s17sm327096wmh.3.2019.10.30.08.13.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 08:13:21 -0700 (PDT) In-Reply-To: <92867006-1219-4139-9aff-1bc7345c09c5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Content-Language: en-US X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hc9OXRmg; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::335 as permitted sender) smtp.mailfrom=melroch-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:23729 Archived-At: I just tried to generate an epub (something I don't usually do) having set the `lang` variable to `sv` and as far as I can see every .xhtml file in the archive has an attribute `xml:lang="sv"`, and the default templates for both epub3 and epub2 have an `$if(lang)$ xml:lang="$lang$"$endif$` in the `html` tag. So one or both of the following must be the case: - Your version of pandoc is outdated. - You are using a custom template which lacks the `$if(lang)$ xml:lang="$lang$"$endif$` in the `html` tag. I suggest upgrading pandoc and/or adding the needed bit to you template. On 2019-10-30 01:39, Patrick Kenny wrote: > 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-...-/JYPxA39Uh5TLH3MbocFFw@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 >>> >>> . >>> >> >