Re: [NTG-context] next beta
> i.e. we already had CL CM and CR, so CT is new .. should be wikified. The wiki [1] describes these \C* commands: \CR color is applied to the background of the text and the remaining space on the right; \CC color is applied to the background of the text only; \CM color is applied to the background of the text and the remaining space on both sides; \CL color is applied to the background of the text and the remaining space on the left. [1] http://wiki.contextgarden.net/Tabulate What does CT do differently than CC? It's not quite clear from the example. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (no subject)
non-null wrote: > I want to be able to adjust the vertical white space between the list > introduction text and the list of items. How can this be > accomplished? Probably \setupitemgroup[itemize][before={\blank[0em]}] will do what you want. For a complete list of parameters: http://wiki.contextgarden.net/Command/setupitemgroup \starttext \setupitemgroup[itemize][before={\blank[0em]}] \starttext \startitemize[packed] asdf asdf asdf asdf \item asdf \item asdf \item asdf \stopitemize \stoptext \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (no subject)
> This is more of a follow-up question than an answer: wouldn't > \blank[nowhite] be better? Quite possibly. When I read "I want to be able to adjust the vertical white space" my mind went towards adding whitespace instead of removing it, but that was just an assumption. I admit that I didn't look up the original thread. :-) Cheers, Sietse On 20 March 2013 13:09, Marcin Borkowski wrote: > Dnia 2013-03-20, o godz. 12:35:11 > Sietse Brouwer napisał(a): > >> non-null wrote: >> > I want to be able to adjust the vertical white space between the >> > list introduction text and the list of items. How can this be >> > accomplished? >> >> Probably \setupitemgroup[itemize][before={\blank[0em]}] will do what >> you want. For a complete list of parameters: >> http://wiki.contextgarden.net/Command/setupitemgroup > > This is more of a follow-up question than an answer: wouldn't > \blank[nowhite] be better? > > Best, > > -- > Marcin Borkowski > http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski > Adam Mickiewicz University > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] man pages for ConTeXt: looking for volunteers
Mojca wrote: > Hans just implemented auto-conversion of help into man pages for the > lua scripts. > but if > there are any volunteers to help polishing out and provide either > more extensive descriptions, examples, ... or overall improvements, An excellent idea. To cut the work into bite-sized pieces: over the coming weeks, I will post these files on the list one by one and solicit specific improvements / check for befuddlement. First, though, I have some questions: 1. I assume the man pages are created from the XML files, and we should edit the XML files -- is this correct? 2. Is the XML-to-man script included in the distribution? That would (a) make it easier to check the result of an edit, and (b) make it easier to find the answer to question 3 for myself. ;-) 3. Is there a key to specify bold and italic in the XML? (\fB...\fP and \fI...\fP in the man page.) Or, if you want to keep it semantic: are (\fB) and (\fI, or also \fB) supported? 4. I really really like the groupings of the flags in the XML files. This useful grouping doesn't show up in the man pages, however. Perhaps the end of a subcategory could correspond to .TP in the man pages? 5. Lastly, I think it would be good to include a standard SEE ALSO block at the end of each man page, to list all the scripts we have man pages for. This will make it easier for users to discover the man pages. Example below. If such a block could be supported, I would be happy to write it. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] placefigure
On 21 March 2013 17:26, Hans Hagen wrote: > while fixing some buglets that showed up in the test suite I ran into > \placenamedfloat > maybe worth wikifying (bug will be solved in beta) Wikified: http://wiki.contextgarden.net/Command/placenamedfloat Below is what I wrote; is that correct? Groetjes, Sietse == Description == If a float is placed (with \placefloat) location argument somewhere:name, it is not placed immediately. Instead, it may be manually placed elsewhere with \placenamedfloat. == Example == This example declares four figures to be placed elsewhere: alpha, beta, gamma, and delta. The first \placenamedfloat call places all figures with l in their name (i.e. alpha and delta; the next two calls place gamma and beta, respectively. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] command reference (was: upto current)
Hi all, Peter wrote: > What about one lua table per command? > See also: > - http://meeting.contextgarden.net/2010/talks/2010-09-14-peter-referencelua/ Lukáš wrote: > Some connection to wiki would be useful, too - once a command > definition is prepared for PDF manual, it would be good to have > a generator which would convert and add info to wiki. > > But I'm thinking about how to avoid doubling documentation work > (not: wiki <-> PDF <-> whatever, but: something (be it Lua) -> {PDF, wiki, > whatever}). Hello all, As regards the question 'where/how to store a the master information of the command reference'; I' been thinking on that for a while, and I believe "on the wiki / in structured wiki templates" is the best answer. This is not because the wiki syntax is so nice -- as far as that goes, Lua is nicer. But: the wiki is massively more visible than any file or directory in the standalone could ever be. These are advantages the wiki copy has over other copies: A. It is the most visible copy B. It is the easiest copy for people to edit C. It has versioning and contributor-tracking built-in D. The wiki will always receive contributions. If it is also the master copy, we don't have to backmerge the contributions into some other file. E. The wiki updates immediately when people edit it. F. There exists a form-based editor for wiki pages, to ensure people use the template. Example: http://discoursedb.org/w/index.php?title=Picture_IDs_are_perfectly_sensible&action=formedit G. There exists an extension to mark versions as 'reviewed'. Now, creating a suitable template is core to this plan. Since that is (1) a rather tricky problem, (2) one that I want to solve anyway (because even if we go Lua-based, we still want a wiki template to write to), I will open a separate e-mail thread on the subject. == How to make sure people use the template? == The Semantic Forms extension means that with one click of the button, you are taken to a semantic form to create or edit (part of) a command page. You fill in the fields; the extension enters the field values into the proper bits of the template. You can add descriptions of what to write in the field. http://www.mediawiki.org/wiki/Extension:Semantic_Forms Example of how such a form will look: http://discoursedb.org/w/index.php?title=Picture_IDs_are_perfectly_sensible&action=formedit == How do we know we can trust wiki edits? == For that, there is the MediaWiki extension Flagged Revisions, to mark versions as approved. It is used by wikibooks, inter alia. http://www.mediawiki.org/wiki/Extension:FlaggedRevs Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] wiki page for \feature
Dear Idris, I have merged your output graphic into the article --- perhaps a bit large, but I wanted to be sure the features were legible. Thank you for including the PDF, that made things easier. I have taken the liberty of moving the page title to [[Featuresets]] ---easier to remember, I think, and easier to link to. I've updated your redirects, of cours. [[Open Type Font Features]], [[Open Type Fonts and Featuresets in MkIV]], and [[Font features]] all redirect there. http://wiki.contextgarden.net/Featuresets#Sample_file_with_examples Thank-you for writing this article, it is much appreciated. Sietse On 22 March 2013 00:01, Idris Samawi Hamid ادريس سماوي حامد wrote: > Dear gang, > > I made a wiki page for \feature et al: > > http://wiki.contextgarden.net/Open_Type_Fonts_and_Featuresets_in_MkIV > > Towards the end we need a graphical sample of the sample file, but I do not > know how to do that. See > > === > Now let us review the results: > > [output/graphic here] > === > > I have to move on to other projects so I'm leaving completion and > improvement to others in the community. Here is the sample file (needs > latest beta! pdf attached as well) that needs graphical output on the page: > > == > \definefontfeature > [schola-preset] > [mode=node,script=latn,language=dflt,kern=yes,liga=yes,lnum=yes] > > \starttypescript [serif] [schola-preset] [name] > \definefontsynonym [Serif] > [name:texgyreschola-regular.otf][features=schola-preset] > \stoptypescript > > \starttypescript [serif] [schola-preset] [size] > \definebodyfont > [35.8pt,29.8pt,24.8pt,20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt] > [rm] > [tf=Serif sa 1] > \stoptypescript > > \starttypescript [schola-default] > \definebodyfontenvironment > [schola-default] > [default] > [interlinespace=2.7ex] > \definetypeface [schola-default] [rm] [serif] [schola-preset] > [schola-preset] % [default] > \stoptypescript > > \usetypescript[schola-default] > \setupbodyfont[schola-default,12pt] > > \definefontfeature[f:smallcaps] [smcp=yes] > \definefontfeature[f:thinimacron] [ss04=yes] > \definefontfeature[f:upsidedown][dlig=yes] > > > \definefontfeature[f:newstyle] [onum=no] > \definefontfeature[f:nocaps][smcp=no] > \definefontfeature[f:wideimacron] [ss04=no] > \definefontfeature[f:rightsideup] [dlig=no] > > > \definefontfeature[f:ligatures] [liga=yes] > \definefontfeature[f:noligatures] [liga=no] > > \definefontfeature[f:oldstyle] [onum=yes,lnum=no] > > \definefontfeature[f:oldstyleupsidedown][onum=yes,dlig=yes] > \definefontfeature[f:newstylerightsideup] [onum=no,dlig=no] > > \definefontfeature[f:oldstylewmacron] [ss04=no,onum=yes] > \definefontfeature[f:newstylesmallcaps] [smcp=yes,onum=no] > > \startTEXpage[offset=10pt] > > \define\SAMPLE{123 Idrīs ?` !` VA fi} > > \SAMPLE\blank > > \feature[+][f:oldstyle] \SAMPLE \blank > \feature[more][f:thinimacron] \SAMPLE \blank > \addfeature[f:upsidedown] \SAMPLE \blank > > \feature[+][f:smallcaps]\SAMPLE \blank > \addfeature[f:wideimacron] \SAMPLE \blank > > \feature[-][f:upsidedown] \SAMPLE \blank > > \feature[=][f:oldstyleupsidedown]\SAMPLE \blank > > \feature[!][f:smallcaps]\SAMPLE \blank > > \feature[<] \SAMPLE \blank > \stopTEXpage > == > > Thanks and best wishes > Idris > -- > Professor Idris Samawi Hamid > Department of Philosophy > Colorado State University > Fort Collins, CO 80523 > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Hiding text
> is it possible to define a start-stop command to hide text within? > > Something like: > > \definestartstop[Hidden][before=\starthiding,after=\stophiding] Just define any buffer, and don't call \getbuffer[mybuffer]. Buffers are not typeset, by default, until you get them. The below is shamelessly adapted from Hans's \starthiding (which already exists): \definebuffer[Hidden] % uncomment the below to turn this into a non-hiding buffer. % \setupbuffer[Hidden][after={\getbuffer[Hidden]}] \startHidden asdf asdf \stopHidden Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] command reference (was: upto current)
> Peter wrote: >> What about one lua table per command? >> See also: >> - http://meeting.contextgarden.net/2010/talks/2010-09-14-peter-referencelua/ NB1: I waffled a lot about wiki templates in the previous e-mail, but of course it is also an option to use the Lua tables format and store those files on the wiki. That gives us the visibility and editability of the wiki without binding us to the wiki template format. --Sietse On 22 March 2013 15:42, Sietse Brouwer wrote: > Hi all, > > Peter wrote: >> What about one lua table per command? >> See also: >> - http://meeting.contextgarden.net/2010/talks/2010-09-14-peter-referencelua/ > > Lukáš wrote: >> Some connection to wiki would be useful, too - once a command >> definition is prepared for PDF manual, it would be good to have >> a generator which would convert and add info to wiki. >> >> But I'm thinking about how to avoid doubling documentation work >> (not: wiki <-> PDF <-> whatever, but: something (be it Lua) -> {PDF, wiki, >> whatever}). > > Hello all, > > As regards the question 'where/how to store a the master information > of the command reference'; I' been thinking on that for a while, and I > believe "on the wiki / in structured wiki templates" is the best > answer. > > This is not because the wiki syntax is so nice -- as far as that goes, > Lua is nicer. But: the wiki is massively more visible than any file or > directory in the standalone could ever be. > > These are advantages the wiki copy has over other copies: > > A. It is the most visible copy > B. It is the easiest copy for people to edit > C. It has versioning and contributor-tracking built-in > D. The wiki will always receive contributions. If it is also the > master copy, we don't have to backmerge the contributions into some > other file. > E. The wiki updates immediately when people edit it. > F. There exists a form-based editor for wiki pages, to ensure people > use the template. Example: > http://discoursedb.org/w/index.php?title=Picture_IDs_are_perfectly_sensible&action=formedit > G. There exists an extension to mark versions as 'reviewed'. > > Now, creating a suitable template is core to this plan. Since that is > (1) a rather tricky problem, (2) one that I want to solve anyway > (because even if we go Lua-based, we still want a wiki template to > write to), I will open a separate e-mail thread on the subject. > > == How to make sure people use the template? == > > The Semantic Forms extension means that with one click of the button, > you are taken to a semantic form to create or edit (part of) a command > page. You fill in the fields; the extension enters the field values > into the proper bits of the template. You can add descriptions of what > to write in the field. > > http://www.mediawiki.org/wiki/Extension:Semantic_Forms > Example of how such a form will look: > http://discoursedb.org/w/index.php?title=Picture_IDs_are_perfectly_sensible&action=formedit > > > == How do we know we can trust wiki edits? == > > For that, there is the MediaWiki extension Flagged Revisions, to mark > versions as approved. It is used by wikibooks, inter alia. > http://www.mediawiki.org/wiki/Extension:FlaggedRevs > > Cheers, > > Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Hiding text
On 22 March 2013 17:05, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > interesting trick; however, it doesn't work when used inside a macro: > Any idea? Nope, sorry. It smells like something to do with expansion; all I know about expansion is that it causes problems (sometimes) when there are macros inside macros. But it might not be expansion. I hope that helps, but it probably doesn't. ;-) --Sietse > Hello, > > interesting trick; however, it doesn't work when used inside a macro: > > > \definebuffer[Hidden] > > \def\WWW{ > \startHidden > DDD > \stopHidden > } > > \starttext > AAA > > \startHidden > BBB > \stopHidden > > \WWW > \stoptext > > > Any idea? > > TIA. > > Best regards, > > Lukas > > > > On Fri, 22 Mar 2013 16:42:27 +0100, Sietse Brouwer > wrote: > >>> is it possible to define a start-stop command to hide text within? >>> >>> Something like: >>> >>> \definestartstop[Hidden][before=\starthiding,after=\stophiding] >> >> >> Just define any buffer, and don't call \getbuffer[mybuffer]. Buffers >> are not typeset, by default, until you get them. The below is >> shamelessly adapted from Hans's \starthiding (which already exists): >> >> \definebuffer[Hidden] >> % uncomment the below to turn this into a non-hiding buffer. >> % \setupbuffer[Hidden][after={\getbuffer[Hidden]}] >> >> >> >> \startHidden >> asdf asdf >> \stopHidden >> >> Cheers, >> Sietse > > > > -- > Ing. Lukáš Procházka [mailto:l...@pontex.cz] > Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] > Bezová 1658 > 147 14 Praha 4 > > Tel: +420 244 062 238 > Fax: +420 244 461 038 > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] command reference
Sietse wrote: >> NB1: I waffled a lot about wiki templates in the previous e-mail, but >> of course it is also an option to use the Lua tables format and store >> those files on the wiki. That gives us the visibility and editability >> of the wiki without binding us to the wiki template format. Hans wrote: > isn't wikimedia lua aware nowadays? Hah, so it is — I didn't know that. That sounds like it might be an ideal fit at least for displaying the command reference, possibly also for storing its info. In case anyone else is curious: here are some useful pages I found. (The information was a bit scattered sometimes, but this set of pages covers most bases.) --Sietse Wikipedia's main page on the Lua extension: http://en.wikipedia.org/wiki/Wikipedia:Lua Good example template: http://en.wikipedia.org/wiki/Module:BananasArgs The reference manual: https://www.mediawiki.org/wiki/Extension%3AScribunto/Lua_reference_manual The extension's page: http://www.mediawiki.org/wiki/Extension:Scribunto Some discussion on using Lua databases: http://lists.wikimedia.org/pipermail/wikitech-l/2013-February/066656.html ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] man pages for ConTeXt: looking for volunteers
Sietse wrote: > 5. Lastly, I think it would be good to include a standard SEE ALSO > block at the end of each man page, to list all the scripts we have man > pages for. Hans wrote: >> sure, we can add stuff How about this? Compile a ConTeXt file or recompile ConTeXt. Convert LaTeX Babel codes for Greek into UTF-8 ConTeXt TDS Management Tool (aka luatools) Manage the ConTeXt and MetaTeX cache Generate MkII character tables Check ConTeXt file for syntax errors Show International Color Consortium table for a file (See `context`) Create ePub zip file Convenience script for fast directory-changing Collect Flac albums in XML file Inspect and manage the ConTeXt font database A simple Lua-based grep Lists of ConTeXt commands (for text editors) Compile MetaPost to PDF MetaTeX process management Extract `%D`-style documentation from ConTeXt module source files Merge: replace loadmodule(...) calls with module contents Produce files for ConTeXt describing hyphenation patters Inspect metadata and font info of PDFs LuaTeX profiler Rsync helper script MetaTeX factotum: run scripts and get info Convert spelling dictionaries to SciTE Lua format Simple webserver TeXworks startup script Process timing data after `context --timing` run Tools to glob directories into XML Simple unzipper Updating script for ConTeXt minimals, used by first-setup.sh Watch a file for changes ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] man pages for ConTeXt: looking for volunteers
Sietse wrote: > How about this See Also block Hans wrote: > and where should that go into? At the end of each man page, as a standard footer --- so that people may discover the mtx scripts and their capabilities. You can also reduce it to just a list of script names without descriptions: context mtx-flac mtx-profile mtx-babelmtx-fonts mtx-rsync mtx-base mtx-grep mtxrun mtx-cachemtx-interface mtx-scite mtx-charsmtx-metapost mtx-server mtx-checkmtx-metatexmtx-texworks mtx-colors mtx-modulesmtx-tools mtx-context mtx-packagemtx-unzip mtx-epub mtx-patterns mtx-update mtx-fcd mtx-pdfmtx-watch --Sietse On 26 March 2013 10:38, Hans Hagen wrote: > On 3/26/2013 1:15 AM, Sietse Brouwer wrote: >> >> Sietse wrote: >>> >>> 5. Lastly, I think it would be good to include a standard SEE ALSO >>> block at the end of each man page, to list all the scripts we have man >>> pages for. >> >> >> Hans wrote: >>>> >>>> sure, we can add stuff >> >> >> How about this? > > > and where should that go into? > > >> >> Compile a ConTeXt file or recompile >> ConTeXt. >> Convert LaTeX Babel codes for Greek into >>UTF-8 >> ConTeXt TDS Management Tool (aka >> luatools) >> Manage the ConTeXt and MetaTeX cache >> Generate MkII character tables >> Check ConTeXt file for syntax errors >> >> Show International Color Consortium table for >>a file >>(See `context`) >> Create ePub zip file >> Convenience script for fast >> directory-changing >> Collect Flac albums in XML file >> Inspect and manage the ConTeXt font >> database >> A simple Lua-based grep >> Lists of ConTeXt commands (for text >> editors) >> Compile MetaPost to PDF >> >> MetaTeX process management >> Extract `%D`-style documentation from >>ConTeXt module source files >> Merge: replace loadmodule(...) calls >>with module contents >> Produce files for ConTeXt describing >>hyphenation patters >> Inspect metadata and font info of PDFs >> >> LuaTeX profiler >> Rsync helper script >> MetaTeX factotum: run scripts and get >> info >> Convert spelling dictionaries to SciTE Lua >>format >> Simple webserver >> TeXworks startup script >> Process timing data after >>`context --timing` run >> Tools to glob directories into XML >> Simple unzipper >> Updating script for ConTeXt minimals, >>used by first-setup.sh >> >> Watch a file for changes >> >> > > > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \setupenumerations, alternative=serried is ignored when setting up multiple enumerations
Hi Tobias, > When I try to use \setupenumerations in the latest beta > (2013.03.22 12:06) for multiple enumerations, the > alternative=... is ignored for all but the first enumeration. It's not just the enumeration; e.g. the color key, too is applied to only to the first enumeration class named. I haven't seen the idiom \setupenumerations[a,b][...] before; I have always used \setupenumerations[a][...] \setupenumerations[b][...] which works fine. Does the manual you were using mention anywhere that the [a,b] idiom should work? If it doesn't, perhaps you simply made a misassumption; if it does, someone more knowledgeable should tell us whether it is the manual or the code that is wrong. Thanks anyhow for bringing this up on the mailing list, of course. And have fun learning ConTeXt! Cheers, Sietse (Slightly changed MWE below, which shows the behaviour of serried) \defineenumeration[a] [text=a] \defineenumeration [b] [text=b] % This only sets up a \setupenumerations [a,b][alternative=serried, color=red] % This sets up both a and b % \setupenumerations [a][alternative=serried, color=red] % \setupenumerations [b][alternative=serried, color=red] \starttext \starta \input ward \stopa \startb \input ward \stopb \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setuphead and Table of Content
Hi Malte, On 31 March 2013 11:53, Malte Stien wrote: > \definehead[foosection][section] > \setuphead[foosection][number=yes, ownnumber=yes, sectionsegments=section] > However, I need them to show up in the table of content. What's the trick? This is the trick: \definecombinedlist[content][chapter,section,foosection,barsection,...] The Table of Contents uses ConTeXt's combinedlist mechanism; to alter the Table of Contents, redefine the list. (You have to redefine it; \setupcombinedlist[content] alters how the list functions, but not what goes into it.) Useful wiki pages: http://wiki.contextgarden.net/Titles (which is where I found the \definecombinedlist trick) http://wiki.contextgarden.net/Command/definecombinedlist (which actually goes into lists and what they do) In case you're curious: this is how the TOC is defined in strc-def.mkiv. \definecombinedlist [\v!content] [\v!part, \v!chapter, \v!section, \v!subsection, \v!subsubsection, \v!subsubsubsection, \v!subsubsubsubsection] [\c!level=\v!subsubsubsubsection, \c!criterium=\v!local] Hope this helps! Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] TeX Live 2013 --- until when can we work on the man pages?
Hello all, I didn't get around to working on the man pages these past 2 weeks. Now, I just saw this timing plan on the TeX Live website: http://www.tug.org/texlive/ March 27: sources committed, builds begin. April 8: tlnet (and TL'12) frozen, tlpretest starts, CTAN updates continue there. May 20: complete freeze for final build, no more updates, final doc tweaks, always more testing. Does this mean any improvements to the man pages should be in on April 8; or that you want them May 20; or has the deadline already passed and are any improvements due next year? Mojca, perhaps you know this? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] combinations
Hi Hans, Is the following correct? (1) [alternative=...] is a new key for \definecombination (2) \definecombination[mycombiA][alternative=text] means you specify the combination's contents as item, caption, item, caption, etc. \startcombination[mycombiA][nx=2,ny=1] {item}{caption} {another item}{another caption} \stopcombination (3) \definecombination[mycombiB][alternative=label] means you specify the combination's contents as item, item, item, etc. \startcombination[mycombiB][nx=2,ny=1] {item} {another item} \stopcombination and the caption (label) will be placed automatically. (4) You can setup the mycombiB labels like so: \setuplabel[combination:mycombiB][ text={Item }, numberconversion=character, stopper=! ] (If you do not setup the mycombiB label, each item's label will be a bold number.) Cheers, Sietse On 15 April 2013 10:50, Hans Hagen wrote: > > Hi, > > As follow up on the combinations tread I made this: > > \useMPlibrary[dum] > > \starttext > > \definecombination[mycombi][alternative=label] > > \setuplabel[combination:mycombi][text={Item > },numberconversion=character,stopper=!] > > \startcombination[mycombi][2*2] > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > \stopcombination > > \blank[2*big] > > \startcombination[mycombi][nx=2,ny=1,continue=yes] > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > \stopcombination > > \blank[2*big] > > \startcombination[mycombi][alternative=text,nx=2,ny=2] > {\externalfigure[dummy][width=4cm,height=1cm]} {alpha} > {\externalfigure[dummy][width=4cm,height=1cm]} {beta} > {\externalfigure[dummy][width=4cm,height=1cm]} {gamma} > {\externalfigure[dummy][width=4cm,height=1cm]} {delta} > \stopcombination > > \blank[2*big] > > \startcombination[mycombi][2*2] > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > {\externalfigure[dummy][width=4cm,height=1cm]} > \stopcombination > > \stoptext > > A relative simple extension but probably useful. > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [***SPAM***] Title of figure not below the figure, but on the right side
> But now I have a figure, where the (pretty long) > title-text should be on the right side, how to > get this? Define a float type `rightfigure` that inherits from `figure`; then setup that float's caption with \setupcaption[rightfigure][...=...]. Like so: \definefloat[rightfigure][rightfigure][figure] \setupcaption[rightfigure][location=right] \starttext \placefigure{caption 1}{\framed{figure 1}} \placerightfigure{caption 2}{\framed{figure 2}} \placefigure{caption 3}{\framed{figure 3}} \stoptext Example stolen from: http://wiki.contextgarden.net/Command/setupcaption On what wiki pages did you look? Perhaps you could add a sentence 'For adjusting the captions and their location, see {{cmd|setupcaption}}.' so that future users will be led to the page they need. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] combinations
Perhaps the default for the label could be numberconversion=character --- subfigures are more commonly numbered a, b, c, I think. Wikified at http://wiki.contextgarden.net/Command/setupcombinations http://wiki.contextgarden.net/Command/startcombination Cheers, Sietse On 15 April 2013 16:04, Hans Hagen wrote: > > On 4/15/2013 3:40 PM, Sietse Brouwer wrote: > >> Is the following correct? > > > indeed > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Title of figure not below the figure, but on the right side
> How can I now tell, where to place the figure? There are keys like "here", > or "force", or "bottom" and so on, how to use them in this configuration? > (my tries failed so far) I don't know! \startplacerightfigure[location=bottom,...] should work, but doesn't. (MWE below.) Perhaps somebody else knows? Or perhaps this is a bug? \definefloat[rightfigure][rightfigures][figure] \setupcaption[rightfigure][location=right] \setupwhitespace[big] \useMPlibrary[dum] \starttext \input davis \par \input knuth \par \input khatt-en \par % \showboxes \startplacerightfigure[ location=bottom, title={Tolles Bild}, reference=fig:demo, number=no, ] {\externalfigure[dum]} \stopplacerightfigure \input linden \par \input weisman \par \input zapf \par \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Mismatched font size when switching fonts in the chapter title
Hi Tim, [PalatinoRoman sa 1] This means "PalatinoRoman scaled at 1 x bodyfontsize. The document's body font size is 12 pt, but chapter headers usually are ... like, about 2.4 * body font size? Hence the size mismatch. [PalatinoRoman sa *] This means "AnotherFont is PalatinoRoman scaled to 1 x the font size at time of calling. Compare these two MWE's (I've changed the font name to texgyrepagellaregular so that the example will work for any ConTeXt user.) \setupbodyfont[12pt] \definefontsynonym[PalatinoRoman][texgyrepagellaregular][features=default] \definefont[AnotherFontSaOne][PalatinoRoman sa 1] \definefont[AnotherFontSaStar][PalatinoRoman sa *] \starttext \chapter{Fonts and \AnotherFontSaOne Fonts} Generalized \AnotherFontSaOne Generals. (Constant size) \chapter{Fonts and \AnotherFontSaStar Fonts} Generalized \AnotherFontSaStar Generals. (Adapt to current size) \stoptext I got this information from page 5 of the Fonts chapter of the long-coming manual. (Not the same as the document detailing what you can do with OTF and Lua, although I think that one, too, is called a fonts manual.) http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [***SPAM***] Updating Context or \"Never change a running System\"?
Hello Janis, The closest you will get to a changelog, at the moment, is the git mirror of the source: http://repo.or.cz/w/context.git That is not so useful if you want to know what new features have arrived in the past year, but I thought I should mention it anyway. I think one could also find a reasonable subset of feature announcements by looking at e-mails to this list with the following properties * from:pra...@wxs.nl (that's Hans) * "new in" OR "next beta" OR "new beta" * after:2011-11-04 * (possibly: first in thread) Unluckily, I can't convince my Gmail to search for that --- it ignores the quotation marks, so I get buried in false positives. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Hyphenation documentation
Hello all, I've just pulled together some questions of mine and their answers, and written them up into a hyphenation Q&A. http://wiki.contextgarden.net/Hyphenation http://wiki.contextgarden.net/Command/definebreakpoint Unfortunately, there are still some holes in the documentation I wrote. Questions I still have, and which I now pose to the list: 1. how do I protect a single instance of a word against hyphenation? Does ConTeXt, like LaTeX, use \hbox{myfragileword}, or something different? 2. In the command \definebreakpoint, what do these keys do? I can't get them to do anything (MWE below) ** left ** middle ** right 3. Is there perhaps a bug in breakpoints of type 2 and 3. (MWE below.) The key 'type' seems to control where hyphens appear. If 1 is a hyphenation character of type 1, etc, this is the observed behaviour (`/` is the linebreak): ...1...1 / ... ...2... / 2-... % I would expect: ...2... / -2... ...3...-3 / ... % I would expect: ...3...3- / ... ...4...4 / 4... ../ ... % breakpoint of type 5 just disappears If this behaviour is not a bug: is there a way to set a breakpoint X that produces ...X...X- / ...? Cheers, Sietse % 2013-04-20 \definebreakpoints[aapje] \definebreakpoint [aapje] [1] [nleft=3,nright=3,type=1] \definebreakpoint [aapje] [2] [nleft=3,nright=3,type=2] \definebreakpoint [aapje] [3] [nleft=3,nright=3,type=3] \definebreakpoint [aapje] [4] [nleft=3,nright=3,type=4] \definebreakpoint [aapje] [5] [nleft=3,nright=3,type=5] \definebreakpoint [aapje] [6] [nleft=3,nright=3,left=X,middle=Y,right=Z] \setbreakpoints[aapje] \setuppapersize[A7] \showframe \starttext \setupwhitespace[big] aapje1aapje1aapje1aapje1aapje1aapje1aapje \par aapje2aapje2aapje2aapje2aapje2aapje2aapje \par aapje3aapje3aapje3aapje3aapje3aapje3aapje \par aapje4aapje4aapje4aapje4aapje4aapje4aapje \par aapje5aapje5aapje5aapje5aapje5aapje5aapje \par aapje6aapje6aapje6aapje6aapje6aapje6aapje \par \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Hyphenation documentation
Hi Wolfgang, hi Hans, Thanks, I've updated the documentation accordingly. > You have to use type 5 to create a rule for this, > do you have a example where this is needed besides > the one mentioned in the duden [1] example for a > closing bracket. No, this was just a gut reaction. I can see the sense of the other way, too, and I couldn't hope to compete with the Duden for authority. ;-) > \unexpanded\def\unhyphenated > {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} \unhyphenated also documented. The name is inconsistent with \setupalign[nothyphenated]; perhaps \nothyphenated is a better name? (You could also add it as a synonym, but it is cleaner to have only one name, I think.) Cheers, Sietse On 21 April 2013 12:43, Hans Hagen wrote: > On 4/21/2013 10:26 AM, Wolfgang Schuster wrote: > >> No, you have to use \hbox too but I think a command with a speaking >> >> name would be better. > > > \unexpanded\def\unhyphenated > {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} > > I'll add that. > > Hans > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] csname not applicable?
> Why doesn't it seem possible to have the following macro > \def\docall#1{\csname xmlprocess#1\encsname{}{}} > and use it with \docall{buffer}? > How then accomplish this? encsname --> endcsname might do the trick. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Accessing string contents of a macro in Lua.
Hi all, Below are three methods of defining a dimension / dimension string in ConTeXt --- the first two boil down to storing a string in a macro, the last is a proper TeX dimen. I want to access these dimensions from Lua. I can access the dimen via tex.dimen.ColumnC, but how can I access the macro contents? If there is no solution, I can always explicitly pass the value to Lua with \ctxlua{var = '\measure{ColumnA}'} , but I want to know if there is a Lua-only method to get these values. %% MWE \definemeasure[ColumnA][10mm] \def\ColumnB{20mm} \newdimen\ColumnC \ColumnC=30mm \startluacode -- print values to stdout logs.report('') logs.report('ColumnA', context.measure('ColumnA')) logs.report('ColumnB', context.ColumnB) logs.report('ColumnC', tex.dimen.ColumnC) -- prints in scaled points print('') \stopluacode Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [wiki] fake account spam
Hi Taco, We're getting 3-12 new accounts created per day. If nothing else, they're cluttering up the recent changes list. I think it's a good idea to update the security questions --- it's easy to do, it'll probably work, and we can always move on to stronger measures that require more work. Below are some replacemetn questions. * If you have a log of which questions get answered correctly, perhaps only rotate out the bad question(s); * If finding the cracked questions is nontrivial (i.e. more work than 'just open the log file and see which ones get answered every day'), just replace them all. If this works, hooray; if it stops working, we can either change the questions again (if the spammers took long to get through) or move on to e.g. the ConfirmAccount extension [1,2] (if the questions got cracked quickly, so we are getting 'human' attention from the spammer instead of his bots). [1] http://www.mediawiki.org/wiki/Extension:ConfirmAccount [2] http://www.stargate-wiki.de/wiki/Spezial:Benutzerkonto_beantragen Cheers, Sietse The proposed questions: * What command indicates 'text starts here'? (Include the backslash.) \starttext * What command is used to setup the bodyfont? (Include the backslash.) \setupbodyfont * What is the last name (starts with K) of the man who created TeX? Knuth * What is the first name (7 letters, starts with H) of Mr Zapf? Hermann * How many letters does 'stoptext' contain? (Please type out the number as a word.) Eight ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [wiki] fake account spam
> Confirm account means that a new user will not be able to quickly correct > typos etc. Isn't there a simple way to add a captcha to mediawiki. Just found one (I had missed it when I sent my previous e-mail): http://www.mediawiki.org/wiki/Extension:ReCAPTCHA, nowadays merged into http://www.mediawiki.org/wiki/Extension:ConfirmEdit (which is not ConfirmAccount). ConfirmEdit can be configured to only present captchas to non-logged-in users, when they try to edit or create a page, or create an account. Might that be useful? Or we could go old-school copy protection style: "What is the fifth word on page 120 of the TeXbook?" :-P If we want to have a slightly higher barrier of entry: "Name one undocumented command that you recently heard about on the mailing list." ;-) Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to center with picture taken into consideration
Hello Cecil, I have a LuaTeX-based start for you, but there is one important thing I do not know: how to obtain the an image's width and/or height from Lua. Although that would also depend on whether you want to resize images to a fixed with, etc. Anyway, now that the typesetting code is Lua-based, working out the conditional stuff you need will hopefully be trivial (for 'if you know Lua or have an hour to learn the basics' values of trivial). Cheers, Sietse % 2013-04-27 \useMPlibrary[dum] \showframe \defineparagraphs[persoon] \setupparagraphs[persoon][1] [width=\dimexpr \textwidth - 3.5cm\relax, distance=0.5cm, align=middle, ] \setuplines[align=middle] \setupparagraphs[persoon][2][width=3cm] \starttext \startluacode -- a table containing the material we want to typeset local contents = { { text = [[ Naam: Adres: Burgerservicenummer: ]], image = "pic1" }, { text = [[ Naam: Aapje aapje aapje aapje Adres: Olifantje Burgerservicenummer: En nu jij ]], image = "pic2" } } -- typeset each text-image pair for k,v in ipairs(contents) do -- calculate or specify how wide you want the image and the paragraphs to be imagecolwidth = string.todimen("3cm") coldistance = string.todimen("0.5cm") textcolwidth = tex.dimen.textwidth - imagecolwidth - coldistance -- setup the text column context.setupparagraphs( { "persoon" }, { 1 }, { width = textcolwidth .. "sp" }) -- setup the image column (possibly to width 0?) context.setupparagraphs( { "persoon" }, { 2 }, { width = imagecolwidth .. "sp" }) -- the actual typesetting code context.startpersoon() context.startlines() context(v.text) context.stoplines() context.nextpersoon() context.externalfigure( { v.image}, { width = imagecolwidth .. "sp", height = "4cm", factor = "fit" } ) context.stoppersoon() end \stopluacode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] square in Cambria font
Hello Hans, The bad news: I think it's the font. The good news: here comes MetaPost to the rescue! I don't have Cambria, so I plucked a cambria.ttf file off the Internet somewhere, which contains both Cambria and Cambria Math. I don't know whether you have the same file/version, so YMMV, but it does exhibit the problem you describe. According to the lovely and free FontForge, * the WHITE SQUARE glyph (U+25A1) is 1060 units high * the SQUARED PLUS glyph (U+229E) is 1630 units high (of which 230 below the baseline). This is in Cambria Math — Cambria does does not have either of these glyphs. I suspect the square size is a design decision: that the designers decided they wanted the white square to match the letters rather than the 'squared *' operators. Anyway, here's a very close MetaPost approximation of the 'squared plus' square, made by looking in with FontForge and copying the glyph dimensions. (And then tweaking them because some things still didn't look right; didn't manage to fix everything, alas.) It scales with the font size. Cheers, Sietse \setuppapersize[A7][A7] \setuppagenumber[state=stop] \setupbodyfont[cambria,40pt] \showframe \showgrid \startuseMPgraphic{square} numeric u, strokewd, strokeht, sqwd, sqht; u:= BodyFontSize / 2083; strokewd := 128u; strokeht := 123u; sqwd := 1506u; sqht := 1533u; offset := 200u; pickup pensquare xscaled strokewd yscaled strokeht; draw unitsquare xscaled sqwd yscaled sqht; setbounds currentpicture to boundingbox currentpicture leftenlarged offset rightenlarged offset; \stopuseMPgraphic \def\mysquare{% \lower \dimexpr \bodyfontsize / 2083 * 234 \relax\hbox{\useMPgraphic{square}}% } try it out \starttext $\square+\mysquare\boxplus$ \crlf $\mysquare\boxplus$ \page[yes] $+ \ruledhbox{\boxplus}$ \crlf $+ \ruledhbox{\mysquare}$ \crlf $\ruledhbox{\boxplus}$ \crlf $\ruledhbox{\mysquare}$ \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TEXpage filename
Alan wrote: > In the production of (scientific) articles for > journal submissions, one is often expected to > supply the figures as separate files. > > One workflow can be through the use of \startTEXpage\stopTEXpage > followed by an external extraction of single pdf pages to separate > files. It might be easier to place the figure code in a separate file, with some conditional code: * if the figure file is being compiled directly, execute a \startTEXpage ... \stopTEXpage at start and end * if the figure file is not the compilation target, i.e. it is being \input, skip the \startTEXpage and just include the figure code. The MWE below *ought* to work, but it doesn't, and I can't get it debugged. Perhaps \doifinputfileelse and \input don't play well together? Assistance welcome! Cheers, Sietse mwe-mode-text.tex % 2013-05-01 \doifinputfileelse{mwe-mode-text.tex}{ \startTEXpage This is standalone compilation: \jobname }{\relax} \placefigure[][fig:cow] {This is a cow} {\externalfigure[cow]} \doifinputfileelse{mwe-mode-text.tex}{ \stopTEXpage }{\relax} mwe-mode-text-parent.tex \setuppapersize[A6] \starttext \section{Hello hello} \input mwe-mode-text \jobname \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] square in Cambria font
> Of the three fonts I tried (cambria, lmodern, > lucidaot) it seems lmodern is the only one > doing it right. Depends on what is required to 'do it right' --- the Unicode reference doesn't mention any mathematical use for U+25A1 white square, so I'm not sure that "must match squared plus glyph" is a requirement. Perhaps the creators of Cambria expected the glyph to be used for itemizations, or footnote marks. Out of curiosity: what are you using the square for / what does it stand for, that makes matching squared plus so important to you? There might even exist some other glyph that is semantically more suitable. Cheers, Sietse On 1 May 2013 10:05, Meer, H. van der wrote: > Thanks, this indeed produces a square more akin to boxtimes in Cambria. But > the situation seems even worse than I thought. Under the 40pt fontsize it is > apparent that lucidaot's square has a thinner outline then boxtimes. Of the > three fonts I tried (cambria, lmodern, lucidaot) it seems lmodern is the only > one doing it right. > > Hans van der Meer > > > > On 1 May 2013, at 12:17 AM, Sietse Brouwer > wrote: > >> Hello Hans, >> >> The bad news: I think it's the font. The good news: here comes >> MetaPost to the rescue! >> >> I don't have Cambria, so I plucked a cambria.ttf file off the Internet >> somewhere, which contains both Cambria and Cambria Math. I don't know >> whether you have the same file/version, so YMMV, but it does exhibit >> the problem you describe. >> >> According to the lovely and free FontForge, >> * the WHITE SQUARE glyph (U+25A1) is 1060 units high >> * the SQUARED PLUS glyph (U+229E) is 1630 units high (of which 230 >> below the baseline). >> >> This is in Cambria Math — Cambria does does not have either of these >> glyphs. I suspect the square size is a design decision: that the >> designers decided they wanted the white square to match the letters >> rather than the 'squared *' operators. >> >> Anyway, here's a very close MetaPost approximation of the 'squared >> plus' square, made by looking in with FontForge and copying the glyph >> dimensions. (And then tweaking them because some things still didn't >> look right; didn't manage to fix everything, alas.) It scales with the >> font size. >> >> Cheers, >> Sietse >> >> \setuppapersize[A7][A7] >> \setuppagenumber[state=stop] >> \setupbodyfont[cambria,40pt] >> >> \showframe >> \showgrid >> >> \startuseMPgraphic{square} >>numeric u, strokewd, strokeht, sqwd, sqht; >>u:= BodyFontSize / 2083; >>strokewd := 128u; >>strokeht := 123u; >>sqwd := 1506u; >>sqht := 1533u; >>offset := 200u; >>pickup pensquare xscaled strokewd yscaled strokeht; >>draw unitsquare xscaled sqwd yscaled sqht; >> >>setbounds currentpicture to >>boundingbox currentpicture >>leftenlarged offset rightenlarged offset; >> \stopuseMPgraphic >> >> \def\mysquare{% >>\lower \dimexpr \bodyfontsize / 2083 * 234 >> \relax\hbox{\useMPgraphic{square}}% >> } >> >> try it out >> >> \starttext >> >> $\square+\mysquare\boxplus$ \crlf >> $\mysquare\boxplus$ >> >> \page[yes] >> >> $+ \ruledhbox{\boxplus}$ \crlf >> $+ \ruledhbox{\mysquare}$ \crlf >> $\ruledhbox{\boxplus}$ \crlf >> $\ruledhbox{\mysquare}$ >> >> \stoptext >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> ___ > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Footnote disappear in "placeongrid"
Wolfgang wrote: > Add the \automigrateinserts command to your > document, it is necessary when you have > footnotes in a box, e.g. \framed or \placeongrid. Would it make sense for \setupalign[grid] to automatically call \automigrateinserts, or are there situations when (a) one typesets on a grid, and (b) one does not want \automigrateinserts in the document? Kind regards, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] use plain LuaTeX in ConTeXt standalone
Hi Hans, Currently mtxrun --script font --reload --simple creates luatex-fonts-names.lua, the font list/database for Plain LuaTeX; and mtxrun --script font --reload creates names.tma and names.tmc, the font list for ConTeXt. Perhaps it makes sense if mtxrun --script font --reload always creates all font lists? That way users of Plain LuaTeX could never run into 'oh damn, I forgot to create the font database' — things would go right automatically. And the --simple flag would no longer be needed. Does that make sense, or am I overlooking some complexity? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] log reporting?
Hi Hans, > How do I enable the output of for example: > report_typescripts("unknown library %a or %a",name_one,name_two) `logs.reporter("fonts","typescripts")` returns a function for writing to the log. Calling that function produces this sort of output: fonts > typescripts > bla bla bla Sometimes calls to a reporter are wrapped in a 'only if tracker x is active'. This is not the case with this reporter, though. If this reporter is not printing anything, it's because the error condition is not arising, not because you didn't activate some tracker. For completeness: the wiki has more on trackers, including a list of them. http://wiki.contextgarden.net/Trackers And this is what a reporter wrapped in a tracker looks like: -- defining the tracker local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end) -- checking whether the tracker is active if trace_casing then report_casing("case trigger %a, instance %a, result %a",attr%100,div(attr,100),ok) end Hope this helps, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] extra line after switchtobodyfont
Hi Hans, everybody, Hans van der Meer wrote: > Would be nice. But doing this is left to other > people than me, I feel not qualified to tinker > with that code. You would like to challenge Hans > Hagen? Last week's thread about ligatures got unpleasantly close to flaming at times; so, just in case, I'd like to ask that this one stays calm. That last sentence sounded a bit more antagonistic than you intended, perhaps. Aditya was simply making a suggestion, not ‘challenging’ Hans (either of the Hanses ^_^). Also: thank you for the work you put into removing/commenting out all spaces in typescript files; a 54 kB zip is nothing to sneeze at. My best wishes to everybody in Bachotek / at BachoTeX — I hope the weather is as fine there as it is here in Leiden. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Grid typesetting: aligning section to top of textarea
Dear list, I am making a foray into grid typesetting, and would like to align the top of my (possibly multi-line) section titles with the top of the textarea. I thought I could do that with \setuphead[subject][grid={broad,high}], but this is not working. I have tried nearly every other combination of grid keywords, and then tried them again with the subject wrapped in a framed. The "It's in the details" manual didn't provide help. I found an old e-mail by Honza, but that never got a reply. http://www.pragma-ade.com/general/manuals/details.pdf http://www.mail-archive.com/ntg-context@ntg.nl/msg58456.html I put an MWE below, and I have attached its output. If anybody has any clues for me, (or 'not currently available, you can stop trying'), I would be most grateful. Cheers, Sietse \setuppapersize[A5] %% Activate grid \setuplayout [grid=yes, width=middle, topspace=2\lineheight, height=31\lineheight, header=2\lineheight, footer=0\lineheight,] \setupbodyfont[schola,13pt] \definefont[AntykwaChapter][antykwatorunskaregular at 18pt]% %% If wrapping the subject in a framed is needed, this command does it \def\subjectcommand#1{% \framed[ frame=on, framecolor=blue, width=\textwidth, align=flushleft, offset=none, %% strut=no does not work %% so cancel out lineheight-fontsize diff with -toffset toffset=-4.5pt, %% This *should* mean: %% * take topmost line in framed as reference line %% * align top of reference line with external baseline. %% but grid=yes may disable that. location={top, hanging}, ]{\AntykwaChapter #1}} %% The head-specific grid setup comes here \setuphead[subject] [header=high, % no header; extend textarea into header area page=yes, %% Take the box, assume it is a snug fit of its contents, and align %% its top with the grid line above it? %% Seems to do nothing %% A tweak like '-3pt' ditto grid={fit,high}, textcommand=\subjectcommand, % textstyle=\AntykwaChapter, ] \showframe \showgrid \showstruts %% Example text \starttext \subject{The hoard of the gibbelins} The Gibbelins eat, as is well known, nothing less good than man. \startsubject[ title={How Nyth would have worked his art upon the gnoles}, marking=How Nuth would have worked his art, ] Despite the advertisements of rival firms, it is probable that every tradesman knows that nobody in business at the present time has a position equal to that of Mr. Nuth. \stopsubject \stoptext mwe-placesubject.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] MkIV problem+fix with \framed[location=depth / height / hanging]
Hi Hans, I believe that in MkIV some \framed[location=...] keys are not working, namely `depth`, `height`, and `hanging`. In MkIV these all place the bottom of the frame flush with the baseline, like [location=]. In MkII they behave more sensibly, as follows: * depth: place bottom of frame flush with bottom of the line (i.e. \strutdepth below baseline) * height: place top of frame flush with top of line * hanging: place top of frame flush with baseline Test code below, mkii and mkiv output attached. I have produced a fix for the code in pack-rul.mkiv [1], placed at the very bottom of this e-mail. It works; but it is a pure-bred example of cargo cult programming, i.e. lots of 'making it look right' and very little understanding, so you will probably want to check it. [1] http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/pack-rul.mkiv All the best, Sietse \setupcolors[state=start] \setupblackrules[depth=\strutdepth,height=\strutheight,width=1mm,color=red] \starttext \ruledhbox {A \framed[width=2cm,align=middle,location=] {location\\equals\\(nothing)}% \blackrule \framed[width=2cm,align=middle,location=depth] {location\\equals\\depth}% \blackrule \framed[width=2cm,align=middle,location=height] {location\\equals\\height}% \blackrule \framed[width=2cm,align=middle,location=hanging]{location\\equals\\hanging} B} \vskip2cm \ruledhbox {A \framed[width=2cm,align=middle,location=low]{location\\equals\\low} \framed[width=2cm,align=middle,location=line] {location\\equals\\line} \framed[width=2cm,align=middle,location=high] {location\\equals\\high} B} \vskip2cm \ruledhbox {A \framed[width=2cm,align=middle,location=bottom] {location\\equals\\bottom} \framed[width=2cm,align=middle,location=lohi] {location\\equals\\lohi} \framed[width=2cm,align=middle,location=middle] {location\\equals\\middle} \framed[width=2cm,align=middle,location=top]{location\\equals\\top} B} \stoptext --- This is the fixed code \installframedlocator \v!hanging % best with strut=no {} - {\dp\b_framed_normal\scratchdimen + {\scratchdimen\ht\b_framed_normal + \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% + \dp\b_framed_normal\scratchdimen \ht\b_framed_normal\zeropoint \hbox{\box\b_framed_normal}} \installframedlocator \v!depth {} - \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax + {\setbox\b_framed_normal\hbox{\lower\strutdp\box\b_framed_normal}% + \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax \dp\b_framed_normal\strutdp \hbox{\box\b_framed_normal}} \installframedlocator \v!height {} - {\dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax + {\scratchdimen\dimexpr \ht\b_framed_normal - \strutht \relax + \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% + \dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax \ht\b_framed_normal\strutht \hbox{\box\b_framed_normal}} mwe-framed-mkii.pdf Description: Adobe PDF document mwe-framed-mkiv.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MkIV problem+fix with \framed[location=depth / height / hanging]
Sietse wrote: >> \setupcolors[state=start] Hans wrote: > this is no longer needed in mkiv where colors are enabled by default Leaving it in allowed me to use the same code to test MkII and MkIV. :-) > .. added to test zip ... I haven't heard of that. Is that the unofficial test suite [1], or is it a zip in the distribution somewhere? [1] https://github.com/melmothx/context-unofficial-test-suite Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Makeup layout
Hi Andrew, Andrew wrote: > I have heard that layers can be used. But there > is no section on layers in the current reference > manual. Where does one find information on this > aspect of ConTeXt? You are right that there is no complete, from-the-ground-up, description and explanation of the layers mechanism. A reasonably good text, however, is in the MetaFun manual [1,2]: section 5.3 (Positional graphics > More layers). The "Pseudo columns" (pdfpages 11-13) section of the "It's in the details" manual [13 is shorter and covers only a few specific use cases, but it's a nice little start and has some information that the MetaFun manual does not have. The MWE below is based mainly on that text. NB: I rarely use layers, so the MWE may not reflect best practices. [1] print version: http://www.pragma-ade.com/general/manuals/metafun-p.pdf [2] screen version: http://www.pragma-ade.com/general/manuals/metafun-s.pdf [3] http://www.pragma-ade.com/general/manuals/details.pdf I hope this will help you on your way a bit! Best wishes, Sietse \setuppapersize[A6] \setuplayout [columns=3, % add a horizontal grid, 3 equal columns columndistance=12pt,]% 12 pt(?) distance between them % The layer `textlayer` will be the background % of the `text` typesetting area. \definelayer[textlayer] \setupbackgrounds [text] [background=textlayer] \showgrid % make the mechanism visible \starttext % Start the title page, sans page number etc. \startstandardmakeup % Using column and line positions the left end of the box's % baseline \setlayer [textlayer] [column=3,line=10,location=grid] {\ruledvtop {\hsize\layoutcolumnwidth \definedfont[Regular sa 2]nitty-\par gritty}} % Using x and y offsets the top left of the box from the top % left corner \setlayer [textlayer] [x=1cm, y=1cm] {\blackrule[width=1cm, height=1cm]} \setlayer [textlayer] [x=1cm, line=10] {\ruledvtop {\hsize\layoutcolumnwidth \definedfont[Regular sa 2]This \par is}} \stopstandardmakeup \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] BROKEN LINK TRANSLATIONS
Hello Manuel, On what page is the link broken? And what is the non-working link? Cheers, Sietse On 17 May 2013 12:42, MANUEL GONZALEZ SUAREZ wrote: > > Hello everyone. > In Context Wiki page is broken the link that refers to the SVN Repository. > How could I get the source files of "Context an excursion" in the English > version? > thanks > -- > Manuel González Suárez > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] BROKEN LINK TRANSLATIONS
Hi all, Hans: in x-set-02.mkii, the following change is required: -\input mult-\userinterfacetag +\input mult-\userinterfacetag.mkii Otherwise, compiling "ConTeXt, an Excursion" gives the following complaint: ! I can't find file `mult-en'. [...] Please type another input file name: Typing `mult-en.mkii` at the prompt (four or eight times, actually, once for every pass) also solves the problem, but this is neater. Mojca wrote: > To Sietse: > - http://wiki.contextgarden.net/Manuals > - http://wiki.contextgarden.net/ConTeXt_an_Excursion,_translations Thank you very much. I should have searched the wiki myself, but I was feeling churlish. Thank you for doing this for me. ;-) Hector: thank you for mailing the list about this problem with the URLs. Much appreciated! Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \digits get \times instead of \cdot before exponent
Hi Hans, Christian Prim wrote: >>> >>> is it possible to change the behaviour of \digits to have \cdot [...] >>> instead of \times [...]? Hans wrote: > there are several ways we can deal with this: [...] > or maybe a key/value in setuptimes .. not sure yet We've already got \setdigitmode, \setdigitorder, and \setdigitspace; it might make sense to create a \setupdigits to consolidate these setups into one interface. Something like this: \setupdigits [mode=4, % -->\setdigitmode{4} % (decimal period, thinspace between groups) inputdecimalmark={,}, % -->\setdigitorder{0} signspace=yes,% -->\setdigitsign{1}; '+ 1.4', not '+1.4' times=\times, % or times=\cdot ] Cheers, Sietse --- P.s: I've been thinking I'd like to write more contexty interface that doesn't use predefined modes, but lets you setup the decimal mark, separator mark, the input decimal mark, etc. Something like this: \setupdigits [inputdecimal={.}, % input 3.1415926535 decimal={,} separator=\space, groupsize=4, % output 3,1415 9265 45 signspace=,] % +3.14159... That could even tie into \setuplanguage to allow setting language-specific defaults. Would anyone be interested in this? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] partial derivatives with bonum/pagella font
Hi Mikael, > is there a quick fix/hack that somehow allows me to get it look "almost like > it should" in a small document today with bonum? This might get you somewhere. I hope you don't have too many double primes in your document... NB: `%macros=mkvi` has to be the first line in the file. Cheers, Sietse % macros=mkvi \setupbodyfont[bonum] % This macro takes 1 arguments, #upper. It postfixes a negative kern just a % bit larger than the width of #upper, so that #upper does not push % the next content away to the right. \def\myprime#upper% {% 1. Store the width of the primes in a box, so we can get its width \setbox\scratchbox=\hbox{$#upper$}% % 2. We'll want to kern back by a bit more than \scratchdimen=\dimexpr \wd\scratchbox + 0.3em \relax% % The actual typesetting \kern 0em #upper\kern -\scratchdimen} \starttext % Quick and dirty 1: just pretend the prime is uppercased $f'_x$, $f_x'$ $f^{\prime\prime}_x$. % Less quick, still dirty: the \myprime macro defined above $f'_x$, $f_x'$ $f\myprime{\prime\prime}_x$. % Slow and dirty: add a kern between the \primes, % because bonum pushes them apart a bit. $f'_x$, $f_x'$ $f\myprime{\prime\kern -0.1em \prime}_x$. \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Faux font
Hi John, John Culleton wrote: >> In some Context manuals (can't remember which ones) there is a faux font >> that just consists of little rectangles of two different sizes. What is >> the name of that font? Is it included in e.g. TeXLive? Wolfgang wrote: > Do you mean \fakeword? Link to the This Way that introduces \fakeword and friends: http://www.pragma-ade.com/general/magazines/mag-0007.pdf (I am personally rather fond of the \simplethesis command. (This command produces a lot of output, so it may take a bit longer than you expect --- just like a real thesis.)) Or perhaps you mean the black boxes in section 5 of the reference manual's typography chapter [1]? Those are made by replacing every letter with a black rule of equal height, depths, and width. I dug op the code [2]; relevant bit is below. [1] http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf [2] http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.tex NB: I also have some recollection of dummy text composed of hollow rectangles rather than solid black ones, but like you I cannot remember where I saw that. Maybe the document also showed kerns, in pretty colors? I can't remember. Cheers, Sietse % Converting every letter into a rectangle. \def\somecharacter#1% {\setbox0=\hbox{#1}% \blackrule[width=\wd0,height=\ht0,depth=\dp0]} \def\someline% {\noindent \processtokens\somecharacter\somecharacter\relax\space {The height and depth of lines differs.}} \starttext \someline \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Faux font
Sietse wrote: >> NB: I also have some recollection of dummy text composed of hollow >> rectangles rather than solid black ones, but like you I cannot >> remember where I saw that. Maybe the document also showed kerns, in >> pretty colors? I can't remember. Wolfgang wrote: > One of these examples can be found in the TeXbook on page 65. Found it; screenshot attached. And now I remember where I saw the hollow rectangles --- it wasn't in a document, but on the GUST website. http://www.gust.org.pl/ @John: we have now found * \fakewords: uniform black slabs with a thin line underneath to suggest descenders * Code to convert letters to filled rectangles * An example of letters-to-outlined-rectangles in the TeXbook * Outlined rectangles on the GUST homepage. Was any of these the fake text you were remembering, or do you think there is still something else? This seems a nice occasion to complete the wiki's [[Dummy text]] article. (Which also mentions the ipsum module for lorem ipsum text, by the way.) http://wiki.contextgarden.net/Dummy_text Cheers, Sietse <>___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Installing Scribuntu, for Lua on the wiki
Hi Taco, I'd like to propose thse three extensions for the wiki: * Scribunto [1], which allows writing wikicode extensions in Lua. I ran into a limitation of the template expansion system the other day. Also, this may come in useful for the command reference. [2] [1] http://www.mediawiki.org/wiki/Extension:Scribunto [2] http://www.mail-archive.com/ntg-context@ntg.nl/msg68550.html * BacktickCode, which allows writing `...` instead of ... — rather pleasant when writing about commands. The code needs a slight modification so as to ignore backticks inside and tags, too; see bottom of this e-mail. http://www.mediawiki.org/wiki/Extension:BacktickCode * Semantic Forms (which requirs Semantic Mediawiki), which allows presenting people with a form when creating certain types of pages. http://www.mediawiki.org/wiki/Extension:Semantic_Forms How does that sound to you? Thank you very much, Sietse Here's the modification to BacktickCode: function backtickCodeParse( &$parser, &$text, &$stripState ) { // We replace '`...`' by '...' and '\`' by '`'. // Text between tags is not modified. $text = preg_replace_callback('/(.*?)<\/pre>/s', function ($match) { return '' . preg_replace('/`/', '\`', $match[1]) . ''; }, $text); +$text = preg_replace_callback('/(.*?)<\/texcode>/s', function ($match) { +return '' . preg_replace('/`/', '\`', $match[1]) . ''; +}, $text); +$text = preg_replace_callback('/(.*?)<\/context>/s', function ($match) { +return '' . preg_replace('/`/', '\`', $match[1]) . ''; +}, $text); $text = preg_replace('/([^]|^)`([^`]*)`/', '$1$2', $text); $text = preg_replace('/\`/', '`', $text); return true; } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [***SPAM***] Re: Understanding the imposing-mechanism
Hi Huseyin, This is not a direct answer to your question, but have you tried reading the reference manual's chapter 3, on page design [1]? It is a rather complete overview of (a) page layout, and (b) positioning multiple pages on a sheet. In particular the \setuppaper command [2] may interest you. [1] http://pmrb.free.fr/contextref.pdf [2] http://wiki.contextgarden.net/Command/setuppaper Cheers, Sietse P.s: Once you've found the answer, it would be nice if you could edit the wiki page on Imposition, adding a section describing how to offset the imposed pages on the sheet. Just (make an account and) log in, and click "Edit" in the top right corner. If you are not familiar with wiki code, just write the info in plain text and I'll add the wiki markup for you. http://wiki.contextgarden.net/Imposition#XY_schema On 25 May 2013 11:15, "H. Özoguz" wrote: >> You have to change the size for the page and paper, the first has to be >> the size of the cards >> while the second is the size of the paper which you use to print all >> cards. >> >> \definepapersize [card] [width=47.5mm,height=76mm] >> \definepapersize [sheet] [width=660mm,height=330mm] >> >> \setuppapersize [card][sheet] >> >> \setuplayout [page] [location=middle,marking=on] >> \setuplayout [page] >> >> \setuppaper[nx=13,ny=4] >> \setuparranging [XY] >> >> \starttext >> \showframe >> \dorecurse{100}{\centerbox{\definedfont[Sans sa 5]\pagenumber}\page} >> \stoptext >> >> Wolfgang > > > Thanks Wolfgang, that works. > Next question to this: The printable area of the sheet is not the complete > area, e.g. it has a not-printable margin of 10mm on the left, 2mm right, and > 5mm at the top and 5mm at the bottom. How to control these margins, s.t. the > cards are only set in the printable area of the sheet? I tried with > "topspace", "buttomspace" etc. in \setuplayout, but that does not work now. > > Thanks. > Huseyin > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Including a large SVG image
Hoi Sander, Sander Maijers wrote: >> I have a few SVG graphics of multiple megabytes. They contain a lot >> of objects (text/shapes). All graphics except for one gets properly >> included in my ConTeXt document. Marco Patzer wrote: > Maybe inkscape failed to convert the file. Is a corresponding > m_k_i_v_filename.svg.pdf file generated? It might be informative to try running the Inkscape conversion manually. This is the command line ConTeXT uses: inkscape "%oldname%" --export-dpi=600 -A "%newname%" (The quotation marks are literal: they are there in case the filename has spaces, e.g.) Good luck! Sietse On 3 June 2013 13:25, Marco Patzer wrote: > On 2013–06–03 Sander Maijers wrote: > >> I have a few SVG graphics of multiple megabytes. They contain a lot >> of objects (text/shapes). All graphics except for one gets properly >> included in my ConTeXt document. In place of the failed one there >> the gray placeholder box with 'status unknown'. > > Maybe inkscape failed to convert the file. Is a corresponding > m_k_i_v_filename.svg.pdf file generated? > > Marco > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fraction with a fraction in the denominator
Hoi Sander, Sander wrote: > This gives basically three equally long division lines The fraction line of a nested fractions is in fact shorter than that of its parent fraction, but by a very small amout. This seems to be the standard behaviour -- I tried the formula in LaTeX, and the difference is just as small. I agree with you that it would be nice if the difference were a bit bigger in the case of continued fractions, but I suspect that would be hard to automate. Anyway: below is a quick hack for manual adjustment. (I've simplified your formula somewhat -- the one in your mail threw some syntax errors to do with {} nesting, and the square roots made it harder to make out the fraction line.) Cheers, Sietse % Declare a new dimension variable \newdimen\padwidth % Set dimen \padwidth=1em % Define a command that adds a padwidth-sized kern \define[0]\pad{\kern \padwidth} % Needed for the formula \def\VAR#1{\text{VAR}(#1)} \startformula \frac{ \mu_{Z} }{ \pad\frac{ \VAR{Z} }{ N_{\text{segments}} }\pad } \stopformula ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Including a large SVG image
Sander wrote: > The inkscape command works okay from the command line. Thanks for checking this! Hmm, so Inkscape is not the problem... Does ConTeXt still fail to include the picture when you make a minimal document containing only some text and the problematic SVG? > Should I upload the SVG and manual PDF output somewhere? Yes, if you could, that would be appreciated. Cheers, Sietse On 4 June 2013 19:35, Sander Maijers wrote: > The inkscape command works okay from the command line. Should I upload the > SVG and manual PDF output somewhere? > > > > On 03-06-13 18:53, honyk wrote: >>> >>> Sander Maijers wrote: > > I have a few SVG graphics of multiple megabytes. They contain a lot > of objects (text/shapes). All graphics except for one gets properly > included in my ConTeXt document. >>> >>> >>> Marco Patzer wrote: Maybe inkscape failed to convert the file. Is a corresponding m_k_i_v_filename.svg.pdf file generated? >>> >>> >>> It might be informative to try running the Inkscape conversion >>> manually. This is the command line ConTeXT uses: >>> >>> inkscape "%oldname%" --export-dpi=600 -A "%newname%" >>> >>> (The quotation marks are literal: they are there in case the filename >>> has spaces, e.g.) >> >> >> If processing in Inkscape fails, you can try another tool: >> http://xmlgraphics.apache.org/batik/tools/rasterizer.html >> >> It can (despite its name) transcode SVG to vector PDF: >> >> java -Xmx2G -jar batik-rasterizer.jar -m application/pdf image.svg >> >> In that case you have to transcode your files first and reference PDF >> variants in your input. >> >> Jan >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to hack the lua files
Lance Larsen wrote: >> If I modify a core lua file how do I remake the format file? luigi scarso wrote: > context --make Now documented on the page about the `context` script. I've added a page about formats, too, which also mentions how to remake them. (MkIV only. Don't know how to remake the MkII format.) http://wiki.contextgarden.net/Context http://wiki.contextgarden.net/Format To make this more discoverable, I've added a redirect from [[Recompiling ConTeXt]]. Any other pages that ought to mention or redirect to this? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to hack the lua files
Wolfgang and Luigi wrote: > texexec --make Thanks, guys. Technical question: * Does `texexec --make` create only the mkii formats, and `context --make` create only the mkiv formats; * Or is it so that both commands create both the mkii *and* the mkiv formats? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Including a large SVG image
I'm afraid I can't help, as this seems to be a PDF problem and I know nothing about the PDF format. ConTeXt correctly produces the converted file `m_k_i_v_scatterplot_of_WER_vs_PPL.svg.pdf`, and that PDF displays correctly when I open it standalone. But when I try to include the PDF with \includepages[m_k_i_v_scatterplot_of_WER_vs_PPL.svg.pdf] I get a blank page. The size of the document does increase from 30 kB to 266 kB, so the image PDF does get included, but somehow it doesn't display. I haven't a clue why. I hope somebody else can help you with this, or find a workaround. Good luck! Cheers, Sietse On 10 June 2013 00:21, Sander Maijers wrote: > Is anybody still interested to look into this issue? > I need the graph for my thesis, which is due soon. > > > > On 08-06-13 12:04, Sander Maijers wrote: >> >> I almost forgot to upload the graphics. >> >> Here is the SVG: >> https://dl.dropboxusercontent.com/u/19254345/scatterplot_of_WER_vs_PPL.svg >> >> SVG (7z compressed): >> >> https://dl.dropboxusercontent.com/u/19254345/scatterplot_of_WER_vs_PPL.svg.7z >> >> >> PDF: >> >> https://dl.dropboxusercontent.com/u/19254345/scatterplot_of_WER_vs_PPL.svg.pdf >> >> >> Best, >> Sander >> >> >> On 05-06-13 15:15, luigi scarso wrote: >>> >>> >>> >>> >>> On Wed, Jun 5, 2013 at 3:13 PM, Sander Maijers >>> mailto:s.n.maij...@student.ru.nl>> wrote: >>> >>> >>> >>> Excuse me. The file became truncated when I was renaming it and the >>> OS froze, it indeed is 0 bytes now. >>> This evening I will try upload it again. >>> >>> can you also post a 7z compressed version of the SVG ? >>> >>> >>> -- >>> luigi >>> >>> >>> >>> ___ >>> >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >>> archive : http://foundry.supelec.fr/projects/contextrev/ >>> wiki : http://contextgarden.net >>> >>> ___ >>> >>> >> >> >> ___ >> >> If your question is of interest to others as well, please add an entry >> to the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Including a large SVG image
Sander wrote: > All graphics except for one gets properly included in my ConTeXt document. Since it's just the one graphic: Luigi, perhaps you could send Sander a copy of the .pdf you produced that didn't show problems? Luigi wrote: > $ inkscape --version > Inkscape 0.48.3.1 r9886 (Jan 29 2013) > > it's ok here on linux ubuntu 12.10 x86_64 I've got Inkscape 0.48.1 r9760 (Mar 22 2011) here on Linux Mint 11 (based on Natty), and that doesn't work. So perhaps it's a problem with Inkscape or the PDF library it uses. Sander, which version of Inkscape do you use? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] What is the status of ConTeXt's various test suites?
Hi, all, There appear to be a number of test suites in existence. (1) The suite on pragma-ade.com. I suspect this is the one Hans actually uses. http://www.pragma-ade.com/download-1.htm (click on cont-tst.7z) (2) The project on foundry.supelec.fr. Most recent file is 3 years old, and most of them are 6-7 years old, AFAICT. Summary: https://foundry.supelec.fr/projects/contexttest/ Files: https://foundry.supelec.fr/scm/viewvc.php/?root=contexttest This is also the suite described on http://wiki.contextgarden.net/Test_suite (3) The ConTeXt unofficial test suite https://github.com/melmothx/context-unofficial-test-suite I want to update the [[Test suite]] page to make it more accurate. So, I'm asking y'all: any inaccuracies in the text at the bottom of this e-mail? Cheers, Sietse * The test suite at pragma-ade.com is Hans's test suite; he runs this suite before uploading a new beta (most times). To contribute a test to this suite, write it in an e-mail and send it to the mailing list. QUESTION: when one downloads and unzips this file in a directory, how does one run it? * The test suite at github is managed by users, especially Marco Patzer. To run the suite, just download it and run `run-suite.pl`. * The test suite at foundry.supelec.fr is no longer being used. QUESTION: are the tests in it already transferred to Hans or Marco's test suite? If not, is that still something we want to do, or can we just bury this suite entirely? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MkIV in the wiki?
Hi Pablo, MkIV-compilation is already enabled -- just use (showing the source is optional, but usually what you want) For more info on the `` tags: http://wiki.contextgarden.net/Help:Context Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong interlinespace or wrong font?
Hi Pablo, I think this is a problem with the Unifraktur Maguntia font. I just downloaded it [1], and measured it using \blackrule -- and the x-height is indeed ridiculously low. [1] from here: http://unifraktur.sourceforge.net/maguntia.html \setupinterlinespace[line=3.2ex] \usemodule[simplefonts] \setmainfont[UnifrakturMaguntia] \starttext xAAgfas\smash{\blackrule[height=1ex]}\smash{\blackrule[height=2mm]\\ xAAgfas\smash{\blackrule[height=2ex]}\\ xAAgfas\smash{\blackrule[height=3ex, color=red]}\\ xAAgfas\smash{\blackrule[height=3.2ex, color=blue]}\\ \stoptext Probably best to take this up with the font designer? I have no idea how a font is supposed to declare its x-height. (I get the impression that `font-con.lua` queries some parameter called 'xheight' or 'x_height', but you should take these impressions of mine with a grain of salt.) Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] simplefonts wiki page added
> I have added a new simplefonts page for new users. (I hope it isn't full > of errors ;-).) It's beautiful. A model of completeness and clarity, and I am especially delighted that you took the trouble to remove the duplicate info from [[Fonts in LuaTeX]]. Nice work! I made two minor changes: * Article names always start with a capital letter (this makes them easier to guess), so I moved the page to [[Simplefonts]] * for links to source files, you can use the `src` template: `{{src|font-ini.lua}}`. Neither of these changes diminishes the fact that you wrote an excellent article. Thanks, and all the best, Sietse On 23 June 2013 20:36, Pablo Rodríguez wrote: > Dear list, > > I have added a new simplefonts page for new users. (I hope it isn't full > of errors ;-).) > > There may be some missing information, because I don't understand how > the standard font handling in ConTeXt works. > > And I removed duplicated content from the font handling in LuaTeX > (http://wiki.contextgarden.net/index.php?title=Fonts_in_LuaTeX&action=historysubmit&diff=21929&oldid=20049). > > Just in case it helps, > > > Pablo > -- > http://www.ousia.tk > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] What is the status of ConTeXt's various test suites?
Hi Lukáš, On 6/10/2013 12:59 PM, Sietse Brouwer wrote: >> There appear to be a number of test suites in existence. >> (1) The suite on pragma-ade.com. I suspect this is the one Hans actually >> uses. >> http://www.pragma-ade.com/download-1.htm (click on cont-tst.7z) >> QUESTION: when one downloads and unzips this file in a directory, how >> does one run it? On 10 June 2013 13:11, Hans Hagen wrote: > Lukáš has his own scripts. > > Here I can run this: > > mtxrun --script testsuite --compare --oldname=cld-compare-old > --newname=cld-compare-new --pattern=**/*.cld > mtxrun --script testsuite --compare --oldname=mkiv-compare-old > --newname=mkiv-compare-mkiv --pattern=**/*.mkiv > mtxrun --script testsuite --compare --oldname=mkvi-compare-old > --newname=mkvi-compare-mkiv --pattern=**/*.mkvi > mtxrun --script testsuite --compare --oldname=tex-compare-old > --newname=tex-compare-new --pattern=**/*.tex I tried running this, but mtxrun complains that the script `testsuite` doesn't exist. Lukáš, what script do you use to run the test suite? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bold Small Caps
Malte wrote: > Thank you. However, I am getting an undefined control sequence here: > > l.4 {\bf This is bold {\feature >[+][f:smallcaps] and bold small caps} and > jus... > > However, the wiki page http://wiki.contextgarden.net/Featuresets > confirms your syntax. What am I missing? The version you are using? The `\feature[+][...]` syntax has been around only since about March 2013; before that you had to use `\addfeature[...]`. Does that explain the error you're getting? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] What is the status of ConTeXt's various test suites?
On 25 June 2013 11:49, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > here are my scripts I'm using to test Ctx. Thanks, Lukáš! Also thanks for the explanation of what files go where, and what to run --- that's very helpful. I hope to be able to play with this soon, and then add what I learn to the wiki. All the best, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong interlinespace or wrong font?
> I cannot compile your code either on my system or on > http://live.contextgarden.net/. I don't know what the error might be, > but I'm not able to compile it. Yeah, that one's all my fault. I copy-pasted my working code to the e-mail, then decided to add one little change (the extra \blackrule), and promptly introduced an error. Forgot to close the \smash{ braces. >_< Correct code below. Cheers, Sietse \setupinterlinespace[line=3.2ex] \usemodule[simplefonts] \setmainfont[UnifrakturMaguntia] \starttext xAAgfas\smash{\blackrule[height=1ex]}\smash{\blackrule[height=2mm]} \\ xAAgfas\smash{\blackrule[height=2ex]} \\ xAAgfas\smash{\blackrule[height=3ex, color=red]} \\ xAAgfas\smash{\blackrule[height=3.2ex, color=blue]}\\ \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding pdfview
Instead of choosing our own default PDF viewer, we should probably invoke the user's default PDF viewer. Every OS has a command-line program to open a file with the system default program: On OS X: open myfile.pdf On Windows: start myfile.pdf On Linux, there separate programmes for KDE, new gnome and old gnome, and desktop-agnostic: kde-open myfile.pdf || gvfs-open myfile.pdf || gnome-open myfile.pdf || xdg-open myfile.pdf Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding pdfview
A summary of things people have said in this thread. NB: everything is paraphrased, so blame me if anything seems overly terse in tone. Bill doesn't have or want SumatraPDF Hans made SumatraPDF the default because it has lots of nice properties that Acrobat doesn't have Luigi thinks maybe mupdf is the right candidate (evince and okular are OK, xpdf doesn't work under 64bit, linux acrobat is old) Siep uses qpdfview, perhaps? Suggests it Bill uses Calibre, personally (and he thinks it would also be bad if ConTeXt assumed everyone uses Calibre) Bill likes the idea of bundling a PDF reader with ConTeXt Hwitloc doesn't use Acrobat at all Luigi mentions that Adobe Reader is the reference PDF viewer -- what doesn't work in Adobe Reader might as well not work at all. Hans agrees Reader is the reference, but prefers sumatrapdf or okular for edit/view cycles Sietse thinks ConTeXt should start by using the user's default pdf viewer --- via open / start / xdg-open. It is then up to the user to override this setting for ConTeXt. Hans thinks this has a problem [on Windows?]: there is start myfile.pdf, but no stop myfile.pdf. Which doesn't play well with Adobe Reader, which cannot handle open PDFs being updated. Aditya proposes -- in jest -- to read the user's mailcap file (on Linux, presumably). Pavneet thinks there is merit in this 'read the user's mailcap' jest. Also, he likes evince. Luigi has found Evince sometimes has printing problems with PDFs make by MkIV I'll repeat what I said, though: the PDF reader that is (a) most likely to be installed, and (b) is most logical / least surprising to the user, is: the user's own default PDF viewer. Adobe Reader may be clunky for this purpose, but IMO the user's choice should nonetheless be respected. It is easier, and less aggravating, to look up 'what is a better PDF viewer than Adobe' than 'why does ConTeXt not respect my default PDF viewer setting?' Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Page numbers off-by-one in latest beta
Hi Hans, all, In the latest beta, \starttext asdf \stoptext produces a document that starts numbering at page 2. A 4-page document will be numbered 2, 3, 4, 5. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Table cell spanning multiple columns in tabulate
Thomas Friedrich wrote: >> I am switching from texexec to context, and from table to tabulate. >> Question: What is the equivalent for \use{2}\ReFormat[c]{text} in the >> \table environment, when you what to do the same in the \tabulate >> environment? I couldn't find the answer in the context garden. Wolfgang Schuster wrote: > The tabulate environment has no support for spanned cells. The TABLE mechanism does, though, and that is probably the mkiv standard for writing non-trivial tables. It's a bit more verbose, but it can do an enormous number of things -- including many things that the tabulate mechanism can't. Wiki link: http://wiki.contextgarden.net/TABLE The equivalent of \use{2}\ReFormat[c]{text} would be this (rest of table code added to make this example self-contained and compilable): \bTABLE \bTR \bTD[nc=2, align=center] text \eTD \eTR \bTR \bTD apples \eTD \bTD oranges \eTD \eTR \eTABLE Hope this help! Cheers, Sietse On 15 July 2013 16:49, Wolfgang Schuster wrote: > > Am 15.07.2013 um 16:39 schrieb Thomas Friedrich > : > >> Hello ConTeXt users, >> >> I am switching from texexec to context, and from table to tabulate. >> Question: What is the equivalent for \use{2}\ReFormat[c]{text} in the >> \table environment, when you what to do the same in the \tabulate >> environment? I couldn't find the answer in the context garden. > > The tabulate environment has no support for spanned cells. > > Wolfgang > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] INstalling the context version of TeX distro.
Hello John, Ah, I see everybody else has already linked you to http://wiki.contextgarden.net/ConTeXt_Standalone#Windows I do apologize for the state of that page. Hans van der Meer sent me (well, he sent it to Hans Hagen and Hans H sent it to me) a much-improved draft of installation instructions, which I still haven't gotten around to putting on the wiki. I have to run out the door now, but I'll get round to it soon. Mentioning it here in order to remind myself. :-) Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Opening quotes problem with context.
John Culleton wrote: >> I use slackware linux 14, the 64 bit version. >> What is the proper code for opening quotes in context? Wolfgang Schuster wrote: > Use “quoted word” or \quotation{quoted word}. Since you're using Linux: if you set your keyboard layout to `English (international AltGr dead keys)`, your keyboard will behave like an ordinary US keyboard, but you can use AltGr (right Alt) to get special characters. Specifically, you can get ‘’ with AltGr + 9 and AltGr + 0 “” with AltGr + { and AltGr + } «» with AltGr + [ and AltGr + ] That might make the quotations easier to type, if you decide to input them “literally” instead of \quotation{structurally}. The AltGr dead keys keyboard is very nice in general, not least because it is indistinguishable from a normal US keyboard under normal usage. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Math accents set too close to capital
Tangential to your issue, but nota bene: instead of $...$ for inline math, ConTeXt lets you use \math{...} or \m{...}. Which is a bit more explicit, and can be easier to debug. You might prefer it. For display math, you really should use \startformula...\stopformula if you aren’t using it already, because $$...$$ doesn't space correctly. (Says the wiki. I don’t know it’s still true.) Cheers, Sietse On 31 July 2013 12:26, Michael Murphy wrote: > Hi Hans, > > Thanks for the response. This is sort of what I wanted, except the \widehat > is, well, quite wide. So I hacked it around a bit to put the \widehat from a > capital 'I' on top of a capital 'H'. In case it happens to be helpful, the > final macro was > > \def\hhat{H\kern-0.61em\widehat{\phantom{I}}\kern0.178em} > > If I really cared, I wouldn't hard-code those numbers, but since they are in > em I'm not really too worried. > > -- > Michael Murphy > murphy...@gmail.com > > On Wednesday, 31 July 2013 at 08:48, Hans Hagen wrote: > > On 7/31/2013 12:04 AM, Michael Murphy wrote: > > Hello all, > > I'm trying to typeset 'H' with a circumflex (or hat) in math mode, but > the result is rather ugly when not using latin-modern. I've tried to > redefine the \hat macro to move the accent up a bit using \topaccent: is > this the best approach? Having to nest '$' does not seem right at all. > (Also, for some reason although I find \mathhat in enco-ini.mkiv, when I > try to use it I get undefined control sequence.) > > Thanks, > Michael > > \starttypescript [mathfont] > \definetypeface [mathfont] [mm] [math] [palatino] [default] > [rscale=1.0] > \stoptypescript > \usetypescript[mathfont] > \setupbodyfont[mathfont] > > \starttext > > $\hat{H}$ > > \def\hat#1{\topaccent{3pt}{0}{90}{\textcircumflex}{$#1$}} > > $\hat{H}$ > > \stoptext > > > $\widehat{H}$ > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory
Hi Sanjoy, Sorry for the late reply; I had to dig around in grph-inc.lua, and I'm a bit rusty at source-diving. Yep, that’s a problem all right. A bug, even: when you put `simple.1` in the same directory as the `.tex` file, it is correctly identified as MetaPost; when you put the exact same file in a subdirectory like `./fig`, you get the problem you describe. No clue why. Until Hans fixes this, you can force ConTeXt to treat a file as MetaPost, JPEG, etc. by passing the `method=` paramater to `\externalfigure`. For MetaPost, write `method=mps`; I don’t know why the MetaPost code is not `mp`. (Perhaps that could be made a synonym?) Complete example below. I hope this workaround helps? Good luck with your work! Cheers, Sietse % test.tex \setupexternalfigures[directory={fig}] \enabletrackers[graphics.locating] \starttext \externalfigure[simple.1][width=10cm, method=mps] \stoptext % fig/simple.1 %!PS %%BoundingBox: 0 0 29 29 %%HiResBoundingBox: 0 0 28.34645 28.34645 %%Creator: MetaPost 1.803 %%CreationDate: 2013.08.04:0841 %%Pages: 1 %%BeginProlog %%EndProlog %%Page: 1 1 0 0 0 setrgbcolor newpath 0 0 moveto 28.34645 0 lineto 28.34645 28.34645 lineto 0 28.34645 lineto closepath fill showpage %%EOF ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing macro parameters to lua
Matt Gushee wrote: >> It took me a while to figure that out, though, since the wiki example >> does not show quotes. Hans Hagen wrote: > indeed you need quotes Yep. I've updated the wiki. http://wiki.contextgarden.net/index.php?title=Programming_in_LuaTeX&action=historysubmit&diff=21966&oldid=13667 Thanks, Matt! Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory
> you can test with this (line 767 in grph-inc): > > askedformat = format -- new per 2013-08-05 > elseif trace_figures then > report_inclusion("unknown format %a",askedformat) > end That fixes the problem, hooray! \o/ Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minor date formatting issue
> Perhaps someone should update the wiki? I suppose I could get an > account and fix it myself ... if people don't mind someone as inexpert > as me messing around in there ... It would be very nice if you could do that. Don’t worry about inexpertise -- people improving the documentation of how commands work is always welcome. (If you can't get the formatting right, you can leave it in plain text and I'll come in later and tidy it up.) Cheers, Sietse On 10 August 2013 07:04, Matt Gushee wrote: > Hi, Wolfgang-- > > On Fri, Aug 9, 2013 at 6:58 AM, Wolfgang Schuster > wrote: > >>> I am experimenting with the \currentdate command. I am finding that >>> >>> \currentdate [weekday,{,~},month,day+,{,~},year] >>> >>> which should work according to the Wiki, produces: >>> >>> Thursday, Augustday+, 2013 > >> It’s recommended to use “day:ord” with \currentdate but you also use “day:+”. >> >> \starttext >> \currentdate[day,space,day:ord,space,day:+] >> \stoptext > > Ah, yes, thank you! > > Perhaps someone should update the wiki? I suppose I could get an > account and fix it myself ... if people don't mind someone as inexpert > as me messing around in there ... > > -- > Matt > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \typesetbuffer at wiki
Hi Pablo, This is probably a backend problem. I know that examples where multiple pages are imposed onto one sheet also don’t work; this is probably similar. I might look into it at some point, try to improve the php, but it’s not a priority. (Unless you think it should be.) Cheers, Sietse On 10 August 2013 12:06, Pablo Rodríguez wrote: > Dear list, > > I have just created http://wiki.contextgarden.net/Command/typesetbuffer. > > In the typeset sample, it seems that \typesetbuffer doesn’t work at the > wiki (it doesn’t include the image). > > Am I missing something here? > > Many thanks for your help, > > > Pablo > -- > http://www.ousia.tk > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [dev-context] bTABLE in header and document give unexpected behavior
Sido wrote: >> I had posted a question on stack-exchange and it was suggested to >> post a bug report here. I’m not sure if this is a bug, but it was >> unexpected behavior to me. Wolfgang wrote: > BTW: Please use next time the normal mailing list for such problems and not > the developer list. That was my mistake: I thought it was a bug, and so I advised him to post to dev-context instead of ntg-context. Just to check: is dev-cont...@ntg.nl also for bug reports, or is it exclusively for development discussions and should (probable) bugs also go on ntg-context@ntg.nl? --Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] A "Lorem ipsum" module?
Hans wrote: > I've added a module m-ipsum. Duly wikified, although heaven knows whether people will actually find it that way. No matter: soon we will have navboxes and that will give us a shot at coherent topic-based navigation. For now I've made a pagelet at http://wiki.contextgarden.net/Dummy_text, as well as an entry on the Modules page. > I have no clue if it provides what one expects from such a module Personally, I think the ability to write one's thesis is a reasonable expectation. ;-) % Shamelessly borrowed from % http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/m-visual.mkiv#l234 \unexpanded\def\ipsumthesis {\setupsystem[random=1234] \title{\ipsum[alternative=lines, n=1]} % the first line from the sample text \placelist[chapter,section] \dorecurse{3} {\chapter{\ipsum[alternative=lines, n=random]} % random sentence from the sample text \dorecurse{5} {\section{\ipsum[alternative=lines, n=random]} \dorecurse{4} {\dorecurse{3}{\ipsum[alternative=paragraph, n=random]\endgraf} \placefigure {\ipsum[alternative=lines,n=random]} {\fakeimage{5cm}{3cm}{10cm}{5cm}} \dorecurse{2}{\ipsum[alternative=paragraph, n=random]\endgraf} Regards, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Adding command pages to the wiki
Hi all, When some command is mentioned on this mailing list, and people say "somebody might want to add this information to the wiki", and the command page doesn't even *exist* yet — don't despair. Creating it is easy, now. * There's a proper copy-paste skeleton for new command pages, now; you can copy it and fill in what you need with a minimum of fuss. It lives at http://wiki.contextgarden.net/Help:Command_reference. * Help:Command_reference is now linked from the [[Category:Commands]] page, so it should be easy to find when you need it. * No more interleaving your prose with and tags: {{cmd|defineparagraphs|[LeftRight]}} produces a linkified and typewriter-fonted \defineparagraphs[LeftRight]. * Link to up-to-date versions of source files with {{src|m-ipsum.mkiv}}. This links to the repository at http://repo.or.cz/w/context.git. * Mark code with {{code|...}} instead of It codes the same thing, but it's easier to type. (And easier to recode what it encodes. Code code code.) Speaking of the command reference: if you click on http://wiki.contextgarden.net/Category:Commands, you'll see that there are only 100 commands left to categorize. Some help would really be appreciated at this stage. Just open two or three commands in tabs, and change [[Category:Commands|mycommand]] to [[Category:Command/SubCategory|mycommand]]; you can see the list of subcategories at the top of the Category:Commands page. Kind regards, Sietse (Esteis on the wiki) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Critical editions with ConTeXt
I'm trying to get straight in my head what critical-edition-related commands are already implemented in ConTeXt. Implemented: (a) footnotes on specific lines, specified inline: \linenote{note text} (b) ditto on line ranges: \startlinenote[tag]{note text} ... \stoplinenote[tag] (c) tag a line and refer to it later in text: \someline[tag]; refer back with \inline[tag] or \inlinerange[tag] (the former has a spurious space before the number). The low-level backreferences are \in[lr:b:tag] and \in[lr:e:tag]; see page-lin.mkiv (d) ditto for line ranges: \startlines[tag] ... \stoplines[tag]; refer to these with \inlinerange[tag]. Not implemented AFAIK: (e) tag a line, but write the linenote on it later; at the end of the stanza or the quotation, say. Nice to keep notes from overpowering the text in the source code.). (f) ditto for line ranges This would have the added advantage that you could place tags in the text according to its contents, and then use those tags for both footnotes and textual references. Hans wrote: > but as you mention the interface is a bit problematic as start/stop is not > nice when being nested Do you mean it doesn't look nice, or is it so that nesting or interleaving \startlinenote[tag] ... \stoplinenote[tag] environments causes problems because the commands start with \start... and \stop...? If looks are the only problem, I think that is a problem with interleaving environments; no matter whether you call them \startlinenote...\stoplinenote, or \fromlinenote...\tolinenote. And in that case, I think consistently naming environment commands \start...\stop... is a very valuable thing, and should get priority. Regards, Sietse Sietse Brouwer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] simpleslides help needed
On Tue, Jul 24, 2012 at 12:51 PM, Pavneet Arora wrote: > Now, I don't know whether there should be a difference in behaviour, > [between \quotation and \startquotation], but there definitely is. This is deliberate: \quotation is for inline quotations, while \startquotation is for block quotations. Compare \math and \startmath. I completely understand that people have gotten into a habit of not looking up commands on the wiki; there was So Much Blankness on the command pages, so why bother? By now, though, we have reached the stage that looking up a basic command, at least, has a good chance of success. So perhaps people could slowly start looking at the wiki command reference again? The answer to quotation/startquotation, at least, was sitting right there. :-) http://wiki.contextgarden.net/Command/startquotation http://wiki.contextgarden.net/Command/quotation Cheers, Sietse Sietse Brouwer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \registerctxluafile vs \ctxloadluafile
Hi all, To load the lua functions in a file mycode.lua, I can use one of these two commands: \registerctxluafile{mycode}{0.1} \ctxloadluafile{mycode}\ Here 0.1 is the version number, which is only recorded if `environment.initex` is true. As far as I can tell they differ only in this: the second command registers mycode.lua as having version number `nil`. Questions: 1. Can these commands be used ad-hoc, or should they be reserved for module-writing? (1b. If reserved, what alternative for users?) 2. Is anything ever done with the version number? 3. When is `initex.environment` true? (Approximate answer is okay.) Cheers, Sietse Sietse Brouwer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Struggling with ConTeXt
Olivier Binda wrote: > 1) does lxml.att("#1","some tag") really work ? Hans Hagen wrote: [various solutions] > You can wikify this ... I'm looking for a place to put it, but I'm handicapped by the fact that I know nothing about ConTeXt's XML handling. I don't even know whether the question+answer is about general lxml.att usage, or a howto for some specific result. Can somebody tell me: Is the lxml namespace common and populated enough that it would be worth creating http://wiki.contextgarden.net/XML_manipulation to document the lxml.* functions, much like http://wiki.contextgarden.net/String_Manipulation documents string.* and lpeg.*, and [[table_manipulation]] documents table.*, and [[Extensions_to_the_Lua_I/O_library]] documents io.*. (Consistent page names? Maybe for Christmas (or St. Nicholas), if you're very good.) Or is there a more suitable page among the links on http://wiki.contextgarden.net/XML? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Luatex error in latest beta (standalone)
Alan wrote: > the relevant lines in strc-not.lua are: > notes.getsymbolpage = getsymbolpage > notes.getnumberpage = getnumberpage > notes.getdeltapage = getdeltapage > > function commands.notesymbolpage(tag,n) context(getsymbolpage(tag,n)) end > function commands.notenumberpage(tag,n) context(getnumberpage(tag,n)) end > function commands.notedeltapage (tag,n) context(getdeltapage (tag,n)) end Three functions are defined directly above: L297: local function getsymbolpage(tag,n) L307: local function getnumberpage(tag,n) L317: function notes.deltapage(tag,n) There is no reference to /\ wrote: > Hi, Keith— > > the relevant lines in strc-not.lua are: > notes.getsymbolpage = getsymbolpage > notes.getnumberpage = getnumberpage > notes.getdeltapage = getdeltapage > > function commands.notesymbolpage(tag,n) context(getsymbolpage(tag,n)) end > function commands.notenumberpage(tag,n) context(getnumberpage(tag,n)) end > function commands.notedeltapage (tag,n) context(getdeltapage (tag,n)) end > > In strc-not.mkiv, the lines are: > > \def\strc_notes_set_style_color_special > > {\iftrialtypesetting > > % keep > >\else\ifx\currentcolorparameter\empty > > > \scratchcounter\ctxcommand{notedeltapage("\currentnote",\currentnotenumber)}\relax > % todo calculate once > > \setlocationcolorspecified\scratchcounter > >\fi\fi} > > > > \unexpanded\def\strc_notes_inject_pointer % todo calculate once > > > {\ifcase\ctxcommand{notedeltapage("\currentnote",\currentnotenumber)}\relax > > % unknown > >\or > > % same page > >\or > > \noteparameter\c!symbolcommand{\symbol[\v!note:\v!nextpage]}% > >\or > > \noteparameter\c!symbolcommand{\symbol[\v!note:\v!previouspage]}% > >\fi} > > > But I have no idea what to make of this. > > Alan > > On Fri, Aug 3, 2012 at 10:04 AM, Keith J. Schultz > wrote: >> >> Hi Alan, >> >> I do not know if this helps. As I do not have the source, but I assume >> that should be notegetdeltapage. >> There are other possiblities. >> >> If that does not help. start looking for getdeltapage. Maybe, it was not >> hook in correct. at one point, >> or somebody for to use a dummy function. >> >> regards >> Keith. >> >> >> Am 03.08.2012 um 15:04 schrieb Alan Bowen : >> >> Files that used to process are now getting this error message: >> >> ! LuaTeX error >> ...TeXt/tex/texmf-context/tex/context/base/strc-not.lua:351: attempt to call >> global 'getdeltapage' (a nil value) >> stack traceback: >> ...TeXt/tex/texmf-context/tex/context/base/strc-not.lua:351: in function >> 'notedeltapage' >> :1: in main chunk. >> >> system > tex > error on line 24 in file c_2012-01_Johnson.tex: >> LuaTeX error >> … >> >> ctxcommand ...\directlua \zerocount {commands.#1} >> >> >> >> \strc_notes_set_style_color_special ...tenumber )} >> \relax >> \setlocationcolorsp... >> \strc_notes_set_style_color_inline ...lor_special >> \fi >> \strc_notes_inject_symbol ...xtstyle \c!textcolor >> \hbox >> \strc_notes_get_refe... >> \195>notation:note ...l \strc_notes_inject_symbol >> \else \unskip \unskip >> \glo... >> \strc_notations_command_nop ...handler \endcsname >> >> \strc_constructions_finali... >> >> I am running ConTeXt ver: 2012.08.02 10:55 MKIV fmt: 2012.8.2 int: >> english/english (standalone) >> >> Is there fix for this? >> >> Many thanks. >> >> Alan >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ___ >> >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ___ > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki :
Re: [NTG-context] Luatex error in latest beta (standalone)
Sietse wrote (at 17:00): >> so I suggest turning L317 into >> local function getdeltapage(tag,n) Alan Bowen wrote (at 17:42): > local function getdeltapage(tag,n) > seems to mess up \definenote > (the error appears when running context --make). > And if one plows ahead anyway, the original error remains. No error here. What \definenote-related error do you get when running context --make? Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Luatex error in latest beta (standalone)
I think you accidentally misread my fix. Happens to the best of us. Original text: function notes.deltapage(tag,n) You tried: local function notes.deltapage(tag,n) You should try: local function getdeltapage(tag,n) That should work. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with setupinteraction and footnote
Hi Otared, This is the same error as in the "Luatex error in latest beta (standalone)" thread. In line 317 of strc-not.lua, change this: function notes.deltapage(tag,n) into this: local function getdeltapage(tag,n) Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Et tu, Taco?
On Sun, Aug 5, 2012 at 11:00 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: > Dear Knights of the ConTeXt Table, > > I am sad to report that our beloved Taco has gone over to the dark side: > > http://tacosw.com/latexian/ I count at least two Dark Sides, here; should we rescue the Taco from LaTeX first, or from Macintosh? (More holy wars = more better.) --Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Draft version of document
Hi Roger, Firstly: drafts are indeed the way to go. \completelistoffigures places a complete list of figure *captions*, so that takes care of that. % No need to define a mode: you can simply enable it with % \enablemode[draft] % or % context --mode=draft \enablemode[draft] \startmode[draft] \completelistoffigures \stopmode Figure images, unlike figure captions, are not saved to a list. A pity, as this makes it difficult to get the associated figure image given a figure number (or figure label). I would do this: (1) make it so you can call the figure image with \externalfigure[img:fig:mylabel]. Use \useexternalfigure for this. (2) then label the figure with [fig:mylabel] (3) then simply manually make an entry in the figures section for each figure label. Perhaps some ConTeXt user more familiar with lists can provide a better, list-based, solution? \useexternalfigure[img:fig:pointy graph][pointy-graph.png] \placefigure [here] [fig:pointy graph] {caption of the pointy graph} {\externalfigure[img:fig:pointy graph][width=4cm]} \startmode[draft] \section{Just the figures} \in{Figure}[fig:pointy graph] \externalfigure[img:fig:pointy graph] \stopmode If you want to automate this, you'll want something like this. Untested and probably needs debugging first, but the table names are correct: \startluacode -- we won't need the keys k, but still. for k,v in pairs(structures.lists.ordered.float.figure) do label_string = v.references.reference -- `..` is Lua for string concatenation image_string = "img" .. label_string -- arguments to TeX commands: -- get [stuff] in TeX with { 'stuff' } in Lua -- get [stuff=bother] in TeX with { stuff = 'bother' } in Lua -- get {stuff} in TeX with 'stuff' in Lua context.in("Figure", { label_string }) context.externalfigure( { image_string } ) end \stopluacode I have made this reply long because I lack the time to make it short. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Marking a textfragment for later reference
Hi Robert, > So my question: "Why can some identifiers, > for example of figures, be used for internal > references and others not?" remains unanswered. That would be because there are * names, for creating a named variant of some command * and labels, which are used for cross-references, and I think you are calling them both identifiers. (Not sure I'm using the official terms, or if there are any.) Some examples below, I hope they'll clarify things. I never had any problems confusing labels and names myself, so I'm not sure how to explain what was obvious to me, but perhaps this will help: Names occur when you're defining things; Labels occur when you're placing things. As for why you can't do \definedelimitedtext[AA] \startAA[mylabel] bla \stopAA I guess that was never baked in. Probably because quotations are not really numbered objects, and so not obvious candidates for having their own labels. Cheers, Sietse %%% Example: label % \placefigure [here] [fig:myfig] % label: used to refer to the figure {caption}{figure} %%% Example: command like \startNAME % \definedelimitedtext [smallquote] % name [style=small] \startsmallquote % our own named environment bla bla bla \stopsmallquote % Example: names and labels % \useexternalfigure [littlecow] % define a named picture [cow.pdf] [width=1cm] \placefigure [here] [fig:littlecow] % a label for the figure float {Kleine, kleine koe} {\externalfigure[littlecow]} % invoking a named picture -- Sietse Brouwer -- sbbrou...@gmail.com -- +31 6 13.456.848 Verlengde Wassenaarseweg 4a -- 2342 BG Oegstgeest -- the Netherlands MSN: sie...@gawab.com -- ICQ: 341232104 On Tue, Aug 7, 2012 at 11:44 AM, Robert Blackstone wrote: > > On 7 aug. 2012, Pontus Lurcock > wrote >> >> On Tue 07 Aug 2012, Robert Blackstone wrote: >> >>> Here follows my minimal example. I reasoned that the identifier [topica] >>> might act as a label, or an anchor, or whatever the correct ConTeXt name >>> is, for a reference. >>> --- >>> >>> \definedelimitedtext[topica] >>> \setupdelimitedtext[topica][left=,right=] %maybe superfluous? I do not need >>> a layout different from the rest of the text. >>> \starttext >>> >>> Some text. >>> >>> \starttopica >>> Some text to explain a certain topic, called topica. >>> \stoptopica >>> >>> Some more text about topica. (See discussion on \at{page}[topica]) >>> >>> \stoptext >>> >>> --- >>> To avoid any misunderstanding: this is no longer a problem since I have >>> been given excellent advice. But it intrigues me. Why can some identifiers, >>> for example of figures, be used for internal references and others not? >> >> In this case, I'd say it's because you're defining a delimited text >> style which can be used in multiple places. Your document could have >> five hundred \starttopica...\stoptopica blocks on different pages. >> A figure identifier, on the other hand, is meant to be unique. >> >> Pont > Hi Pont, > Thanks for your comment. I realized this. There would of course be only one > "\starttopica...\stoptopica block" in my text. If I would like to use > delimited texts in this manner for several different topics, I would simply > give them different names. Each topic its own name, like [topicb], [topicc], > etc. Like you would do if you wanted to use slightly different types of > blockquote in your document. > So my question: "Why can some identifiers, for example of figures, be used > for internal references and others not?" remains unanswered. > Best regards, > Robert > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Draft version of document
Hi Robert, Debugged and all, here you go. Cheers, Sietse \useexternalfigure[img:fig:cow][cow.pdf] \useexternalfigure[img:fig:mill][mill.png] \starttext \section{Pictures} % The externalfigure names HAVE TO take the form 'img:FIGURELABEL', % or the automatic image list at the end on won't be able to % guess the image names from the figure labels. \placefigure[here][fig:cow] {cap-cow} {\externalfigure[img:fig:cow]} \section{More pictures} \placefigure[here][fig:mill] {cap-mill} {\externalfigure[img:fig:mill]} Lists start here %%% \enablemode[draft] \startmode[draft] % Better list heading --- the captions are what matters \setupheadtext[figures=List of Captions] \completelistoffigures % Now for printing all the images \section{List of Pictures} \startluacode -- we won't need the keys k, but still. for k,v in pairs(structures.lists.ordered.float.figure) do label_string = v.references.reference -- `..` is Lua for string concatenation image_string = "img:" .. label_string -- TeX <--> Lua, passing arguments to commands -- [stuff] <--> { 'stuff' } -- [stuff=bother] <--> { stuff = 'bother' } -- {stuff} <--> 'stuff' -- context.in() seems to have some Lua meaning -- so we print the command string directly, instead context("\\in{Figure}[" .. label_string .. "]") context.page( { 'no' } ) context.externalfigure( { image_string }, { 'here' } ) context.hairline() context.par() -- end paragraph end \stopluacode \stopmode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \product tag
Hi John, What Wolfgang said: `\product X` should be processed once inside `\startproject` environments, and never otherwise. And you should probably have products as your build targets, not projects. @Hans: when I looked at the `processors` table in file-job.lua, I found some discrepancies between the processing commands and the reporting strings. Here is the table edited to show just the discrepancies: local processors = utilities.storage.allocate { -- [we_are_inside_startthis] = { -- [we_encounter_this] = { "string_for_message", processing_command }, -- comment -- } [v_text] = { [v_project] = { "none", context.processfileonce }, -- none [v_product] = { "none", context.processfileonce }, -- none }, [v_project] = { [v_product] = { "once", context.processfilenone }, -- once -- consistent, but strange comment [v_component] = { "none", context.processfilenone }, -- many * }, [v_product] = { [v_product] = { "none", context.processfilemany }, -- none }, } Is this all right? In general, the reporing strings are the ones consistent with the table at the bottom of http://wiki.contextgarden.net/Project_structure which is taken from page 3 of http://pragma-ade.com/general/magazines/mag-1101.pdf Cheers, Sietse On Wed, Aug 8, 2012 at 2:29 AM, john Culleton wrote: > In a MKIV file using the approved method of structuring projects, > does the \product tag do anything or is it just internal > documentation for the source file? When I process a file called > book.tex and containing the tag: > \product foobar > the result is a file called book.pdf, just as if the tag did not > exist. > > -- > John Culleton > Free list of books for self-publishers: > http://wexfordpress.net/shortlist.html > Police Procedural and Expose: "Death Wore Black" > "Create Book Covers with Scribus" > http://www.booklocker.com/books/4055.html > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Draft version of document
@Roger: I just realised I called you Robert. Sorry about that, moment of inattention. Hi Hans, > Actually, this is something that should be doable with user data weren't it > that for floats that's not yet available. So I've added it to the core (will > be in next upload) ... Ah, nifty; and fantastically quick, as always. I've not heard of ConTeXt's "user data" feature before. Where can I find more on that? Is there a list e-mail I should search for? I'm trying to work out how to describe the new feature, so I can add that to the documentation. I think I see two features, but I'm not sure. Can you tell me if the below is correct? New feature 1: previously we could only do \startplacefigure[reference=fig:mill, title={A Mill}] or \startsection[reference=sec:sheep, title={The Sheep}] but now we can do \startplacefigure[reference=fig:mill, title={A Mill}][resource=mill] or \startsection[reference=sec:sheep, title={The Sheep}][mykey=myvalue] Nothing is done with the parameters in the second key=value list, but they are stored as part of the object when the object is written to its figures/sections/whatever list; and there they can be used in constructing the Table of figures/contents/whatever. New feature 2: the command \rawstructurelistuservariable{#1} . This command can be used by custom list entry macros like \mylistentrymacro below: \setuplist[somelist][alternative=command, command=\mylistentrymacro] The command gets a property from the current list entry object, like so: \rawstructurelistuservariable{resource} %--> mill Question: does this work, too, or can we only access values in the *second* key=value list? \rawstructurelistuservariable{reference} %--> fig:mill Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startcomponent, \startproduct... + automatic file name
> On Thu, 09 Aug 2012 11:27:08 +0200, Hans Hagen wrote: >> in the current beta you can say >> >> \startcomponent * >> >> Hans Wikified at http://wiki.contextgarden.net/Command/startcomponent. This trick also works for startproject, startenvironment, and startproduct, I assume? And for the general case, what about `\ctxlua{commands.processedfile}`? That looks like it should print the current filename, as long as any inclusions use the ConTeXt commands and not \input. --Sietse On Thu, Aug 9, 2012 at 1:24 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > Great, thank you. > > Lukas > > > On Thu, 09 Aug 2012 11:27:08 +0200, Hans Hagen wrote: > >> in the current beta you can say >> >> \startcomponent * >> >> Hans > > > > -- > Ing. Lukáš Procházka [mailto:l...@pontex.cz] > Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] > Bezová 1658 > 147 14 Praha 4 > > Tel: +420 244 062 238 > Fax: +420 244 461 038 > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startcomponent, \startproduct... + automatic file name
Wolfgang wrote: > You can use \currentcomponent, \currentproduct and \currentproject to print > the name of the file. Another secret unearthed! All wikified, together with \processedfile and \processedfiles. Sans examples, but at least the info's there. Thank you, Wolfgang. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math formula linebreak
Steffen Wolfrum wrote: >> them to break automatically ... is there a handy solution? Aditya Mahajan wrote: > Short answer: No easy solution exists. Is this because allowing automatic line breaks in math mode is itself hard to implement, or is the basic mechanism possible but preventing stupid/ugly breakpoints is hard? Because I can imagine a 70 percent solution being a big help already. --Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math formula linebreak
Hi Aditya, > I wish that the breqn algorithm were described somethere; > then one could play around implementing it in luatex. Have you seen the new User's Guide yet? It's from last May, very recent, so it may not have been there yet when last you looked. It includes the entire source code, and comments that quite thoroughly: the ratio works out to 16 lines of comment per 26 lines of code. (A page is about 42 lines.) And the comments go into the "how", and not just the "what". Might be useful at some point in the future, if it is indeed new. http://ctan.unixbrain.com/macros/latex/contrib/mh/breqn.pdf --Sietse P.s. The lack of an index and a table of contents is criminal, although probably due to this being a beta version (v0.98b) of the manual. I've extracted the sections and subsection titles, albeit without the page numbers. == User's guide == 1 A bit of history 2 Package loading 3 To do 4 Introduction 5 Principal features 6 Shortcomings of the package 6.1 Incompatibilities 6.2 Indention of delimited fragments 6.3 Math symbol subversion 6.4 Subscripts and superscripts 7 Incomplete 8 Package options 9 Environments and commands 9.1 Environments 9.2 Commands 10 Various environment options 11 The \@exisym package 12 Caution! Warning! 13 Examples == Implementation == 14 Introduction 15 Strategy 16 Prelim 17 Package options 18 Required packages 19 Some useful tools 20 Debugging 21 The \listwidth variable 22 Parameters 23 Measuring equation components 24 The dmath and dmath* environments 25 Special processing for end-of-equation 26 Preprocessing the equation body 27 Choosing optimal line breaks 28 Equation layout options 29 Centered Right-Number Equations 30 Framing an equation 31 Delimiter handling 32 Series of expressions 33 Equation groups 34 The darray environment 35 Miscellaneous 36 Wrap-up 37 To do ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math formula linebreak
Addendum: I just bumped into Morten Høgholm's bachelor's thesis. "Automatic line-breaking of displayed math expressions" https://sites.google.com/site/mortenhoegholm/breqn-thesis.pdf That thesis contains a conceptual explanation of the breqn algorithm (or at least the algorithm he used when reimplementing breqn as l3breqn). Might be useful if/when somebody decides to have a go at improving ConTeXts math breaking. The thesis also contains the code of l3breqn, but that is rather more sparsely commented than the code in the breqn.pdf manual. --Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Figured bass symbols in a text.
Hans wrote: > So, we have low/high definable and clonable etc. Best check if the defaults > are compatible. Valid parameters are 'up', 'down' and 'distance' > (dimensions) and of course 'style' and 'color'. Just downloaded and tested, looks nice. Small bug: It's called lomihi, but the arguments are placed middle/high/low. For documentation/clarification, is the following correct? distance = extra kerning, distance between lomihi and preceding character. up = how much the {hi} arg is raised down = how much the {low} arg is lowered Support for the [left] keyword seems to have been dropped, but is still in the documentation comments. Perhaps instead support align=..., and turn distance= into kernbefore= and kernafter=? Sorry about not knowing enough to implement it myself. Cheers, Sietse On Fri, Aug 10, 2012 at 7:59 PM, Hans Hagen wrote: > On 10-8-2012 18:08, Wolfgang Schuster wrote: >> >> >> Am 10.08.2012 um 18:00 schrieb "Rogers, Michael K" : >> >>> Hi, >>> >>> Since no one has offered a quick ConTeXt solution, I offer my usual -- a >>> dumb Plain TeX solution: >>> >>> \def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{#3}$} >>> >>> With the Computer Modern font, the top is a little further away from the >>> middle than the bottom. It can be adjusted with something like >>> >>> >>> \def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{\lower0.23pt\hbox{$\scriptstyle{#3}$}}$} >>> >>> but this would probably have to be adjusted for each font and size. >> >> >> You can use \framed: >> >> >> \defineframed[lohimi][align=flushleft,location=middle,frame=off,foregroundstyle=\tx] >> >> \starttext >> text \lohi{1}{2} text \lohimi{1\\2\\3} text >> \stoptext > > > Neat trick. > > === > > Wolfgang, > > The next beta has: > > \starttext > > \definelow [MyLow] [style=\txx] > \definehigh [MyHigh] [style=\txx] > \definelowhigh [MyLoHi] [style=\txx] > \definelowmidhigh[MyLoMiHi][style=\txx] > > We have > \ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and > \ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and > \ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and > \ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}. > > \stoptext > > So, we have low/high definable and clonable etc. Best check if the defaults > are compatible. Valid parameters are 'up', 'down' and 'distance' > (dimensions) and of course 'style' and 'color'. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Footer text style
Lukáš wrote: > Added to http://wiki.contextgarden.net/Command/setuppagenumbering as an > example. Thanks! That is greatly appreciated. > (BTW: Any idea how to make wiki-contex-source-compiler show the page number, > if *really* wanted - i.e. in this case?) \showframe[] does the trick: when an empty options argument [] is given, \showframe only draws a green edge around the page boundary. (When no arguments are given, OTOH, a frame is drawn around all areas. See http://wiki.contextgarden.net/Command/showframe .) NB: \showframe seems to be broken in the wiki's mkiv installation, which is old. The next example draws no frame, but if you remove the mode=mkii then all is well. It works with both mkii and the latest beta on my local machine. \showframe asdf Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Project & automatic lookup for included directories
A little experimentation shows the lookup order is as follows, from highest to lowest priority: current directory, parent, grandparent, whatever is in \usepath. > What is the default lookup of \environment? I thought it were at least one > level up, but I'm not sure. current directory, parent directory, grandparent > Suppose having 3 files: > > _e-Geom.mkiv > ../_e-Geom.mkiv > ../../_e-Geom.mkiv > > Which of them will be used when I write '\environment _e-Geom.mkiv' and > > a) I specify explicitly \usepath[{../..}]? > b) I don't use '\usepath'? _e-Geom.mkiv will be used in both cases. Does anybody know if there is a way to specify a lookup path that has higher priority than the default lookups? I don't know one myself. Cheers, Sietse ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___