X-Received: by 2002:a05:620a:24d5:b0:6ee:d4bb:e5ba with SMTP id m21-20020a05620a24d500b006eed4bbe5bamr35059573qkn.457.1666884761954; Thu, 27 Oct 2022 08:32:41 -0700 (PDT) X-Received: by 2002:a25:7689:0:b0:6cb:70c7:5579 with SMTP id r131-20020a257689000000b006cb70c75579mr13847515ybc.275.1666884761723; Thu, 27 Oct 2022 08:32:41 -0700 (PDT) Path: ...!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: fr.comp.text.tex Date: Thu, 27 Oct 2022 08:32:41 -0700 (PDT) In-Reply-To: <8363a352-191d-4ac1-96a8-a5795b0b0388n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=2a02:842a:838d:2c01:196:8823:16c2:5d82; posting-account=_4U1BQoAAAATFOu2QrnujIeoJPeIbW6L NNTP-Posting-Host: 2a02:842a:838d:2c01:196:8823:16c2:5d82 References: <77fa6d9f-4ce9-4c50-b422-814ad50e8b1en@googlegroups.com> <87h70fn5mt.fsf@example.com> <8363a352-191d-4ac1-96a8-a5795b0b0388n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Deux PDFs via un lancement de compilation From: projetmbc Injection-Date: Thu, 27 Oct 2022 15:32:41 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Bytes: 2160 Lines: 46 Un peu mieux et je m'arr=C3=AAterais l=C3=A0 sur ce sujet. :-) % Fichier unique =C3=A0 compiler en "shell escape" \documentclass{article} \usepackage{xcolor} \usepackage{iexec} \usepackage{jobname-suffix} \newcommand{\solution}[1]{{\color{red}#1}} \IfSuffixT[]{=09 \iexec[quiet]{touch \jobname-student.tex} \iexec[quiet]{echo '\\input{\jobname.tex}' > \jobname-student.tex} \iexec[quiet]{pdflatex \jobname-student.tex} =09 } \IfSuffixT[student]{ \renewcommand{\solution}[1]{} } \begin{document} \begin{enumerate} =09 \item First question \solution{First answer} \item Second question \solution{Second answer} \item Third question \solution{Third answer} \end{enumerate} \end{document}