Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2286234pxt; Sun, 8 Aug 2021 18:27:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT5lvfyg89M6DlcgHJiK0P2GI8muHX1lA9wp/SeHTgsWmZGVogqOeG96YD3wF/LVKtcDzq X-Received: by 2002:a05:6402:1e96:: with SMTP id f22mr26824923edf.189.1628472465880; Sun, 08 Aug 2021 18:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628472465; cv=none; d=google.com; s=arc-20160816; b=NXrAezUkMDaF0Nf6lWVXewU8t/Z4j4NEu6yWTnYaQI8wr6zpWUgtB61gedsRZjKsKp 9UdHWjW8wa4ejmu0nsKc945to6RhrPP6+y32SutGX1OSf9iySbojSYQk9e3H31pJI9Nt JFdS76ASZxKhaT907gPqpXxbw/8li6JhRQzr03d3ROGA9sXD5GbE7oc3ixXX/H8nSXVZ Ad6GuGqqsBvtntpz68vhmLUPRB3V7YmHHkEnK4lWNuqnlPTMa897NJ/XlIRmMx00kCAv jmh/R8LjrnEBt7PRVKWBoUx9ytLr2Xwg5tlKDN5dcL2A462pGBpYzL2hjXbZ9BWSVC6d L/Tw== 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=65uq92+uPfX201VDvmSTKZbSUN3WhilhgfG4rF4gYBQ=; b=kg3uzgQOksQzhZhhAEFEf+BjB5QmXmVSiVkHPiLXyeOTxyV1+IjUbwNOU28aaidsEF 0JacCmA5zihzFEqO6fmSVFs6ibS9keU/VmePv4rr+2tIHc43Wj/iJHbZ1J0d1ekvP/RP kbfIJUQnvc+6XWZdaTkpRnGGMeM6TbEi1+gn0wsL+ARn7KCtbKc+RwwFzY4vnnfKwJFM W/E2sQPbqOpEZWQOIrGibzHsTEUz0yBBBOh7NEpg2ElTR1mR/3lfcPojYtdWQNyz4bXC NLebKjM1HOuRPF5CgSKKim7CeLfbrWArPqVa4fDwAA9s9RIMAWLtTu2fNytGI45GdWOF Xx+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Iokl1Pdx; 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 v12si2139071eds.540.2021.08.08.18.27.22; Sun, 08 Aug 2021 18:27:45 -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=Iokl1Pdx; 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 S232130AbhHIBYV (ORCPT + 99 others); Sun, 8 Aug 2021 21:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbhHIBYV (ORCPT ); Sun, 8 Aug 2021 21:24:21 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF519C061760; Sun, 8 Aug 2021 18:24:00 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id a8so25417492pjk.4; Sun, 08 Aug 2021 18:24:00 -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=65uq92+uPfX201VDvmSTKZbSUN3WhilhgfG4rF4gYBQ=; b=Iokl1Pdx38bGc8N5LxtjlSPrwWf2MQ3RZbCEuhb2oRZnT8eRjpKKA7b4jznKdYq3SJ lHkVePrUQcfN+aHDl1rcHmSHztiBn3hk3ebt1svGRp5yFgbllkUuVFNGlqDJlYxWUGp+ 2VlKGjmbyYLddQtooHV8CRwS8XWDPKqlmW9L3eF0eEt82HzIr3XkE74DZpC1gPY1KE/Q HqGYD4Z1XKZ10v3fJTTRajWDaJbbDYO+DTgx1HjALqFm+AsQS22drQRxAPhCJhw9bohg lfYzBbkpR1cLwG122cvqDqw3ZYJdEAZX5K6yU1zZcrFch9P0qEtNsRYsHuPyHEWsQFuZ Xh0Q== 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=65uq92+uPfX201VDvmSTKZbSUN3WhilhgfG4rF4gYBQ=; b=qj/fbYXX0lZtaUIsEwKllCYRVHsVI4cKF6zVBib0rAQqsX0wgSsoDp+K/VWQ3gAHKM QIqcX/+ZeTLJddz07Ln2bMo/KmdlLW7UH9lsjsZJGVZHHh25YjQo0DPHEuy+1tUuKQs9 Kkyd/IPeNujDhP2+x1jM4Uzhj3MfkFd3oSDDq4eKeC62xNCsZxnxElX1zmiydmzRpw/+ wEGz5VBuuSh4n2KR0/Z2Mq7T4OJzuh8lZTLd82qFhBsw04sKfJx+PJhD38cKnOCDEBQL sDsu+K1UJqFjqxIwR/SrCJnbPm+9PVLqM/rgdnyetsHlOfPo/FS3mrMLKtc3DTfBIMx/ iYSg== X-Gm-Message-State: AOAM5312ncZbyuVfo4jbuNCE1nIJ95f5gVIQnXE94ZCAXzzqDUf20o3x tERDx5lz9WvAfykrmpHPSOk= X-Received: by 2002:a65:6785:: with SMTP id e5mr195805pgr.199.1628472240324; Sun, 08 Aug 2021 18:24:00 -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 q13sm18837759pjq.10.2021.08.08.18.23.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Aug 2021 18:24:00 -0700 (PDT) Subject: [PATCH v4 6/9] docs: pdfdocs: One-half spacing for CJK translations To: Jonathan Corbet Cc: Mauro Carvalho Chehab , "Wu X.C." , SeongJae Park , Hu Haowen , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Akira Yokosawa References: <39d0fb0f-b248-bca4-2dac-df69e8d697b1@gmail.com> From: Akira Yokosawa Message-ID: <547a1f1c-0bb5-20a7-ea0e-951bfc3c3925@gmail.com> Date: Mon, 9 Aug 2021 10:23:57 +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: <39d0fb0f-b248-bca4-2dac-df69e8d697b1@gmail.com> 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 CJK documents are much easier to read with a wider baseline stretch. Applying onehalfspacing option of "setspace" package looks reasonable. 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.= For systems with Sphinx < 2.3, dummy commands of \onehalfspacing and \singlespacing are provided instead. One-half spacing is not effective in LaTeX sources generated by such revisions of Sphinx. Signed-off-by: Akira Yokosawa --- Documentation/conf.py | 12 ++++++++++-- Documentation/translations/ja_JP/howto.rst | 8 ++++++++ Documentation/translations/ko_KR/howto.rst | 8 ++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Documentation/conf.py b/Documentation/conf.py index 2ccfe4442acc..f219a7a41f48 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. @@ -404,9 +407,12 @@ latex_elements['preamble'] +=3D ''' } \\newCJKfontfamily[JPsans]\\jpsans{Noto Sans CJK JP} \\newCJKfontfamily[JPmono]\\jpmono{Noto Sans Mono CJK JP} + % Dummy commands for Sphinx < 2.3 (no 'extrapackages' support) + \\providecommand{\\onehalfspacing}{} + \\providecommand{\\singlespacing}{} % 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 +443,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/t= ranslations/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 Jap= anese. 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/t= ranslations/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 kor= ean 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= =2E --=20 2.17.1