[NTG-context] Can't use MetaFun with mplib anymore
Dear list, Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of luatex test.tex mtxrun --script plain test.tex This is the error: >> LUATEXFUNCTIONALITY >> "mp.print(LUATEXFUNCTIONALITY)" ! Equation cannot be performed (numeric=string). MWE is below, as always. Cheers, Henri --- \directlua{ local mpkpse = kpse.new(arg[0], "mpost") local function finder(name, mode, ftype) if mode == "w" then return name else return mpkpse:find_file(name,ftype) end end local mpx = mplib.new { find_file = finder } local ret = mpx:execute[[ boolean mplib ; mplib := true ; input metafun.mp ; ]] print(ret.log) } \bye ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Framed text split over multiple pages
Is there a simple way to split a large \startframedtext environment over multiple pages. It doesn't work out of the box and I didn't find any option make it work in the wiki nor in the documentation I read. Use backgrounds or textbackgrounds. 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 webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Framed text split over multiple pages
Hi, Is there a simple way to split a large \startframedtext environment over multiple pages. It doesn't work out of the box and I didn't find any option make it work in the wiki nor in the documentation I read. Thanks. -- Romain Diss ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fwd: Question and Answer Iteration
This worked very well, thanks. I now want at the end of each chapter some questions with the chapter number in the follow-up number, and then at the end of the document a separate chapter with the answers with matching numbers. In general for a single QA section this works, but now I start distributing it over a number of chapters, the question and answer numbering seems to be an issue. Would the define require a change? % QUESTION AND ANSWER \define[1]\QuestionTextCommand {\doglobal\increment\QuestionCounter \pagereference[question:\QuestionCounter]% \doifreferencefoundelse{answer:\QuestionCounter} {\goto{#1}[answer:\QuestionCounter]} {#1}} \define[1]\AnswerTextCommand {\doglobal\increment\AnswerCounter \pagereference[answer:\AnswerCounter]% \doifreferencefoundelse{question:\AnswerCounter} {\goto{#1}[question:\AnswerCounter]} {#1}} \defineenumeration [question] [text={\black Question}, titledistance=2em, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text={\black Answer}, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\AnswerTextCommand] \defineblock[answer] % END SETUP \starttext \chapter{Chap1} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \chapter{Chap2} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \Chapter{End of Chapter Answers} \section{Answers Chapter 1} \useblocks[answer] \section{Answers Chapter 2} \useblocks[answer] \stoptext I have it working with a single chapter: % QUESTION AND ANSWER \define[1]\QuestionTextCommand {\doglobal\increment\QuestionCounter \pagereference[question:\QuestionCounter]% \doifreferencefoundelse{answer:\QuestionCounter} {\goto{#1}[answer:\QuestionCounter]} {#1}} \define[1]\AnswerTextCommand {\doglobal\increment\AnswerCounter \pagereference[answer:\AnswerCounter]% \doifreferencefoundelse{question:\AnswerCounter} {\goto{#1}[question:\AnswerCounter]} {#1}} \defineenumeration [question] [text={\black Question}, titledistance=2em, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text={\black Answer}, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\AnswerTextCommand] \defineblock[answer] % END SETUP \starttext \chapter{Chap1} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \useblocks[answer] \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXT install failing [solved]
My fault. A spurious older version of luatex too early in the search path. Became disastrous only after the luatex version in the betas changed at some point in time. However in search of the problem I stumbled on a few statements invoking a Lua error that can be avoided by safer coding, thus sparing non-programmers a problem. The error message is: /tex/texmf-context/scripts/context/lua/mtx-context.lua:1819: attempt to index a nil value (field 'filenames') originates from: elseif environment.filenames[1] or getargument("nofile") then scripts.context.timed(scripts.context.autoctx) I suggest to change this to (change highlighted) elseif environment.filenames and environment.filenames[1] or getargument("nofile") then scripts.context.timed(scripts.context.autoctx) The same applies to lines 1208, 1795, 1802 In line 1188 I recommend interchanging the operands for a more natural order; here the check is already done. local list = (name and { name }) or (environment.filenames and environment.filenames[1]) or defaultformats dr. Hans van der Meer > On 11 Mar 2019, at 22:53, Hans van der Meer wrote: > > I cannot get ConTeXt working on my other machine though I mimicked everything > there from the working one. > Installed the contextbeta with the script than try to run but this fails. See > the output from what has been done and what results. Also attached the > .bashrc setup sofar as regarding TeX. These are the same on both machines. > I am stymied of what happened here or what could be amiss. > Any pointers to the solution will be very much appreciated. > > dr. Hans van der Meer > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___