pdfform et AMCopen (Feature #717)


Added by Frédéric Bréal about 4 years ago. Updated over 2 years ago.


Status:New Start date:04/01/2020
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:LaTeX
Target version:-

Description

Je n'ai pas l'impression que \AMCopen fonctionne en mode form. Me trompe-je ?
J'ai bidouillé un truc pour l'instant.

\makeatletter
\newcommand{\AMCOpenfielddots}{ %
  \noindent%
  \ifAMC@pdfform%
   \hspace*{\fill}%
    \TextField[name={\the\AMCid@etud:namefield},width=\linewidth,bordercolor=0 0 0,multiline=true]{}%
   \hspace*{\fill}
  \else%
    \dotfill
  \fi%
 }
\makeatother

puis
\begin{question}{pdf}
\QuestionIndicative
Quel lecteur utilises-tu et sous quel OS ?

\AMCOpen{contentcommand=AMCOpenfielddots}{\bonne{1}\bareme{1}}
%contentcommand=AMCOpenfielddots[4]
\end{question}


History

Updated by Hervé Cabaud about 3 years ago

en remplaçant \the\AMCid@etud par \theAMCquestionaff, cela fonctionne et incrémente bien les formulaires

\TextField[name={\theAMCquestionaff:namefield},width=\linewidth,bordercolor=0 0 0,multiline=true]{}

Updated by Hervé Cabaud almost 3 years ago

je rajoute pour avoir une taille de formulaire correspondant au nombre de lignes demandées :

En mettant
\def\DefaultHeightofTextMultiline{#1\baselineskip}

j'ai mes cadres à la taille demandée. Plus besoin de rajouter des Textfield supplémentaires.

\def\correction{correction}
\makeatletter
\newcommand{\QuestionOuverteModeCorrige}[2][3]{
\ifAMC@correchead
\def\AMCotextReserved{}
\AMCOpen{lines=0,lineup=false,framerulecol=white,dots=false,lineheight=0cm}{}
\vspace*{-3em}\explain{ \color{red} \correction}
\else%
\def\DefaultHeightofTextMultiline{#1\baselineskip}
\AMCOpen{lines=#1,framerulecol=white,lineheight=1cm, contentcommand=AMCOpenfielddots}{#2}
\fi}
\makeatother

Updated by Alexis Bienvenüe over 2 years ago

  • Target version deleted (1.5.0)

Also available in: Atom PDF