I work with Linux Debian Sid, Emacs and TeXlive 2013 installed in my home. I compile all my documents with LuaLaTeX with header as a master file that contains, among other things, the package file below :

%%% Local Variables: 
%%% mode: LaTeX
%%% LaTeX-command: "lualatex -shell-escape"
%%% End

Are there a conflict between these packages ? If yes, what should be correct ?

The compilation of this file works perfectly.

Recently I discovered ConTeXt. I made several attempts, and there were problems with the fonts in the distribution TeXlive 2013. I was advised to install Standalone ConTeXt to avoid these problems. To have ConTeXt Standalone permanently, I changed my .profile file as follows :

  source /home/fab/context/tex/setuptex
  export LIBGS=/usr/lib/libgs.so.9
  export PATH=$PATH:/texmf/tex/latex/tex4ebook-master/tex4ebook
  export PATH=$PATH:/home/fab/texlive/2013/bin/x86_64-linux

My conclusion is that the file texnansi.enc of Standalone ConTeXt was loaded instead of that of 2013 TeXlive distribution, and it was he who was the cause of problems.

  • 1
    Why use LY1 encoding with luatex? Mar 4, 2014 at 17:22
  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Mar 4, 2014 at 18:15
  • 5
    You shouldn't load fontspec along with mathdesign.
    – egreg
    Mar 4, 2014 at 19:07
  • 1
    texnansi is known within LaTeX as LY1 it was a non standard encoding developed by Y&Y for their TeX system (mostly). But I see now you didn't explicitly ask for this and it's a package incompatibility as noted by @egreg Mar 4, 2014 at 19:35
  • 1
    While I don't dispute the consensus here - don't load mathdesign with fontspec, either there is another problem or there is a (minor) bug concerning a rather misleading error message. TeX should be able to find the encoding file for LY1 even if loading it will cause problems. Or does LuaTeX modify the search path to block the loading of .enc files deliberately? (But then it would be much more helpful if it said so.)
    – cfr
    Mar 4, 2014 at 23:50

1 Answer 1


Tex installations are complex in terms of how they organise binaries, fonts, and macros/scripts, and the code and data are tightly coupled. Since you seem to have both mixed together in your setup, it looks like the files in Context Standalone's (CS) hierarchy are getting looked up by the TL programs and confusing TL. Untying the two by ensuring that TL cannot see Context Standalone's hierarchy should allow your compilation to work.

When it is important to be able to use both distributions, the Context wiki recommends that you only source setuptex when you need it:

ConTeXt suite works in a non-interfering manner because it does not put anything in your $PATH and does not set any system variables. This in turn means that in order to use it, you need to do some initialization. An intialization script called setuptex is provided in installation-dir/tex/. If you run context from a terminal, source setuptex like so: source /installation-dir/tex/setuptex

From http://wiki.contextgarden.net/ConTeXt_Standalone#Usage

which needs to be done before each time you use CS, and will only affect invocations of SC from that shell. Instead, to the method you seem to be using that the wiki goes on to describe next:

The above method means that you always have to type source /installation-dir/tex/setuptex in a terminal before you can use typeset. If you always use ConTeXt suite and never use LaTeX or plain TeX provided by another TeX distribution, you can add the above intialization line to the startup script of your shell. For bash, this means $HOME/.bashrc; for zsh, this means $HOME/.zshrc; for (t)csh, this means $HOME/.cshrc or $HOME/.tcshrc. Then, setuptex will always be sourced in your terminal.

This then messes about with the setup that is usually done for TL by the site-wide configuration given in \etc.

  • Could you provide maybe a bit of detail on how one might go about "untying [TL and ConTeXt standalone]"?
    – Mico
    Mar 5, 2014 at 19:21
  • @Mico: now done. Mar 6, 2014 at 9:57

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.