Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

[What follows is my question, re-written with better information and condensed.]

I might be missing something really simple and I might be overcomplicating something really easy.

To Be Extremely Brief

Prior to updating a fresh MacTeX install (with up-to-date packages installed from one of the main repositories), ConTeXt worked will, even in MK IV, except that I couldn't get font selection to work. It seamed to ignore it or show garbage (Palatino). So I updated with the tlcontrib packages using tlmgr and now, even after doing what I can to rebuild hashes/--generate (mtxtools) etc, luatools always returns MTXrun | unknown script 'base.lua' or 'mtx-base.lua'.

Question 1: What's wrong?

Question 1 MK II: :) Is there something called mtx-base.lua or base.lua, or is this some script not getting a variable name and just putting base in there, because that's the constant... or something? Anyway, I cannot find either file, so I'm in the same boat as luatools.lua. :)

To Be Kind of Brief

  1. I installed MacTeX 2010 fresh, after a failed attempt at using updated ConTeXt files. (resolved from an In an earlier question)
  2. I updated all packages using the normal trees.
  3. I changed my TEXMFHOME variable in /usr/local/texlive/2010/texmf.cnf to ~/src/texmf-trms, which is where I keep my custom modules/templates/packages. (This is normally within our github source control, but hasn't been yet.) and moved the content from the old directory to the new.
  4. I was beating my head against the wall, trying to make font selection work using typescriptfile/typescript as well as simplefont. The closest I could get was with simplefont and Palatino spewing garbage text into the PDF. While it's not the main topic of this post, if it's helpful, typing sudo mtxrun --script fonts --list --name --pattern=*' always resulted inzsh: no matches found: --pattern=*`.
  5. I decided to try http://tlcontrib with tlmgr using:

    sudo tlmgr --repository http://tlcontrib.metatex.org/2010 update -all

  6. I sudo texconfig rehashed (seemed okay), sudo mtxrun --generate (seemed okay). Then I sudo luatools --generate and got something that ended with MTXrun | unknown script 'base.lua' or 'mtx-base.lua'

  7. Just typing luatools results in: MTXrun | unknown script 'base.lua' or 'mtx-base.lua'
  8. As per my attempt to solve this and some reading on the Interweb, I tried editing the two texmfcnf.lua files that I found (in /usr/texlive/2010/ and /usr/texlive/2010/texmf/web2c`) with:

    return { content = { TEXMFCACHE = '~/Library/texlive/2010/texmf-var', TEXMFHOME = '~/src/texmf-trms', }, TEXMFCACHE = '~/Library/texlive/2010/texmf-var', }

This had no effect and, quite probably, has nothing to do with anything, as someone has helpfully pointed out.

Outputs From Some Commands That I Tried

Compile a document with luatools:

MTXrun | warning: no format found, forcing remake (commandline driven)
MTXrun | running command: luatools --generate
MTXrun | unknown script 'base.lua' or 'mtx-base.lua'

MTXrun | running command: luatools --make --compile cont-en
MTXrun | unknown script 'base.lua' or 'mtx-base.lua'

MTXrun | error, no format found with name: cont-en, aborting
MTXrun | total runtime: 0.321

Output from sudo luatex --generate --verbose:

MTXrun | resolvers: variable 'SELFAUTOLOC' set to
'/usr/local/texlive/2010/bin/x86_64-darwin'
MTXrun | resolvers: variable 'SELFAUTODIR' set to '/usr/local/texlive/2010/bin'
MTXrun | resolvers: variable 'SELFAUTOPARENT' set to '/usr/local/texlive/2010'
MTXrun | resolvers: variable 'TEXMFCNF' set to ''
MTXrun | resolvers: variable 'TEXMF' set to ''
MTXrun | resolvers: variable 'TEXOS' set to 'bin'
MTXrun | resolvers
MTXrun | resolvers: loading configuration file
'/usr/local/texlive/2010/texmfcnf.lua'
MTXrun | resolvers
MTXrun | resolvers: loading configuration file
'/usr/local/texlive/2010/texmf/web2c/texmfcnf.lua'
MTXrun | resolvers
MTXrun | resolvers: locating list of '/Users/andrew/src/texmf-trms' (runtime)
MTXrun | resolvers: handler 'tree:////Users/andrew/src/texmf-trms' ->
'locators' -> 'path=/Users/andrew/src/texmf-trms | noscheme=false |
query= | scheme=tree | original=tree:////Users/andrew/src/texmf-trms |
fragment= | authority='
MTXrun | resolvers: hash 'tree:////Users/andrew/src/texmf-trms' appended
MTXrun | resolvers: skipping list of
'/usr/local/texlive/2010/texmf-project' (cached)
MTXrun | resolvers: skipping list of
'/usr/local/texlive/2010/texmf-fonts' (cached)
MTXrun | resolvers: skipping list of
'/usr/local/texlive/2010/texmf-local' (cached)
MTXrun | resolvers: skipping list of
'/usr/local/texlive/2010/texmf-context' (cached)
MTXrun | resolvers: locating list of '/usr/local/texlive/2010/texmf' (cached)
MTXrun | resolvers: tex locator '/usr/local/texlive/2010/texmf' found
MTXrun | resolvers: hash '/usr/local/texlive/2010/texmf' appended
MTXrun | resolvers: locating list of
'/usr/local/texlive/2010/texmf-dist' (cached)
MTXrun | resolvers: tex locator '/usr/local/texlive/2010/texmf-dist' found
MTXrun | resolvers: hash '/usr/local/texlive/2010/texmf-dist' appended
MTXrun | resolvers
MTXrun | resolvers: handler 'tree:////Users/andrew/src/texmf-trms' ->
'hashers' -> 'path=/Users/andrew/src/texmf-trms | noscheme=false |
query= | scheme=tree | original=tree:////Users/andrew/src/texmf-trms |
fragment= | authority='
MTXrun | resolvers: scanning path '/Users/andrew/src/texmf-trms'
MTXrun | resolvers: 596 files found on 114 directories with 62
uppercase remappings
MTXrun | resolvers: loading 'files' for
'/usr/local/texlive/2010/texmf' from
'/Users/andrew/Library/texlive/2010/texmf-var/luatex-cache/context/210a81d6dcb1059dc80fab3f5470ab7a/trees/1240e363db2f4c53de58379d2b0c6f6b'
MTXrun | resolvers: loading 'files' for
'/usr/local/texlive/2010/texmf-dist' from
'/Users/andrew/Library/texlive/2010/texmf-var/luatex-cache/context/210a81d6dcb1059dc80fab3f5470ab7a/trees/26993469c6208234eef0d0acf8456c4d'
MTXrun | resolvers: using suffix based filetype 'lua'
MTXrun | resolvers: using suffix based filetype 'lua'
MTXrun | resolvers: remembering file 'mtx-base.lua'
MTXrun | resolvers: using suffix based filetype 'lua'
MTXrun | unknown script 'base.lua' or 'mtx-base.lua'
share|improve this question
1  
You could try passing --verbose to luatools --generate to see which texmfcnf.lua file it is reading. –  Aditya Nov 16 '10 at 15:26
    
@Aditya That's a great that I wish I had myself! I try to avoid posting huge logs, but I don't know what is relevant. I'll post the output... –  Andrew Starks Nov 16 '10 at 15:37
    
@Aditya: As you can see, it didn't seem to change the price of tea in china, or get luatools to work. :) I really appreciate the suggestions. Do you have any other insight? Thanks! –  Andrew Starks Nov 16 '10 at 16:49
1  
I do not see what is going wrong here and I am not familiar with the tex-live structure. You could try asking in the context mailing list also. –  Aditya Nov 16 '10 at 18:01
1  
@Andrew: you wrote luatex --generate while you mean luatools --generate, in the question. Also, your calls to texconfig are useless, and wrong: sudo texconfig makes no sense (unless you want to configure the tex system for root only), you probably mean sudo texconfig-sys. Anyway, tlmgr is the preferred command now. –  mpg Nov 16 '10 at 18:15
show 4 more comments

2 Answers

up vote 3 down vote accepted

Mica is almost correct, but I couldn't convey the edits in a comment, so if it is more appropriate, he can edit his and I'll remove my answer...

The current MacTeX needs the following line in the /usr/local/texlive/2010/texmfcnf.lua file:

return { TEXMFCACHE = '$HOME/Library/texlive/2010/texmf-var' }

Sweet! But, this does not work for the beta builds on tlcontrib! Mica's solution should work, except that there is an issue with how the betas deal with the ~ that is beyond my brain capacity. So, instead, one needs to edit the file to say:

return {content={ TEXMFCACHE = '$HOME/Library/texlive/2010/texmf-var',
                  TEXMFHOME = '$HOME/src/texmf-trms'}, 
          TEXMFCACHE='$HOME/Library/texlive/2010/texmf-var'
       }

...instead. Notice the absent coma after the last TEXMFCACHE and notice the use of $HOME instead of ~.

To speed things up, I made two files. One called /usr/local/texlive/2010/texmfcnf-tlcontrib.lua which has the new code and another called /usr/local/texlive/2010/texmfcnf-mactex.lua which has the standard MacTeX installation code.

Then, in my zsh profile (I think bash is the same) I added the following utility commands:

alias tlc="sudo tlmgr --repository http://tlcontrib.metatex.org/2010"
function tlcontext {
  sudo cp -f -v /usr/local/texlive/2010/texmfcnf-tlcontrib.lua /usr/local/texlive/2010/texmfcnf.lua;
  sudo tlmgr --repository http://tlcontrib.metatex.org/2010 update context luatex metapost;
}

function tlmactex {
  sudo cp -f -v /usr/local/texlive/2010/texmfcnf-mactex.lua /usr/local/texlive/2010/texmfcnf.lua;
  sudo tlmgr install context luatex metapost --reinstall;  
}

function tlun { sudo tlmgr $1 --reinstall; }

tlcontext seems to do everything that I need to move to the newest ConTeXt build. tlmactex appears to bring me back. I'll let all ya'all know if I'm wrong, but it appears that this works perfectly.

share|improve this answer
add comment

Alright, here we go.

I started, much like you: Oh tlcontrib, awesome. Let's get that going.

At first I opened the terminal, and passed the same command as you did, sudo tlmgr --repository http://tlcontrib.metatex.org/2010 update -all

This left me with the same errors as describe above. To fix it:

  1. In the terminal, sudo tlmgr reinstall context luatex metapost (NOTE: I don't think I had any other packages from the tlcontrib repo installed, if I had other packages [fontspec, maybe] I have not tested to see if they work... this fix only got context/luatex/metapost working again. The idea here is to reinstall the packages from the texlive 2010 distro and replace the ones from tlcontrib.)

  2. edit texmfcnf.lua at /usr/local/texlive/2010/: return { content = { TEXMFCACHE = '~/Library/texlive/2010/texmf-var', TEXMFHOME = '~/Library/texmf', }, TEXMFCACHE = '~/Library/texlive/2010/texmf-var', }

  3. In the terminal, sudo tlmgr --repository http://tlcontrib.metatex.org/2010 update context luatex metapost

  4. In the terminal, run sudo luatools --generate & mtxrun --generate

  5. context --version now returns:

MTXrun | main context file: /usr/local/texlive/2010/texmf-dist/tex/context/base/context.tex MTXrun | current version: 2010.07.30 11:35

share|improve this answer
    
Alas, this did not work. I tried the above, but was unable to get the older files to reinstall. I will try from a fresh install to put in the changes to texmfcnf.lua and roll the repository. I'll let you know how it goes. I think I'm going to find that it does work. –  Andrew Starks Nov 17 '10 at 5:34
    
see my answer. I had done what you had suggested prior to your post, but your answer led me to think that more research along that path was needed. Therefore, if you think it's appropriate, edit your answer with my suggestions and I'll happily remove mine and mark yours as the correct one. Thanks! –  Andrew Starks Nov 17 '10 at 16:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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