[NTG-context] startup error
Hello everyone, I am coming back to Context after a while. I have updated ConTeXt LMTX, everything seemed to go well. I have the following problem: If I run: context Hello-world.tex I get the message "startup error : no format file given, quitting" I am clueless! Thanks in advance for your help, Roland (downloaded context-linux-64.zip) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] update fails
Le 6 janv. 2014 à 10:36, Hans Hagen a écrit : > On 1/5/2014 6:36 PM, Roland Thiers wrote: >> Hi everybody, >> First of all, my best wishes of a very happy new year to all users of this >> list ! >> >> I used to update context standalone with the script ctx-update : >> >> cd /Users/rolandthiers/context >> rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh >> ../first-setup.sh --modules=all --engine=luatex >> >> Usually the update runs well, no problem. But the last time it did not work. >> I've got this message : >> >> This went wrong: >> ...67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui:107: bad >> bytecode register >> This is LuaTeX, Version beta-0.78.0-2013123119 (rev 4704) >> \write18 enabled. >> .. >> <*> >> cont-yes.mkiv >> ? Assertion failed: (kpse->program_name), function kpathsea_var_value, file >> ../../../source/texk/kpathsea/variable.c, line 36. >> >> mtx-context | fatal error: no return code, message: luatex: execution >> interrupted >> >> My system : Mac OS X 10.6.8 . >> Could someone tell me what happens or what mistake I did ? > > no clue ... kpse is not used in context mkiv so there should not be such a > message; it looks like a bad binary or maybe you need to do a context --make > explicitly > > also, don't use ctx-update but first-update in the minimal root > > Hans Thanks very much Hans ! I did a context --make and everything is working well again ! Roland ___ 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 ___
[NTG-context] update fails
Hi everybody, First of all, my best wishes of a very happy new year to all users of this list ! I used to update context standalone with the script ctx-update : cd /Users/rolandthiers/context rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh ./first-setup.sh --modules=all --engine=luatex Usually the update runs well, no problem. But the last time it did not work. I've got this message : This went wrong: ...67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui:107: bad bytecode register This is LuaTeX, Version beta-0.78.0-2013123119 (rev 4704) \write18 enabled. . <*> cont-yes.mkiv ? Assertion failed: (kpse->program_name), function kpathsea_var_value, file ../../../source/texk/kpathsea/variable.c, line 36. mtx-context | fatal error: no return code, message: luatex: execution interrupted My system : Mac OS X 10.6.8 . Could someone tell me what happens or what mistake I did ? Roland ___ 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 ___
Re: [NTG-context] Configure AUCTeX to run context not texec
Le 8 nov. 2013 à 18:47, Michael Ash a écrit : > > > Does anyone know how to change the command from "texexec" to "context" in > emacs/AUCTeX? > I have that in my preference.el (I use aquamacs) : --8<---cut here---start->8--- (defun rol-context () (interactive) (save-current-buffer (save-buffer) (TeX-save-document "") (setq TeX-PDF-mode nil) (let ((nomdufichiersansextension (file-name-sans-extension (buffer-file-name (shell-command (format "context --autopdf %s.tex" nomdufichiersansextension)) (TeX-view --8<---cut here---end--->8--- I have bound this function rol-context to the key "F7", it works fine but it's definitely non optimal ! Regards, Roland (math teacher in a high school) ___ 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 ___
Re: [NTG-context] command for a MP graphic
Le 8 mai 13 à 06:56, Wolfgang Schuster a écrit : Am 07.05.2013 um 22:28 schrieb Roland Thiers : Thank you very much for this precision, Wolfgang. I tried with two variables and it works with this syntax : \startuniqueMPgraphic{polygoneregulier} numeric u ; u:=\MPvar{unite}*cm ; numeric n ; n:=\MPvar{sides}; rest of the code \stopuniqueMPgraphic \define[2]\polyreg {\setupMPvariables[polygoneregulier][unite,sides] \uniqueMPgraphic{polygoneregulier}{sides=#1,unite=#2}} You can define the command as \define[2]\polyreg {\setupMPvariables[polygoneregular][sides=#1,unite=#2]% \uniqueMPgraphic{polygoneregular}} where the variables are set with the \settupMPvariables command or as \define[2]\polyreg {\uniqueMPgraphic{polygoneregular}{sides=#1,unite=#2}} where the variables are set in the optional argument for \uniqueMPgraphic. \starttext %\uniqueMPgraphic{polygoneregulier}{unite=2,sides=4} \polyreg{6}{0.5} \stoptext I did not find any détails on \MPvar et \setupMPvariables on the wiki, however Both commands are mentioned in the metafun [1] manual. [1] http://www.pragma-ade.nl/show-man-7.htm Wolfgang Thank you Wolfgang for the correction of the syntax. I bought the Metafun manual and began to work with it. Great ! Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] command for a MP graphic
≥ Le 7 mai 13 à 13:05, Wolfgang Schuster a écrit : Am 07.05.2013 um 09:51 schrieb Marco Patzer : On 2013–05–07 Roland Thiers wrote: Hi, I did this code to get a regular polygon with metafun, it works but I would like to have an user command like \define or \def to be able to choose the number of sides, n. I don't know how to do that ... Here's one way to do it: \startuniqueMPgraphic{polygoneregulier}{sides} drawoptions (withpen pencircle scaled 2pt); numeric u ; u:=1*cm ; numeric n ; n:=\MPvar{sides}; pair a[]; a[0]:=(0,3u); path polygone[] ; for i=1 upto n : a[i]:=a[0] rotatedaround(origin,i*360/n) ; polygone[i]:=a[i-1]--a[i]; draw polygone[i]; endfor; draw fullcircle scaled 6u withcolor blue; \stopuniqueMPgraphic %% \polyreg{} \define[1]\polyreg {\setupMPvariables[polygoneregulier][sides=#1]%% \uniqueMPgraphic{polygoneregulier}} \define[1]\polyreg {\uniqueMPgraphic{polygoneregulier}{sides=#1}} Wolfgang Thank you very much for this precision, Wolfgang. I tried with two variables and it works with this syntax : \startuniqueMPgraphic{polygoneregulier} numeric u ; u:=\MPvar{unite}*cm ; numeric n ; n:=\MPvar{sides}; rest of the code \stopuniqueMPgraphic \define[2]\polyreg {\setupMPvariables[polygoneregulier][unite,sides] \uniqueMPgraphic{polygoneregulier}{sides=#1,unite=#2}} \starttext %\uniqueMPgraphic{polygoneregulier}{unite=2,sides=4} \polyreg{6}{0.5} \stoptext I did not find any détails on \MPvar et \setupMPvariables on the wiki, however Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] command for a MP graphic
Le 7 mai 13 à 09:51, Marco Patzer a écrit : \startuniqueMPgraphic{polygoneregulier}{sides} drawoptions (withpen pencircle scaled 2pt); numeric u ; u:=1*cm ; numeric n ; n:=\MPvar{sides}; pair a[]; a[0]:=(0,3u); path polygone[] ; for i=1 upto n : a[i]:=a[0] rotatedaround(origin,i*360/n) ; polygone[i]:=a[i-1]--a[i]; draw polygone[i]; endfor; draw fullcircle scaled 6u withcolor blue; \stopuniqueMPgraphic %% \polyreg{} \define[1]\polyreg {\setupMPvariables[polygoneregulier][sides=#1]%% \uniqueMPgraphic{polygoneregulier}} \starttext \dontleavehmode \dorecurse{9}{\polyreg\recurselevel\space} \stoptext Thanks a lot Marco ! I have to think carefully on your way : I don't understand all these commands yet. Roland ___ 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 ___
[NTG-context] command for a MP graphic
Hi, I did this code to get a regular polygon with metafun, it works but I would like to have an user command like \define or \def to be able to choose the number of sides, n. I don't know how to do that ... \startbuffer[largeurdeslignes] drawoptions (withpen pencircle scaled 2pt); \stopbuffer \startbuffer[polygoneregulier] numeric u ; u:=1*cm ; numeric n ; n:=7 ; pair a[]; a[0]:=(0,3u); path polygone[] ; for i=1 upto n : a[i]:=a[0] rotatedaround(origin,i*360/n) ; polygone[i]:=a[i-1]--a[i]; draw polygone[i]; endfor; \stopbuffer \startbuffer[cercleunite] draw fullcircle scaled 6u withcolor blue; \stopbuffer \define \polyreg {\processMPbuffer[largeurdeslignes,polygoneregulier,cercleunite]} \starttext \polyreg \stoptext Thanks, Roland Thiers ___ 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 ___
Re: [NTG-context] text overlayed
Le 4 mars 13 à 12:37, Marco Patzer a écrit : On 2013–03–04 Roland Thiers wrote: I'm learning a little bit of metapost language, using metafun manual. I made some background for a title (surely the code is awful, thanks for suggestions of improvement) but it's static, i'd like to adapt it to the widthof the text. I don't know if it is possible from my code and if it is i don't know how to do ! You can use the variable OverlayWidth to obtain the width of the overlay, which is determined by the provided text. You can use it as follows: \setuplayout [backspace=6cm] \startuniqueMPgraphic{essai} path p,p',q,q'; w:=2OverlayWidth; p := (0,0.1cm) -- (w,0.3cm); q := (11cm,-0.7cm) -- (w,2.2cm); p':= (w,1.3cm) -- (-0.4cm,1.4cm); q':= (0.3cm,2.4cm) -- (0.2cm,-0.3cm); pickup pencircle scaled 1mm; drawoptions(withcolor 0.3white); draw p; draw p'; draw q; draw q'; pair A; A:=q'intersectionpoint p'; pair B; B:=q intersectionpoint p'; pair C; C:=p intersectionpoint q; pair D; D:=q'intersectionpoint p; path s; s:= A--B--C--D--cycle; fill s withcolor .8white; \stopuniqueMPgraphic \defineoverlay [encadrement] [\uniqueMPgraphic{essai}] \defineframed [boxframed] [frame=off, foregroundstyle=bolditalic, foregroundcolor=darkred, background=encadrement] \starttext \boxframed{Devoir de mathématiques} \blank [2cm] \boxframed{Devoir de mathématiques and some more text} \stoptext Marco Great ! Thank you very much, Marco ! I saw the use of the numeric variable OverlayWidth and also all your improvements like drawoptions, defineframed ... in preamble. Roland ___ 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 ___ ___ 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 ___
[NTG-context] text overlayed
Hello all, I'm learning a little bit of metapost language, using metafun manual. I made some background for a title (surely the code is awful, thanks for suggestions of improvement) but it's static, i'd like to adapt it to the widthof the text. I don't know if it is possible from my code and if it is i don't know how to do ! Thanks for any help, best regards, Roland My code : \setuplayout[width=fit,height=fit,header=0cm,topspace=1.8cm,footer=1.2cm,% bottomspace=1cm,backspace=6cm,leftmargin=1.5cm, leftmargindistance=0.5cm,rightmargin=1cm,rightmargindistance=0.5cm, location=singlesided] \startuniqueMPgraphic{essai} path p,p',q,q'; p:=(0,0.1cm)--(12cm,0.3cm); q:=(11cm,-0.7cm)--(11.5cm,2.2cm); p':=(11.7cm,1.3cm)--(-0.4cm,1.4cm); q':=(0.3cm,2.4cm)--(0.2cm,-0.3cm); draw p withpen pencircle scaled 1mm withcolor 0.3white; draw p' withpen pencircle scaled 1mm withcolor 0.3white; draw q withpen pencircle scaled 1mm withcolor 0.3white; draw q' withpen pencircle scaled 1mm withcolor 0.3white; pair A; A:=q'intersectionpoint p'; pair B; B:=q intersectionpoint p'; pair C; C:=p intersectionpoint q; pair D; D:=q'intersectionpoint p; path s; s:= A--B--C--D--cycle; fill s withcolor .8white; \stopuniqueMPgraphic \starttext \defineoverlay[encadrement][\uniqueMPgraphic{essai}] \framed[frame=off,background=encadrement]{\it\tfb\color[darkred]{Devoir de mathématiques}} \stoptext ___ 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 ___
Re: [NTG-context] Math typesetting problems
Le 28 janv. 13 à 10:11, Janne Junnila a écrit : Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne OK ! So you need an expert, I'm just a newbie :) I would be interested to know how to do that. Best, Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] Math typesetting problems
Le 27 janv. 13 à 12:52, Janne Junnila a écrit : Hi all, Another problem I have is related to the positioning of minus signs in front of fractions. I would expect the minus sign to align with the horizontal line of the fraction, as it does on LaTeX. Below is an example formula to illustrate my point. The result seems to be independent of the font in use. \startformula -\frac{e^{\frac{4}{5}}}{4} \stopformula Janne Hi Janne, With \dfrac it looks good. With \fraction the minus sign is on the top of the fraction. Best regards, Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] \IncludePicture in SimpleSlides
Le 4 janv. 13 à 23:39, Thomas A. Schmitz a écrit : On 12/30/2012 03:05 AM, Roland Thiers wrote: Hello, I have tried the simpleslides module. Starting with it is very nice. I have get some trouble with \IncludePicture. Running : ConTeXt ver: 2012.12.28 20:30 MKIV fmt: 2012.12.29 int: english/ english \IncludePicture [horizontal] [riviere] {La Dumbéa} do not work. Maybe that problem is new (process succeded a few time ago). If I use \externalfigure, no problems. Best regards, Roland Please make a small example demonstrating your problem. \IncludePicture works normally here (with version: 2013.01.02 18:19). Thomas Thanks, Thomas, for your reply. I 've updated version to 2013.01.02 and \IncludePicture works perfectly ! I am not sure about the error that I have reported : maybe I made something wrong with the commands (surely that !) or maybe something missing in version 2012.12.29. To be able do produce a nice presentation without a long curve learning is really great, thanks a lot for this module, Roland ___ 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 ___ ___ 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 ___
[NTG-context] \IncludePicture in SimpleSlides
Hello, I have tried the simpleslides module. Starting with it is very nice. I have get some trouble with \IncludePicture. Running : ConTeXt ver: 2012.12.28 20:30 MKIV fmt: 2012.12.29 int: english/english \IncludePicture [horizontal] [riviere] {La Dumbéa} do not work. Maybe that problem is new (process succeded a few time ago). If I use \externalfigure, no problems. Best regards, Roland ___ 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 ___
Re: [NTG-context] to pass an argument in a macro
Le 25 déc. 12 à 23:24, Hans Hagen a écrit : On 12/25/2012 9:36 AM, Roland Thiers wrote: - when one create a table doing this : userdata=userdata or {}, is it only to be sure that "userdata" is not actually a variable which exists (with a non nil value) ? Less safely we could write : userdata={} ? There can already be stuff in userdata that you don't want to loose. OK. - arguments for the user.data.table function are given as strings : " #1" and changed in numbers in the body of the function. I noticed that it was possible to give numbers directly. is there always better to do like this ? (enter strings et use tonumber) Depends on if you want to catch errors. Forgetting an argument (or an empty one) when a number is expected results in ,, which triggers a Lua error, while with ,"", you can intercept the empty string and default. Hans OK. Thanks ! Roland - 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 - ___ 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 ___
Re: [NTG-context] to pass an argument in a macro
Am 23.12.2012 um 02:58 schrieb Roland Thiers : Bonjour, I am new in ConTeXt. I love its features. I need some (or a lot of) help. I tried to get a macro which compute some values for a math function. Le 23 déc. 12 à 18:43, Wolfgang Schuster a écrit : \startluacode userdata = userdata or {} userdata.roland = userdata.roland or {} local roland = userdata.roland function roland.f(x) context(x*x*x) end function roland.table(min,max,step) local min = tonumber(min) local max = tonumber(max) local step = tonumber(step) context.starttable({string.format("|*{%d}{l|}",max-min+2)}) context.HL() context.VL() context("x") for i=min,max do context.NC() context(min+(i-1)*step) end context.VL() context.FR() context.HL() context.VL() context("f(x)") for i=min,max do context.NC() roland.f(min+(i-1)*step) end context.VL() context.AR() context.HL() context.stoptable() end \stopluacode \define[3]\TableFuntion {\ctxlua{userdata.roland.table("#1","#2","#3")}} \starttext \TableFuntion{1}{6}{1} \TableFuntion{2}{7}{1} \stoptext Wolfgang I read with care (maybe) your code above, Wolfgang (thanks again !) et had a look in "programming in lua" to get a better idea of the object table, new in lua too :-) I have some more questions : - when one create a table doing this : userdata=userdata or {}, is it only to be sure that "userdata" is not actually a variable which exists (with a non nil value) ? Less safely we could write : userdata={} ? - arguments for the user.data.table function are given as strings : " #1" and changed in numbers in the body of the function. I noticed that it was possible to give numbers directly. is there always better to do like this ? (enter strings et use tonumber) - I found the command \define in context garden and saw it's the same than \unexpanded\def , there is a link to the définitions of the TeX primitives but I could'nt find \unexpanded\def (\def was very instructive however). - I changed slightly the code to obtain a range (x between min and max with a step) and to choose a round-way. I failed to find a context way to get rounded numbers, so I did a workaround (a another function) with help from "programming in lua". I would like a more straight (context) way. Here is the code : \startluacode -- userdata = userdata or {} -- userdata["roland"] = userdata["roland"] or {} userdata=userdata or {} userdata["roland"]=userdata["roland"] or {} local roland = userdata["roland"] function roland.f(x) return math.log(x) end function roland.round (number, approx) local power = 10^(approx or 0) context(math.floor(number * power + 0.5) / power) end function roland.table(min,max,step,approx) local min = tonumber(min) local max = tonumber(max) local step = tonumber(step) local nbrcol = tonumber((max-min)*(1/step)+2) local approx = tonumber(approx) context.starttable({string.format("|*{%d}{l|}",nbrcol)}) context.HL() context.VL() context("x") for i=1,(nbrcol-1) do context.NC() context(min+(i-1)*step) end context.VL() context.FR() context.HL() context.VL() context("f(x)") for i=1,(nbrcol-1) do context.NC() local result=roland.f(min+(i-1)*step) roland.round(result,approx) end context.VL() context.AR() context.HL() context.stoptable() end \stopluacode \define[4]\TableFuntion {\ctxlua{userdata.roland.table("#1","#2","#3","#4")}} \starttext \TableFuntion{2}{6}{0.5}{2} \blank[2*big] \TableFuntion{1}{16}{1}{} \blank[2*big] \TableFuntion{2}{4}{2}{5} \blank[2*big] \TableFuntion{0.2}{2}{0.2}{3} \stoptext Best regards, Roland Happy Christmas to all Context users ! ___ 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 ___ ___ 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 ___
[NTG-context] to pass an argument in a macro
Bonjour, I am new in ConTeXt. I love its features. I need some (or a lot of) help. I tried to get a macro which compute some values for a math function. With help from the wiki ConTeXt Garden and some time I could do that - write my function userdata.f - write another function to put the values in a table : userdata.tabf - put both of them in a file "/Users/rolandt/context/mesfonctionsluatex.lua" - In a file.tex, I use that macro : \def\tabf#1#2% {\startluacode dofile("/Users/rolandt/context/mesfonctionsluatex.lua") userdata.tabf(#1,#2) \stopluacode} Here are the functions: -- fonction cube -- on utilise l'espace de nom userdata userdata=userdata or {} function userdata.f(x) context(x*x*x) end -- fonction tabf -- which makes a table , compute 6 values, b=first x, c = step userdata=userdata or {} function userdata.tabf(b,c) context.starttable{"*{7}{|l}|"} local b=b local c=c context("\\HL") context("\\VL x ") for i=1,6 do context("\\NC" .. b+(i-1)*c) end context("\\VL".."\\AR") context("\\HL") context("\\VL f(x) ") for i=1,6 do context("\\NC") context(userdata.f(b+(i-1)*c)) end context("\\VL".."\\LR") context("\\HL") context.stoptable() end I am sure it could be much better but it works ! Evidently I need a third argument to be able to choose how many values compute. I failed completely (I don't understand how arguments are passed). I tried things like : context.starttable{"*{%s}{|l}|",a} but ... fatal error :) I would appreciate some help or what to read to improve understanding that kind of things. Best regards, Roland ___ 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 ___
Re: [NTG-context] Numerical Calculations
Le 20 déc. 12 à 05:43, Troy Henderson a écrit : Do \luaexpr{1/3.8} and \ctxcommand{format("@0.3f",1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. Troy Bonjour, \ctxlua{context(type(\luaexpr{1/3.8}))} gives : number Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] LuaTex choking on \definesynonyms?
84e10e73c8fbdf4ae2/formats/cont-en.lui" --backend=pdf "/Users/rs/Desktop/Dropbox/B/BerlinPaper/BookConTeXt/minimal.tex" 72 MTXrun | fatal error, return code: 1 On Tue, Aug 4, 2009 at 22:27, Kevin D. Robbins wrote: > Hi Roland, > > Hans (or someone else) added abbreviation as a standard synonym in the file > strc-syn.mkiv. You no longer need to separately define abbreviation with > \definesynonym in order to use \abbeviation{VVV}{Bureau of Tourist > Information}. > > Kevin > > On Sun, Aug 2, 2009 at 8:08 AM, Roland > wrote: >> >> Hi all, >> >> LuaTex doesn't seem to like the \definesynonyms command. The following >> works fine in PDFtex: >> >> 1 \definesynonyms[abbreviation][abbreviations][\infull] >> 2 >> 3 \starttext >> 4 \abbreviation{VVV}{Bureau of Tourist Information} >> 5 The Dutch \VVV\ (\infull{VVV}) can provide you with the tourist >> 6 information on Hasselt. >> 7 >> 8 \stoptext >> >> >> ...but when compiling with Luatex, I get the errors as below. On Mac >> OS X with an updated ConTeXt/Luatex minimals installation. >> >> The abbreviations aren't essential in my current document but I guess >> somebody might want to look into this? >> >> Thanks >> Roland >> >> >> 1 This is LuaTeX, Version beta-0.42.0-2009071723 >> 2 \write18 enabled. >> 3 (/Users/rs/Desktop/Dropbox/C/ConTeXt_sandbox/sandbox.tex >> 4 >> 5 ConTeXt ver: 2009.07.23 20:11 MKIV fmt: 2009.8.2 int: >> english/english >> 6 >> 7 system : cont-new loaded >> 8 >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.tex >> 9 systems : beware: some patches loaded from cont-new.tex >> 10 >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.mkiv)) >> 11 system : cont-fil loaded >> 12 >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-fil.tex >> 13 loading : ConTeXt File Synonyms >> 14 ) >> 15 system : cont-sys.rme loaded >> 16 >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/user/cont-sys.rme >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.tex >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.mkiv)) >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.tex >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.tex >> >> (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.mkiv))) >> 17 system : sandbox.top loaded >> 18 (sandbox.top) >> 19 fonts : preloading latin modern fonts >> 20 bodyfont : 12pt rm is loaded >> 21 language : language en is active >> 22 ! Use of \doassignsometextprefixnop doesn't match its definition. >> 23 \doassignsometextprefix ...sometextprefixyes \fi { >> 24 #1} >> 25 \dododosetupsometextprefix ...nsometextprefix {#1} >> 26 [#2,,] >> 27 \next1 #1,->\dodosetupsometextprefix {#1} >> 28 \doprocesscommaitem >> 29 \doprocesscommalist ...item \gobbleoneargument #1, >> 30 ]\relax >> \global \advance \... >> 31 \dosetupsometextprefix ...dodosetupsometextprefix >> 32 \fi >> 33 >> 34 \setvalue >> 35 ... >> 36 l.2 >> 37 >> 38 >> 39 ? ! Too many }'s. >> 40 \doassignsometextprefix ...etextprefixyes \fi {#1} >> 41 >> 42 \dododosetupsometextprefix ...nsometextprefix {#1} >> 43 [#2,,] >> 44 \next1 #1,->\dodosetupsometextprefix {#1} >> 45 \doprocesscommaitem >> 46 \doprocesscommalist ...item \gobbleoneargument #1, >> 47 ]\relax >> \global \advance \... >> 48 \dosetupsometextprefix ...dodosetupsometextprefix >> 49 \fi >> 50 >> 51
[NTG-context] LuaTex choking on \definesynonyms?
Hi all, LuaTex doesn't seem to like the \definesynonyms command. The following works fine in PDFtex: 1 \definesynonyms[abbreviation][abbreviations][\infull] 2 3 \starttext 4 \abbreviation{VVV}{Bureau of Tourist Information} 5 The Dutch \VVV\ (\infull{VVV}) can provide you with the tourist 6 information on Hasselt. 7 8 \stoptext ...but when compiling with Luatex, I get the errors as below. On Mac OS X with an updated ConTeXt/Luatex minimals installation. The abbreviations aren't essential in my current document but I guess somebody might want to look into this? Thanks Roland 1 This is LuaTeX, Version beta-0.42.0-2009071723 2 \write18 enabled. 3 (/Users/rs/Desktop/Dropbox/C/ConTeXt_sandbox/sandbox.tex 4 5 ConTeXt ver: 2009.07.23 20:11 MKIV fmt: 2009.8.2 int: english/english 6 7 system : cont-new loaded 8 (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.tex 9 systems : beware: some patches loaded from cont-new.tex 10 (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.mkiv)) 11 system : cont-fil loaded 12 (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-fil.tex 13 loading : ConTeXt File Synonyms 14 ) 15 system : cont-sys.rme loaded 16 (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/user/cont-sys.rme (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.mkiv)) (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.mkiv))) 17 system : sandbox.top loaded 18 (sandbox.top) 19 fonts : preloading latin modern fonts 20 bodyfont : 12pt rm is loaded 21 language : language en is active 22 ! Use of \doassignsometextprefixnop doesn't match its definition. 23 \doassignsometextprefix ...sometextprefixyes \fi { 24 #1} 25 \dododosetupsometextprefix ...nsometextprefix {#1} 26 [#2,,] 27 \next1 #1,->\dodosetupsometextprefix {#1} 28 \doprocesscommaitem 29 \doprocesscommalist ...item \gobbleoneargument #1, 30 ]\relax \global \advance \... 31 \dosetupsometextprefix ...dodosetupsometextprefix 32 \fi 33 34 \setvalue 35 ... 36 l.2 37 38 39 ? ! Too many }'s. 40 \doassignsometextprefix ...etextprefixyes \fi {#1} 41 42 \dododosetupsometextprefix ...nsometextprefix {#1} 43 [#2,,] 44 \next1 #1,->\dodosetupsometextprefix {#1} 45 \doprocesscommaitem 46 \doprocesscommalist ...item \gobbleoneargument #1, 47 ]\relax \global \advance \... 48 \dosetupsometextprefix ...dodosetupsometextprefix 49 \fi 50 51 \setvalue 52 ... 53 l.2 54 55 56 ? systems : begin file sandbox at line 3 57 ! Missing } inserted. 58 59 } 60 61 \endgroup 62 l.5 The Dutch \VVV\ (\infull{VVV} 63 ) can provide you with the tourist 64 ? 65 ! Emergency stop. 66 67 } 68 69 \endgroup 70 l.5 The Dutch \VVV\ (\infull{VVV} 71 ) can provide you with the tourist 72 ! ==> Fatal error occurred, no output PDF file produced!MTXrun | run 1: luatex --fmt="/Applications/ConTeXtMinimals/tex/texmf-cache/luatex-cache/context/3fc847143b06f084e10e73c8fbdf4ae2/formats/cont-en" --lua="/Applications/ConTeXtMinimals/tex/texmf-cache/luatex-cache/context/3fc847143b06f084e10e73c8fbdf4ae2/formats/cont-en.lui" --backend=pdf "/Users/rs/Desktop/Dropbox/C/ConTeXt_sandbox/sandbox.tex" 73 MTXrun | fatal error, return code: 1 ___ 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 /
Re: [NTG-context] LuaTex error "attempt to index global 'lang' (a nil value)"
@Mojca, I found that /usr/texbin was pointing to a missing directory, so this caused the problem mentioned below. I took /usr/texbin out of the $PATH and replaced it with /usr/local/texlive/2007/bin/i386-darwin -- this lets luatools --selfupdate run correctly: LuaTools | to be replaced old script /usr/local/texlive/2007/bin/i386-darwin/luatools LuaTools | checking new script /usr/local/texlive/texmf-local/scripts/context/lua/luatools.lua LuaTools | old script content replaced by new content LuaTools | LuaTools | runtime: 0.056 seconds But the old problem still persists. @Hans, I pressed enter when the original error occurs and this just gives me one more line before the script stops: l.3174 ? ../../../../src/texk/web2c/luatexdir/tex/linebreak.c:1599: failed assertion `alink(cur_p)==temp_head' LuaTools | LuaTools | runtime: 10.399 seconds @Taco, I think my core-ref.tex contains the same as yours: 3165 \def\setupbuttons 3166{\dodoubleargument\getparameters[\??bt]} 3167 3168 \definecomplexorsimpleempty\button 3169 3170 \def\complexbutton 3171{\docomplexbutton\??bt} 3172 3173 \presetlocalframed[\??bt] 3174 3175 \long\def\docomplexbutton#1[#2]#3#4% get rid of possible space before [#4] 3176{\dodocomplexbutton#1[#2]{#3}#4} % #4 == [ 3177 3178 \def\buttonframed{\dodoubleempty\localframed[\??bt]} % goodie 3179 3180 \long\def\dodocomplexbutton#1[#2]#3[#4]% #3 can contain [] -> {#3} later Anybody? Roland On 12/04/2008, Roland <[EMAIL PROTECTED]> wrote: > Hmmm this produces something funny: > > $ luatools --selfupdate > > LuaTools | to be replaced old script /usr/texbin/luatools > LuaTools | unable to locate new script > LuaTools | > LuaTools | runtime: 0.005 seconds > > Perhaps some link is wrong or I shouldn't use the alias /usr/texbin > (as installed by MacTeX)? > > > On 08/04/2008, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > > Did you try to run > >luatools --selfupdate > > ? > ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] LuaTex error "attempt to index global 'lang' (a nil value)"
Hmmm this produces something funny: $ luatools --selfupdate LuaTools | to be replaced old script /usr/texbin/luatools LuaTools | unable to locate new script LuaTools | LuaTools | runtime: 0.005 seconds Perhaps some link is wrong or I shouldn't use the alias /usr/texbin (as installed by MacTeX)? On 08/04/2008, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > Did you try to run >luatools --selfupdate > ? ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] LuaTex error "attempt to index global 'lang' (a nil value)"
yes, here goes: $ luatools --ini --verbose --compile cont-en LuaTools | version 1.1.1 - 2006+ - PRAGMA ADE / CONTEXT LuaTools | skipping configuration for /texmf-local/web2c from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/d80510d450a3fa2a64df4d3741825f1d LuaTools | skipping configuration for /texmf/web2c from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/3113242409ded67a0ad7bd508bd26609 LuaTools | locating list of /Users/rs/.texlive2007/texmf-config LuaTools | locating list of /Users/rs/.texlive2007/texmf-var LuaTools | locating list of /Users/rs/Library/texmf LuaTools | locating list of /usr/local/texlive/2007/texmf-config LuaTools | locating list of /usr/local/texlive/2007/texmf-var LuaTools | locating list of /usr/local/texlive/2007/texmf LuaTools | locating list of /usr/local/texlive/texmf-local LuaTools | locating list of /usr/local/texlive/2007/texmf-dist LuaTools | loading files for /Users/rs/.texlive2007/texmf-var from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/f1bc347f62f0cb65067c428b92016cc8 LuaTools | loading files for /Users/rs/Library/texmf from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/060f50e7db2104cfd20ae5a16b964fee LuaTools | loading files for /usr/local/texlive/2007/texmf-config from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/729867c88f88a392262749cb9c3d602b LuaTools | loading files for /usr/local/texlive/2007/texmf-var from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/8e784414cbc94d079ab302f28581fb78 LuaTools | loading files for /usr/local/texlive/2007/texmf from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/2adb941cffe60c990191225deee5cf98 LuaTools | loading files for /usr/local/texlive/texmf-local from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/1f08e3a96247a4bd25d903ca1cb00c0e LuaTools | loading files for /usr/local/texlive/2007/texmf-dist from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/caabba858325c30f4015e448eae0e0e7 LuaTools | creating initialization file cont-en LuaTools | using library path : /usr/local/texlive/texmf-local/tex/context/base LuaTools | using lua libraries: l-string.lua l-lpeg.lua l-table.lua l-boolean.lua l-number.lua l-set.lua l-unicode.lua l-md5.lua l-os.lua l-io.lua l-file.lua l-url.lua l-dir.lua l-utils.lua l-tex.lua luat-env.lua luat-lib.lua luat-inp.lua luat-tmp.lua luat-zip.lua luat-tex.lua LuaTools | using compiled initialization file cont-en.luc LuaTools | using lua initialization file cont-en.luc LuaTools | running command: luatex --ini --lua="cont-en.luc" "/usr/local/texlive/texmf-local/tex/context/base/cont-en.tex" \\dump (/usr/local/texlive/texmf-local/tex/context/base/cont-en.tex (/usr/local/texlive/texmf-local/tex/context/base/context.tex (/usr/local/texlive/texmf-local/tex/context/base/syst-pln.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-prm.tex) (/usr/local/texlive/texmf-local/tex/context/base/luat-env.tex) (/usr/local/texlive/texmf-local/tex/context/base/luat-lib.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-cat.tex (/usr/local/texlive/texmf-local/tex/context/base/syst-cat.mkiv)) (/usr/local/texlive/texmf-local/tex/context/base/syst-etx.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-pdt.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-omg.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-xtx.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-mtx.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-gen.tex loading : Context System Macros / General ) (/usr/local/texlive/texmf-local/tex/context/base/syst-ext.tex loading : Context System Macro's / Extras ) (/usr/local/texlive/texmf-local/tex/context/base/syst-chr.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-fnt.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-new.tex) (/usr/local/texlive/texmf-local/tex/context/base/syst-con.tex loading : Context System Macro's / Conversions (/usr/local/texlive/texmf-local/tex/context/base/syst-con.mkiv)) (/usr/local/texlive/texmf-local/tex/context/base/syst-var.tex loading : Context System Macro's / Variables ) (/usr/local/texlive/texmf-local/tex/context/base/syst-str.tex loading : Context System Macro's / Strings (/usr/local/texlive/texmf-local/tex/context/base/syst-str.mkiv)) (/usr/local/texlive/texmf-local/tex/context/base/syst-rtp.tex loading : Context Core Macros / Run Time Processes (/usr/local/texlive/texmf-local/tex/context/base/syst-rtp.mkiv)) (/usr/local/texlive/texmf-local/tex/context/base/supp-ini.tex loading : Context Support Macros / Initializations ) (/usr/local/texlive/texmf-local/tex/context/base/supp-fil.tex loading : Context Support Macros / Files (/usr/local/texlive/texmf-local/tex/context/base/supp-fil.mkiv)) (/usr/local/texlive/texmf-local/tex/context/base/supp-dir.tex) (/usr/local/texlive/texmf-local/tex/context/base/mult-ini.tex loading : Context Multilingual
Re: [NTG-context] LuaTex error "attempt to index global 'lang' (a nil value)"
Hi Taco, thanks for the quick reply. Something seems to work better now (no more errors about missing texmf directories) but I still get an error message after installing the new binary you pointed me to: (/usr/local/texlive/texmf-local/tex/context/base/sort-lan.tex loading : Context Sorting Macros (languages) (/usr/local/texlive/texmf-local/tex/context/base/sort-lan.mkiv))error: ...al/texlive/texmf-local/tex/context/base/node-ini.lua:345: attempt to index field 'otf' (a nil value) . l.3174 Any idea? Thanks Roland On 06/04/2008, Taco Hoekwater <[EMAIL PROTECTED]> wrote: > Roland wrote: > > Hi, > > > > I've been following Thomas Schmitz's great instructions at > > http://www.ntg.nl/pipermail/ntg-context/2007/027418.html to set up > > Luatex. All works fine and without errors but the last step: > > > > Hans and me are to blame, for not keeping the binaries on > www.luatex.org synced. Afaics, everytyhing else in Thomas' > instructions is ok, so if you fetch the binary from > > http://minimals.contextgarden.net/current/bin/luatex/ > > you should be ready to run in 'no time'. > > We will change the binary links on www.luatex.org to the new minimal > distributions on contextgarden, I think. > > Best wishes, > Taco > > ___ > 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___ > ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] LuaTex error "attempt to index global 'lang' (a nil value)"
Hi, I've been following Thomas Schmitz's great instructions at http://www.ntg.nl/pipermail/ntg-context/2007/027418.html to set up Luatex. All works fine and without errors but the last step: $ luatools --ini --verbose --compile cont-en LuaTools | version 1.1.1 - 2006+ - PRAGMA ADE / CONTEXT LuaTools | skipping configuration for /texmf-local/web2c from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/d80510d450a3fa2a64df4d3741825f1d LuaTools | skipping configuration for /texmf/web2c from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/3113242409ded67a0ad7bd508bd26609 LuaTools | locating list of /Users/rs/.texlive2007/texmf-config LuaTools | locating list of /Users/rs/.texlive2007/texmf-var LuaTools | locating list of /Users/rs/Library/texmf LuaTools | locating list of /usr/local/texlive/2007/texmf-config LuaTools | locating list of /usr/local/texlive/2007/texmf-var LuaTools | locating list of /usr/local/texlive/2007/texmf LuaTools | locating list of /usr/local/texlive/texmf-local LuaTools | locating list of /usr/local/texlive/2007/texmf-dist LuaTools | loading files for /Users/rs/.texlive2007/texmf-var from /tmp/luatex-cache/context/fcf214085bb2c4fcd9a0f9a9f0d0aecf/trees/f1bc347f62f0cb65067c428b92016cc8 [snip] loading : Context Attribute Macros / initialization systems : defining attribute mark with number 1 systems : defining attribute state with number 2 systems : defining attribute trigger with number 3 systems : defining attribute skip with number 4 systems : defining attribute penalty with number 5 systems : defining attribute colormodel with number 6 systems : defining attribute color with number 7 systems : defining attribute transparency with number 8 systems : defining attribute overprint with number 9 systems : defining attribute negative with number 10 systems : defining attribute effect with number 11 ) (/usr/local/texlive/texmf-local/tex/context/base/node-ini.tex loading : Node Support (initialization) ! LuaTeX error ...al/texlive/texmf-local/tex/context/base/node-ini.lua:506: attempt to index global 'lang' (a nil value). \ctxluabytecode ...ode " .. "#1" .. str) end end } \registerctxluafile ...{\the \luabytecodecounter } \fi l.16 \registerctxluafile{node-ini}{1.001} ? Anybody have an idea what is wrong? I'm on Leopard 10.5.2. Thanks Roland ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Seems we never posted the conclusion about this problem: XeTeX simply doesn't work with the old Mac Type 1 Postscript fonts on Mac OS X (Leopard or before). The reason is that these old fonts store their data in the resource fork, which Unix utilities like XeTeX don't see. Only TrueType or OpenType fonts will be recognised and loaded correctly. PCs don't have the data fork so old Type 1 Postscript fonts for PCs (with .pfb extension) seem to work. Just copying these to the Mac is no solution, however, because Mac OS X does not support PC-style Type 1 fonts (only the Mac ones with the data in the resource fork), and therefore XeTeX will not find these fonts. Therefore the preferred solution is to use fonts of TrueType or OpenType varieties. For those with access to a font conversion program like fondu (?) fontforge (?) or fontlab (?) it may be possible to convert the old Type 1 font to TrueType or OpenType, reinstall it and have XeTeX work with it in that way. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt XSLT plugin for MultiMarkdown> anyone know XSLT?
Hi, I have been experimenting with using standard text formats like Markdown and Multimarkdown to produce texts for multiple outputs (HTML, RTF, ConTeXt etc) The basic Markdown syntax is quite limiting; but unfortunately, the more advanced MultiMarkdown syntax does not yet have an XSLT translator available for ConTeXt. It seems that creating one is simple, but that the author needs people with more understanding of ConTeXt syntax than he has. See my request on the MultiMarkdown website http://fletcherpenney.net/Comments_on_Feature_Requests[copied below]. Anyone on the mailing list have enough understanding of XSLT and ConTeXt to help out with creating such a translator? Like the Pandoc converter, it would help to promote ConTeXt towards a broader audience... Thanks Roland Would it be difficult to also create an XSLT file for output to ConTeXt? I know it's not used as much as LaTeX but given the focus on highly customisable ouput, I find it more suitable to writing and publishing needs than LaTeX. Also, the syntax seems more consistent, therefore an XSLT file might not be all that hard to produce? There is some more info on http://tex.loria.fr/formats/context/LaTeX2ConTeXt.pdf and on http://wiki.contextgarden.net/From_LaTeX_to_ConTeXt Pandoc (an alternative for converting Markdown documents into various formats) already has ConTeXt support built in but unfortunately it does not allow multimarkdown syntax… – siros 2008-02-24 15:57 An XSLT setup can be made for any TeX derivative, since they all rely on a plain text document format. I am not too familiar with the ConTeX syntax, but I suspect most of it would be quite similar to LaTeX, and that the preamble stuff would be the biggest changes. – Fletcher Penney 2008-02-25 22:55 ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi Mojca, Sorry for the late reply. I was travelling extensively. Now I am trying to pick up this thread again -- here's the text source I used (with your latest suggestion) and the error produced (see line 100) -- still the same problem I think :-( 1 \starttypescript[serif][eco] 2 \definefontsynonym[Serif] [Eco-Regular] 3 \definefontsynonym[SerifBold] [Eco-Bold] 4 \definefontsynonym[SerifItalic][Eco-Italic] 5 \definefontsynonym[SerifBoldItalic][Eco-BoldItalic] 6 \stoptypescript 7 8 \starttypescript[serif][eco] 9 \definefontsynonym[Eco-Regular] [name:Eco101Roman][features=default] 10 \definefontsynonym[Eco-Bold] [name:Eco301Bold][features=default] 11 \definefontsynonym[Eco-Italic][name:Eco102Italic][features=default] 12 \definefontsynonym[Eco-BoldItalic][name:Eco302BoldItalic][features=default] 13 \stoptypescript 14 15 \starttypescript[eco] 16 \definetypeface[\typescriptone][rm][serif][eco][default] 17 \stoptypescript 18 19 \usetypescript[eco] 20 \setupbodyfont[eco] 21 22 \starttext 23 normal text, {\bf bold text}, {\em italic text} and {\bi bolditalic text}. 24 \stoptext 1 TeXExec | processing document 'hello.tex' 2 TeXExec | no ctx file found 3 TeXExec | tex processing method: context 4 TeXExec | TeX run 1 5 TeXExec | writing option file hello.top 6 TeXExec | using randomseed 13 7 TeXExec | tex engine: xetex 8 TeXExec | tex format: cont-en 9 This is XeTeXk, Version 3.141592-2.2-0.997 (Web2C 7.5.6) 10 \write18 enabled. 11 file:line:error style messages enabled. 12 entering extended mode 13 (./hello.tex 14 15 ConTeXt ver: 2008.01.16 13:49 MKII fmt: 2008.1.21 int: english/english 16 17 language: language en is active 18 system : cont-new loaded 19 (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.tex 20 systems : beware: some patches loaded from cont-new.tex 21 (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkii) 22 (/usr/local/context/tex/texmf-context/tex/context/base/cont-mtx.tex)) 23 system : cont-old loaded 24 (/usr/local/context/tex/texmf-context/tex/context/base/cont-old.tex 25 loading : Context Old Macros 26 ) 27 system : cont-fil loaded 28 (/usr/local/context/tex/texmf-context/tex/context/base/cont-fil.tex 29 loading : Context File Synonyms 30 ) 31 system : cont-sys.rme loaded 32 (/usr/local/context/tex/texmf-context/tex/context/user/cont-sys.rme 33 (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) 34 (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) 35 (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) 36 (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex)) 37 bodyfont: 12pt rm is loaded 38 language: patterns nl->ec:ec->1->2:3 fr->ec:ec->2->2:3 de->ec:ec->3->2: 39 3 it->ec:ec->4->2:3 pt->ec:ec->5->2:3 hr->ec:ec->6->2:3 pl->ec:ec->7->2:3 cz->e 40 c:ec->8->2:3 sk->ec:ec->9->2:3 sl->ec:ec->10->2:3 ru->ec:ec->12->2:3 en->ec:ec- 41 >13->2:3 uk->ec:ec->14->2:3 us->ec:ec->15->2:3 agr->ec:ec->16->2:3 da->ec:ec->1 42 7->2:3 sv->ec:ec->18->2:3 af->ec:ec->19->2:3 no->ec:ec->20->2:3 deo->ec:ec->21- 43 >2:3 es->ec:ec->25->2:3 ca->ec:ec->26->2:3 la->ec:ec->27->2:3 ro->ec:ec->28->2: 44 3 tr->ec:ec->29->2:3 fi->ec:ec->31->2:3 hu->ec:ec->32->2:3 loaded 45 specials: tex,postscript,rokicki loaded 46 system : hello.top loaded 47 (./hello.top 48 specials: loading definition file dpx 49 (/usr/local/context/tex/texmf-context/tex/context/base/spec-dpx.tex 50 specials: loading definition file fdf 51 (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.tex 52 (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.mkii)) 53 specials: fdf loaded 54 ) 55 specials: fdf,dpx loaded 56 specials: loading definition file xet 57 (/usr/local/context/tex/texmf-context/tex/context/base/spec-xet.tex) 58 specials: fdf,dpx loaded 59 ) (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) 60 (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) 61 (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) 62 (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex) 63 (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) 64 (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) 65 (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) 66 (/usr/local/context/tex/texmf-context/tex/context/ba
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Oh well let's try again in that case ;-) I ran the first test script and it gives the same error (see log 1). Then I went back to Wolfgang's recommended script and replaced the second typescript block with your suggested lines (the bolditalic font is called Eco302BoldItalic, by the way). This produced the errors as enclosed in log 2... Thanks again Roland == LOG 1 = TeXExec | processing document 'hello.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file hello.top TeXExec | using randomseed 166 TeXExec | tex engine: xetex TeXExec | tex format: cont-en This is XeTeXk, Version 3.141592-2.2-0.997 (Web2C 7.5.6) \write18 enabled. file:line:error style messages enabled. entering extended mode (./hello.tex ConTeXt ver: 2008.01.16 13:49 MKII fmt: 2008.1.21 int: english/english language: language en is active system : cont-new loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkii) (/usr/local/context/tex/texmf-context/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys.rme loaded (/usr/local/context/tex/texmf-context/tex/context/user/cont-sys.rme (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex)) bodyfont: 12pt rm is loaded language: patterns nl->ec:ec->1->2:3 fr->ec:ec->2->2:3 de->ec:ec->3->2: 3 it->ec:ec->4->2:3 pt->ec:ec->5->2:3 hr->ec:ec->6->2:3 pl->ec:ec->7->2:3 cz->e c:ec->8->2:3 sk->ec:ec->9->2:3 sl->ec:ec->10->2:3 ru->ec:ec->12->2:3 en->ec:ec- >13->2:3 uk->ec:ec->14->2:3 us->ec:ec->15->2:3 agr->ec:ec->16->2:3 da->ec:ec->1 7->2:3 sv->ec:ec->18->2:3 af->ec:ec->19->2:3 no->ec:ec->20->2:3 deo->ec:ec->21- >2:3 es->ec:ec->25->2:3 ca->ec:ec->26->2:3 la->ec:ec->27->2:3 ro->ec:ec->28->2: 3 tr->ec:ec->29->2:3 fi->ec:ec->31->2:3 hu->ec:ec->32->2:3 loaded specials: tex,postscript,rokicki loaded system : hello.top loaded (./hello.top specials: loading definition file dpx (/usr/local/context/tex/texmf-context/tex/context/base/spec-dpx.tex specials: loading definition file fdf (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.tex (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.mkii)) specials: fdf loaded ) specials: fdf,dpx loaded specials: loading definition file xet (/usr/local/context/tex/texmf-context/tex/context/base/spec-xet.tex) specials: fdf,dpx loaded ) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) systems : begin file hello at line 12 fonts : resetting map file list fonts : using map file: original-base fonts : using map file: lm-math fonts : using map file: lm-rm fonts : using map file: texnansi-base fonts : using map file: ec-base fonts : using map file: qx-base fonts : using map file: t5-base fonts : using map file: 8r-base fonts : using map file: original-ams-base fonts : using map file: original-ams-euler fonts : using map file: original-public-lm (/usr/local/context/tex/texmf-context/tex/context/base/sort-def.tex (/usr/local/context/tex/texmf-context/tex/context/base/sort-def.mkii)) (/usr/local/context/tex/texmf-context/tex/context/base/sort-lan.tex loading : Context Sorting Macros (languages) (/usr/local/context/tex/texmf-context/tex/context/base/sort-lan.mkii)) [1.1] systems : end file hello at line 18 system : cont-err loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-err.tex systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead stdin -> hello.pdf [1 ** ERROR ** Invalid font: -1 (1) Output file removed. ) ) (see the transcript file for additional information) Output written on hello.pdf (1 page). Transcript written on hello.log. TeXUtil | parsing file hello.tui TeXUtil | shortcuts : 169 TeXUtil | expansions: 308 TeXUtil | reductions
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi Mojca, Not quite there yet. I did manage to install the standalone ConTeXt without problems after changing the line 18 of that file. I also found the same error in setuptex, which of course prevented me from getting the right new mktexlsr and texexec onto the path... Anyway that's solved now and Textmate and the shell are calling the right distribution. Guess what -- I'm still at the original problem now: ** ERROR ** Invalid font: -1 (0) (though still using Wolfgang's suggested script). See output below. I'm getting desperate now... Thanks Roland TeXExec | processing document 'hello.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file hello.top TeXExec | using randomseed 759 TeXExec | tex engine: xetex TeXExec | tex format: cont-en This is XeTeXk, Version 3.141592-2.2-0.997 (Web2C 7.5.6) \write18 enabled. file:line:error style messages enabled. entering extended mode (./hello.tex ConTeXt ver: 2008.01.16 13:49 MKII fmt: 2008.1.21 int: english/english language: language en is active system : cont-new loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkii) (/usr/local/context/tex/texmf-context/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (/usr/local/context/tex/texmf-context/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys.rme loaded (/usr/local/context/tex/texmf-context/tex/context/user/cont-sys.rme (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex)) bodyfont: 12pt rm is loaded language: patterns nl->ec:ec->1->2:3 fr->ec:ec->2->2:3 de->ec:ec->3->2: 3 it->ec:ec->4->2:3 pt->ec:ec->5->2:3 hr->ec:ec->6->2:3 pl->ec:ec->7->2:3 cz->e c:ec->8->2:3 sk->ec:ec->9->2:3 sl->ec:ec->10->2:3 ru->ec:ec->12->2:3 en->ec:ec- >13->2:3 uk->ec:ec->14->2:3 us->ec:ec->15->2:3 agr->ec:ec->16->2:3 da->ec:ec->1 7->2:3 sv->ec:ec->18->2:3 af->ec:ec->19->2:3 no->ec:ec->20->2:3 deo->ec:ec->21- >2:3 es->ec:ec->25->2:3 ca->ec:ec->26->2:3 la->ec:ec->27->2:3 ro->ec:ec->28->2: 3 tr->ec:ec->29->2:3 fi->ec:ec->31->2:3 hu->ec:ec->32->2:3 loaded specials: tex,postscript,rokicki loaded system : hello.top loaded (./hello.top specials: loading definition file dpx (/usr/local/context/tex/texmf-context/tex/context/base/spec-dpx.tex specials: loading definition file fdf (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.tex (/usr/local/context/tex/texmf-context/tex/context/base/spec-fdf.mkii)) specials: fdf loaded ) specials: fdf,dpx loaded specials: loading definition file xet (/usr/local/context/tex/texmf-context/tex/context/base/spec-xet.tex) specials: fdf,dpx loaded ) (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-tmf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-siz.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-otf.tex) (/usr/local/context/tex/texmf-context/tex/context/base/type-xtx.tex) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) (./hello.tuo) systems : begin file hello at line 33 fonts : resetting map file list fonts : using map file: original-base fonts : using map file: lm-math fonts : using map file: lm-rm fonts : using map file: texnansi-base fonts : using map file: ec-base fonts : using map file: qx-base fonts : using map file: t5-base fonts : using map file: 8r-base fonts : using map file: o
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi Mojca, thanks for the quick answer. On 20/01/2008, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > An alternative in to use the standalone ConTeXt. For example by > downloading and running > http://minimals.contextgarden.net/setup/osx-intel/first-setup.sh and > then putting something like > . context/tex/setuptex context/tex > to .bash_profile (or executing it each time when you need it) or to > the place where TextMate can "find it" > (~/context/ is where I have saved the "first-setup.sh") I am trying this now, with first-setup.sh stored in a new /usr/local/context directory. However, when I execute the script, I get the following error: > ./first-setup.sh: line 18: platform: command not found Afterwards it does install loads of stuff, but when I take the following steps as suggested and run a context file, I get another error: > This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) > \write18 enabled. > file:line:error style messages enabled. > kpathsea: Running mktexfmt cont-en.fmt > > /usr/texbin/mktexfmt: line 336: > /usr/local/context/tex/texmf/texconfig/tcfmgr: No such file or directory > > fmtutil: config file `fmtutil.cnf' not found. > > I can't find the format file `cont-en.fmt'! > Sorry to keep bugging you about these errors all the time! Thanks for any help you might have ;-) Roland ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi Mojca, Thanks for your two answers. I guess updating my distribution is the first priority--perhaps that is causing all the errors I just posted in answer to Wolfgang's suggestion. I'll try your suggestion and then see if it works, will confirm to the mailing list once I know. Thanks Roland PS Is it always necessary to upgrade a fresh distribution immediately? I am a bit surprised that a fresh MacTex from December would already be so outdated... On 20/01/2008, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > Roland, > > I forgot two things so I should better mention some before you ask. > > First: welcome to the ConTeXt community. > Second: you need a *recent enough* ConTeXt (anything between october > 07-january 08), but if you take the latest one, then you also need the > future version of LM :) And you need a recent version of XeTeX & > xdvipdfmx. > > If you're using TeX Live's version, then: > > a) update XeTeX binaries > > compile it from sources or take it from here (you can download it > manually from http or using rsync) and replace the old binaries with > these ones: > > http://minimals.contextgarden.net/current/bin/xetex/osx-intel/bin/ >or > rsync -av > rsync://contextgarden.net/minimals/current/bin/xetex/osx-intel/bin/ > path-to-bins > > b) update ConTeXt > > many other ways to do it as well (you can take a zip from pragma) > > For example: > rsync -av rsync://contextgarden.net/minimals/current/context/2008.01.16/ > path-to-texmf-tree-with-context > you may replace 2008.01.16 with any version that you find here: > http://minimals.contextgarden.net/current/context/ > > 2008.01.16 requres new LM fonts already, older versions do not. > > c) update LM if you take too recent ConTeXt (otherwise, leave the > fonts alone) - these fonts are still a pre-release version, so you > should better take an older version of ConTeXt > > rsync -av > rsync://contextgarden.net/minimals/current/fonts/new/fonts/opentype/public/lm/ > path-to-LM > > Mojca ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi Wolfgang, Thanks, I tried this. Getting loads of error messages though, see below. They are repeated multiple times in Textmate, just once when I try to issue the command "mktextfm Eco101Roman" from the command line. 1 /usr/local/texlive/2007/texmf/web2c/mktexnam: Could not map source abbreviation E for Eco101Roman. 2 /usr/local/texlive/2007/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2007/texmf-dist/fonts/map/fontname/special.map? 3 mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Eco101Roman 4 This is METAFONT, Version 2.71828 (Web2C 7.5.6) 5 6 kpathsea: Running mktexmf Eco101Roman 7 ! I can't find file `Eco101Roman'. 8 <*> ...our; mag:=1; nonstopmode; input Eco101Roman 9 10 Please type another input file name 11 ! Emergency stop. 12 <*> ...our; mag:=1; nonstopmode; input Eco101Roman 13 14 Transcript written on mfput.log. 15 grep: Eco101Roman.log: No such file or directory 16 mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Eco101Roman' failed to make Eco101Roman.tfm. This is in a freshly installed MacTex version, producing version numbers as below: 1 This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) 2 file:line:error style messages enabled. 3 %&-line parsing enabled. 4 (WARNING: translate-file "natural.tcx" ignored) 5 entering extended mode 6 (./hello.tex 7 8 ConTeXt ver: 2007.01.12 15:56 MKII fmt: 2008.1.20 int: english/english Any idea? Thanks Roland On 20/01/2008, Wolfgang Schuster <[EMAIL PROTECTED]> wrote: > On Sun, 20 Jan 2008 11:21:32 +0100 > Roland <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I am fairly new to both ConTeXt (and XeTeX) but I've already been very > > impressed with the active user community and the amount of > > documentation available, as well as with the sheer userfriendliness of > > ConTeXt when compared to LaTeX. Now I'm trying to get into fonts, but > > activating a Postscript Type 1 font seems to go beyond my abilities > > and the wiki documentation on > > http://wiki.contextgarden.net/Fonts_in_XeTeX . Perhaps anybody can > > help? > > > > I have a Postscript type 1 font family called Eco, consisting of > > Eco101Roman, Eco102Italic, Eco301Bold and some others. FontBook shows > > these names identically as PostScript name, Full Name and Family name > > (which means Fontbook is unaware that they are a family, but this is > > not the topic here). > > > > The fonts can be used with any Mac application and they also work fine > > in a LaTeX-fontspec-XeTeX combination: the following minimal LaTeX > > file produces the text as desired in Eco101Roman. > > > > 1 %!TEX TS-program = xelatex > > 2 %!TEX encoding = UTF-8 Unicode > > 3 \documentclass[12pt]{article} > > 4 \usepackage{fontspec} > > 5 \defaultfontfeatures{Scale=MatchLowercase} > > 6 \setromanfont[Mapping=tex-text]{Eco101Roman} > > 7 \setsansfont[Mapping=tex-text]{Skia} > > 8 \setmonofont{Courier} > > 9 \author{Roland} > > 10 \title{XeTeX test} > > 11 > > 12 \begin{document} > > 13 \maketitle > > 14 \section{This is a new section} > > 15 Let's try to \emph{write} this. > > 16 > > 17 Lorem ipsum dolor sit amet, consectetur adipisicing elit, > > 40 \end{document} > > > > On ConTeXt however, I cannot get the font to be recognised. Please see > > my testfile below, in which I tried to > > (a) compile it with a self-installed TrueType font (which works) > > (b) tried to select Eco101Roman directly (which produces a ** ERROR ** > > Invalid font) and > > (c) tried to select the font through a typescript (which produces a > > "Metric (TFM) file or installed font not found.") > > > > What am I doing wrong? How can I get these fonts to work (and make > > ConTeXt treat them as a proper family too?) > > > > Looking forward to your ideas! > > Roland > > > > > > > > 1 % == > > 2 % = Various font tests = > > 3 % == > > 4 > > 5 %% TRUETYPE -- works fine > > 6 %\definetypeface[myfont][rm][Xserif][LegacySerifLT-Book] > > 7 > > 8 %% TYPE1 without typescript > > 9 %\definetypeface[myfont][rm][Xserif][Eco101Roman] > > 10 %% Produces > > 11 %% > > 12 %% [1 > > 13 %% > >
[NTG-context] Using Postscript Type 1 fonts in ConTeXt/XeTeX?
Hi, I am fairly new to both ConTeXt (and XeTeX) but I've already been very impressed with the active user community and the amount of documentation available, as well as with the sheer userfriendliness of ConTeXt when compared to LaTeX. Now I'm trying to get into fonts, but activating a Postscript Type 1 font seems to go beyond my abilities and the wiki documentation on http://wiki.contextgarden.net/Fonts_in_XeTeX . Perhaps anybody can help? I have a Postscript type 1 font family called Eco, consisting of Eco101Roman, Eco102Italic, Eco301Bold and some others. FontBook shows these names identically as PostScript name, Full Name and Family name (which means Fontbook is unaware that they are a family, but this is not the topic here). The fonts can be used with any Mac application and they also work fine in a LaTeX-fontspec-XeTeX combination: the following minimal LaTeX file produces the text as desired in Eco101Roman. 1 %!TEX TS-program = xelatex 2 %!TEX encoding = UTF-8 Unicode 3 \documentclass[12pt]{article} 4 \usepackage{fontspec} 5 \defaultfontfeatures{Scale=MatchLowercase} 6 \setromanfont[Mapping=tex-text]{Eco101Roman} 7 \setsansfont[Mapping=tex-text]{Skia} 8 \setmonofont{Courier} 9 \author{Roland} 10 \title{XeTeX test} 11 12 \begin{document} 13 \maketitle 14 \section{This is a new section} 15 Let's try to \emph{write} this. 16 17 Lorem ipsum dolor sit amet, consectetur adipisicing elit, 40 \end{document} On ConTeXt however, I cannot get the font to be recognised. Please see my testfile below, in which I tried to (a) compile it with a self-installed TrueType font (which works) (b) tried to select Eco101Roman directly (which produces a ** ERROR ** Invalid font) and (c) tried to select the font through a typescript (which produces a "Metric (TFM) file or installed font not found.") What am I doing wrong? How can I get these fonts to work (and make ConTeXt treat them as a proper family too?) Looking forward to your ideas! Roland 1 % == 2 % = Various font tests = 3 % == 4 5 %% TRUETYPE -- works fine 6 %\definetypeface[myfont][rm][Xserif][LegacySerifLT-Book] 7 8 %% TYPE1 without typescript 9 %\definetypeface[myfont][rm][Xserif][Eco101Roman] 10 %% Produces 11 %% 12 %% [1 13 %% 14 %% ** ERROR ** Invalid font: -1 (1) 15 %% 16 %% 17 %% 18 %% Output file removed. 19 20 %% TYPE1 with typescript 21 \starttypescript[serif][eco][uc] 22 \definefontsynonym [Eco-Roman]['Eco101Roman:mapping=tex-text'][encoding=uc] 23 \definefontsynonym [Eco-Italic] ['Eco102Italic:mapping=tex-text'][encoding=uc] 24 \definefontsynonym [Eco-Bold] ['Eco301Bold:mapping=tex-text'][encoding=uc] 25 \stoptypescript 26 \usetypescript[eco] 27 \definetypeface[myfont][rm][Xserif][Eco-Roman] 28 %% produces 29 %% ./hello.tex:35: Font \*myfont12ptrmtfrm*:=Eco-Roman:mapping=tex-text at 12.0pt 30 %% not loadable: Metric (TFM) file or installed font not found. 31 %% 32 33 34 \starttext 35 \switchtobodyfont[myfont,18pt] 36 \section{Testing font} 37 This is plain text \bf{This is bold text} \it{This is bold italic text} 38 39 \stoptext ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___