A trouble with setupbodyfontenvironment
So I've come back to using ConTeXt after a year away from it (publishers preferring LaTeX, y'know), and in revising some student notes I'm getting errors which seem new. For a collection of overheads, I've set up \setupbodyfontenvironment[default][em={\slanted\color[red]}] However, when I run context on my files, a command such as {\em elephant} produces: l.3 The {\em elephant} is a large gray animal ? h The control sequence marked <to be read again> should not appear between \csname and \endcsname. What's going on here, and how do I fix it? Thanks, Alasdair
On 2013–02–28 Alasdair McAndrew wrote:
So I've come back to using ConTeXt after a year away from it
Welcome back :)
\setupbodyfontenvironment[default][em={\slanted\color[red]}]
\setupbodyfontenvironment [default] [em=slantedred] \definehighlight [slantedred] [style=slanted, color=red] Marco
Thanks for that, but it doesn't seem to work:
I enter "context myfile.tex", and a bit later:
l.26 \definehighlight
[slantedred][style=slanted,color=red]
? h
The control sequence at the end of the top line
of your error message was never \def'ed.
Do I have to include a special module here?
-Alasdair
On Thu, Feb 28, 2013 at 11:02 PM, Marco Patzer
On 2013–02–28 Alasdair McAndrew wrote:
So I've come back to using ConTeXt after a year away from it
Welcome back :)
\setupbodyfontenvironment[default][em={\slanted\color[red]}]
\setupbodyfontenvironment [default] [em=slantedred]
\definehighlight [slantedred] [style=slanted, color=red]
Marco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On 2013–03–01 Alasdair McAndrew wrote:
Do I have to include a special module here?
No. I tested some versions between 2011.11.29 23:11 and 2013.02.26 00:17 and it worked for me. Which version are you using? \definehighlight is nothing which was recent added. \setupbodyfontenvironment [default] [em=slantedred] \definehighlight [slantedred] [style=slanted, color=red] \starttext foo {\em bar} \stoptext You cannot update, you can try this instead of \definehighlight: \definealternativestyle [slantedred] [{\slanted\color[red]}] Marco
Actually, maybe my version is a bit old: context --version
returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04,
but when I tried to update using apt-get the system told me that I had the
latest version). In the meantime I'll try your alternative.
Thanks!
On Fri, Mar 1, 2013 at 12:40 AM, Marco Patzer
On 2013–03–01 Alasdair McAndrew wrote:
Do I have to include a special module here?
No. I tested some versions between 2011.11.29 23:11 and 2013.02.26 00:17 and it worked for me. Which version are you using? \definehighlight is nothing which was recent added.
\setupbodyfontenvironment [default] [em=slantedred]
\definehighlight [slantedred] [style=slanted, color=red]
\starttext foo {\em bar} \stoptext
You cannot update, you can try this instead of \definehighlight:
\definealternativestyle [slantedred] [{\slanted\color[red]}]
Marco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Fri, 1 Mar 2013, Alasdair McAndrew wrote:
Actually, maybe my version is a bit old: context --version returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative.
It is best to install ConTeXt standalone in a parallel directory. http://wiki.contextgarden.net/ConTeXt_Standalone @Mojca: What's with the name of the distribution. The wiki has a mix of minimals, standalone, and suite. Can we converge on one name for the distribution. Aditya
Arrgh: more problems. I've downloaded and installed context standalone
(version 2013.02.26 00:17). Now when I run context I get an error (for the
first time ever) when it reaches a chapter heading:
l.1 ...[ch:this]{My first chapter}
? h
The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.
I have the following setups:
\def\chap#1#2{\vbox{\darkgreen Chapter
#1\crlf\framed[frame=off,topframe=on]{#2}}}
\def\uchap#1#2{#2}
\setuphead[chapter][command=\chap,style=bfd,after={\blank[1cm]},textcolor=darkgreen,numbercolor=darkgreen]
None of this has ever given me any problems before. I also experimented by
removing the entire context tree and reinstalling the stable version - only
to get the same error. Any ideas?
Thanks,
Alasdair
On Fri, Mar 1, 2013 at 11:01 AM, Aditya Mahajan
On Fri, 1 Mar 2013, Alasdair McAndrew wrote:
Actually, maybe my version is a bit old: context --version
returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative.
It is best to install ConTeXt standalone in a parallel directory. http://wiki.contextgarden.net/**ConTeXt_Standalonehttp://wiki.contextgarden.net/ConTeXt_Standalone
@Mojca: What's with the name of the distribution. The wiki has a mix of minimals, standalone, and suite. Can we converge on one name for the distribution.
Aditya
______________________________**______________________________** _______________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/** listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________**______________________________** _______________________
On 2013–03–01 Alasdair McAndrew wrote:
Arrgh: more problems. I've downloaded and installed context standalone (version 2013.02.26 00:17). Now when I run context I get an error (for the first time ever) when it reaches a chapter heading:
l.1 ...[ch:this]{My first chapter}
? h The lua interpreter ran into a problem, so the remainder of this lua chunk will be ignored.
I have the following setups:
\def\chap#1#2{\vbox{\darkgreen Chapter #1\crlf\framed[frame=off,topframe=on]{#2}}} \def\uchap#1#2{#2}
\setuphead[chapter][command=\chap,style=bfd,after={\blank[1cm]},textcolor=darkgreen,numbercolor=darkgreen]
None of this has ever given me any problems before.
It's easier to tell with a minimal example. But here's a guess. Try \unexpanded\def#1#2\chap{…} or \define[2]\chap{…} Marco
I'll try to sort out a minimal example; unfortunately neither of those
suggestions worked.
In the meantime, here's some more info from the log file:
-----
(chapter.tex
! LuaTeX error
.../context/tex/texmf-context/tex/context/base/strc-doc.lua:156: attempt to
index local 'metadata' (a number value)
stack traceback:
.../context/tex/texmf-context/tex/context/base/strc-doc.lua:156: in
function 'load'
.../context/tex/texmf-context/tex/context/base/strc-doc.lua:167: in
function '__index'
.../context/tex/texmf-context/tex/context/base/strc-doc.lua:143: in
function 'save'
.../context/tex/texmf-context/tex/context/base/strc-doc.lua:371: in
function 'somelevel'
[string "\directlua "]:1: in main chunk.
system > tex > error on line 1 in file chapter.tex: LuaTeX error
...
1 >> \chapter[ch:this]{My first chapter}
-----
It seems to be a mkiv issue; when I attempted to typeset the file(s) with
texexec (mkii), I had no problem.
Thanks again,
Alasdair
On Fri, Mar 1, 2013 at 8:54 PM, Marco Patzer
On 2013–03–01 Alasdair McAndrew wrote:
Arrgh: more problems. I've downloaded and installed context standalone (version 2013.02.26 00:17). Now when I run context I get an error (for the first time ever) when it reaches a chapter heading:
l.1 ...[ch:this]{My first chapter}
? h The lua interpreter ran into a problem, so the remainder of this lua chunk will be ignored.
I have the following setups:
\def\chap#1#2{\vbox{\darkgreen Chapter #1\crlf\framed[frame=off,topframe=on]{#2}}} \def\uchap#1#2{#2}
\setuphead[chapter][command=\chap,style=bfd,after={\blank[1cm]},textcolor=darkgreen,numbercolor=darkgreen]
None of this has ever given me any problems before.
It's easier to tell with a minimal example. But here's a guess. Try
\unexpanded\def#1#2\chap{…}
or
\define[2]\chap{…}
Marco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
-- Blog: http://amca01.wordpress.com Web: http://sites.google.com/site/amca01/ Facebook: http://www.facebook.com/alasdair.mcandrew
On 3/1/2013 11:27 AM, Alasdair McAndrew wrote:
I'll try to sort out a minimal example; unfortunately neither of those suggestions worked.
In the meantime, here's some more info from the log file:
----- (chapter.tex ! LuaTeX error .../context/tex/texmf-context/tex/context/base/strc-doc.lua:156: attempt to index local 'metadata' (a number value)
how does that line look? here it is: if metadata and metadata.kind == "section" and not metadata.nolist then ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/1/2013 11:27 AM, Alasdair McAndrew wrote:
I'll try to sort out a minimal example; unfortunately neither of those suggestions worked.
btw, can it be that you run a new luatex but an old context? if so ... it's a 5.2 hashing issue and you need to update context to match luatex ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 02/28/2013 06:51 PM, Alasdair McAndrew wrote:
Actually, maybe my version is a bit old: context --version returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative.
Thanks!
Most of the software in the repository is a few to several revisions behind. The texlive package, for example, is from 2009 :( Best to install the standalone or install texlive yourself using the installer from CTAN. I have both on my 12.04 system though I mostly use the standalone version. -- Bill Meahan Westland, Michigan USA
I think I might completely uninstall my current TeXlive (2011) and install
the newest one from CTAN, as you recommend. I also run into problems when
I want to run both ConTeXt and plain TeX or LaTeX: I was using TeX on some
old files yesterday, and because my path was set up to reference the
/opt/context tree before the /usr/share/texmf tree, TeX kept giving errors.
So I needed to fiddle with my path first. (One day I'll convert my TeX
files to ConTeXt, but that requires more time than I have right now.)
Thanks, everybody!
On Sat, Mar 2, 2013 at 6:18 AM, Bill Meahan
On 02/28/2013 06:51 PM, Alasdair McAndrew wrote:
Actually, maybe my version is a bit old: context --version returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative.
Thanks!
Most of the software in the repository is a few to several revisions behind. The texlive package, for example, is from 2009 :(
Best to install the standalone or install texlive yourself using the installer from CTAN. I have both on my 12.04 system though I mostly use the standalone version.
-- Bill Meahan Westland, Michigan USA
______________________________**______________________________** _______________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/** listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________**______________________________** _______________________
participants (5)
-
Aditya Mahajan
-
Alasdair McAndrew
-
Bill Meahan
-
Hans Hagen
-
Marco Patzer