Deutsch   English   Français   Italiano  
<8363a352-191d-4ac1-96a8-a5795b0b0388n@googlegroups.com>

View for Bookmarking (what is this?)
Look up another Usenet article

X-Received: by 2002:a05:6214:21e5:b0:4b3:efa6:4b17 with SMTP id p5-20020a05621421e500b004b3efa64b17mr41405776qvj.22.1666881051414;
        Thu, 27 Oct 2022 07:30:51 -0700 (PDT)
X-Received: by 2002:a25:8483:0:b0:6cb:d547:6485 with SMTP id
 v3-20020a258483000000b006cbd5476485mr2919202ybk.236.1666881051063; Thu, 27
 Oct 2022 07:30:51 -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 07:30:50 -0700 (PDT)
In-Reply-To: <m2v8o6wjg4.fsf@pc40.home>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:842a:838d:2c01:b0f0:3b3b:76ac:f17c;
 posting-account=_4U1BQoAAAATFOu2QrnujIeoJPeIbW6L
NNTP-Posting-Host: 2a02:842a:838d:2c01:b0f0:3b3b:76ac:f17c
References: <77fa6d9f-4ce9-4c50-b422-814ad50e8b1en@googlegroups.com>
 <87h70fn5mt.fsf@example.com> <m2v8o6wjg4.fsf@pc40.home>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8363a352-191d-4ac1-96a8-a5795b0b0388n@googlegroups.com>
Subject: Re: Deux PDFs via un lancement de compilation
From: projetmbc <projetmbc@gmail.com>
Injection-Date: Thu, 27 Oct 2022 14:30:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Bytes: 2085
Lines: 47

En fait, il y a un petit hack qui peut =C3=AAtre utile.

Il faut deux fichiers comme ci-dessous, et on lance juste la compilation su=
r other.tex (en shell escape).


% Fichier: other-student.tex

\input{other.tex}



% Fichier: other.tex

\documentclass{article}

\usepackage{xcolor}

\usepackage{iexec}
\usepackage{jobname-suffix}


\newcommand{\solution}[1]{{\color{red}#1}}
\newcommand{\launchstudent}{
	\iexec[quiet]{pdflatex \jobname-student.tex}
}


\IfSuffixT[student]{
	\renewcommand{\solution}[1]{}
	\renewcommand{\launchstudent}{}
}

\begin{document} \begin{enumerate}
=09
\item First question \solution{First answer}

\item Second question

\solution{Second answer} \end{enumerate}

\launchstudent{}

\end{document}