I have Mac OS X 10.7.5 and TeX Live 2012, and "XeTeX, Version 3.1415926-2.4-0.9998". How do I install the mcq package?
To download the Linux Libertine font, the link is http://www.fontspace.com/linux-libertine. Be sure to download Libertine and not Biolinum. The rest is done by following the instructions on http://www.matapp.unimib.it/~ferrario/var/mcqxelatex.html, bearing in mind that
.py is the extension for python files which are run by
python FileName.py on the Terminal. The file is created by that mcq.py program, then you open it in your TeX editor, put the questions and answers in the designated areas and typeset normally. Be sure to use XeTeX or LuaTeX as plain pdfTeX won't work. The strange thing is I never had to move the
.sty file from my Downloads folder, so that
kpsewhich -var-value TEXMFHOME command was pretty useless for me. Besides, the result of that was
/Users/michelegorini/Library/texmf, which I can't access because it does not show up, neither in the Finder, nor in the Terminal where the Library does show up. The only problem now is that
mcq.sty is found only if the
.tex file using it is in the Downloads folder.
Update: I stumbled again upon this question while searching for examples to link to from the answer to this meta SX question, and there are two ways to fix this "only" problem:
- Find the directory where LaTeX looks for packages (where the packages from the installed distribution are) and put the mcq folder into it, and then go on terminal and use
sudo texhash; this isn't tested but it worked when I tried to install my own package.
- Place the
.styin the appropriate "local" directory, as indicated here; well, perhaps the indications there are not accurate for your computer; in my case, if
~is the home directory, they are accurate, but note that my Library was invisible; the Finder has a
Go to Librarycommand which becomes visible under the
Gomenu when pressing the Option key.
Just two comments (I wrote
If you create, in the directory
/Users/michelegorini/Library/texmf/, a TEXMF tree, there you can install your own packages (or tex files, or image files, or bibtex files... ) - out of the official
texhash might be needed after.
About the proper place where to put
mcq.py, it depends on your
$PATH. A typical place might be
/usr/local/bin, after making sure that something like
export PATH=/usr/local/bin:$PATH is in your
~/.profile . Also, it needs to be executable (check file permissions).
From the "Linux Libertine font" comment I reckon that you could already run it: Linux Libertine is the default font. You can change it to any other font with the proper glyphs (by changing the commands
\Ufont, and setting a different
\setmainfont), but you should first make sure that there are no missing symbols (check the logfile).