[dev-context] Line endings with \starttypescript
Hi, This question is motivated by a question of TeX.SE (https://tex.stackexchange.com/questions/549725/context-strange-issue-with-typescript). Basically, the OP defined \starttypescriptcollection[fira] ... \stoptypescriptcollection \setuphead[section][style={\switchtobodyfont[fira,sans]}] \starttext \section{section 1} \section{section 2} \section{section 3} \stoptext and found that the first section was indented. As Wolfgang explained in a comment, this happens because of the newlines at the end of each \definesynonym in \starttypescriptcollection. Wolfgang also explained how to avoid this error. I am wondering if it makes sense to change the definition of \starttypescriptcollection or \starttypescript so that newlines are automatically ignored (similar to \startsetups). Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Light colors in colo-imp-rgb.mkiv
On Mon, 8 Jun 2020, Hans Hagen wrote: On 6/8/2020 7:36 AM, Aditya Mahajan wrote: Hi, The 'light' colors defined in colo-imp-rgb.mkiv are not light! \definecolor [lightred] [r=1, g=0, b=0] \definecolor [lightgreen] [r=0, g=1, b=0] \definecolor [lightblue] [r=0, g=0, b=1] \definecolor [lightcyan] [r=0, g=1, b=1] \definecolor [lightmagenta] [r=1, g=0, b=1] \definecolor [lightyellow] [r=1, g=1, b=0] hm, a compatibility thing Is this intentional? How about replacing them with somewhat reasonable defaults? \definecolor [lightred] [r=1, g=0.5, b=0.5] \definecolor [lightgreen] [r=0.5, g=1, b=0.5] \definecolor [lightblue] [r=0.75, g=1, b=1] \definecolor [lightcyan] [r=0.5, g=1, b=1] \definecolor [lightmagenta] [r=1, g=0.5, b=1] \definecolor [lightyellow] [r=1, g=1, b=0.5] See attached output. These are not the ideal choices in terms of shades, but I have chosen values which are least subjective and still give reasonable shades. your blue is kind of weird .. 0.5(blue,white) does look like light blue to it, but it is better than 1.0(blue) :-) this is the metapostisch way: \definecolor [lightred] [.5(red,white)] \definecolor [lightgreen][.5(green,white)] \definecolor [lightblue] [.5(blue,white)] \definecolor [lightcyan] [.5(cyan,white)] \definecolor [lightmagenta] [.5(magenta,white)] \definecolor [lightyellow] [.5(yellow,white)] which i bet you prefer Much nicer. Thanks, Aditya___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Light colors in colo-imp-rgb.mkiv
Hi, The 'light' colors defined in colo-imp-rgb.mkiv are not light! \definecolor [lightred] [r=1, g=0, b=0] \definecolor [lightgreen][r=0, g=1, b=0] \definecolor [lightblue] [r=0, g=0, b=1] \definecolor [lightcyan] [r=0, g=1, b=1] \definecolor [lightmagenta] [r=1, g=0, b=1] \definecolor [lightyellow] [r=1, g=1, b=0] Is this intentional? How about replacing them with somewhat reasonable defaults? \definecolor [lightred] [r=1,g=0.5, b=0.5] \definecolor [lightgreen][r=0.5, g=1, b=0.5] \definecolor [lightblue] [r=0.75, g=1, b=1] \definecolor [lightcyan] [r=0.5, g=1, b=1] \definecolor [lightmagenta] [r=1,g=0.5, b=1] \definecolor [lightyellow] [r=1,g=1, b=0.5] See attached output. These are not the ideal choices in terms of shades, but I have chosen values which are least subjective and still give reasonable shades. Aditya colo-test.pdf Description: Adobe PDF document ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typo in mp-tool
--- /opt/luametatex/texmf-context/metapost/context/base/mpiv/mp-tool.mpiv 2020-01-01 13:22:40.0 -0500 +++ mp-tool.mpiv2020-02-28 22:24:09.527072792 -0500 @@ -641,7 +641,7 @@ addto currentpicture also pattern ; addto currentpicture also shape ; fi ; -currentpicture := currentpicture shifted - centrum ; +currentpicture := currentpicture shifted centrum ; endgroup ; ) enddef; ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Adding before and after keys to setupcaption
Hi Hans, There have been a few questions on TeX.SX asking essentially for a frame around a float that covers both the caption and the content. 1. https://tex.stackexchange.com/questions/25180/adding-a-frame-and-background-color-to-floats-in-context/37128#37128 2. https://tex.stackexchange.com/questions/457412/context-place-rules-above-and-below-floating-figure I have provided a hacky solutions to both questions (the internals changed quite a bit between the two questions), but as I was playing around with the code, I thought that the simplest solution will be to add a `before` and an `after` key to `\setupcaptions`: \def\strc_floats_build_box {\global\setbox\floatbox\vbox % pack ? probably not {\strc_floats_set_local_hsize \forgetall \ifconditional\c_floats_store_minimal_package \strc_floats_build_box_separate_make \else % \let\floatcaptionarrangement\s!default \let\floatcaptionarrangement\v!bottom % for Alan \processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step \floatcaptionparameter\c!before %AM: Added \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname \lastnamedcs \else \strc_floats_build_box_default \fi \floatcaptionparameter\c!after %AM: Added \fi}} A simple usage example is the following: \setupexternalfigures[location={local,global,default}] \setupcaption [ before={\startframedtext[widht=fit, background=color, backgroundcolor=gray, frame=off]}, after=\stopframedtext, ] \starttext \section{A figure with rules} \startplacefigure[location={left,high},title={A dutch cow}] \externalfigure[cow] \stopplacefigure \input knuth \startplacefigure[title={\input zapf \relax}] \externalfigure[cow] \stopplacefigure \dorecurse{4}{\input knuth \endgraf} \stoptext Does it make sense to add this or something similar? Thanks, Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typo in data-crl and data-sch
Hi, There was a pull request on the github mirror of context sources about a typo in the curl template in data-crl.lua and data-sch.lua https://github.com/contextgarden/context-mirror/pull/1/commits/02e9affa92bc7d23feddae03b34b7bebbe652cf1 There should be no space in `-- insecure` flag. Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typo in tabl-tab.mkiv
There is a typo in tabl-tab.mkiv: Line 1075 should be \let\tabl_tabulate_insert_foot\tabl_tabulate_insert_foot_content (note **foot_content** instead of **head_content**) Thanks, Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typo in page-brk.mkiv
Line 507: \pagecheckparameter should be \pagecheckerparameter Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] mathpairs
On Sun, 6 Aug 2017, Hans Hagen wrote: On 8/5/2017 6:53 AM, Aditya Mahajan wrote: On Sat, 5 Aug 2017, Aditya Mahajan wrote: := \colonequals =: \equalscolon BTW, should we remove the definitions of \colonequals, \equalcolons, and \minuscolon from math-def.mkiv? i'll comment them ... how about the others .. Thanks. \coloncolonequals can also be commented (it is 0x2A74). We can also create a mathpair for this. * :: (0x3A, 0x3A) -> 0x2237 * ::- (0x2237, 0x2D) -> 0x2A74. i can make them into virtual characters if needed .. or do they need to be added to unicode (given that we have proof of usage, in that case we can ask barbara) I don't see the usage of other \colon... symbols (at least in my sub-field of mathematics). For consistency with others, we can convert them into virtual characters. Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] mathpairs
On Sat, 5 Aug 2017, Aditya Mahajan wrote: := \colonequals =: \equalscolon BTW, should we remove the definitions of \colonequals, \equalcolons, and \minuscolon from math-def.mkiv? Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Solarized colors
On Sun, 12 Feb 2017, Hans Hagen wrote: On 2/12/2017 6:05 AM, Aditya Mahajan wrote: Hi, I am wondering if there is any interest in adding solarized colors to the core. I am attaching colo-imp-solarized.mkiv file. (Essentially the same file will work in MkII). For those who do not know, solarized (http://ethanschoonover.com/solarized) is a 16 color palatte designed with a precise LAB lightness between the colors and is supposed to work well in a variety of lighting conditions. file added Thanks. Aditya ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
[dev-context] Solarized colors
Hi, I am wondering if there is any interest in adding solarized colors to the core. I am attaching colo-imp-solarized.mkiv file. (Essentially the same file will work in MkII). For those who do not know, solarized (http://ethanschoonover.com/solarized) is a 16 color palatte designed with a precise LAB lightness between the colors and is supposed to work well in a variety of lighting conditions. I have named the colors such that loading this will override the default color values of yello, orange, red, magenta, violet, blue, cyan, and green (X11 does the same, but X11's color definitions match the default). Another option is to either use CamelCase names or names such as 'solarizedYellow', etc. If you think that it is not worth having such small color palattes in the core, then I can create a separate module that collects these. Aditya%D \module %D [file=colo-imp-solarized, %D version=2017.02.10, %D title=\CONTEXT\ColorMacros, %Dsubtitle=Solarized, %D author=AdityaMahajan, %D ] %D Colors based on solarized scheme %D \hyphenatedurl{http://ethanschoonover.com/solarized} \startprotectedcolors \definecolor[base03] [h=002b36] \definecolor[base02] [h=073642] \definecolor[base01] [h=586e75] \definecolor[base00] [h=657b83] \definecolor[base0] [h=839496] \definecolor[base1] [h=93a1a1] \definecolor[base2] [h=eee8d5] \definecolor[base3] [h=fdf6e3] \definecolor[yellow] [h=b58900] \definecolor[orange] [h=cb4b16] \definecolor[red] [h=dc322f] \definecolor[magenta] [h=d33682] \definecolor[violet] [h=6c71c4] \definecolor[blue][h=268bd2] \definecolor[cyan][h=2aa198] \definecolor[green] [h=859900] \stopprotectedcolors ___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] local allocation in ConTeXt
On Tue, 27 Dec 2016, Sašo Živanović wrote: I'm the author of a PGF/TikZ-based LaTeX package Forest for drawing (linguistic) trees. I have received several requests to support ConTexT and I'm trying to do that now. Thank you for trying to port your code to ConTeXt. Although I don't foresee that I will use the forest package, I do use pgfplots quite a lot and appreciate the extra effort put in by the package authors to support two different macro packages. Forest uses a lot of \boxes. Actually, the number of boxes used cannot be known in advance, as it depends on the document. Here's why: Forest's main job is to place the nodes of a tree so that they don't overlap and to do that, it needs to first typeset the individual nodes and measure them. The typeset nodes are kept around and later used when typesetting the entire tree. I don't have an answer to your questions, but I am replying partly to bump this thread again. The typeset nodes are kept in "local" boxes. They are created using \locbox, which is defined either by plain eTeX format or package elocalloc.sty for LaTeX >2015. (Prior to LaTeX 2015, \locbox was defined in etex.sty.) elocalloc.sty's \locbox is somewhat broken, but still works, mainly because it seems no other package is using local allocation. ;-) Let me see if I understand this correctly. You are asking how to define a macro, \locbox, such that the following code should not change the value of \c_syst_last_allocated_box. \bgroup \locbox\BoxOne \locbox\BoxTwo \BoxOne\hbox{Box One} \BoxTow\hbox{Box Two} % Do some measurement based on the size of the boxes \egroup The fact that a LaTeX package implements this behaviour by allocating local box numbers from the end seems to be an implementation detail. I don't know the best way to implement such a macro in ConTeXt, but I want to make sure that the user-level behavior that you want is properly understood. Given the details in your question, one can easily lose the forest for the trees (pun intended :-) Aditya___ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] scrn-but.lua
On Sun, 8 Nov 2015, Wolfgang Schuster wrote: Hi, there is a misspelled "data" variable. local function registerbuttons(tag,register,language) local data = sorters.definitions[language] - local orders = daya and data.orders or sorters.definitions.default.orders + local orders = data and data.orders or sorters.definitions.default.orders local tag = tag == "" and { "" } or { tag } for i=1,#orders do local order = orders[i] context.menubutton(tag,f_two_colon(register,order),order) end end I am not too familiar with the lua toolchain, but would it be possible to run a lua static analyzer (such as luacheck https://github.com/mpeterv/luacheck) on the context sources? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] live.contextgarden.net
On Wed, 23 Sep 2015, Taco Hoekwater wrote: On 23 Sep 2015, at 17:45, Aditya Mahajan <adit...@umich.edu> wrote: I am in favor of changing the default to mkiv, but it does mean that some of the mkii only examples might no longer compile and we will need to manually add "mode=mkii" to them. Yes. But then, at the meeting we decided that the wiki should be mkiv, with mkii only mentioned as a footnote (where applicable) so most pages need to be edited anyway. I agree. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typo in page-set.mkiv
In the definition: \def\page_set_setup[#1][#2][#3]% {\ifthirdargument \unexpanded\def\page_set_setup_step##1% {\doifelse{##1}\v!each {\dorecurse{\namedcolumnsetparameter{#1}\c!n}{\page_set_setup_step\recurselevel}} {\normalexpanded{\page_set_setup_saved[#1:\recurselevel]}[#3]}}% \processcommalist[#2]\page_set_setup_step \else \page_set_setup_saved[#1][#2]% \fi} #1:\recurselevel should be replaced by #1:##1 Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Merging font support modules
Hi everyone, I was browsing through the third party modules, and noticed that there are a few packages that provide typescripts for fonts. I think that it will be worthwhile to clean up and merge these modules, so as to reduce the amount of clutter. I am listing all the font related modules below, and asking if these are still needed; or should some of these be moved to an obsolete/ branch or merged with other modules. - Chinese font support (by Wolfgang Schuster; provides fonts, perhaps merge with cwTeX font module, also by Wolfgang) - GFSDidot Opentype fonts (I cannot browse through that! Should this be moved to obsolete branch?) - Greek (by Thomas Schmitz; provides fonts as well as typescripts, so this module cannot be merged) - Storm font support (Again, I cannot browse through that. Should this be moved to obsolete branch?) - Lucida bright font support (by Vit Zyka: do we still need these support files, or can this be moved to obsolete?) - Support for cwTeX fonts (by Wolfgang Schuster provides fonts and typescripts. Can this be merged with Chinese font support?) - Typescript (by Wolfgang Schuster, provides typescripts for a variety of fonts. I think that all modules that only distribute font typescripts should be merged with this one.) - URW Garamond support (by Peter Münster; is this still needed? If so, this should be merged with the typescript module) - URW Gothic support (by Taco Hoekwater; is this still needed? If so, this should be merged with the typescript module). What do others feel about such pruning and merging of packages? Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Texexec help message
On Wed, 28 Nov 2012, Hans Hagen wrote: On 11/27/2012 9:37 PM, Aditya Mahajan wrote: It appears that a `.join` or `.to_s` method is missing somewhere. can you patch r ' ' + s.to_s in line 736 (a pretty weird situation if that changed in ruby; on my system that patch is not needed; ruby version 1.8.6) I use ruby 1.9.3p286 (2012-10-12 revision 37165) [i686-linux] and it does appear to be due to a change in the Array class. See http://stackoverflow.com/a/3960429/193149 http://nuclearsquid.com/writings/ruby-1-9-what-s-new-what-s-changed/ (search for to_s) The bug is not in line 736. If I change that line to r ' ' (an extreme case always helps testing), I get texexec --help --all TeXExec | [version 6.2.1 - 1997-2009 - PRAGMA ADE/POD] TeXExec | [--checkcheck versions] TeXExec | [--figures generate overview of figures] TeXExec | [--listing list of file content] TeXExec | [--make make formats] TeXExec | [--modules generate module documentation] TeXExec | [--mpgraphicprocess mp file to stand-alone graphics] TeXExec | [--mpstatic process mp/ctx file to stand-alone graphics] TeXExec | [--mptexprocess mp file] TeXExec | [--mpxtex process mpx file] TeXExec | [--pdfarrange impose pages (booklets)] TeXExec | [--pdfcombine combine multiple pages] TeXExec | [--pdfcopy copy pages from file(s)] TeXExec | [--pdfselectselect pages from file(s)] TeXExec | [--pdfsplit split file in pages] TeXExec | [--pdftrim trim pages from file(s)] TeXExec | [--process process file] TeXExec | [] TeXExec | [boolean switches:] TeXExec | [] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [] TeXExec | [] TeXExec | [string switches:] TeXExec | [] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] TeXExec | [ ] So, the `s` part is being formatted correctly, the brackets are coming from somewhere else. I tested by changing report function in base/logger.rb, and if I change line 50 to message = str.first.join(' ') then texexec --help --all gives TeXExec | --checkcheck versions TeXExec | --figures generate overview of figures TeXExec | --listing list of file content TeXExec | --make make formats TeXExec | --modules generate module documentation TeXExec | --mpgraphicprocess mp file to stand-alone graphics TeXExec | --mpstatic process mp/ctx file to stand-alone graphics TeXExec | --mptexprocess mp file TeXExec | --mpxtex process mpx file TeXExec | --pdfarrange impose pages (booklets) TeXExec | --pdfcombine combine multiple pages TeXExec | --pdfcopy copy pages from file(s) TeXExec | --pdfselectselect pages from file(s) TeXExec | --pdfsplit split file in pages TeXExec | --pdftrim trim pages from file(s) TeXExec | --process process file TeXExec | TeXExec | boolean switches: TeXExec | TeXExec | allpatterns alpha arrange automprun autopath TeXExec | autopdf batchmode beta centerpage color TeXExec | combine draft fast final forcempy TeXExec | forcetexutil forcexml foxet fullscreen globalfile TeXExec | keep local markings mkii mkiv TeXExec | mpyforce noarrange nobackend nobanner noctx TeXExec | noduplex nomapfiles nompmode nomprun nonstopmode TeXExec | nooptionfile notparanoid once paranoid pretty TeXExec | purge purgeall screensaver simplerun synctex TeXExec | texutil utfbom verbose xpdf TeXExec | TeXExec | string switches: TeXExec | TeXExec | addempty arguments backend background backspace TeXExec | bannerheight bodyfont boxtype combination ctxfile TeXExec | distribution endcolumn endline engine environments TeXExec | filename filters input interface language TeXExec | logfile mainlanguage method mode modefile TeXExec | modes mpsformats output pages paperformat TeXExec | paperoffset passon path pdftitle printformat TeXExec | progname randomseed response result runs TeXExec | scale selection separation setuppath startcolumn TeXExec | startline suffix tempdir texformats textwidth TeXExec | timeout topspace usemodules Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Texexec help message
texexec --help --all gives TeXExec | [--checkcheck versions] TeXExec | [--figures generate overview of figures] TeXExec | [--listing list of file content] TeXExec | [--make make formats] TeXExec | [--modules generate module documentation] TeXExec | [--mpgraphicprocess mp file to stand-alone graphics] TeXExec | [--mpstatic process mp/ctx file to stand-alone graphics] TeXExec | [--mptexprocess mp file] TeXExec | [--mpxtex process mpx file] TeXExec | [--pdfarrange impose pages (booklets)] TeXExec | [--pdfcombine combine multiple pages] TeXExec | [--pdfcopy copy pages from file(s)] TeXExec | [--pdfselectselect pages from file(s)] TeXExec | [--pdfsplit split file in pages] TeXExec | [--pdftrim trim pages from file(s)] TeXExec | [--process process file] TeXExec | [] TeXExec | [boolean switches:] TeXExec | [] TeXExec | [ allpatterns alpha arrange automprun autopath] TeXExec | [ autopdf batchmode beta centerpage color] TeXExec | [ combine draft fast final forcempy] TeXExec | [ forcetexutil forcexml foxet fullscreen globalfile] TeXExec | [ keep local markings mkii mkiv] TeXExec | [ mpyforce noarrange nobackend nobanner noctx] TeXExec | [ noduplex nomapfiles nompmode nomprun nonstopmode] TeXExec | [ nooptionfile notparanoid once paranoid pretty] TeXExec | [ purge purgeall screensaver simplerun synctex] TeXExec | [ texutil utfbom verbose xpdf] TeXExec | [] TeXExec | [string switches:] TeXExec | [] TeXExec | [ addempty arguments backend background backspace] TeXExec | [ bannerheight bodyfont boxtype combination ctxfile] TeXExec | [ distribution endcolumn endline engine environments] TeXExec | [ filename filters input interface language] TeXExec | [ logfile mainlanguage method mode modefile] TeXExec | [ modes mpsformats output pages paperformat] TeXExec | [ paperoffset passon path pdftitle printformat] TeXExec | [ progname randomseed response result runs] TeXExec | [ scale selection separation setuppath startcolumn] TeXExec | [ startline suffix tempdir texformats textwidth] TeXExec | [ timeout topspace usemodules] It appears that a `.join` or `.to_s` method is missing somewhere. ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] typo is spac-ali
\let\startmidaligned \startmiddlealigned \let\stopmidaligned \stopmiddlealignment \let\startcenteraligned\startmiddlealigned \let\stopcenteraligned \stopmiddlealignment The \stopmiddlealignment should be changed to \stopmiddlealigned. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Error while updating to new beta
Hi, When compiling the format in the new beta, I get the following error: loading ConTeXt File Macros / Job Handling ! LuaTeX error ...d/src/tex/texmf-context/tex/context/base/l-table.lua:106: C stack overflow stack traceback: ...d/src/tex/texmf-context/tex/context/base/l-table.lua:106: in function 'sortedkeys' ...d/src/tex/texmf-context/tex/context/base/l-table.lua:156: in function 'sortedpairs' .../src/tex/texmf-context/tex/context/base/data-pre.lua:168: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 ... .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/data-pre.lua:177: in function .../src/tex/texmf-context/tex/context/base/data-pre.lua:165 .../src/tex/texmf-context/tex/context/base/file-job.lua:570: in function 'code' .../src/tex/texmf-context/tex/context/base/util-lua.lua:130: in function 'loadedluacode' .../src/tex/texmf-context/tex/context/base/luat-env.lua:285: in function 'luafilechunk' .../src/tex/texmf-context/tex/context/base/luat-cod.lua:45: in function 'registercode' main ctx instance:1: in main chunk. system tex error on line 20 in file /home/adityam/Software/context-pkgbuild/src/tex/texmf-context/tex/context/base/file-job.mkvi: LuaTeX error ... 10 %C This module is part of the \CONTEXT\ macro||package and is 11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12 %C details. 13 14 %D This module is still to be split and documented. 15 16 \writestatus{loading}{ConTeXt File Macros / Job Handling} 17 18 \unprotect 19 20 \registerctxluafile{file-job}{1.001} 21 22 % processing 23 24 \unexpanded\def\doifinputfileelse#name% 25 {\ctxcommand{doifinputfileelse(#name)}} 26 27 \unexpanded\def\processfile#name% 28 {\ctxcommand{processfile(#name)}} 29 30 % path control \registerctxluafile ...ua.registercode(#1,#2)} l.20 \registerctxluafile{file-job}{1.001} ? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Error while updating to new beta
On Mon, 15 Oct 2012, Hans Hagen wrote: On 15-10-2012 23:16, Aditya Mahajan wrote: Hi, When compiling the format in the new beta, I get the following error: weird: I've added this to core-job local function toppath() local pathname = dirname(inputstack[#inputstack] or ) if pathname == then return . else return pathname end end resolvers.toppath = topath resolvers.prefixes.toppath = function(str) return cleanpath(joinpath(toppath(),str)) end local function process(what,name) local depth = #typestack local process -- name = resolvers.resolve(name) but that should be harmless. (On my machine the format is made.) What if you comment name = resolvers.resolve(name) Same error. But if I comment the definition of resolvers.prefixes.toppath, the error goes away. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] 2 patches for grph-inc
On Thu, 13 Sep 2012, Peter Münster wrote: On Fri, Sep 07 2012, Aditya Mahajan wrote: + \edef\current_width{\externalfigureparameter\c!width}% + \edef\current_height{\externalfigureparameter\c!height}% + \def\nocrap##1{\doifnotemptyvalue{##1}{% + \the\dimexpr\csname##1\endcsname\relax}}% It is better to use a more meaningful name. This can be a general macro that will be useful outside of the figure inclusion code as well. Ok. What about \scratch_current_width, \scratch_current_height, \scratch_nocrap ? Or something similar... Hans already added a generic function \setemeasure to syst-aux, that can be used here. Note that a simple \doifnotemptyvalue is not enough. I can pass values like 'fit', 'max', etc to height and width keys, so you must check if what is being passed is a dimension before calling \dimexpr. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] 2 patches for grph-inc
On Fri, 7 Sep 2012, Peter Münster wrote: 2.) To avoid crap in the width and height options: --8---cut here---start-8--- --- grph-inc.mkiv~ 2012-07-20 23:26:52.0 +0200 +++ grph-inc.mkiv 2012-08-01 00:02:23.851094854 +0200 @@ -293,6 +293,10 @@ % \the\t_grph_include_local_settings \dostarttagged\t!image\empty + \edef\current_width{\externalfigureparameter\c!width}% + \edef\current_height{\externalfigureparameter\c!height}% + \def\nocrap##1{\doifnotemptyvalue{##1}{% + \the\dimexpr\csname##1\endcsname\relax}}% It is better to use a more meaningful name. This can be a general macro that will be useful outside of the figure inclusion code as well. \ctxlua{figures.push { name = \p_grph_include_name, label = \p_grph_include_label, @@ -312,8 +316,8 @@ resolution = \externalfigureparameter\c!resolution, color = \internalspotcolorparent{\externalfigureparameter\c!color}, % hack is needed [repeat] = \externalfigureparameter\c!repeat, -width = \externalfigureparameter\c!width, % can be crap -height = \externalfigureparameter\c!height, % can be crap +width = \nocrap{current_width}, % no more crap +height = \nocrap{current_height}, % no more crap } }% Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Adding setuvalue etc to syst-gen.mkii
Hi Hans. Can you add the following block of macros from syst-aux.mkiv to syst-gen.mkii? \def\setuvalue#1{\normalprotected\expandafter \def\csname#1\endcsname} \def\setuevalue #1{\normalprotected\expandafter\edef\csname#1\endcsname} \def\setugvalue #1{\normalprotected\expandafter\gdef\csname#1\endcsname} \def\setuxvalue #1{\normalprotected\expandafter\xdef\csname#1\endcsname} I wonder how long should I support MkII for my modules? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Change preset to setups in page-lay.mkiv
Hi, \setuplayouts has a preset option, which is used for specifying setups. This is the only instance where preset is used to specify setups. All other uses of preset is in layers. I think that it will be more consistent to change that option to setups. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Local settings for frame borders
On Mon, 28 May 2012, Wolfgang Schuster wrote: Am 28.05.2012 um 16:40 schrieb Marco: On 2012-05-23 Marco net...@lavabit.com wrote: I improved the code. There is no interference any more and no strange offsets. One thing is still unsolved: The top/bottom/…rulethickness settings are not inherited from rulethickness (see the table example at the end). This breaks the compilation if only rulethickness is provided but not toprulethicknes and bottomrulethickness. I don't know how to fix that. That's not what users expect and is a bug. Add these setups to the module (there is no need for the braces): \setupTABLE [ \c!left\c!rulethickness=\framedparameter\c!rulethickness, \c!left\c!framecolor=\framedparameter\c!framecolor] \setupTABLE [ \c!right\c!rulethickness=\framedparameter\c!rulethickness, \c!right\c!framecolor=\framedparameter\c!framecolor] \setupTABLE [ \c!top\c!rulethickness=\framedparameter\c!rulethickness, \c!top\c!framecolor=\framedparameter\c!framecolor] \setupTABLE [\c!bottom\c!rulethickness=\framedparameter\c!rulethickness,\c!bottom\c!framecolor=\framedparameter\c!framecolor] I made some more changes at https://github.com/adityam/context-fences-extra Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Local settings for frame borders
On Mon, 28 May 2012, Wolfgang Schuster wrote: I made also a few modifications on Marcos code, maybe a few of them should be moved to the core. It would be also a good idea to change the name of the module to meta-imp-frame.mkiv or something similar. In that case, we also need to change local and tight to \v!local and \v!tight (and define a variable for tight). Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Including gif images from the web
Hi, Inclusion of gif images from the web does not work. For example: \starttext \externalfigure[http://upload.wikimedia.org/wikipedia/commons/a/a0/Sunflower_as_gif_websafe.gif] \stoptext It is a rather strange bug. In grph-inc.lua we have local newbase = file.addsuffix(newbase,newformat) local newname = file.join(newpath,newbase) Now, since the webaddress has a dot, newbase has a dot. file.addsuffix does not change the suffix if a file already has a suffix (and does not give any warning about it!). So, newname does not end with .pdf, and therefore gm convert long-path.gif long-path does not convert to pdf--the resultant file is a gif file. Hence, direct inclusion of that file fails. A simple fix is to change the addsuffix line to: newbase = newbase .. . .. newformat Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Local settings for frame borders
On Wed, 23 May 2012, Wolfgang Schuster wrote: Am 23.05.2012 um 15:41 schrieb Marco: And here we go again, including the file. You can replace \the\dimexpr\framedparameter{…} with \frameddimension{…} In my tests that was failing. IIRC, that was because rulethickness is equal to \linewidth, which is a \dimen register. To be usable in MP, we need \the\linewidth. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Local settings for frame borders
On Wed, 23 May 2012, Wolfgang Schuster wrote: Am 23.05.2012 um 16:30 schrieb Aditya Mahajan: On Wed, 23 May 2012, Wolfgang Schuster wrote: Am 23.05.2012 um 15:41 schrieb Marco: And here we go again, including the file. You can replace \the\dimexpr\framedparameter{…} with \frameddimension{…} In my tests that was failing. IIRC, that was because rulethickness is equal to \linewidth, which is a \dimen register. To be usable in MP, we need \the\linewidth. Do you have a minimal example because this is how \frameddimension is defined: \def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax} Sorry, I misread your comment (\frameparameter instread of \frameddimension). Of course, \frameddimension should work fine. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Local settings for frame borders
Hi, Currently it is not possible to individually set the thickness of the different borders of a frame. A typical use-case is typesetting a table row where the top frame is double the thichness of the bottom frame. Having to resort to metapost for something as simple as this is a bit annoying. Attached is a metapost library that defines local fences and allows you to set border individually. For example \defineframed[...][frame=off, topframe=local, topframethickness=1pt, bottomframe=local, bottomframethickness=0.5pt] sets the top frame to be 1pt and the bottomframe to be 0.5pt. Does it make sense to include this (appropriately modified) in the core? Or is it better to distribute such enhancements as a user module. Aditya%D \module %D [ file=meta-imp-local-fences, %Dversion=2012.05.23, %D title=\METAPOST\ Graphics, %D subtitle=Fences, %D author=Aditya Mahajan, %D date=\currentdate, %D copyright={Aditya Mahajan}] %C %D This module allows one to set the thickness and color of each side of a %D frame. \unprotect \def\insall_local_fence_handler#1#2% {\startuniqueMPgraphic {#1_local_fence} draw #1boundary OverlayBox withpen pensquare scaled (\the\dimexpr\framedparameter{#2\c!rulethickness}\relax) withcolor \MPcolor{\framedparameter{#2\c!framecolor}} ; setbounds currentpicture to OverlayBox ; \stopuniqueMPgraphic \setupframed[#2\c!rulethickness=\c!rulethickness, #2\c!framecolor=\c!framecolor] \getvalue{install#1framerenderer}\v!local {\uniqueMPgraphic{#1_local_fence}}} \insall_local_fence_handler {top}\v!top \insall_local_fence_handler {bottom} \v!bottom \insall_local_fence_handler {left} \v!left \insall_local_fence_handler {right} \v!right \protect \continueifinputfile{meta-imp-local-fences.mkiv} % Typo in pack-fen.mkiv \unprotected \let\setinstalledframedimensions\pack_framed_overlay_initialize_indeed \defineframed [colorful] [ toprulethickness=1pt, topframecolor=red, bottomrulethickness=2pt, bottomframecolor=blue, leftrulethickness=3pt, leftframecolor=green, rightrulethickness=4pt, rightframecolor=yellow, frame=off, topframe=local, bottomframe=local, rightframe=local, leftframe=local, ] \colorful{Hello world} \stoptext ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] ReadFile introduces a space before reading file
On Sat, 14 Jan 2012, Aditya Mahajan wrote: Hi, In the current version \ReadFile introduces an extra space before reading the file. \starttext A\ReadFile{ward} \stoptext No such space is produced by \input \starttext A\input ward \stoptext Bug? In file-res.mkvi: \def\syst_files_read_file_indeed#true#false% {#true% --- AM: % was missing \relax \normalinput{\readfilename}% \relax} Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] beta
On Thu, 22 Dec 2011, Wolfgang Schuster wrote: PS. I hope that in 2012 I've redone all the code (consistency, mkiv'd, namespaces, etc). Can we now consider the following prefixes for registers as the suggested method to name them: \newcount: \c_… \newdimen: \d_… \newskip: \s_… \newbox: \b_… \newtoks: \t_… I hope you don't converge to LaTeX3 syntax after all the rewrite is over :) Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] beta
On Thu, 22 Dec 2011, Wolfgang Schuster wrote: Am 22.12.2011 um 01:19 schrieb Aditya Mahajan: On Thu, 22 Dec 2011, Wolfgang Schuster wrote: PS. I hope that in 2012 I've redone all the code (consistency, mkiv'd, namespaces, etc). Can we now consider the following prefixes for registers as the suggested method to name them: \newcount: \c_… \newdimen: \d_… \newskip: \s_… \newbox: \b_… \newtoks: \t_… I hope you don't converge to LaTeX3 syntax after all the rewrite is over :) Don’t you already use your own syntax? No. I reverted to the new internal syntax last week. Now I am using \modulename@macro_name etc. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Additional framed fences
Hans, Can you change the definition of setinstalledframeddimensions in pack-fen.mkiv to: \def\setinstalledframedimensions {\edef\overlaywidth {\the\frameddimenwd\space}% \edef\overlayheight{\the\dimexpr\frameddimenht+\frameddimendp\relax\space}% \edef\overlaydepth {\the\frameddimendp\space}% \edef\overlaycolor {\framedparameter\c!backgroundcolor}% \edef\overlaylinecolor{\framedparameter\c!framecolor}% \edef\overlaylinewidth{\the\ruledlinewidth}} and include the attached file as part of meta-imp-fen.mkiv? This is based on an example by Marcin on TeX.se: http://tex.stackexchange.com/questions/34482/contest-show-off-your-skillz-in-tex-friends-tex-sx-birthday/35211#35211 Thanks, Aditya\unprotect % Hooked fences: lefthook, righthook, tophook, and bottomhook. % The parameter \type{radius} determine the radius of the hook. % The parameter \type{hook} determines the length of the hook. \startMPextensions vardef BasicHook (expr size, radius, hook) = ((0,0) --- (size - radius, 0){right} .. {up}(size, radius) --- (size, hook)) enddef; \stopMPextensions \startuseMPgraphic{bottom_right_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayWidth, radius, hook) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{bottom_left_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayWidth, radius, hook) reflectedabout ((0.5OverlayWidth, 0), (0.5OverlayWidth, OverlayHeight)) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{top_right_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayWidth, radius, hook) reflectedabout ((0,0),(OverlayWidth,0)) shifted (0,OverlayHeight) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{left_top_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayWidth, radius, hook) reflectedabout ((0.5OverlayWidth, 0), (0.5OverlayWidth, OverlayHeight)) reflectedabout ((0,0),(OverlayWidth,0)) shifted (0,OverlayHeight) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{left_bottom_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayHeight, radius, hook) rotated -90 shifted (0,OverlayHeight) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{left_top_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayHeight, radius, hook) reflectedabout ((0,0),(OverlayWidth,0)) rotated 90 withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{right_top_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayHeight, radius, hook) rotated 90 shifted (OverlayWidth,0) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \startuseMPgraphic{right_bottom_hook} save radius, hook ; radius := \the\dimexpr\framedparameter\c!frameradius\relax; hook := \the\dimexpr\framedparameter{hook}\relax; draw BasicHook(OverlayHeight, radius, hook) reflectedabout ((0,0),(OverlayWidth,0)) rotated -90 shifted (OverlayWidth,OverlayHeight) withpen pencircle scaled OverlayLineWidth withcolor OverlayLineColor; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \installtopframerenderer{righthook}{\useMPgraphic{top_right_hook}} \installtopframerenderer {lefthook}{\useMPgraphic{top_left_hook}} \installbottomframerenderer {righthook}{\useMPgraphic{bottom_right_hook}} \installbottomframerenderer {lefthook}{\useMPgraphic{bottom_left_hook}}
[dev-context] Add toggle method to indent
Hi Hans, Can you add a `toggle` key to `\setupindenting`. This will allow one to easily write poety where alternative stanzas are to be indented. defineindentingmethod [toggle] {\ifdim\parindent=\zeropoint\relax \parindent\ctxparindent\relax \else \parindent\zeropoint\relax \fi} \setuplines [inbetween={\blank[preference,line]\setupindenting[toggle]}, indenting=no] \startlines \stoplines Thanks, Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] range in \typefile
Hi, \typefile[range={1,3}]{...} does not work. My guess is that this is because the variable `range` is never initialized in `filter` function in buff-ver.lua. A local range = settings.range should be added to the `filter` function. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Changing font and color using \processisolatedwords
Why can't I change the color and style when using processisolatedwords? \defineframed[colored][foregroundcolor=red,foregroundstyle=\bfc,location=low] \starttext \colored{What} \processisolatedwords {\input ward \relax } \colored \stoptext Also \processwords is defined twice, first in syst-aux which is then overwritten by the definition in supp-box. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] --iftouched not working
Hi, mtxrun --iftouched does not work. The reason is that line 147000 of mtxrun.lua has local oldname, newname = string.split(touchname, ,) This sets oldname to be equal to a table and newname to nil. Consequently, the next test if oldname and newname and oldname ~= and newname ~= then fails. An easy fix is to wrap string.split inside a unpack. local oldname, newname = unwrap(string.split(touchname, ,)) but there might be more canonical ways of fixing this. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Structure syntax for enumerations
Hi, I will like to propose a new command, \definestructureenumeration, which is similar to \defineenumeration, but follows the conventions of \definestructuresection, that is, allows one to write \definestructureenumeration[theorem] \starttheorem[title={An important theorem}, list={Not so important}] ... \stoptheorem The \startenumeration command takes the same arguments as \startsection. What do you think? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] bash vs sh in installation script
On Sun, 17 Apr 2011, Mojca Miklavec wrote: change, I just wanted to hear from others and maybe I need to find a good reference to what is not allowed in sh that works in bash.) The bash user manual: http://www.faqs.org/docs/bashman/bashref_122.htmlhttp://www.faqs.org/docs/bashman/bashref_122.html On mac it is: sh --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) On linux, sh either links to bash or dash. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] newpair in mp-tool
Hans, Should the following be added to mp-tool for completeness? def newpairtext v = forsuffixes i=v : save i ; pairi ; endfor ; enddef ; Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Greek without Latin
On Fri, 15 Oct 2010, Aditya Mahajan wrote: On Wed, 13 Oct 2010, Wolfgang Schuster wrote: Am 13.10.2010 um 01:01 schrieb Aditya Mahajan: I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek). \usemodule[translate] \translateinput[μμ][mm] \enableinputtranslation \starttext\tt \scratchdimen=2mm 2mm: \the\scratchdimen\crlf \scratchdimen=1μμ 1μμ: \the\scratchdimen \stoptext On 2010.10.13 beta I get ! LuaTeX error main ctx instance:32: attempt to call field 'install_text_filter' (a nil value) The three lines with resolvers.install_text_filter should be changed to resolvers.filters.install Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Catcodes in bib module
Hi, Try this example: \newcatcodetable\arbitcatcodes \startcatcodetable\arbitcatcodes \catcod...@=0 \stopcatcodetable \setcatcodetable\arbitcatcodes @starttext Hello @stoptext This results in the entire bxml-apa.mkiv being typeset! The file bxml-apa is called by \def\dodoloadbibtexpublicationalternative#1% {\doonlyonce{#1} {\readsysfile{bxml-#1.mkiv} {\showmessage\m!publications{6}{bxml-#1}} {\showmessage\m!publications{1}{bxml-#1 in bibl-bib.mkiv I don't know if this should be considered a bug or not. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Catcodes in bib module
On Mon, 18 Oct 2010, Hans Hagen wrote: On 17-10-2010 11:38, Aditya Mahajan wrote: Hi, Try this example: \newcatcodetable\arbitcatcodes \startcatcodetable\arbitcatcodes \catcod...@=0 \stopcatcodetable \setcatcodetable\arbitcatcodes @starttext Hello @stoptext This results in the entire bxml-apa.mkiv being typeset! The file bxml-apa is called by \def\dodoloadbibtexpublicationalternative#1% {\doonlyonce{#1} {\readsysfile{bxml-#1.mkiv} {\showmessage\m!publications{6}{bxml-#1}} {\showmessage\m!publications{1}{bxml-#1 in bibl-bib.mkiv I don't know if this should be considered a bug or not. does wrapping in \startreadingfile \stopreadingfile Partially. Adding \def\dodoloadbibtexpublicationalternative#1% {\doonlyonce{#1} {\startreadingfile\readsysfile{bxml-#1.mkiv}\stopreadingfile {\showmessage\m!publications{6}{bxml-#1}} {\showmessage\m!publications{1}{bxml-#1 before the test file gives an error on the next command: ! LuaTeX error main ctx instance:1: ')' expected near '\'. system error on line 15 in file backend.tex: LuaTeX error ... 5 \stopcatcodetable 6 7 \def\dodoloadbibtexpublicationalternative#1% 8 {\doonlyonce{#1} 9 {\startreadingfile\readsysfile{bxml-#1.mkiv}\stopreadingfile 10 {\showmessage\m!publications{6}{bxml-#1}} 11 {\showmessage\m!publications{1}{bxml-#1 12 13 \setcatcodetable\arbitcatcodes 14 15 @starttext 16 Hello 17 @stoptext \normalshowmessage ...showmessage(#1,#2,#3)} argument ...ns{6}{bxml-apa}} {\showmessage \m !p ublications{1}{bxml-apa}} \firstofoneargument #1-#1 But adding this at the beginning of the file works. \let\normaldoloadbibtexpublicationalternative\doloadbibtexpublicationalternative \let\doloadbibtexpublicationalternative\relax \appendtoks \pushcatcodetable \setcatcodetable\ctxcatcodes \normaldoloadbibtexpublicationalternative \popcatcodetable \to \everystarttext % was everyjob, will change anyway Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Typing in footnotes
Hi, Typing in footnote worked (and still works) in MkII. For example: \starttext Hello \footnote{Typing in footnote \starttyping test \stoptyping } \stoptext However, in MkIV this gives: Runaway argument? test \stoptyping \endstrut \dostopstoreddescription \egroup \the \everyafternoteinsert \ETC. ! File ended while scanning use of \dododowithbuffer. system error on line 0 in file : File ended while scanning use of \dododowithbuffer ... empty file inserted text \par * ./backend.tex I can work around this by using \start-stop buffer outside the footnote and \typebuffer inside the footnote, but that does not work when the ConTeXt file is generated from markdown using pandoc. Is this something that can be fixed (not immediately, but in the long run). If so, I will open a tracker item for it. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Greek without Latin
On Wed, 13 Oct 2010, Wolfgang Schuster wrote: Am 13.10.2010 um 01:01 schrieb Aditya Mahajan: I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek). \usemodule[translate] \translateinput[μμ][mm] \enableinputtranslation \starttext\tt \scratchdimen=2mm 2mm: \the\scratchdimen\crlf \scratchdimen=1μμ 1μμ: \the\scratchdimen \stoptext On 2010.10.13 beta I get ! LuaTeX error main ctx instance:32: attempt to call field 'install_text_filter' (a nil value) stack traceback: main ctx instance:32: in function 'enable' main ctx instance:1: in main chunk. system error on line 5 in file test.tex: LuaTeX error ... 1 \usemodule[translate] 2 3 \translateinput[μμ][mm] 4 5 \enableinputtranslation 6 7 \starttext\tt 8 \scratchdimen=2mm 2mm: \the\scratchdimen\crlf 9 \scratchdimen=1μμ 1μμ: \the\scratchdimen 10 \stoptext 11 This works fine in TL ConTeXt. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Greek without Latin
On Wed, 13 Oct 2010, Hans Hagen wrote: On 12-10-2010 9:24, Mojca Miklavec wrote: here's a challenging question from the XeTeX mailing list. Somebody gave a challenge of how one writes units or rather: if it is possible to get rid of latin keyboard entirely, for example if one is able to retype \includegraphics[width=10cm,scale=5]{...} in arabic/possibly greek interface without using the latin keyboard)? In either case I think that one should convince the author to take ConTeXt instead of LaTeX to rewrite the commands ... Just take a look at mult-def.lua and you will see that there is already a persian interface ... defining commands in any language is possible already right from the start of mkiv. I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek). Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Greek without Latin
On Wed, 13 Oct 2010, Hans Hagen wrote: On 13-10-2010 1:01, Aditya Mahajan wrote: I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek). hmm, but why units if not the rest too? The translation of the macros is definitely needed. But along with that, the OP was also looking for translation of units. I think that the use case is someone who uses a greek keyboard cannot key in latin characters easily. A partial translation (that only converts the macro commands) is not sufficient, because the user has to switch to the latin keyboard to enter units and then switch back to greek keyboard for the rest of the text. I think that dealing with units in arbitrary characters is somewhat tricky (an a callback woudl slow down luatex a lot) Or perhaps something like 10\UNITmm (in Greek, of course). Similar to how metapost defines units. aren't units like mm sort of standard? I don't know how Greeks enter greek, so I have no idea how easy it is to enter latin using greek keyboards. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] TLContrib is ready for testing
On Tue, 5 Oct 2010, Taco Hoekwater wrote: Hello all, Please, if you have moment to spare, have a good look at the TLContrib website and associated repository: http://tlcontrib.metatex.org/ The system should now be ready for the initial kickoff (I hope). Mojca, Hans and me have already tried and tested various things, but it is quite likely that there are still bugs. I decided to post to a small group of people before doing an announcement on tex-l...@tug.org / c.t.t hoping that perhaps more people can have a look, and that the remaining bugs can then be fixed before 'normal' users start using the site. Probably I am doing something stupid, but how do I use this repo to make a fresh installation of TL. I downloaded http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz and ran install-tl --repository http://tlcontrib.metatex.org/2010/ which gave Installing TeX Live 2010 from: http://tlcontrib.metatex.org/2010 Platform: i386-linux = 'Intel x86 with GNU/Linux' Distribution: net (downloading) Using URL: http://tlcontrib.metatex.org/2010 Directory for temporary files: /tmp Loading http://tlcontrib.metatex.org/2010/tlpkg/texlive.tlpdb Aborting, cannot find either scheme-full or scheme_minimal at install-tl line 1344. Or can this only be used to upgrade existing TL installation? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] TLContrib is ready for testing
On Wed, 6 Oct 2010, Mojca Miklavec wrote: On Wed, Oct 6, 2010 at 22:28, Aditya Mahajan wrote: Probably I am doing something stupid, but how do I use this repo to make a fresh installation of TL. Or can this only be used to upgrade existing TL installation? No, you cannot make a fresh installation from it. You can only use it to upgrade LuaTeX/ConTeXt or to install additional packages on top of existing installation. OK. Tried to update a fresh TL installation: sudo tlmgr --repository http://tlcontrib.metatex.org/2010/ update --all %%% OUTPUT tlmgr: package repository http://tlcontrib.metatex.org/2010/ tlmgr: saving backups to /usr/local/texlive/2010/tlpkg/backups [1/6, ??:??/??:??] update: context.i386-linux [75k] (18902 - 18903) ... done [2/6, 02:09/06:46:48] update: context [9421k] (19744 - 19745) ... done [3/6, 10:20/15:19] update: luatex.i386-linux [1562k] (19405 - 19406) ... done [4/6, 11:45/14:57] update: luatex [809k] (19324 - 19328) ... done [5/6, 12:25/14:44] update: metapost.i386-linux [192k] (18765 - 18766) ... done [6/6, 12:40/14:47] update: metapost [2023k] (18835 - 18836) ... done tlmgr: package log updated at /usr/local/texlive/2010/texmf-var/web2c/tlmgr.log running mktexlsr ... done running mktexlsr. regenerating fmtutil.cnf in /usr/local/texlive/2010/texmf-var running fmtutil-sys --no-error-if-no-format --byengine mpost ... fmtutil-sys --no-error-if-no-format --byengine mpost failed (status 1), output: fmtutil: running `mpost -ini -jobname=metafun -progname=mpost metafun.mp' ... This is MetaPost, version 1.502 (kpathsea version 6.0.0) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/metafun.mp (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-base.mp Preloading the plain mem file, version 0.63) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-tool.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-spec.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-core.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-page.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-text.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-txts.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-shap.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-butt.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-char.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-step.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-grph.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-figs.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-mlib.mp) (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-grid.mp (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-form.mp (/usr/local/texlive/2010/texmf-dist/metapost/base/string.mp) (/usr/local/texlive/2010/texmf-dist/metapost/base/marith.mp (/usr/local/texlive/2010/texmf-dist/metapost/base/string.mp (/usr/local/texlive/2010/texmf-dist/metapost/context/base/mp-func.mp) ) Transcript written on metafun.log. Error: `mpost -ini -jobname=metafun -progname=mpost metafun.mp' failed fmtutil: running `mpost -ini -jobname=mpost -progname=mpost mpost.mp' ... This is MetaPost, version 1.502 (kpathsea version 6.0.0) (/usr/local/texlive/2010/texmf-dist/metapost/base/mpost.mp (/usr/local/texlive/2010/texmf-dist/metapost/base/plain.mp Preloading the plain mem file, version 1.004) ) Transcript written on mpost.log. Error: `mpost -ini -jobname=mpost -progname=mpost mpost.mp' failed ### fmtutil: Error! Not all formats have been built successfully. Visit the log files in directory /usr/local/texlive/2010/texmf-var/web2c for details. ### This is a summary of all `failed' messages: `mpost -ini -jobname=metafun -progname=mpost metafun.mp' failed `mpost -ini -jobname=mpost -progname=mpost mpost.mp' failed running fmtutil-sys --no-error-if-no-format --byengine luatex ... done running fmtutil-sys --no-error-if-no-format --byengine luatex. running fmtutil-sys --byfmt cont-en ... done running fmtutil-sys --byfmt cont-en. tlmgr: exiting unsuccessfully (status 1). Not sure what went wrong. I am attaching the metapost and metafun log files, but they appear to be from the original TL installation (based on the time stamp). On the plus side, I do not 2010.07.30 version of context and a simple context document containing metapost does comiple fine. (I cannot test MkII because I don't have a working ruby installation on this machine). Aditya This is MetaPost, version 1.211 (TeX Live 2010) (kpathsea version 6.0.0) (INIMP) 6 OCT 2010 17:34 **metafun.mp (/usr/local/texlive/2010/texmf-dist/metapost
Re: [dev-context] TLContrib is ready for testing
Hi Taco, On Tue, 5 Oct 2010, Taco Hoekwater wrote: Hello all, Please, if you have moment to spare, have a good look at the TLContrib website and associated repository: http://tlcontrib.metatex.org/ The system should now be ready for the initial kickoff (I hope). Mojca, Hans and me have already tried and tested various things, but it is quite likely that there are still bugs. I decided to post to a small group of people before doing an announcement on tex-l...@tug.org / c.t.t hoping that perhaps more people can have a look, and that the remaining bugs can then be fixed before 'normal' users start using the site. Is this meant only for packages that cannot be part of TL due the restrictions that you mention, or is this also the right place to upload normal context modules. If so, is this going to eventually replace modules.contextgarden.net upload system? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] TLContrib is ready for testing
On Wed, 6 Oct 2010, Taco Hoekwater wrote: On 10/06/2010 07:09 AM, Aditya Mahajan wrote: Is this meant only for packages that cannot be part of TL due the restrictions that you mention, or is this also the right place to upload normal context modules. If so, is this going to eventually replace modules.contextgarden.net upload system? As Nrobert said. Fairly soon there will be a second website similar to the new tlcontrib that will indeed replace modules.contextgarden.net (and that will take care of uploads to ctan just like garden does now) but that will be a different site, not this one. Great. For anyone else using github as an external repo, github allows an svn export and that works fine. So, no more manual updating of the modules! The only isse is that the svn export is only for the master branch. Which means that I will have to change the branching convention for my modules, but that is easy. What is the HTTP URL meant for? I tried pointing it to a zip file of my module and it says Sorry, we can only handle zip and tar.gz files at the moment. Thanks a lot. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] TLContrib is ready for testing
On Oct 6, 2010, at 1:48 AM, Taco Hoekwater t...@elvenkind.com wrote: On 10/06/2010 07:33 AM, Aditya Mahajan wrote: What is the HTTP URL meant for? I tried pointing it to a zip file of my module and it says Sorry, we can only handle zip and tar.gz files at the moment. What was your exact url? It really should end with .zip The url was the auto generated zipball for a tag at github: http://github.com/adityam/filter/archives/2010.09.26 Is it possible to detect the archive using content/type? Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] cont-en.xml
On Wed, 16 Jun 2010, Wolfgang Schuster wrote: Hi, i plan to update cont-en.xml with changes in mkiv (new keys and commands) but i'm unsure if it's good to mix mkii and mkiv. I think it's to make a separate definition file for mkiv which contains the extra keys for the commands (e.g. sectionsegments for \setuphead) and use the current one for mkii only. Is there a XML schema for the commands. The cont-en.xml file mentions http://www.pragma-ade.com/commands but that does not exist. (I am trying to experiement with using YAML instead of XML...) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] audit of commands
On Mon, 10 May 2010, Peter Münster wrote: On Mon, May 10 2010, Taco Hoekwater wrote: I would much prefer working on the wiki, then export to .tex with a script. Having two sources for what is essentially the same information is asking for trouble, imo. Hello Taco, There is not enough structure on the wiki. I imagine a script that exports parts of the wiki to tex, but additional information has to be entered in the tex-files (are arguments optional or not, etc.). Maybe, we can have an infobox for the wiki pages, so we can say something like {{ Infobox command | name = setupframed | ... }} That way, it will be easier to export to TeX (no need to parse raw HTML). Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Versioning system for modules
On Thu, 11 Mar 2010, Patrick Gundlach wrote: Am 11.03.2010 um 14:20 schrieb Norbert Preining: I don't want to answer the question before knowing the exact question. As far as I understand the problem: we need version controlled modules. Why? Who would go back in time? The module authors? Other users? The minimals-distribution-Mojca? Actaully, I am not sure. For example, I personally store all (OK, most) of my modules on github. Whenever I want to upload something to garden, it is usually as easy as ctxtools --tpmmake module and upload the zip to contextgarden. As a module writer, I do not want to do the last step each time. For me, it will be easier to just create a branch garden (or something) on my github repo, fill in some details on contextgarden, and let something at the server take care of syncing from my git repo. Other authors use mercurial, svn, bazaar, you name it. I do not expect garden to support all of these VCs. Actually, there is not too big a difference between them, and there are easy ways of going from one VC - svn - another VC. So, I will be happy if contextgarden just pulls data from the appropriate branch of my VC stored at a public hosting site. What interface do these people need? How often do they need access to the SCM? As a context user, I do not care about VC. For installing/uninstalling, both minimals and TL work perfectly fine. As a power user, when something goes wrong, I like to look at the diffs to see what changed. There is alreay a git repo for the context files, but, IMO, it is horribly broken. The branches are, well not branches but shoots grafted on top of each other with frequent pruing and regrafting. But that is a discussion for another thread. Should we get rid of the files on the modules section? Personally, I only use the file section for browsing. So, even if the files section redirects me to github/bitbucket/whatever, I do not really care. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] refereces in mkiv
On Tue, 10 Nov 2009, Mojca Miklavec wrote: Hello Hans, what's the status of referencing mechanism in MKIV? (I have some memories that you were implementing some fancy features, but the simple example doesn't work at the moment): \placeformula[test] \startformula a+b=c \stopformula \in[test] Formula referencing has been working fine for a while now. which version are you using? The example works correctly in 2009.11.09 and 2009.11.02. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] refereces in mkiv
On Tue, 10 Nov 2009, Mojca Miklavec wrote: On Tue, Nov 10, 2009 at 16:12, Aditya Mahajan wrote: On Tue, 10 Nov 2009, Mojca Miklavec wrote: Hello Hans, what's the status of referencing mechanism in MKIV? (I have some memories that you were implementing some fancy features, but the simple example doesn't work at the moment): \placeformula[test] \startformula a+b=c \stopformula \in[test] Formula referencing has been working fine for a while now. which version are you using? The example works correctly in 2009.11.09 and 2009.11.02. The almost-latest one, I guess (2009.11.10 13:30, beta-0.44.0). And this time I have no TeX Live installed or whatever other version of ConTeXt that could interfere. Never mind. I have just seem to have a bad karma. What happens on your machine with \placeformula[test one]? that does not work. label with spaces works with sections but not with formulas. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Second problem with Pizza and Problems
On Thu, 1 Oct 2009, Taco Hoekwater wrote: This problem is because of euler math: the virtual fonts for that use computer modern for the missing glyphs in the euler set, and those are not provided by the minimals. A workaround is to add this statement after the \assignment \pdfmapline{=cmsy10 LMMathSymbols10-Italic enclmmathsy ReEncodeFont lm-mathsy.enc lmsy10.pfb } (it has to come after the font initialization, hence the ugly place) Perhaps the minimals should ship the traditional math fonts (cc dev-context), otherwise we could re-create the euler virtual fonts, or this mapline (and a dozen or so similar ones) could go into the euler typescript. I thought that we had (by we I mean Mojca) already taken care of this/ Here is a minimal example. \definetypeface [mainface] [rm] [serif] [palatino] [default] [encoding=texnansi] \definetypeface [mainface] [mm] [math] [euler] [euler] [encoding=texnansi] \setupbodyfont[mainface] \starttext test $E= \mu c^2 \int_{a}^b \exists$ \stoptext pdffonts test.pdf gives name type emb sub uni object ID - --- --- --- - WXUTWK+TeXGyrePagella-RegularType 1yes yes no 4 0 ZXUTFO+EURM10Type 1yes yes no 5 0 KVDNPZ+EUFM10Type 1yes yes no 6 0 JQWHRK+EUEX10Type 1yes yes no 7 0 YXBNQG+LMMathSymbols10-Regular Type 1yes yes no 8 0 So, LM symbols font is being used (for \exists). David, which version are you using? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Mon, 24 Aug 2009, Wolfgang Schuster wrote: Am 24.08.2009 um 00:17 schrieb Aditya Mahajan: In your module you can either use \getparameters or – what I think you want in your module – \setvariables because it's not very different to \setupmodule. I thought that \setupmodule was meant for passing parameters to modules, mainly because of the following comment in core-fil Is this passing parameters to the module, I don't think so! \def\dosetupTitle[#1]% {\setupmodule[simpleslides:title][#1]} Oh those. I had forgotten about them :) I will change these to \getvariables. As, \setupmodule is just \getparameters with a few defaults in place, I can also use \getparamters with \currentmoduleparamters. You use \currentmoduleparameter only in t-simpleslides to load a style file but \moduleparameter is used many other files to setvariables etc. and the last one is more like \getvariables (which use rawparameters) I agree. To stop the TeX run we can have \setupmodule[contextversion=2009.08.22] at the begin of a module and ConTeXt will abort the run if the key 'contextversion' has a value and context is older than the user has requested. Do you want this to check to be part of the definition of \setupmodule? One difficultly that I see is that typically this will mean that we need to set this separately for each engine. I don't need such a check, it was Olivers idea and I thought about a idea how this can be integrated without introducing a new command which breaks backward compatibility. I meant that when you said \setupmodule[contextversion=...], what is the implementation you had in mind. \setupmodule macro doing the checking, or the module writer doing the checking. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Mon, 24 Aug 2009, Wolfgang Schuster wrote: Am 24.08.2009 um 16:27 schrieb Aditya Mahajan: To stop the TeX run we can have \setupmodule[contextversion=2009.08.22] at the begin of a module and ConTeXt will abort the run if the key 'contextversion' has a value and context is older than the user has requested. Do you want this to check to be part of the definition of \setupmodule? One difficultly that I see is that typically this will mean that we need to set this separately for each engine. I don't need such a check, it was Olivers idea and I thought about a idea how this can be integrated without introducing a new command which breaks backward compatibility. I meant that when you said \setupmodule[contextversion=...], what is the implementation you had in mind. \setupmodule macro doing the checking, or the module writer doing the checking. I think it's up to the developer to write something in the module, e.g. http://bitbucket.org/wolfs/simplefonts/src/46a1f454bccc/files/t-simplefonts.tex but it's not so hard to integrate it into the \setupmodule command. Thanks for clarifying. I also think that it is better to do this selectively for each module rather than in the core. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Sun, 23 Aug 2009, Wolfgang Schuster wrote: Am 22.08.2009 um 13:47 schrieb Oliver Buerschaper: What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-) *You* want to write a test suite for ConTeXt? The test suite is there. There is even a script in the test suit that compares the outputs of two versions at pixel level. All we need is people to submit tests and then someone to monitor the test suite. See http://wiki.contextgarden.net/Test Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module has to declare a field like minkernelversion in its header ... just thinking out loud. The problem with such systems is they lead always to incompatibilities with ConTeXt installations (think about TeXLive) and we had one at the end of last year when Hans changed the multilingual interface to allow a persian interface. Loading of lua files has this feature. For modules, asking for a minimum kernel version is no guarantee that the module will work with future versions of ConTeXT :-) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Mac installation package
On Sun, 23 Aug 2009, Wolfgang Schuster wrote: Am 23.08.2009 um 17:52 schrieb Oliver Buerschaper: I agree that my suggestion would sacrifice backwards compatibility. At the same time I'm not sure how much change to the MkIV kernel is desirable given that MkII is considered frozen. I'm really in no position to have an educated opinion on whether there should be as few changes as possible or rather the occasional clear cut. It's just that if you guys think that some clear cuts are due for MkIV anyway then there will probably be never a better time than now to make module loading more bullet-proof. As I was saying, I'm just thinking out loud ;-) MkIV is ConTeXt’s feature without an doubt but it's not so easy as you think. I have myself two modules which work only with MkIV (simplefonts and games) but bigger ones like simpleslides or letter are just complexer styles and you can't expect from a user to upgrade to MkIV just to make a presentation or to write a short letter. I thought about integrating the version check into \setupmodule because the command is only used in modules and available in MkII and MkIV but Thomas and Aditya use it in the simpleslides module to pass parameters to the module and this a few times at different places and not only at the start of the file. If you have a suggestion that will make things cleaner, we (Thomas and I) can easily change the internals of simple slides to accomodate that. Aditya___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] A few questions
On Fri, 7 Aug 2009, Hans Hagen wrote: i get the feeling we're moving towards latex3 (brr), before this happens drop the whole thing and i don't like \getvariable in this context anyway there was a presentation about this ltx3 low level syntax and i definitely don't want to have something like that; it's more that in context we have this system of [optional]{whatever} that we might want to support me neither, the latex3 system is too complicated and one has to remember what n, N, x ... means etc. indeed, and also kind of redundant as the name should denote the usage, i.e. imagine that in e.g. lua we did myfunction_takes_num_and_num i would not be surprised if it's also quite slow (esp when used in core code) and core code is not used by users anyway there are a few interesting things like namespaces for module/macros but that's not worth the effort they take indeed, but keep in mind that in context we seldom have other interfaces that [] and {}, no optoinal * etc One good thing with LaTeX 3 syntax is that something like \DeclareDocumentCommand\foo { o o m } will be (from what I understand) equivalent to \def\foo {\dodoubleempty\dofoo} \def\dofoo[#1][#2]#3{...} When I started using context, I was surprised that context did not have anything for optional arguments. We could have something like \definesinglearugment\foo[#1]#2{...} to be equal to \def\foo{\dosingleargument\dofoo} \def\dofoo[#1]#2{...} and \definesingleempty\foo[#1]#2{...] to be equal to \def\foo{\dosingleempty\dofoo} \def\dofoo[#1]#2{...} and similar things for \definedoublearugment, \definetripleargument, etc. I am not convinced that this is a good thing, but using something like this in the core may result in a 10% reduction in the code size and might kill a few dodos :) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Making a minimals update svn friendly
On Mon, 25 May 2009, Oliver Buerschaper wrote: To what Aditya has answered: --keep option is probably not the solution to what Oliver wants to achieve. I suspect that he indeed wants to delete obsolete files, but preserve .svn. Yep. (Although I'm not quite sure what --keep exactly does here.) Does not add --delete flag to rsync. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] piping to ConTeXt
On Sun, 24 May 2009, Mojca Miklavec wrote: Maybe you can ask her to add that file :-) Once we figure out if it's needed for this purpose at all. There is already a use for it. When you type \input nonexistantfile, then you can type null at the tex prompt to make tex continue with the rest of the compilation. And there is no harm in adding the file, it is really small :) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] trouble with texmfstart and =
On Sun, 31 Aug 2008, Hans Hagen wrote: Aditya Mahajan wrote: On Sat, 30 Aug 2008, Hans Hagen wrote: Aditya Mahajan wrote: texmfstart does not handle = in --argument propertly. For example texmfstart --verbose --arguments=a=b bin:echo and what does Both give incorrect output texmfstart --verbose --arguments=a=b bin:echo texmfstart --verbose --arguments=a=b bin:echo the first argument of texmfstart is considered to be the called script, prog etc texmfstart [optional args for texmfstart] [prog to call] [args to prog] so the question is, what do you want to achieve texmfstart --verbose bin:echo --args=a=b texmfstart version 2.0.3 using 'system' call: echo --args=a=b --args=a=b I want to call vim with the following arguments (all in one line) vim -u NONE -e -C -n -c set tabstop=8 -c source /home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim -c wqa test-vimsyntax.tmp So, I use the following command: (in one line) texmfstart --verbose bin:vim -u NONE -e -C -n -c \set tabstop=8\ -c \source kpse:2context.vim \ -c \wqa\ test-vimsyntax.tmp which gives texmfstart version 2.0.3 kpse : direct (forced) locating '2context.vim' in program space 'context' 2context.vim is resolved to /home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim using 'system' call: vim -u NONE -e -C -n -c set tabstop=8 -c source /home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim -c wqa test-vimsyntax.tmp Notice that texmfstart has mungled the quotes. There are quotes around 8, and an extra quote in the end. The man page of texmfstart says --arguments=str an alternative for providing the arguments to be passed. For example, texmfstart --arguments=b.tex texexec will pass b.tex as the argument to texexec. So, I was trying to use --arguments to see if that works better than the default. But --arguments fails does worse (again on one line) texmfstart --verbose --arguments=-u NONE -e -C -n -c \set tabstop=8\ -c \source kpse:2context.vim \ -c \wqa\ test-vimsyntax.tmp bin:vim texmfstart version 2.0.3 using 'system' call: vim -u NONE -e -C -n -V10log -c set tabstop sh: Syntax error: Unterminated quoted string So, how do I use texmfstart to get what I need? I cannot call vim directly because I want to use kpse to search for the exact path of 2context.vim file. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] trouble with texmfstart and =
On Sat, 30 Aug 2008, Hans Hagen wrote: Aditya Mahajan wrote: texmfstart does not handle = in --argument propertly. For example texmfstart --verbose --arguments=a=b bin:echo and what does Both give incorrect output texmfstart --verbose --arguments=a=b bin:echo texmfstart --verbose --arguments=a=b bin:echo texmfstart version 2.0.3 using 'system' call: echo a a execution was successful do? or texmfstart --verbose --arguments='a=b' bin:echo texmfstart --verbose --arguments='a=b' bin:echo texmfstart version 2.0.3 using 'system' call: echo a a execution was successful ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] trouble with texmfstart and =
texmfstart does not handle = in --argument propertly. For example texmfstart --verbose --arguments=a=b bin:echo gives texmfstart version 2.0.3 using 'system' call: echo a a Notice that oly echo a is being called. This causes problems when I want to call echo a=b. If I try texmfstart --verbose --arguments=\a=b\ bin:echo I get texmfstart version 2.0.3 using 'system' call: echo a sh: Syntax error: Unterminated quoted string execution failed For some reason, texmfstart is truncating the argument before =. Due to this bug the vim module does not work anymore. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Texlive 2008 and luatools
Hi, Texlive 2008 works perfectly with Context, but I have one question regarding luatools. I am posting this here rather than on TL mailing list, since I do not want to cause more confusion on TL regarding ConTeXt. In the bin directory in minimals, luatools is a copy of luatools.lua. This means that one does not need ruby in order to run luatools. It also means that whenver you upgrade your system, you need to run luatools --selfupdate. In TL2008, luatools is a wrapper script. #!/bin/sh texmfstart luatools.lua $@ This means that you need to have ruby in order to run luatools. The advantage is that you do not need to run luatools --selfupdate. In terms of speed, there is a slight disadvantage, you first start ruby, and then start texlua. Using a wrapper script was suggested by Taco on the mailing list. If TL is to use a wrapper scipt, why not simply #!/bin/sh mtxrun --script luatools $@ this will mean that you do not start ruby before moving to lua. In both cases, one has to do mtxrun --selfupdate after a update that changes mtxrun. This is not really important, since luatools will be run rarely. Do you think that the current texmfstart wrapper should be changed to a mtxrun wrapper? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] problem with new context and old pdftex
On Tue, 15 Apr 2008, Norbert Preining wrote: On Di, 15 Apr 2008, Taco Hoekwater wrote: I wager just about all of these are manifestations of the same bug (redefined \hyphenatedfile) that Aditya found. Do you have a patch I could test? Add this to the top of the file: \unexpanded\def\filename#1{{\tttf\hyphenatedurl{#1}}} Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Assertion failure with latest luatex
On Tue, 11 Mar 2008, Taco Hoekwater wrote: Aditya Mahajan wrote: Hi, I am using LuaTeX, Version snapshot-0.23.0-2008030822 and context 2008.03.04. In a long article, I get an error: luatex: ../../../../src/texk/web2c/luatexdir/tex/linebreak.c:215: find_protchar_right: Assertion `varmem[(varmem[((r)+1)].hh.v.RH)].hh.v.RH==r' failed. Is this a known bug? If not, I can try to create a minimal example. This was a bug, and is now fixed in the repository trunk. The problem was that the interals of the boxes resulting from math superscripts were not initialized correctly. Thank you for the quick fix. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] mkiv and metapost
On Tue, 11 Mar 2008, Wolfgang Schuster wrote: On Tue, 11 Mar 2008 11:16:18 -0400 (EDT) Aditya Mahajan [EMAIL PROTECTED] wrote: Hi, Something is broken in the interaction between metapost and mkiv. The minimal example here gives me an empty pdf. \starttext \startMPcode draw fullcircle scaled 1cm; \stopMPcode \stoptext The metapost figure is created, but for some reason not is not being included. Doing an explicit \externalgraphics[filename-mpgraph.1] gives mp-test-mpgraph.1 !luaTeX error: internal error: unknown image type == Fatal error occurred, no output PDF file produced! I am using luatex snapshot-0.23.0-2008031110 and ConTeXt 2008.03.04 Works here without problems. ConTeXt ver: 2008.03.11 14:48 MKIV fmt: 2008.3.11 int: english/english This is LuaTeX, Version snapshot-0.23.0-2008030910 Thanks for checking. Must be something wrong in my setup. I tried 2008.03.11 but I can't get get the latest luatex to run with mkiv (?:0 attempt to index global 'tex' (a nil value)) :( Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] New Debian TeX packages for Etch
On Fri, 7 Dec 2007, Aditya Mahajan wrote: Hi Norbert, Sorry for the (extremely) late reply. On Mon, 5 Nov 2007, Norbert Preining wrote: Hi Aditya, On Mo, 05 Nov 2007, Aditya Mahajan wrote: So, there are two differences here. The files are organized in a different directory structure, and have a different extension. Is there some way this can be corrected at the packaging end? I will take a look at that, but note that the context-doc-nonfree packages has NOT been updated in a while, so it probably is in a bad state wrt organization. Next upload will ship pdf uncompressed, and hopefully fix these issues. Can you propose/list a better/working layout? The docs should reside somehow under /usr/share/doc/package but can be linked into /usr/share/doc/texmf/ which in turn is linked from /usr/share/texmf/doc/ so that texdoc finds the stuff. How about having the same directory structure as in the context standalone distribution? For that, we will need to make the following changes cd /usr/share/doc/context-doc-nonfree/ gunzip showcase/*.pdf.gz gunzip manuals/*.pdf.gz mv showcase/*.pdf ./ rmdir showcase mkdir general mv manuals general The files in setup/ are ok, since they are not linked by anything else. Also, can the context magazines (isoimage/usr/local/context/docroot/documents/general/magazines in the context standalone distribution) be included in the debian package at /usr/share/doc/context-doc-nonfree. Their location does not matter, but to keep the directory structure future proof, I would suggest the same strucutre as pragma's So they can be copied to general/magazines/ Actually, the magazines are linked from show-mag.pdf so they MUST go to general/magazines/ directory. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] New Debian TeX packages for Etch
Hi Norbert, Sorry for the (extremely) late reply. On Mon, 5 Nov 2007, Norbert Preining wrote: Hi Aditya, On Mo, 05 Nov 2007, Aditya Mahajan wrote: So, there are two differences here. The files are organized in a different directory structure, and have a different extension. Is there some way this can be corrected at the packaging end? I will take a look at that, but note that the context-doc-nonfree packages has NOT been updated in a while, so it probably is in a bad state wrt organization. Next upload will ship pdf uncompressed, and hopefully fix these issues. Can you propose/list a better/working layout? The docs should reside somehow under /usr/share/doc/package but can be linked into /usr/share/doc/texmf/ which in turn is linked from /usr/share/texmf/doc/ so that texdoc finds the stuff. How about having the same directory structure as in the context standalone distribution? For that, we will need to make the following changes cd /usr/share/doc/context-doc-nonfree/ gunzip showcase/*.pdf.gz gunzip manuals/*.pdf.gz mv showcase/*.pdf ./ rmdir showcase mkdir general mv manuals general The files in setup/ are ok, since they are not linked by anything else. Also, can the context magazines (isoimage/usr/local/context/docroot/documents/general/magazines in the context standalone distribution) be included in the debian package at /usr/share/doc/context-doc-nonfree. Their location does not matter, but to keep the directory structure future proof, I would suggest the same strucutre as pragma's So they can be copied to general/magazines/ As you mentioned, these need to be linked to appropriate directories so that texdoc can also find them. I could not figure out how context files are linked in the texmf tree, but texdoc does find the files. I assume that the above changes will not make searching for pdfs difficult for texdoc. Thank you once more for maintaining the context packages for debian. It really makes it easy to setup context on ubuntu. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] New Debian TeX packages for Etch
Hi Norbert, On Mon, 5 Nov 2007, Norbert Preining wrote: Hi all! The new packages uploaded some time ago by myself to Debian unstable have been backported to etch are as usual available on people.debian.org. Don't forget that you will also need lmodern and context for texlive-full. Binaries of texlive-bin 2007.dfsg.1-1 are currently only for i386, I hope to get powerpc binaries soon. amd64 I will build myself rather soon. I am using ubuntu 7.10 (amd64) and installed context using the debian repositories without any problem. However, the directory structure of the documentation has been reorganized, and it does not work correctly. What I usually do is locate show-man.pdf | xargs gnome-open which opens show-main.pdf.gz from /usr/share/doc/context-doc-nonfree/showcase/ Now suppose I wan to open the charts manual. The show-man.pdf links to general/manuals/mchart.pdf while mcharts.pdf is at /usr/share/doc/context-doc-nonfree/manuals/ and the file is named mchart.pdf.gz. So, there are two differences here. The files are organized in a different directory structure, and have a different extension. Is there some way this can be corrected at the packaging end? Thank you. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Improved substack macro
Hi Hans and Taco, The \startsubstack macro in core-mat places the subscript lower than the atop. See for example \startformula \sum_{\startsubstack a \NR b \NR \stopsubstack} \sum_{\scriptstyle a \atop \scriptstyle} \stopformula I have tried to get the correct spacing by copying what amsmath does. When you have time, can you look if it makes sense to provide both the substack macros. Aditya \def\startsubstackA {\vcenter\bgroup \baselineskip\fontdimen10 \scriptfont\plustwo \advance\baselineskip\fontdimen12 \scriptfont\plustwo \lineskip\plusthree\fontdimen8 \scriptfont\plusthree \lineskiplimit\lineskip \let\stopmathmode\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\startmathmode}% \global\let\domatrixNC\dodomatrixNC \def\NR {\stopmathmode \global\let\domatrixNC\dodomatrixNC \crcr}% \mathsurround\zeropoint \everycr\emptytoks \halign\bgroup\hfil$\scriptstyle##$\hfil\crcr} \def\stopsubstackA {\crcr \egroup \egroup} \starttext \startformula \sum_{\startsubstack a \NR b \NR c \NR \stopsubstack} \sum_{a} \sum_{\startsubstackA a \NR b \NR c \NR \stopsubstackA} \sum_{\scriptstyle a \atop \scriptstyle b} \stopformula \stoptext ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Question about definition of \frac
In core-mat.tex \frac is defined as \def\dofrac#1#2#3{\relax\mathematics{{{#1{#2}}\over{#1{#3} \unexpanded\def\frac {\dofrac\mathstyle} Shouldn't that be \def\dofrac#1#2#3{\relax\mathematics{{\begingroup#1{#2}\endgroup\over#1{#3 Basically, \begingroup ... endgroup instead of bgroup ... egroup generated by the braces. Compare the definition of \frac in core-mat with the definition of genfrac in m-newmat. I am not sure whether this really creates a difference or not, but generally most math definition try to avoid creating an extra group. Even LaTeX defines \frac as \def\frac#1#2{{\begingroup#1\endgroup\over#2}} So, should the definition of \dofrac be changed? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] lvert rvert etc in math
On Sun, 25 Feb 2007, Taco Hoekwater wrote: Aditya Mahajan wrote: Hi Hans and Taco, amsmath.sty defines \lvert and \rvert which provide correct spacing when \vert is used as a left or a right delimiter (code at the end of email). I do not completely understand what amsmath is trying to do. Wouldn't \definemathsymbol [lvert] [open] [sy] [6A] [ex] [0C] \definemathsymbol [rvert] [close] [sy] [6A] [ex] [0C] this achieve the same goal? Yes. The AMS code does not quite know when it will be run and it has to cope with other math encodings as well, that is why it is that much more complicated. Hans, Can the following be added to math-tex \definemathsymbol [lvert] [open] [sy] [6A] [ex] [0C] \definemathsymbol [rvert] [close] [sy] [6A] [ex] [0C] \definemathsymbol [lVert] [open] [sy] [6B] [ex] [0D] \definemathsymbol [rVert] [close] [sy] [6B] [ex] [0D] Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] texshow down
Hi Patrick, texshow.contextgarden.net is not working working properly. I get Sorry, an error occured Probably some internal error. Please contact Patrick if the problem persist. Thanks, Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [contexttest-Feature Requests][76] floats and indenting
Comment By: Aditya Mahajan (adityam) Date: 2007-03-02 15:12 Message: Forgot to check the box to upload the file The file is not posted to the mailing list :-( I am attaching it now. Aditya\unprotect % Line:256 of page-flt \def\dodocomplexplacefloat[#1][#2][#3]#4% {\flushnotes \flushsidefloats % here ! \ifsomefloatwaiting % this was \checkwaitingfloats spread all over \doifinsetelse\v!always{#2} {\showmessage\m!floatblocks5\empty} {\expanded{\doifcommonelse{#2}{\flushfloatslist}}\doflushfloats\donothing}% % but which should be done before using box \floatbox \fi \ifmargeblokken \doifinset\v!margin{#2}\endgraf \fi \global\insidefloattrue \begingroup % ** \ifmargeblokken \doifinset\v!margin{#2}{\hsize\@@mbwidth}% \fi \the\everyinsidefloat \let\@@extrafloat\empty \presetmorefloatvariables{#2}% \dowithnextboxcontent % better a \the\everyfloattoks {\setlocalfloathsize \floatparameter\c!inner \fuzzysnappingfalse \postponenotes} % new {\doifsomething{\floatparameter\c!criterium} {\ifdim\wd\nextbox\floatparameter\c!criterium\relax \edef\forcedfloatmethod{\executeifdefined{\??fl\currentfloat\c!fallback}\v!here}% \fi}% \xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}% ** not yet done % we need to carry over the par because of side floats \doifnotinset\v!text{#2}{\carryoverpar\endgroup}% \global\sidefloatdownshift \zeropoint \global\sidefloatextrashift\zeropoint \ifparfloat \doifinset\v!reset{#2}\forgetsidefloats \doinhibitblank \fi% better move this to side floats %AM:Added \nonoindentation \dochecknextindentation{\??fl\currentfloat}% \dorechecknextindentation} \vbox} % Line:2599 of page-flt \def\sometopfloat [#1]{\someelsefloat[#1]} \protect % Test: Try with and without the patch \setupindenting[big,yes] \setupfloat [figure] [indentnext=auto] \starttext \section {Test} \placefigure[top]{top}{} \input knuth \input tufte \placefigure[bottom]{top}{} \input tufte \stoptext ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [NTG-context] \frak (Fractur) in math mode
On Wed, 28 Feb 2007, Taco Hoekwater wrote: Hi Aditya, Aditya Mahajan wrote: Hi Hans and Taco, Something seems to be broken with \frak. \frak does not work in math mode and works in text mode! For example $\frak ABC$ {\frak ABC} A workaround is to use \fraktur, which works fine in math mode, but it will be nice to remove this bug. It has been like that almost since day one, so I am not at all sure Hans would consider it a bug, just different from LaTeX (plain). Ok. I will document it somewhere then. But looking at the code, I can not figure out why \frak is different from \cal. The definitions look identical to me. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Math subformula numbering
On Fri, 23 Feb 2007, Hans Hagen wrote: Aditya Mahajan wrote: Any comments? I think that Mojca and I are the only people who use \startsubformulas right now (my fault, have not documented them), so breaking the backward compatibility of \startsubformulas should not be too big a problem. As long as it's consistent ... I'm really sensitive for consistency -) Just send me the patches needed. I will do that once I get home. (which reminds me of other pending patches but i assume that i get to know things once they're ready) The theorem part needs more work. I have something that works, but it needs more testing. I did not get any feedback on theorems, so I think that I really need to write a myway to show what can and cannot be done :-) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] Math subformula numbering
Hi Hans, Taco and Mojca, There is a bit of inconsistency between the two subformula numbering methods (\startsubformulas that I wrote, and \NR[+][a] of \startalign). While writing a paper I realized that both of them are needed. For example \startsubformulas[eq:encoder] \placeformula \startformula \startalign \NC Z_1 \EQ c_1 (X_1), \NR[eq:encoder 1] \intertext{and for $t=2,\dots,T$,} \NC Z_t \EQ c_t (X_1, \dots, X_t, \tilde Y_1, \dots, \tilde Y_{t-1}). \NR[eq:encoder t] \stopalign \stopformula \stopsubformulas and \placeformula \startformula \startalign \NC \hat X_t \EQ g_1(Y_1) \NR[eq:decoder][a] \NC M_1 \EQ l_1(Y_1) \NR[eq:memory][a] \intertext{and for $t=2,\dots,T$,} \decrementnumber[formula] \decrementnumber[formula] \NC \hat X_t \EQ g_t(Y_t, M_{t-1}) \NR[+][b] \NC M_t \EQ l_t(Y_t, M_{t-1}) \NR[+][b] \stopalign \stopformula However, the startsubformulas uses \@@fnseparator as separator while \NR[+][a] uses no separator. It is relatively straight forward to make \NR honor the separator, in \dododoformulanumber change \edef\hetnumber{#2} to \edef\hetnumber{\@@fnseparator#2} and \edef\hetnumber{#4} to \edef\hetnumber{\@@fnseparator#4} To maintain backward compatibility we can change \setupsubformulas[separator=\@@fmseparator] to \setupsubformulas[separator=] Any comments? I think that Mojca and I are the only people who use \startsubformulas right now (my fault, have not documented them), so breaking the backward compatibility of \startsubformulas should not be too big a problem. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] \rm in pmod, bmod, etc
On Sat, 3 Feb 2007, Taco Hoekwater wrote: It is cleaner when renamed a little: Taco Hoekwater wrote: [EMAIL PROTECTED] \def\preparebinrel#1% {\begingroup \setbox0=\hbox {\thinmuskip 0mu \medmuskip -1mu \thickmuskip -1mu \setbox2=\hbox{$#1\mathsurround0pt$}% \kern -wd2 ${}#1{}\mathsurround0pt$}% [EMAIL PROTECTED] {\endgroup \let\noexpand\binrel@@ \let\noexpand\currentbinrel \ifdim\wd00pt \mathbin \else \ifdim\wd0\z@ \mathrel \else \relax \fi\fi }% [EMAIL PROTECTED] } And: \unexpanded\def\overset#1#2% {\preparebinrel{#2}% [EMAIL PROTECTED] There was another request (although misguided) for overset in the mailing list today. I think that the following macros can go into the core: (Taco's version, with a typo corrected). %D \macros{overset, underset} %D %D The macros \type{\overset} and \type{\underset} are provided by %D \AMS\ packages in \LATEX. These macro allows you to place a symbol %D above or below another symbol, irrespective of whether the other %D symbol is a relation or something else, and without influencing the %D spacing. For most cases there is a better way to do such things %D (declaring a math command with limop option, or using accents), but %D occasionally these macros can be useful, for example %D %D \startbuffer %D \startformula %D \overset{*}{X} \underset{*}{X} %D \stopformula %D \stopbuffer %D \typebuffer \getbuffer %D %D Use these macros sparingly. Remember, \TEX\ was designed for %D mathematics, so there is usually a proper method for typesetting %D common math notation. %D These macros are a clearer version of [EMAIL PROTECTED] and %D \type{\binrel@@} macros in \AMSTEX\ packages. \def\preparebinrel#1% {\begingroup \setbox0=\hbox {\thinmuskip 0mu \medmuskip -1mu \thickmuskip -1mu \setbox2=\hbox{$#1\mathsurround0pt$}% \kern-\wd2 ${}#1{}\mathsurround0pt$}% [EMAIL PROTECTED] {\endgroup \let\noexpand\currentbinrel \ifdim\wd00pt \mathbin \else \ifdim\wd0\z@ \mathrel \else \relax \fi\fi}% [EMAIL PROTECTED] \unexpanded\def\overset#1#2% {\preparebinrel{#2}% [EMAIL PROTECTED] \unexpanded\def\underset#1#2% {\preparebinrel{#2}% [EMAIL PROTECTED] Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] feature requests from contextgarden
On Mon, 5 Feb 2007, Taco Hoekwater wrote: \Fixme will be the topic of the `how to write a module' tutorial at Epen Great! I have been planning to write a module that does something like that, but I have never managed to completely figure out the type of output that I want (endnote, footnote, sidenote,) and the features to support: list of fixme's, how critical is the fixme (show in log, give a warning, give a error), etc. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] regression testing: page image differences
On Mon, 5 Feb 2007, Sanjoy Mahajan wrote: Here are output differences between 20070112 and 20070123, mostly to test the regression tests. Here's how to decode it. The line WARN: tex/context/base/math-pln.tex/test-001-20070112-20070123.report means tex/context/base/math-pln.tex/test-001.tex was run through 20070112 and 20070123 to make pdf files, converted to bitmaps, and subtracted (page by page), and that there were some differences. The line [p.0001] 0.176462 dB diff [see png's in /tmp/tmp.mRMxS24124/] menas that p.1 was different in the two runs, but only slightly (about 0.2 dB). Here another example with a slightly larger dB difference: Could it be because of the differences between lm-math and cm-math fonts? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] \rm in pmod, bmod, etc
On Sat, 3 Feb 2007, Taco Hoekwater wrote: Aditya Mahajan wrote: Hi Hans and Taco, Do you think it makes sense to replace {\rm mod} in the definition of bmod and pmod (in math-pln.tex) by \mfunction{mod}? Yes. It would even better to move the definitions to math-tex, where the other named operators live. On Sat, 3 Feb 2007, Hans Hagen wrote: makes sense, rather encoding independent eh? \ifx\mfunction\undefined \def\mfunction{\mathbin{\rm#1}} \fi Why the mathbin? In math-ini.tex \mfunction is defined as \def\mfunction#1{{\mr#1}}. \def\bmod {\nonscript \mskip-\medmuskip \mkern5mu \mfunction{mod}% \penalty900 \mkern5mu \nonscript \mskip-\medmuskip} \def\pmod#1% {\allowbreak \mkern18mu (\mfunction{mod}\,\,#1)} How about replacing \, with \mskup\thinskip? That will be the macro more readable. i changed it Thanks. (wondering what it does in pln) Probably because it is defined by plain.tex Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] \rm in pmod, bmod, etc
On Fri, 2 Feb 2007, Aditya Mahajan wrote: Hi Hans and Taco, Do you think it makes sense to replace {\rm mod} in the definition of bmod and pmod (in math-pln.tex) by \mfunction{mod}? Another request: I am thinking of updating the nath module, and I notice that nath.sty goes into considerable length to make math commands robust (whatever that means). Basically \def\makerobust#1{% \expandafter\let\csname @[EMAIL PROTECTED] #1\endcsname=#1 \unexpanded\def#1{\csname @[EMAIL PROTECTED] #1\endcsname}} % Making composed math symbols robust: \makerobust\cong \makerobust\notin If I understand correctly, this can be achieved by replace \def\cong to \undexpanded\def\cong in math-pln. I do not understand expansion very well, but is there a disadvantage of not defining math characters to be unexpandable to begin with? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] texexec return codes
On Wed, 10 Jan 2007, Hans Hagen wrote: Norbert Preining wrote: On Mit, 10 Jan 2007, Hans Hagen wrote: i just uploaded a current with some patched to texexec (for norbert) Thanks a lot, but it is getting worse ;-) Now everything is the other way round Ah texmfstart --verbose texexec --make --all --fast en should generate format and report success It reports success, but returns 1, which is bad: execution was successful bagnasciuga:~# echo $? 1 bagnasciuga:~# texmfstart --verbose texexec --make --all --fast xx reports a failure and exits with code 1 it reports 0!! execution failed bagnasciuga:~# echo $? 0 bagnasciuga:~# So we are close, but not finished ;-) in scripts/context/ruby/switch.rb i say ... def exit if @error then Kernel.exit(1) else Kernel.exit(0) end end Maybe set Kernel.exit! rather than exit. exit! bypasses exception handling and at_exit stuff. See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6482 Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [NTG-context] Problems with mathalign
On Thu, 4 Jan 2007, Hans Hagen wrote: Taco Hoekwater wrote: Aditya Mahajan wrote: (changed lists) On Wed, 3 Jan 2007, Taco Hoekwater wrote: Aditya Mahajan wrote: I can confirm that there is an extra number. I do not know what is causing this. I am not aware of anything in core-mat has changed. There is that extra stuff in \everymathematics. Could that be it? The file runs fine with ConTeXt 2006-11-24 19:15 so it is something in the last month. (This version is available as the windows stand alone distribution from pragma's website.) I've been staring at this for some time now, but I don't see happens. The number comes from \stopformula, but I do not remember what was supposed to prevent its appearance in the first place. If you still have the Nov 24 context version, can you run this: \starttext \loggingall \placeformula \startformula \startalign \NC a \EQ b \NR[+] \NC c \EQ d \NR[+] \stopalign \stopformula \stoptext and email me the log file? something before an \crcr ? the alignment sees an extra line This is working correctly in the latest beta. I still do not understand what was causing this problem. AFAIU, the beta just juggles around stuff from math-pln to core-mat. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [NTG-context] Problems with mathalign
On Fri, 5 Jan 2007, Taco Hoekwater wrote: Aditya Mahajan wrote: This is working correctly in the latest beta. I still do not understand what was causing this problem. AFAIU, the beta just juggles around stuff from math-pln to core-mat. Problem in a nutshell: Correct old: math-pln.tex:[EMAIL PROTECTED] core-mat.tex:[EMAIL PROTECTED]@y core-mat.tex:[EMAIL PROTECTED]@y} Broken old: core-mat.tex:[EMAIL PROTECTED]@y core-mat.tex:[EMAIL PROTECTED]@y} math-pln.tex:[EMAIL PROTECTED] New: core-mat.tex:[EMAIL PROTECTED] core-mat.tex:[EMAIL PROTECTED]@y core-mat.tex:[EMAIL PROTECTED]@y} Thanks. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Script files for third party modules.
On Wed, 3 Jan 2007, Hans Hagen wrote: Basically need to esacpe the quote inside quote. oh, so actually we should patch texexec to escape the tui stuff? No, I think that texexec is working in an expeted manner. I did not clearly understand how it worked, and that is why the confusion. The module is finally ready. It works well for small snippets (1000 lines). I have uploaded it to http://modules.contextgarden.net/t-vim I made a mistake while naming the module, so all the files are in t-vim.tar.gz directory instead of t-vim. Hopefully, this will not cause any trouble. The documentation is at http://dl.contextgarden.net/modules/t-vim.tar.gz/doc/context/t-vim/t-vim.pdf and a sample matlab and context pretty output at http://dl.contextgarden.net/modules/t-vim.tar.gz/doc/context/t-vim/t-vim-demo.pdf The context output is very similar to what I see on the vim screen :) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Incorporating math ligatures in ConTeXt
On Sun, 3 Dec 2006, Taco Hoekwater wrote: Hi, Aditya Mahajan wrote: Hi Hans and Taco, I recently came across mathlig.tex (ftp://tug.ctan.org/pub/tex-archive/macros/generic/misc/mathlig.tex) which allows one to write \mathlig {-} {\rightarrow} and then in math mode - will be equal to \rightarrow so one can just write $A - B$ Yes, that reads much better. It really should be a separate module because of potential conflicts with active characters, but you can just incorporate the existing mathlig.tex wholesale in a module file since it appears to work (but consider using \protect/\unprotect instead of the @ trickery) Here is the first attempt. I have cleaned up mathlig.tex. Aditya thrd-lig.tex Description: Binary data ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] An Idea for the garden
On Tue, 17 Oct 2006, Mojca Miklavec wrote: On 10/14/06, Aditya Mahajan wrote: Wasn't there a project somewhere with the compiled pdf of all sources? Do you mean this one? http://wiki.contextgarden.net/User:Luigi.scarso/modules.pdf Yes. I noticed that Luigi also has a file for making the sources. I always wondered what was the purpose of s-mod-2.tex and this document explains it. I will work with this and see if this document can be kept up to date. Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] An Idea for the garden
On Fri, 13 Oct 2006, Patrick Gundlach wrote: Hi Aditya, Occasionally, while browsing sources at source.contextgarden.net, I feel the need of seeing the pdf copy of that file. I wonder how difficult will it be to add a link, say View pdf with each file listing, so that if I click that link, I see the output of texexec --module filename.tex Well, from what is available now, it is still a very big step. But I'll write this feature request down and when I've got too much time Until then, please generate those by yourself (but now I start thinking on it, I could generate the files with a script and just create this link ... just thinking aloud). OK, its a nice idea and it shouldn't be too hard. I was playing around with a script, some observations. Some Context files do not compile, I will make a list of them and see how they can be corrected. The new mkii and mkiv means that the script needs to be more intelligent than a simple for FILE in *.* do texmfstart texexec --module $FILE ; done; If the file ends in mkii, you need to add --result $FILE-mkii.pdf (or something like that) Wasn't there a project somewhere with the compiled pdf of all sources? Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
[dev-context] An Idea for the garden
Hi Patrick, Occasionally, while browsing sources at source.contextgarden.net, I feel the need of seeing the pdf copy of that file. I wonder how difficult will it be to add a link, say View pdf with each file listing, so that if I click that link, I see the output of texexec --module filename.tex I do not know if the perl scripts support this. From what I remember, in perl texutil kept care of generate module listing. Maybe, the pdf files can be cached (no idea how) so that they are not regenerated, or maybe they can be autogenerated each time the source files are updated. Do not spend too much time on this, I can always do it on my own machine :-) Aditya ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context