automultiplechoice.sty on CTAN (Feature #306)


Added by Miguel Frasson about 10 years ago. Updated over 9 years ago.


Status:New Start date:10/14/2014
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-

Description

Hi.

I am trying to run AMC on Mac through MacPorts without port dependencies on port texlive.
For that, it is best that automultiplechoice.sty could get in MacTeX (by tlmgr) without AMC trying to install if it is there.

I see that automultiplechoice.sty is not in my MacTeX. I look further and it is not on CTAN either!
That cannot be.

In the distribution files (that is, on auto-multiple-choice_1.2.1_sources.tar.gz) I did not find the .dtx file that generates the documentation (automultiplechoice.pdf, that is on the distributed files) and automultiplechoice.sty. Both files are clearly generated with docstrip, so no further work should be needed.

If there was a automultiplechoice package on CTAN, installation of .sty and pdflatex compilation on a system without AMC would be straight forward.

This solution is much better than that suggested in
http://project.auto-multiple-choice.net/boards/2/topics/1358
"How can I compile (AMC) LaTex source without installing AMC?"

1) create automultiplechoice.zip containing
automultiplechoice/
README
automultiplechoice.dtx
automultiplechoice.ins
automultiplechoice.pdf

(apparently all these files are ready)

2) http://www.ctan.org/upload
There, fill the form to upload .zip file just created.

3) That is it! CTAN scripts take care of the rest.

It is best for the AMC maintainers to upload, because they maintain and can control better the package.

  • How AMC installation scripts could check whether automultiplechoice.sty is already installed?

kpsewhich automultiplechoice.sty
-> returns full path or empty.

So it is easy to check whether AMC will work or have to perform further .sty installation.


automultiplechoice.pdf - style doc (492 kB) Alexis Bienvenüe, 10/14/2014 03:58 pm


History

Updated by Miguel Frasson about 10 years ago

Sorry, this is not a bug, but feature request or something like that.

Updated by Alexis Bienvenüe about 10 years ago

I understand CTAN is a very good place to publish LaTeX packages. The source file follows the dtx format, so that this could be easy to put the package on CTAN. However, the automultiplechoice.sty package changed its way to communicate with AMC several times, and this is very important for AMC to use the exact same version of the style file. If the style file is in CRAN, it will also be in some deb/rpm packages, but it will be difficult to control both the version of the style file and AMC version. Maybe I am wrong but I think the simplest way to be sure that the style file is the good one is to distribute it with AMC and not with CRAN. This has some drawbacks, unfortunately, so if you see any good solution…

Updated by Miguel Frasson about 10 years ago

Hi

Since the draft watermark disapeears from PDF, it means that AMC somehow can control the call of LaTeX, maybe changing package options or inserting bits of code.

  1. If AMC tells sty about its version since older versions (por example define a command like \AMCversion), it is easy to satisfy everybody:
    • automultiplechoice.sty checks amc version and inputs automchoice-v<version>.tex
    • if no version is provided, inputs last stable version.

Actually the job is done in automultchoice-v<version>.tex

  1. If older AMC doesn't tell sty its version, then I would suggest
    • if AMC tells version (means newer version)
      automultiplechoice.sty inputs automchoice-v<version>.tex
    • else
      automultiplechoice.sty inputs automchoice-v1.2.1.tex

Then both sty (the actual and this new) would do the same job for the actual stable version. New sty would work with any version.

This way, it seams to me that we could get that a even better match between AMC and sty versions, also puts the code on CTAN (instead of difficulting users acess to sty).

I could help with such implementation, if you like. I have some experience with TeX programming.

Regards

Miguel.

Updated by Alexis Bienvenüe about 10 years ago

AMC somehow can control the call of LaTeX

AMC sets some LaTeX macros before running the source file, like

latex --nonstopmode '\def\SujetExterne{1} \input{source.tex}'

(see AMC-prepare.pl and External control in style doc), but the version is not already told to the style file.

Your idea seems interesting. Perhaps it will be strange to include multiple versions in the same package version on CTAN?

I could help with such implementation, if you like. I have some experience with TeX programming.

Good! Your contributions are welcome.

Updated by Alexis Bienvenüe about 10 years ago

  • Tracker changed from Bug to Feature

Updated by Miguel Frasson about 10 years ago

From the Exertnal control section, \SujetExterne now is just checked if it's defined or not. It seams to hold the value 1 now. It could hold the version number of the "external entity" AMC. Internally, we could define,that 1.2.1 version means 1 for the sty.

There would be no several versions of the same package, but one (automultiplechoice.sty) that inputs the right macros according to AMC version. When there is a new version of AMC, we just add another "version" file to the package in CTAN, without change the others, even the package file.

If user does not have that specific version file, sty gives error asking user to install that particular file, either systemwise of in local texmf. Better: AMC could always put a copy of the correct version file together with the source.tex, so it ensures that always the file will be there.

Updated by Alexis Bienvenüe about 10 years ago

\SujetExterne now is just checked if it's defined or not. It could hold the version number [...]

Yes but sometimes it has to be not defined (it is defined only to build the question, not the catalog or other documents), so I think it should be better to use another macro to hold the version number.

AMC could always put a copy of the correct version file together with the source.tex, so it ensures that always the file will be there.

Maybe it is a waste to copy this sty file in all projects directories

Updated by Miguel Frasson about 10 years ago

Hi, Alexis

I would like to take a look on the dtx files for the package on versions 1.2.1 and beta. Do you have them? My e-mail is in my project account.

Regards

Miguel.

Updated by Alexis Bienvenüe about 10 years ago

You can find the dtx.in file in the doc/sty directory (see mercurial repository). The dtx is built from the dtx.in replacing some few version data, such as @/PACKAGE_V_DEB/@, with make MAJ)

Updated by red sea over 9 years ago

Dear Migual
- save automultiplechoice.dtx.in from her:
http://project.auto-multiple-choice.net/projects/auto-multiple-choice/repository/changes/doc/sty/automultiplechoice.dtx.in

- change the file extention from dxt.in to sty by click right button then rename (mouse or tochpad).
from: automultiplechoice.dtx.in
to : automultiplechoice.sty

- open automultiplechoice.sty by texmaker program then search for "DRAFT" word, delete this word, then save.

- put your tex file and automultiplechoice.sty in same folder.

- open tex file by texmaker then click quick build.

Also available in: Atom PDF