Hi, I uploaded a beta: - Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized. - All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster. - There are a couple of fixes related to marks. - There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation). - In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime. - Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like: \startitemize \startitem test \starttyping test \stoptyping \stopitem \stopitemize - Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok. - Unicode math variants (supported by xits) are supported: \mathematics { \utfchar{"2229} = \utfchar{"2229}\utfchar{"FE00} = \vsone{\utfchar{"2229}} } - Defining commands at the lua end now also handles arg only cases and has better tracing. - Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot. Hans ----------------------------------------------------------------- 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 13 jul 2011, at 22:50, Hans Hagen wrote:
Hi,
I uploaded a beta:
- Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok.
No, there must be some error in the new code, I guess, because xmlunprivatized is nil. HVDM-XML > common xml macros module $Id:: hvdm-xml.tex 112 2011-07-0##$ )) ! LuaTeX error ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:535: attempt to call upvalue 'xmlunprivatized' (a nil value) stack traceback: ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:535: in function '@tx@' ...ers/hans/Library/texmf/tex/context/base/lxml-tab.lua:895: in function '@dc@' ...ers/hans/Library/texmf/tex/context/base/lxml-tab.lua:933: in function 'serialize' ...ers/hans/Library/texmf/tex/context/base/lxml-tab.lua:882: in function <...ers/hans/Library/texmf/tex/context/base/lxml-tab.lua:881> ...ers/hans/Library/texmf/tex/context/base/lxml-tab.lua:914: in function 'xmlserialize' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:639: in function 'main' <main ctx instance>:1: in main chunk. system > tex > error on line 23 in file dvd.tex: LuaTeX error ... 13 \quittypescriptscanning 14 \stoptypescript 15 \usetypescript[typeface]\setupbodyfont[typeface,11pt]\rm 16 17 \usemodule[hvdm-dvd] % xml conversions ......... \ctxlxml #1->\directlua \zerocount {lxml.#1} \doxmlprocess ...ml:process}} {\xmlsetup {#3}{#5}} \endgroup l.23 ...processfile{dvd}{\DATALOCATION data.xml}{} % start at the dvd root node ? Hans van der Meer
On 14-7-2011 9:19, Hans van der Meer wrote:
On 13 jul 2011, at 22:50, Hans Hagen wrote:
Hi,
I uploaded a beta:
- Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok.
No, there must be some error in the new code, I guess, because xmlunprivatized is nil.
grepping unprivatized on the base path gives me hits that look ok Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hi Hans, the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour): ································································· \setuppapersize[A5][A5] \setuplayout[grid=verystrict] \setupheadertexts[{Blindtext}][{\tfb\bf \pagenumber}] \setuphead[chapter][ style=\WORD, grid=yes, ] \starttext \chapter {This is supposed to mimick a rather long chapter title as is common in German language environments; shorter titles might not look as natural as longer ones} \dorecurse{5}{\input dawkins\par} \stoptext \endinput ································································· Gridless it works ok. I’d just like to know whether this is to be taken as a bug or as a feature. Thanks a lot, Philipp On 2011-07-13 <22:50:42>, Hans Hagen wrote:
Hi,
I uploaded a beta:
- Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized.
- All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster.
- There are a couple of fixes related to marks.
- There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation).
- In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime.
- Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like:
\startitemize \startitem test
\starttyping test \stoptyping
\stopitem \stopitemize
- Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok.
- Unicode math variants (supported by xits) are supported:
\mathematics { \utfchar{"2229} = \utfchar{"2229}\utfchar{"FE00} = \vsone{\utfchar{"2229}} }
- Defining commands at the lua end now also handles arg only cases and has better tracing.
- Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot.
Hans
----------------------------------------------------------------- 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 14-7-2011 10:49, Philipp Gesang wrote:
Hi Hans,
the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour):
forget about mkii, we have a new and different mechanism \setuplayout[grid=yes] \showgrid % tolerant] \showgrid \setuppapersize[S6][S6] \starttext \setuphead[chapter][after=] \definegridsnapping[MyOne] [global,strut] \definegridsnapping[MyTwo] [local,strut] \definegridsnapping[MyThree][global,strut,top:3] \definegridsnapping[MyThree][local,strut,top:3] \setuphead[chapter][grid=MyOne] \startchapter[title={Global, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyOne] \startchapter[title={Global,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \stoptext the question is, what are reasonable defaults (many more structural elements will have a grid key) Hans ----------------------------------------------------------------- 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 2011-07-14 <11:29:29>, Hans Hagen wrote:
On 14-7-2011 10:49, Philipp Gesang wrote:
Hi Hans,
the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour):
forget about mkii, we have a new and different mechanism
Ok, thanks for the info. I’ll update my layouts then. (Btw is this new functionality described in „Layouts in Context“? I didn’t yet receive my copy and when it arrives, unfortunately, I won’t be able to look into it for another month :(. Just want to know whether I’ll miss something that important during my time away.) Best regards, Philipp
\setuplayout[grid=yes] \showgrid % tolerant] \showgrid
\setuppapersize[S6][S6]
\starttext
\setuphead[chapter][after=]
\definegridsnapping[MyOne] [global,strut] \definegridsnapping[MyTwo] [local,strut] \definegridsnapping[MyThree][global,strut,top:3] \definegridsnapping[MyThree][local,strut,top:3]
\setuphead[chapter][grid=MyOne] \startchapter[title={Global, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut, 3 Top Lines}] test \par test \par test \stopchapter
\setuphead[chapter][grid=MyOne] \startchapter[title={Global,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut,\\3 Top Lines}] test \par test \par test \stopchapter
\stoptext
the question is, what are reasonable defaults (many more structural elements will have a grid key)
Hans
----------------------------------------------------------------- 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 ___________________________________________________________________________________
On 14-7-2011 4:26, Philipp Gesang wrote:
On 2011-07-14<11:29:29>, Hans Hagen wrote:
On 14-7-2011 10:49, Philipp Gesang wrote:
Hi Hans,
the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour):
forget about mkii, we have a new and different mechanism
Ok, thanks for the info. I’ll update my layouts then. (Btw is this new functionality described in „Layouts in Context“? I didn’t yet receive my copy and when it arrives, unfortunately, I won’t be able to look into it for another month :(. Just want to know whether I’ll miss something that important during my time away.)
yes (and for sure there will me more as the mechanism evolves) Hans ----------------------------------------------------------------- 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 2011-07-14 <16:37:55>, Hans Hagen wrote:
On 14-7-2011 4:26, Philipp Gesang wrote:
On 2011-07-14<11:29:29>, Hans Hagen wrote:
On 14-7-2011 10:49, Philipp Gesang wrote:
Hi Hans,
the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour):
forget about mkii, we have a new and different mechanism
Ok, thanks for the info. I’ll update my layouts then. (Btw is this new functionality described in „Layouts in Context“? I didn’t yet receive my copy and when it arrives, unfortunately, I won’t be able to look into it for another month :(. Just want to know whether I’ll miss something that important during my time away.)
yes (and for sure there will me more as the mechanism evolves)
Hurray; now I’m already eager to get back before I leave … Philipp
Hans
----------------------------------------------------------------- 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 ___________________________________________________________________________________
On 07/13/2011 10:50 PM, Hans Hagen wrote:
Hi,
I uploaded a beta:
- Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized.
- All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster.
- There are a couple of fixes related to marks.
- There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation).
- In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime.
- Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like:
\startitemize \startitem test
\starttyping test \stoptyping
\stopitem \stopitemize
- Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok.
- Unicode math variants (supported by xits) are supported:
\mathematics { \utfchar{"2229} = \utfchar{"2229}\utfchar{"FE00} = \vsone{\utfchar{"2229}} }
- Defining commands at the lua end now also handles arg only cases and has better tracing.
- Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot.
Hans
Hi Hans, my xml files seem to run OK (I just did a few experiments). However, there is a problem with the new project structure code. My book project is set up like a proper ConTeXt project, and with the new version, context has lost the ability to compile single components. context mycomponent will compile the entire document, and then append the single mycomponent at the end of the document. That can't be right... Thomas
On 14-7-2011 4:47, Thomas A. Schmitz wrote:
will compile the entire document, and then append the single mycomponent at the end of the document. That can't be right...
Can you check with: \enabletrackers[system-jobfiles] and see what gets reported? In the past there was no real push/pop of states, although the meaning of (say) \component depended in the current \start*; now we're bit more restrictive. So, the question is: what is missing. (also see http://www.pragma-ade.com/show-mag-13.htm) Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Am 14.07.2011 um 17:24 schrieb Hans Hagen:
(also see http://www.pragma-ade.com/show-mag-13.htm)
So it's recommended to load the \environment before the \start- \stopcomponent and \start- \stopproduct? So far I've done it vice versa, but this changes my page break. Greeting Andreas
On 14-7-2011 6:07, Andreas Harder wrote:
Am 14.07.2011 um 17:24 schrieb Hans Hagen:
(also see http://www.pragma-ade.com/show-mag-13.htm)
So it's recommended to load the \environment before the \start- \stopcomponent and \start- \stopproduct?
you can do both ... the advantage of doing it before is that when you set the bodyfont it will avoid loading the defaults first (which is triggered by \startcomponent, \startproduct and \starttext if no bodyfont has been defined) which makes the run slightly faster
So far I've done it vice versa, but this changes my page break.
then there is something wrong with your style ----------------------------------------------------------------- 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 Wed, 13 Jul 2011, Hans Hagen wrote:
- Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like:
Great. Recently I had added a similar functionality to t-vim using the key 'trimspaces=on|off'. I'll change that to 'frontstripped' to be consistent with the core. Aditya
On Thu, 14 Jul 2011, Aditya Mahajan wrote:
On Wed, 13 Jul 2011, Hans Hagen wrote:
- Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like:
Great. Recently I had added a similar functionality to t-vim using the key 'trimspaces=on|off'. I'll change that to 'frontstripped' to be consistent with the core.
There is no option frontstripped. buff-ver does have a 'strip' option, but looking at the corresponding lua code, I don't think that it can work: local function filter(lines,settings) local strip = settings.strip if strip == v_yes then lines = realign(lines,strip) end ... end This means that when realign is called, strip = v_yes. But, realign function is defined as local function realign(lines,forced_n) -- no, auto, <number> forced_n = (forced_n == v_auto and huge) or tonumber(forced_n) if forced_n then ... end return lines end Since, forced_n is always true when realign is called, the original lines are not changed. Hans, did you mean if not (strip == v_no) then in the filter function? Aditya
On 18-7-2011 10:31, Aditya Mahajan wrote:
On Thu, 14 Jul 2011, Aditya Mahajan wrote:
On Wed, 13 Jul 2011, Hans Hagen wrote:
- Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like:
Great. Recently I had added a similar functionality to t-vim using the key 'trimspaces=on|off'. I'll change that to 'frontstripped' to be consistent with the core.
There is no option frontstripped. buff-ver does have a 'strip' option, but looking at the corresponding lua code, I don't think that it can work:
local function filter(lines,settings) local strip = settings.strip if strip == v_yes then lines = realign(lines,strip) end ... end
This means that when realign is called, strip = v_yes. But, realign function is defined as
local function realign(lines,forced_n) -- no, auto, <number> forced_n = (forced_n == v_auto and huge) or tonumber(forced_n) if forced_n then ... end return lines end
Since, forced_n is always true when realign is called, the original lines are not changed.
Hans, did you mean
if not (strip == v_no) then
in the filter function?
I cleaned up that bit. So now we have: \starttext test (automatic based on spaces before \stop...): \starttyping test test test test test test \stoptyping test (key controlled): \starttyping[strip=yes] test test test test test test \stoptyping test \startbuffer[x] test test test test test test \stopbuffer \typebuffer[x][strip=yes] test \typebuffer[x][strip=8] test \stoptext -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (7)
-
Aditya Mahajan
-
Andreas Harder
-
Christian
-
Hans Hagen
-
Hans van der Meer
-
Philipp Gesang
-
Thomas A. Schmitz