Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2110044pxj; Sat, 22 May 2021 11:16:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnGIwAX4ViJVQEEKP6idg+dpr1KzrBryMec9aaNlLbex81oRDonXTX6nTXqnQaqZDm7slI X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr15584985ejb.285.1621707418649; Sat, 22 May 2021 11:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621707418; cv=none; d=google.com; s=arc-20160816; b=nF1ZzyEyvLMvsYnzdO/QJ4exB8D7T9j63Hv6ErZ8cr9mCLL6q0t9uEUCx8nVpQnx4/ ihwMrFiFjnUFxuHUIIG1x2U5pNquF5OmkLO47JQfGDjpJaqj3cqqKzPJegq8Rh1NKTcN yVeP0QpViwaWCqxXWnNvxwXB6dGCJL9DSmLLSpamlY9SmFcHZ0+1d1NTIw0wyQmzp9Lv uLrLGPtldL4B33jb1G8mWfCgBiuZ2BStJVUhakt+B7fXqSdxcsrqgVLlDx9szFX3S2O9 qtgwXaOqN86aD9wplK8ODBamnha+UQYq4APjE4wA+AHrs4SKGgAHhSfzjDeh8ocfGoi0 Z1nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eiFHCLAnnIxyYqVCLpAcIW1NXvqUezdZhQVbLAR3tm8=; b=Wyo4547EKflEGTYfjhc1loWlXSsmxmfFxLGXkLRg1q4OZ8Vw6mbdiQ9GpHE+UI8KEa DkRhlPtYbS1BjJZEgOeeqtqnDE+okNUU/+/WeL1AW66lSRGLbGR5xU1cREoBU42mevA9 +E0NX7aDRMl3FC2BnePykVrVttNR4JQ3X7arIeWxqPr0tNzmyGkZAsQLyndeNqxLcWVb CLboEZJdriGPtREq41nD78S9CpNZh7jhTfgJicOxqB0Zqt5jhuhyFYDL+NTLZruJvF9b USBSq7KdMVIpR7xydTokHlSlWdxGt39oMCXisf9Uf/ubTohkCgvWjtawYSO1/zn2z2XS /WNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=um8dFcrf; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si8869410ejj.534.2021.05.22.11.16.34; Sat, 22 May 2021 11:16:58 -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=@kernel.org header.s=k20201202 header.b=um8dFcrf; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbhEVSQK (ORCPT + 99 others); Sat, 22 May 2021 14:16:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbhEVSQJ (ORCPT ); Sat, 22 May 2021 14:16:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17DD761139; Sat, 22 May 2021 18:14:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621707284; bh=IHJaW7ZlVSvMC1KLuAGqIxUGLtak5vbK3m+puLvh9yk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=um8dFcrfe44rnIZGthyLzh6KkWo4SncCPGa7YOFMLc3sItv0k5g70uX7GDMsABRFC ddMUnV/jwq14wwFs18vD6BQ2EUQ0ZWOcbV0SuYgzedgO6Yzoj953ck8PZQ3ymlhHlC zVNKYQ7nSZkkMSRRnECG4LGQdNYB7IOebJcXeVUK8Y+QxIPyzUQ5WbwAN3lM/kASKp gDxPZtZmlOrYv3V7MFhsoO5TR21tCPuLlv1D+h87i4fCTrUJRNV0NP6bsuw4/8/f4o uaEiSbHuQWfbuCZD5khhMura8+HiKuQOk/gtX94e6a0JB0gk9P2Qv9AdRDTTE8fRXj 1NX1zbOLwU2fw== Date: Sat, 22 May 2021 20:14:39 +0200 From: Mauro Carvalho Chehab To: Akira Yokosawa Cc: Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] docs: Activate xeCJK only in CJK chapters Message-ID: <20210522201439.156bded8@coco.lan> In-Reply-To: <2061da0a-6ab1-35f3-99c1-dbc415444f37@gmail.com> References: <2061da0a-6ab1-35f3-99c1-dbc415444f37@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, 22 May 2021 16:28:55 +0900 Akira Yokosawa escreveu: > Activating xeCJK in English or Italian-translation documents > results in sub-optimal typesetting with wide-looking apostrophes > and quotation marks. > > The xeCJK package provides macros for enabling and disabling its > effect in the middle of a document, namely \makexeCJKactive and > \makexeCJKinactive. > > So the goal of this change is to activate xeCJK in the relevant > chapters in translations. > > To do this: > > o Define custom macros in the preamble depending on the > availability of the "Noto Sans CJK" font so that those > macros can be embedded in translations.tex after the fact. > By default, xeCJK is inactive. > > o Add a script retouch-translations.sh to embed the on/off > macros in translations.tex where necessary. > The patterns in the script are ad-hoc by nature, and will > need updates when the chapter organization changes. > > o Invoke the script at the final step of target "latexdocs". Interesting solution, but there are probably an easy/better way of doing something similar to it. There is an extension called: Documentation/sphinx/load_config.py Which allows using a per-document conf.py file. While it can also be used to have a "nitpick" version where extra warnings are enabled, the main usage were to have separated PDF documents. We ended finding a better solution, so most conf.py got removed on this patch: 9fc3a18a942f ("docs: remove extra conf.py files"). Anyway, perhaps we could simply add a Documentation/translations/conf.py that would add the CJK font only there. Even better, we could even improve it in a way that each translation would generate a separated book, and then use CJK only for the non-Latin translations. Regards, Mauro