Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
From: Akira Yokosawa
Date: Tue Jan 04 2022 - 05:26:17 EST
On Tue, 4 Jan 2022 09:05:48 +0100, Mauro Carvalho Chehab wrote:
> Em Tue, 4 Jan 2022 10:54:52 +0900
> Akira Yokosawa <akiyks@xxxxxxxxx> escreveu:
>
>> Hi Mauro, see inline comments below.
>>
>> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:
>>> Hi,
>>>
>>> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@xxxxxxx> wrote:
>>>> Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> writes:
>>>>
>>>>> After a change meant to fix support for oriental characters
>>>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>>>>> for PDF output.
>>>
>>> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
>>> in June 2021.
>>>
>>> Thanks, Akira
>>>
>>>>>
>>>>> Reported-by: Christoph Hellwig <hch@xxxxxx>
>>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>>>>> ---
>>>>>
>>>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@xxxxxxxxxx/
>>>>>
>>>>> scripts/sphinx-pre-install | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>>>> index 288e86a9d1e5..46aaab414098 100755
>>>>> --- a/scripts/sphinx-pre-install
>>>>> +++ b/scripts/sphinx-pre-install
>>>>> @@ -78,6 +78,7 @@ my %texlive = (
>>>>> 'ucs.sty' => 'texlive-ucs',
>>>>> 'upquote.sty' => 'texlive-upquote',
>>>>> 'wrapfig.sty' => 'texlive-wrapfig',
>>>>> + 'ctexhook.sty' => 'texlive-ctex',
>>>>> );
>>>>
>>
>> I'm afraid this update of the list for Fedora/openSUSE won't help
>> Debian Stable (bullseye) users.
>>
>> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.
>
> On such case, it is needed to map it for Debian/Ubuntu.
> Could you please test the enclosed patch, applied on the top
> of the previous one?
Looks like we need an additional hunk. See below.
Thanks, Akira
>
> Thanks!
> Mauro
>
> -
>
> [PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian
>
> The name of the package with ctexhook.sty is different on
> Debian/Ubuntu.
>
> Reported-by: Akira Yokosawa <akiyks@xxxxxxxxx>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index 46aaab414098..ea96d18ee946 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -367,6 +367,7 @@ sub give_debian_hints()
> "Pod::Usage" => "perl-modules",
> "xelatex" => "texlive-xetex",
> "rsvg-convert" => "librsvg2-bin",
> + "texlive-ctex" => "texlive-lang-chinese",
> );
>
> if ($pdf) {
>
@@ -380,6 +381,7 @@ sub give_debian_hints()
}
check_program("dvipng", 2) if ($pdf);
+ check_missing_tex(2) if ($pdf);
check_missing(\%map);
return if (!$need && !$optional);