texlive[63722] Master: multiple-choice (25jun22)
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 25 22:23:31 CEST 2022
Revision: 63722
http://tug.org/svn/texlive?view=revision&revision=63722
Author: karl
Date: 2022-06-25 22:23:31 +0200 (Sat, 25 Jun 2022)
Log Message:
-----------
multiple-choice (25jun22)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/multiple-choice/
trunk/Master/texmf-dist/doc/latex/multiple-choice/README
trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf
trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.tex
trunk/Master/texmf-dist/tex/latex/multiple-choice/
trunk/Master/texmf-dist/tex/latex/multiple-choice/multiple-choice.sty
trunk/Master/tlpkg/tlpsrc/multiple-choice.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/multiple-choice/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/multiple-choice/README (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/multiple-choice/README 2022-06-25 20:23:31 UTC (rev 63722)
@@ -0,0 +1,22 @@
+_____________________
+The multiple-choice package
+v0.2
+
+This package adjusts the choices of the multiple-choice question automatically.
+
+It has been wholly inspired by the work of Enrico Gregorio
+and improved by Vafa Khalighi and I've just packed and
+redistributed it under the name of the `multiple-choice` package.
+
+Current version release date: 2022/06/24
+___________________
+Seiied-Mohammad-Javad Razvian
+javadr at gmail dot com
+
+Copyright © 2022
+It may be distributed and/or modified under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is “author-maintained” (as per LPPL maintenance status)
+by Seiied-Mohammad-Javad Razavian.
Property changes on: trunk/Master/texmf-dist/doc/latex/multiple-choice/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf 2022-06-25 20:22:32 UTC (rev 63721)
+++ trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf 2022-06-25 20:23:31 UTC (rev 63722)
Property changes on: trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.tex 2022-06-25 20:23:31 UTC (rev 63722)
@@ -0,0 +1,96 @@
+\documentclass{ltxdoc}
+
+\usepackage{fullpage}
+\usepackage{url}
+\usepackage{holtxdoc}
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{multicol}
+\usepackage{multiple-choice}
+
+\lstdefinestyle{BashInputStyle}{
+ basicstyle=\footnotesize\sffamily,
+ frame=tb,
+ columns=fullflexible,
+ backgroundcolor=\color{gray!10},
+}
+\lstset{basicstyle=\ttfamily}
+
+\title{The \xpackage{multiple-choice} Package}
+\author{Seiied Mohammad Javad Razavian}
+
+\date{\choicesdate,\space version \choicesversion}
+
+ \parindent=0pt
+
+\thispagestyle{empty}
+
+\begin{document}
+\maketitle{
+\centerline{\large\bfseries Abstract}
+\bigskip
+\begin{multicols}{2}
+The \xpackage{multiple-choice} package adjusts the choices of the multiple-choice question automatically.
+It has been wholly inspired by the work of Enrico Gregorio\footnote{\url{https://tex.stackexchange.com/questions/140923}}
+and improved by Vafa Khalighi. I've just packed and redistributed it. It works with \XeLaTeX, \pdfLaTeX, and \LuaLaTeX.
+Please, report any issues including bugs, typos in the documentation
+or feature requests on \url{https://github.com/javadr/multiple-choice.sty/issues}.
+\end{multicols}
+ }
+
+ \section{Loading Package}
+The package can be loaded in the ordinary way
+\cs{usepackage{multiple-choice}}.
+
+\section{Typesetting the multiple-choice question}
+ The package defines the \texttt{choices} environment with the \cs{choice} macro for the choices of the multiple-chocie question.
+
+\begin{lstlisting}[style=BashInputStyle, escapechar={|},]
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+\end{lstlisting}
+
+ \section{Sample}
+\begin{enumerate}
+
+\item First question?
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\item Second question?
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+ \choice The fifth choice.
+ \choice The sixth choice.
+\end{choices}
+
+\item Third question?
+\begin{choices}
+ \choice The very very very first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\item Fourth question?
+\begin{choices}
+ \choice The very very very very very very very very very first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\end{enumerate}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/multiple-choice/multiple-choice-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/multiple-choice/multiple-choice.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/multiple-choice/multiple-choice.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/multiple-choice/multiple-choice.sty 2022-06-25 20:23:31 UTC (rev 63722)
@@ -0,0 +1,99 @@
+%%
+%% This is file `multiple-choice.sty'.
+%%
+%% LaTeX package for multiple-choice questions
+%%
+%% Copyright © 2022
+%% ------------------------------------------------------------------
+%% Author: Seiied-Mohammad-Javad Razavian <javadr at gmail dot com>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the Latex Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2003/06/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%% This work is “author-maintained” (as per LPPL maintenance status).
+%% The Current Maintainer of this work is Seiied-Mohammad-Javad Razavian.
+%% ------------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\choicesdate{2022/06/24}
+\def\choicesversion{0.2}
+\ProvidesPackage{multiple-choice}[\choicesdate\space v\choicesversion^^JMultiple-choice question with automatic adjustment of the choices based on their widths]
+\RequirePackage{biditools}
+\newdimen\mc at ChoiceLabelWidth
+\newdimen\mc at ChoiceLabelSep
+\mc at ChoiceLabelWidth=1.5em
+\mc at ChoiceLabelSep=0.5em
+\newcounter{mc at MultChoiceCount}
+\newcommand{\mc at InitialChoice}{%
+ \ifnum\value{mc at MultChoiceCount}>\z@
+ \cr
+ \fi
+ \stepcounter{mc at MultChoiceCount}%
+ \hbox to \mc at ChoiceLabelWidth{\hss(\Alph{mc at MultChoiceCount})}%
+ \kern\mc at ChoiceLabelSep
+}%
+\newcommand{\mc at FinalChoice}{%
+ \ifnum\value{mc at MultChoiceCount}>\z@
+ \egroup
+ \egroup
+ \fi
+ \stepcounter{mc at MultChoiceCount}%
+ \hspace{0pt plus 1pt}%
+ \hbox\bgroup
+ \hbox to \mc at ChoiceLabelWidth{\hss(\Alph{mc at MultChoiceCount})}%
+ \kern\mc at ChoiceLabelSep
+ \vtop\bgroup
+ \hsize\mc at MultChoicesWidth
+ \advance\hsize-\mc at ChoiceLabelWidth
+ \advance\hsize-\mc at ChoiceLabelSep
+}%
+\newbox\mc at MultChoicesBox
+\newdimen\mc at MultChoicesWidth
+\newcommand{\mc at ComputeMultChoicesWidth}[1]{%
+ \setbox\mc at MultChoicesBox\hbox{%
+ \vbox{%
+ \halign{%
+ ##\hfil\cr
+ #1\crcr
+ }%
+ }%
+ }%
+}%
+% MultipltChoices Environment.
+\newenvironment{choices}{%
+ \setcounter{mc at MultChoiceCount}{0}%
+ \let\choice\mc at InitialChoice
+ \bidi at collect@long at body\mc at ComputeMultChoicesWidth
+}{%
+ \mc at MultChoicesWidth-\fontcharwd\font`
+ \advance\mc at MultChoicesWidth\wd\mc at MultChoicesBox
+ \ifdim\mc at MultChoicesWidth>0.5\linewidth
+ \mc at MultChoicesWidth=\linewidth
+ \else
+ \ifdim\mc at MultChoicesWidth>0.25\linewidth
+ \mc at MultChoicesWidth=0.5\linewidth
+ \else
+ \mc at MultChoicesWidth=0.25\linewidth
+ \fi
+ \fi
+ \setcounter{mc at MultChoiceCount}{0}%
+ \let\choice\mc at FinalChoice
+ \parindent\z@
+ \ifvmode
+ \else
+ \par
+ \fi
+ \the\@bidi at envbody
+ \egroup
+ \egroup
+}%
+%%
+%%
+%% End of file `multiple-choice.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/multiple-choice/multiple-choice.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2022-06-25 20:22:32 UTC (rev 63721)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2022-06-25 20:23:31 UTC (rev 63722)
@@ -553,7 +553,7 @@
mucproc mugsthesis muling multenum
multiaudience multibbl multibib multibibliography
multicap multicolrule multidef multido multienv multiexpand
- multifootnote multilang multiobjective multirow munich
+ multifootnote multilang multiobjective multiple-choice multirow munich
musical musicography musikui musixguit
musixtex musixtex-fonts musixtnt musuos muthesis
mversion mwcls mwe mweights mxedruli
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2022-06-25 20:22:32 UTC (rev 63721)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2022-06-25 20:23:31 UTC (rev 63722)
@@ -944,6 +944,7 @@
'mtx', "die 'skipping, pascal musixtex binaries'",
'multibox', "die 'skipping, noinfo license, author deceased'",
'multido', "&MAKEpst",
+ 'multiple-choice', "&MAKEflatten",
'multirow', "&MAKEflatten",
'musictex', "die 'skipping, superseded by musixtex'",
'musixtnt', "&MAKEflatten",
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2022-06-25 20:22:32 UTC (rev 63721)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2022-06-25 20:23:31 UTC (rev 63722)
@@ -888,6 +888,7 @@
depend multiexpand
depend multifootnote
depend multilang
+depend multiple-choice
depend multirow
depend mversion
depend mwe
Added: trunk/Master/tlpkg/tlpsrc/multiple-choice.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.