From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MKjtIIk/H2L52wAAgWs5BA (envelope-from ) for ; Wed, 02 Mar 2022 10:57:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sLJbHok/H2KqJAEA9RJhRA (envelope-from ) for ; Wed, 02 Mar 2022 10:57:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B670C2E558 for ; Wed, 2 Mar 2022 10:57:28 +0100 (CET) Received: from localhost ([::1]:49558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPLjb-0003F7-HU for larch@yhetil.org; Wed, 02 Mar 2022 04:57:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPLjD-0003E9-8o for guix-patches@gnu.org; Wed, 02 Mar 2022 04:57:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPLjC-000311-UH for guix-patches@gnu.org; Wed, 02 Mar 2022 04:57:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPLjB-0007Jz-NT; Wed, 02 Mar 2022 04:57:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54220] [PATCH] doc: Add "Using TeX and LaTeX" chapter. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: rekado@elephly.net, mail@nicolasgoaziou.fr, bauermann@kolabnow.com, guix-patches@gnu.org Resent-Date: Wed, 02 Mar 2022 09:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54220@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Ricardo Wurmus , Nicolas Goaziou , Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Ricardo Wurmus , Nicolas Goaziou , Thiago Jung Bauermann Received: via spool by submit@debbugs.gnu.org id=B.164621497728075 (code B ref -1); Wed, 02 Mar 2022 09:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Mar 2022 09:56:17 +0000 Received: from localhost ([127.0.0.1]:39128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPLiS-0007Ik-KG for submit@debbugs.gnu.org; Wed, 02 Mar 2022 04:56:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:39964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPLiQ-0007Ic-FN for submit@debbugs.gnu.org; Wed, 02 Mar 2022 04:56:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPLiQ-000389-6d for guix-patches@gnu.org; Wed, 02 Mar 2022 04:56:14 -0500 Received: from [2001:470:142:3::e] (port=54766 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPLiP-0002vq-OS; Wed, 02 Mar 2022 04:56:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=fUBnh3uBE3R4vs0rtLej1xzUKYGQl+YFrU8kJepPTBg=; b=CGdhgR9V6h24/8 WU+Nt+JWYHwnEN4qvJ3BVd6o8KOuyqW5SzBWG5ejnhiuHAPWIdeIAbFZ4bOmT4o/FiOdbFbDldsEV 72uAa1c6ByON2SdQS8n6Fv4MIk81+B5/CjHCx6hImFa/RDuHzZHxzUnRP1o9wVvq7vydEdYOm0fqu 0qLNzf8GlJOYX2POd+esbJyfUlUA/sAaRKv7ECHRmwDVhLJ2BxOvUX68Qk3cxlMYXbyWC4m0MsS7n zQXSK4XR1MYsqV9ulfb2u8vyXfxfNCfw+TdjhXbxwb19kLPCxyuVWmQhHrXM+0ZSosS2Gg0d8i0fx dmj3jO3A5tzswRIVxuvw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50044 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPLiP-0006yN-73; Wed, 02 Mar 2022 04:56:13 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 2 Mar 2022 10:55:50 +0100 Message-Id: <20220302095550.17700-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646215049; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fUBnh3uBE3R4vs0rtLej1xzUKYGQl+YFrU8kJepPTBg=; b=KGN7akuucuKgdH8yO6hHacZn/Oju+86lQAiv9AK5L/9zO9619jhpQMEX1M4jU5R0J0x0BX /zFxX8oZyhYJvRLcJbN2J3mzkzycUsJuixmXqiZX08NoMIygShM02PLZkiPSpQ9mF3yOgf 4dSstpnLWIbbqC7foVLPcQnqaBVJylvA93AeoJ+IIbRtJZKHKV3ujTUnKyfTPBxwZw63CK r2GhzRJDk+Y1+SjcyeYMYFpZOIip3Xlt9p00nkuaZrc/kt0Bj+cNPAtRldgWfBp1gBqeKo rmng8byHEwVTTQtlYMUEMIK27MYpZ3fFDY2MxZF6UgyY1//19qqTWL3tY5zoOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646215049; a=rsa-sha256; cv=none; b=q4FsrsooABF3qupvJNGkQ/wRaTVtE85kqd4OK2IM5PGwhDhxGn4WxF02SBXadMEg1wTMJo +I7x9AiBOsqj9nuQoYG3Dyr1oEJiJdK5vkOJAWV1g/K16o34K7hVoR0MizcDrQIBhCpjNd pKq6eSIW6X6Lydx/jg/xH82RCLpVLDdykD9q6n7GExyYWdzxCTDLF//QUMQbMlegXCdewp vOGc7OgvHgarICJXyyMMH0PmJhANYFxNjaDZYJYAe39gjz+Tq+WFW/lEqbUARclpj0NF0y Dsv0gzfF14Q5SbQH0+xsrp2tMK3ySBY8zcCK+ia5yJgQ3MWPQsYNxRUZCkNQiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=CGdhgR9V; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=CGdhgR9V; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B670C2E558 X-Spam-Score: -4.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: GyjbObLes+jM * doc/guix.texi (Using TeX and LaTeX): New node. --- doc/guix.texi | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) Hello! This patch documents the current state of TeX/LaTeX packaging and tips and tricks to get things done with the modular package set. I’m writing this as an eternal TeX/LaTeX newbie (and as a Lout refugee!) not completely familiar with the intricacies of TeX Live packaging, so this section might need corrections and improvements. It’s a top-level chapter, because I couldn’t find any better place, but I think it’s fine. Thoughts? Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index 1e8b23ad7e..1c11cc8d5a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -175,6 +175,7 @@ Weblate} (@pxref{Translating Guix}). * Home Configuration:: Configuring the home environment. * Documentation:: Browsing software user manuals. * Installing Debugging Files:: Feeding the debugger. +* Using TeX and LaTeX:: Typesetting. * Security Updates:: Deploying security fixes quickly. * Bootstrapping:: GNU/Linux built from scratch. * Porting:: Targeting another platform or kernel. @@ -38622,6 +38623,146 @@ Note that there can be packages for which @option{--with-debug-info} will not have the desired effect. @xref{Package Transformation Options, @option{--with-debug-info}}, for more information. +@node Using TeX and LaTeX +@chapter Using @TeX{} and @LaTeX{} + +@cindex @TeX{} packages +@cindex @LaTeX{} packages +Guix provides packages for the @TeX{} and @LaTeX{} typesetting systems, +taken from the @uref{https://www.tug.org/texlive/, @TeX{} Live +distribution}. However, because @TeX{} Live is so huge and because +finding your way in this maze is tricky, we thought that you, dear user, +would welcome guidance on how to deploy the relevant packages so you can +compile your @TeX{} and @LaTeX{} documents. + +@TeX{} Live currently comes in two flavors in Guix: + +@itemize +@item +The ``monolithic'' @code{texlive} package: it comes with @emph{every +single @TeX{} Live package} (more than 7,000 of them), but it is huge +(more than 4@tie{}GiB for a single package!). + +@item +The ``modular'' @code{texlive-} packages: you install +@code{texlive-base}, which provides core functionality and the main +commands---@command{pdflatex}, @command{dvips}, @command{luatex}, +@command{mf}, etc.---together with individual packages that provide just +the features you need---@code{texlive-latex-listings} for the +@code{listings} package, @code{texlive-hyperref} for @code{hyperref}, +@code{texlive-beamer} for Beamer, @code{texlive-latex-pgf} for PGF/TikZ, +and so on. +@end itemize + +We recommend using the modular package set because it is much less +resource-hungry. To build your documents, you would use commands such +as: + +@example +guix shell texlive-base texlive-latex-wrapfig \ + texlive-hyperref texlive-cm-super -- pdflatex doc.tex +@end example + +You can quickly end up with unreasonably long command lines though. The +solution is to instead write a manifest, for example like this one: + +@lisp +(specifications->manifest + '("rubber" + + "texlive-base" + "texlive-latex-wrapfig" + + "texlive-microtype" + "texlive-latex-listings" "texlive-hyperref" + + ;; PGF/TikZ + "texlive-latex-pgf" + + ;; Additional fonts. + "texlive-cm-super" "texlive-amsfonts" + "texlive-times" "texlive-helvetic" "texlive-courier")) +@end lisp + +You can then pass it to any command with the @option{-m} option: + +@example +guix shell -m manifest.scm -- pdflatex doc.tex +@end example + +@xref{Invoking guix package, @option{--manifest}}, for more on +manifests. In the future, we plan to provide packages for @TeX{} Live +@dfn{collections}---``meta-packages'' such as @code{fontsrecommended}, +@code{humanities}, or @code{langarabic} that provide the set of packages +needed in this particular domain. That will allow you to list fewer +packages. + +The main difficulty here is that using the modular package set forces +you to select precisely the packages that you need. You can use +@command{guix search}, but finding the right package can prove to be +tedious. When a package is missing, @command{pdflatex} and similar +commands fail with an obscure message along the lines of: + +@example +doc.tex: File `tikz.sty' not found. +doc.tex:7: Emergency stop. +@end example + +@noindent +or, for a missing font: + +@example +kpathsea: Running mktexmf phvr7t +! I can't find file `phvr7t'. +@end example + +How do you determine what the missing package is? In the first case, +you'll find the answer by running: + +@example +$ guix search texlive tikz +name: texlive-latex-pgf +version: 59745 +@dots{} +@end example + +In the second case, @command{guix search} turns up nothing. Instead, +you can search the @TeX{} Live package database using the @command{tlmgr} +command: + +@example +$ guix shell texlive-base -- tlmgr info phvr7t +tlmgr: cannot find package phvr7t, searching for other matches: + +Packages containing `phvr7t' in their title/description: + +Packages containing files matching `phvr7t': +helvetic: + texmf-dist/fonts/tfm/adobe/helvetic/phvr7t.tfm + texmf-dist/fonts/tfm/adobe/helvetic/phvr7tn.tfm + texmf-dist/fonts/vf/adobe/helvetic/phvr7t.vf + texmf-dist/fonts/vf/adobe/helvetic/phvr7tn.vf +tex4ht: + texmf-dist/tex4ht/ht-fonts/alias/adobe/helvetic/phvr7t.htf +@end example + +The file is available in the @TeX{} Live @code{helvetic} package, which is +known in Guix as @code{texlive-helvetic}. Quite a ride, but we found +it! + +There is one important limitation though: Guix currently provides a +subset of the @TeX{} Live packages. If you stumble upon a missing +package, you can try and import it (@pxref{Invoking guix import}): + +@example +guix import texlive @var{package} +@end example + +@quotation Note +@TeX{} Live packaging is still very much work in progress, but you can +help! @xref{Contributing}, for more information. +@end quotation + @node Security Updates @chapter Security Updates base-commit: a53ea46bfc219a2c184fbf3ce8f3e3ba3f539a7d -- 2.34.0