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?

  • What is the mcq package? It is not found on CTAN. – daleif Dec 29 '13 at 17:20
  • 1
    I think this. – marczellm Dec 29 '13 at 17:23
  • Yes that's it. How do I run mcq.py on Terminal? If I just type mcq.py it says -bash: mcq.py: command not found, and if I type latex mcq.py, it says ! You can't use 'macro parameter character #' in vertical mode. l.1 # !/usr/bin/env python And my Mac has no such directory as /Users/michelegorini/Library/texmf which is given by the command kpsewhich -var-value TEXMFHOME. Could it be hidden? How do I show it? – MickG Dec 29 '13 at 18:00
  • Does not any answer in Where do I place my own .sty files, to make them available to all my .tex files? help you? Is a font involved? Then see Manual font installation. – Speravir Dec 30 '13 at 2:31
  • 1
    If it ends with .py, it's probably a python file. Maybe ./mcq.py or python mcq.py? – Stephan Lehmke Dec 30 '13 at 5:29

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:

  1. 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.
  2. Place the .sty in 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 Library command which becomes visible under the Go menu when pressing the Option key.
  • NO! First: The original source for Linux Libertine is LinuxLibertine.org. Second: It is already installed or can be so in all big TeX distributions, also in opentype version - the according package is libertine. – Speravir Dec 30 '13 at 23:40

Just two comments (I wrote mcq.py):

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 texlive/* distribution.

Example: /Users/michelegorini/Library/texmf/tex/latex/mcq.sty

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 ~/.bashrc or ~/.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 \squarebox, \Ufont, and setting a different \setmainfont), but you should first make sure that there are no missing symbols (check the logfile).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.