Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1914880pxm; Thu, 24 Feb 2022 11:58:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxemtQXjoMbw0QcU31lYAS+EyvYMt1SDdlFLWboSRTdbK63+ts/GJnE2D/oqZou+mmhFXtI X-Received: by 2002:a17:902:cf05:b0:14d:5249:3b1f with SMTP id i5-20020a170902cf0500b0014d52493b1fmr4103268plg.135.1645732691160; Thu, 24 Feb 2022 11:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645732691; cv=none; d=google.com; s=arc-20160816; b=A6AamwM/1VQDbPHHRwMYb+GoXlAG2/zMV0K7J4SKr/clgsLLiWEwavZBYv6LBNyu0g 7QEuQwtgg0nn32LBVI6MPKNbbbTO3OlAmnFQq8J1mTrM4gHkKGBZfQJzoru14JAr7wNq 7fb5gHUg3Xbgdo8pGAhzyiyvg9JLy9OX3x3SKCosne04izimjtf1vJOBCZoJHEIOU2qo dS2Q/k3OjvpngrQ/61l/p6xAM3TsbKxJE8xApzNM5zaltGKSVm3NCop2TnZwgHsvINf6 dEfNTsV5n+15FtUcMsMZWNIMUKpQx5MvkKi+upic5yc7+UozbYd9BU2OR3IZnocvTLwO 0Qmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=pfteFMcBeSU5O1zvXhbYKaJIpax/VGepVWGGkWIcJj8=; b=gj1nQZBuNsf+9R4kKfwSziIn73CabTfMOtF0e7kVwvPSU02xbPY2Ryb7lmAmyEsV8D U9ZKVcrSv5iMMUTOwZU2D0X97Fud7bQvMEw0R8iOo+n/faTJu/2+3hiMC/FnY2QSq5UD oJ7/JYbmmufcQV0H86Oja7TP0nxVwCJAlkoV6BZYivPdbKkV2GMgejpa+IwT75DhEbx5 c9NO8hk47wGiMgw4cQkRmf8CEsWB1Ndq+76/527QHSa9wTGvBz2sJtveMda1S3umtIbR t9KWG6rg4ubWmlpoYhrIJ7P47pJHgrYwpTBTlxgbJiLr+B1kX4zoeFxsunhrnP0428JS pKyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=pSQo4UyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020a63ab42000000b0036c6d35c448si129112pgp.446.2022.02.24.11.57.54; Thu, 24 Feb 2022 11:58:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=pSQo4UyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233938AbiBXTd7 (ORCPT + 99 others); Thu, 24 Feb 2022 14:33:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232937AbiBXTd5 (ORCPT ); Thu, 24 Feb 2022 14:33:57 -0500 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE2A120428C; Thu, 24 Feb 2022 11:33:26 -0800 (PST) Received: from localhost (unknown [IPv6:2601:281:8300:104d::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id D59865BF; Thu, 24 Feb 2022 19:33:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net D59865BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1645731206; bh=pfteFMcBeSU5O1zvXhbYKaJIpax/VGepVWGGkWIcJj8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pSQo4UyXh85LHmLnYYovW36yjYdQ6CQVI+aq4jzYB8YRQKRXK570bUiE9x2ZeDQYk vpFZzHmi0aAAc+yR5ezJ+/lv/ZpR4QA9IZ3y8ZP5iAUICP/xo7MJ9FoPruGba94dnL DjcBGzbPSgzdWuNKj5wI7qsIgvasvCuc9OITPCPuOmJxQLQAQWkTLshDalBGpwmbi/ fDlK7wGslhDyyVNcclbvWRazZB/LT5bB77vlIVlL/j1aB7hbo99aMzyuI9YHeZjz+x 3jHYX2HflMOHi42VcTLxxYsk3KL5ZJWSTiLJCGxneh3EZt14SRrcjumVA4Eaa1o73+ ZVHcxilE5g7Kg== From: Jonathan Corbet To: Akira Yokosawa Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Akira Yokosawa Subject: Re: [PATCH 1/3] docs: pdfdocs: Pull LaTeX preamble part out of conf.py In-Reply-To: References: Date: Thu, 24 Feb 2022 12:33:25 -0700 Message-ID: <875yp4kqka.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Akira Yokosawa writes: > Quote from Jon's remark [1]: > > I do notice that Documentation/conf.py is getting large and > unapproachable. At some future point, it might be nice to pull > all of the latex stuff out into a separate file where it won't > scare people who stumble into it by accident. > > Pull LaTeX preamble settings added since commit 3b4c963243b1 ("docs: > conf.py: adjust the LaTeX document output") out into > sphinx/kerneldoc-preamble.sty. > > It will be copied to the build directory by the added > "latex_additional_files" setting in conf.py. > > As a bonus, LaTeX/TeX code can be maintained without escaping backslashes. I've applied the set, thanks. Still testing the pdfdocs build (and will be for some time, naturally) One little note, since you mentioned the need for backslash escapes: > +# Load kerneldoc specific LaTeX settings > +latex_elements['preamble'] += ''' > + % Load kerneldoc specific LaTeX settings > + \\input{kerneldoc-preamble.sty} > +''' You can avoid that problem in Python code with the use of raw strings: latex_elements['preamble'] += r''' % Load kerneldoc specific LaTeX settings \input{kerneldoc-preamble.sty} ''' (note the "r" on the first line). Something for future reference. Thanks, jon