Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1684996pxt; Sat, 7 Aug 2021 21:05:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTS8VhfcbJfRfXwCfk7CJhcNr3CQ36x0kXvYTLfATkL3mZBiPZ3CSDDq+AorprRKmmDWGr X-Received: by 2002:a17:906:d54c:: with SMTP id cr12mr16831389ejc.227.1628395534584; Sat, 07 Aug 2021 21:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628395534; cv=none; d=google.com; s=arc-20160816; b=AANFpvHXCKQ30xeAcjyWm9eSb74Xqq/hMP0m6/YqaT3YUG7RBik3QLQEN1I2BnehgK Yoq+59hkKwe/VrTuQeUuu4MF9fv9FXWoBx4ivxWy2GdVEC9nBnZhAtErUb2pTZ8Ffz1H qEadj6IzQyx690JUY21seFquy5ZdfdKFn1e2nanLhJEtGQ8y9D23o4ikwAW3rUSTuGyL 9I+grBex35fpKyehty+HmGfGmDY/AhUwx7Cq8aJlrccYZfyP4VjA7mPklSl5QL75Mkfp u8kbv1Hr6zOwFVjdIi9cjb2mrmXCyDef+qYDc1zYVSsrfTBGRZAX1WrjYvjQ43US5wpI M/cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=mJCzvgG17lDIrPVUXi3Q36FAL+nZMzi8syW3cWaF/28=; b=y0Q4logP1oZaaUNyRe7E/RYnfqIF0RhPRkFipC03mpM/bsnQeA/WIfuCojqPCy+HDo 0526Og+uZnPg5VhK6G7DSBUA9cHmBxbmh3CntQJ6stOyh2za3XHWlVWathdo5IIVy8hG vd7aDMw5po68k/nMQ2oorUz1rJw5k/JuKB/fM91yY4PreNiITGOxL67XGmjTY8DzZkzV VUYPNEI+iVHkWXExR+5lFAQtmPOeIaSW6A9U1xj4IVKQyI0maounRULicir1x5VAR+7p 9jjG35DLBtOjV/Suu6lSZzI+joBSxnsN9VnCh8rT3cjP3o+ig4flRw6XXIls8EaXdPUH JRqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DFjyMlNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si12583436edq.35.2021.08.07.21.04.43; Sat, 07 Aug 2021 21:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DFjyMlNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbhHHDyI (ORCPT + 99 others); Sat, 7 Aug 2021 23:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbhHHDyG (ORCPT ); Sat, 7 Aug 2021 23:54:06 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D03BFC061760; Sat, 7 Aug 2021 20:53:47 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id u5-20020a17090ae005b029017842fe8f82so15089651pjy.0; Sat, 07 Aug 2021 20:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mJCzvgG17lDIrPVUXi3Q36FAL+nZMzi8syW3cWaF/28=; b=DFjyMlNiJhu+rvkBzvFde/2g0HmPd6knViZBvTLAWhfcp3BXNS6beo9J13yf4i18Cj yVDbL95ZEEJrlyG9VfjDu2aDMIAf5vt8U6VQQ0gaIDQOtWqozv3MCLmlL8g/1RZfOO6/ a1HgdtfsiDUaiFnBxGW2Q0ORRXyh6hrRSJrRpSdGnICBXSmcuuwXW2lm9IY5xn2aOaQZ CWVDAuWapV4C5Lmj7c8wObNFJXNIjQiZkjvgeCOKQJ6L8eSTGvLXtCWInm8sea8simLj LLfalKpRnmHFx9dJrluhIvm/HQMa7hTThXzheFAFgAkRaWBgtIJSuYKtGPdzTl/pH2Mh 7K/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mJCzvgG17lDIrPVUXi3Q36FAL+nZMzi8syW3cWaF/28=; b=JagKi631NNKiLqIfq5cNHppSMcepAUlVYq+jgcZyH7B491zKTOlP6IcB2HS13iTHW7 8plHgFvq2tIBFMiqdXNFyMpKKczCCrY7LednP5EhN7NtB6e/Dbp72zbeHmGZFmkQzPtR 8I4d5yL/bUa6a8maFAvQXfzbBA2JeKFcxYcGj0apoOYPnIKdmLCr96YRIG3m48SH6HHz vJ+uh2GcxtV49L6kIoX6tSGqUM0y9sjv2XCeH37tMo+OjeT11C6zsGR/dNEd9nDTkdL7 P4p5Le4HU12Vg7brKTBFPILh11xMyV4v2yFANlaTHjVd9hohQBYwORe4VFgd5Ljf6wmO Erdw== X-Gm-Message-State: AOAM530HQbvyBpxjzBcllhjeyn6rr6lZqvZnoW6u6yCDNsxHh6+A+SB/ Zr/2+/0/h4gUpLrIHCylcPA= X-Received: by 2002:a63:f341:: with SMTP id t1mr238565pgj.149.1628394827249; Sat, 07 Aug 2021 20:53:47 -0700 (PDT) Received: from [192.168.11.2] (KD106167171201.ppp-bb.dion.ne.jp. [106.167.171.201]) by smtp.gmail.com with ESMTPSA id a22sm15641180pfa.137.2021.08.07.20.53.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 Aug 2021 20:53:46 -0700 (PDT) Subject: Re: [PATCH v3 6/9] docs: pdfdocs: One-half spacing for CJK translations To: Jonathan Corbet , Mauro Carvalho Chehab Cc: "Wu X.C." , SeongJae Park , Hu Haowen , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Akira Yokosawa References: From: Akira Yokosawa Message-ID: <8e70e5ed-c0d9-a0f0-6640-a0f1ebdda6d4@gmail.com> Date: Sun, 8 Aug 2021 12:53:43 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Aug 2021 18:56:16 +0900, Akira Yokosawa wrote: > CJK documents are much easier to read with a wider baseline stretch. > Applying the onehalfspacing option of "setspace" package looks > reasonable. >=20 > Note: \usepackage{setspace} needs to be before that of hyperref in the > preamble. The 'extrapackages' key (available since Sphinx 2.3) is for > this purpose. Sphinx versions < 2.3 ignore 'extrapackages' and generate LaTeX sources without setspace package. Obviously, building such LaTeX sources will end up in the error of: ! Undefined control sequence. \kerneldocCJKoff ...exeCJKinactive \singlespacing Current requirement to build pdfdocs is Sphinx 2.4.4, but LaTeX sources generated by 1.7.9 can at least be built prior to this change. Jon, Mauro, do you think this is a regression? You can skip 6/9 if you'd like.=20 I'll see what can be done for compatibility with Sphinx < 2.3. Thanks, Akira >=20 > Signed-off-by: Akira Yokosawa > --- > Documentation/conf.py | 9 +++++++-- > Documentation/translations/ja_JP/howto.rst | 8 ++++++++ > Documentation/translations/ko_KR/howto.rst | 8 ++++++++ > 3 files changed, 23 insertions(+), 2 deletions(-) >=20 > diff --git a/Documentation/conf.py b/Documentation/conf.py > index 2ccfe4442acc..2e54488e2480 100644 > --- a/Documentation/conf.py > +++ b/Documentation/conf.py > @@ -341,6 +341,9 @@ latex_elements =3D { > verbatimhintsturnover=3Dfalse, > ''', > =20 > + # For CJK One-half spacing, need to be in front of hyperref > + 'extrapackages': r'\usepackage{setspace}', > + > # Additional stuff for the LaTeX preamble. > 'preamble': ''' > % Prevent column squeezing of tabulary. > @@ -405,8 +408,8 @@ latex_elements['preamble'] +=3D ''' > \\newCJKfontfamily[JPsans]\\jpsans{Noto Sans CJK JP} > \\newCJKfontfamily[JPmono]\\jpmono{Noto Sans Mono CJK JP} > % Define custom macros to on/off CJK > - \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive} > - \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive} > + \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive\\onehalfspacing} > + \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive\\singlespacing} > \\newcommand{\\kerneldocBeginSC}{% > \\begingroup% > \\scmain% > @@ -437,6 +440,8 @@ latex_elements['preamble'] +=3D ''' > \\renewcommand{\\CJKttdefault}{JPmono}% > } > \\newcommand{\\kerneldocEndJP}{\\endgroup} > + % Single spacing in literal blocks > + \\fvset{baselinestretch=3D1} > % To customize \\sphinxtableofcontents > \\usepackage{etoolbox} > % Inactivate CJK after tableofcontents > diff --git a/Documentation/translations/ja_JP/howto.rst b/Documentation= /translations/ja_JP/howto.rst > index 73ebdab4ced7..d667f9d8a02a 100644 > --- a/Documentation/translations/ja_JP/howto.rst > +++ b/Documentation/translations/ja_JP/howto.rst > @@ -1,3 +1,7 @@ > +.. raw:: latex > + > + \kerneldocCJKoff > + > NOTE: > This is a version of Documentation/process/howto.rst translated into J= apanese. > This document is maintained by Tsugikazu Shibata > @@ -11,6 +15,10 @@ try to update the original English file first. > =20 > ---------------------------------- > =20 > +.. raw:: latex > + > + \kerneldocCJKon > + > =E3=81=93=E3=81=AE=E6=96=87=E6=9B=B8=E3=81=AF=E3=80=81 > Documentation/process/howto.rst > =E3=81=AE=E5=92=8C=E8=A8=B3=E3=81=A7=E3=81=99=E3=80=82 > diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation= /translations/ko_KR/howto.rst > index a2bdd564c907..e3cdf0c84892 100644 > --- a/Documentation/translations/ko_KR/howto.rst > +++ b/Documentation/translations/ko_KR/howto.rst > @@ -1,3 +1,7 @@ > +.. raw:: latex > + > + \kerneldocCJKoff > + > NOTE: > This is a version of Documentation/process/howto.rst translated into k= orean > This document is maintained by Minchan Kim > @@ -11,6 +15,10 @@ try to update the original English file first. > =20 > ---------------------------------- > =20 > +.. raw:: latex > + > + \kerneldocCJKon > + > =EC=9D=B4 =EB=AC=B8=EC=84=9C=EB=8A=94 > Documentation/process/howto.rst > =EC=9D=98 =ED=95=9C=EA=B8=80 =EB=B2=88=EC=97=AD=EC=9E=85=EB=8B=88=EB=8B= =A4. >=20