Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-14 Thread Marco Patzer
On 2013–10–14 Marco Patzer wrote: > On 2013–10–13 Hans Hagen wrote: > > > >inbetween the arcs, that should alsó be drawn). The text should not be > > >stretched but center on the top, flowing evenly distributed on each > > >side. This link will

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote: > In the subsection head, I would like to suppress the newline between the > number and the text, That's controlled by the “after” key. \setuphead [Exercise] [after=] > My purpose is to define something like: > > \definehead[Exercise][subsection] > \s

[NTG-context] \setcharactercasing misbehaviour

2014-01-09 Thread Marco Patzer
Hi, \setcharactercasing requires a new paragraph to work. Seems like a bug to me. \starttext \setcharactercasing[Word]foo %% Uppercase \setcharactercasing[Word]bar %% lowercase \setcharactercasing[Word]bar %% Uppercase \stoptext Marco signature.asc Description: Digital signature

[NTG-context] Language “deo” causes “TeX capacity exceeded” when units are used

2014-01-09 Thread Marco Patzer
Hi, the following example exceeds TeX's capacity: \mainlanguage [deo] \starttext \unit{10 square metre} \stoptext Marco signature.asc Description: Digital signature ___ If your question is of interest to others a

Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–07 Marco Pallante wrote: > […] > > What I get, however, is a table that starts at page 2 and not just after > the chapter head. The table starts on page one here. Which version are you using? Marco signature.asc Description: Digital signature ___

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote: > \starttext > \definehead[Exercise][subsection] > \setuphead > [Exercise] > [after=] > \startExercise[]{(this is the exercise's title)} > The exercise's content. > \stopExercise > \stoptext \definehead [Exercise] [subsection] [after=] \starttex

Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–09 Marco Pallante wrote: Hello Marco, I have no clue where the issue is, but I can confirm that the table starts on page two using version 2013.05.28. It works with a current beta. If want to keep using TeXLive, instead of ConTeXt standalone, one possible workaround would be to use Lu

Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–09 Marco Pallante wrote: > How do I use LuajitTeX? context --jit > I've seen the two options --jit and --jiton > which seem to be the right way. Am I right? context --help | grep jit --jituse luajittex with jit turned off (only use the faster virtual machine) --jiton us

Re: [NTG-context] \setcharactercasing misbehaviour

2014-01-09 Thread Marco Patzer
On 2014–01–09 Hans Hagen wrote: > On 1/9/2014 12:56 PM, Marco Patzer wrote: > >Hi, > > > >\setcharactercasing requires a new paragraph to work. Seems like a > >bug to me. > > > >\starttext > > \setcharactercasing[Word]foo %% Uppercase >

Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-10 Thread Marco Patzer
On 2014–01–10 Marco Pallante wrote: > It seems my TL2013 installation is missing LuajitTeX. Do you know what > package has it? You're right, TeXLive apparently doesn't ship LuajitTeX. I don't use TeXLive myself, but have an installation for testing. Having set up the PATH for TeXLive "context " i

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-14 Thread Marco Patzer
On 2014–01–14 Pablo Rodriguez wrote: > I have a presentation that defines a typing environment and I would like > to know who to apply it to \typebuffer. > > Here is a sample: > > \definetyping[TeXcode][option=TEX] Use: \setuptyping [buffer] [option=TEX] This applies globally, thoug

Re: [NTG-context] Disable balancing of page bottoms

2014-01-15 Thread Marco Patzer
On 2014–01–15 Joshua Krämer wrote: > I have found out that I had interpreted the problem wrongly. It is > not a problem of balancing, it is a problem of the layout macros. It's not a problem with the macros, it's a consequence of you using them the wrong way. > I use a different page layout for

Re: [NTG-context] Disable balancing of page bottoms

2014-01-15 Thread Marco Patzer
On 2014–01–15 Joshua Krämer wrote: > Thank you, Marco. The problem with your solution is that in > doublesided mode, after \startmakeup ... \stopmakeup, an empty page is > inserted, but I need to have text on the back of the page. Do you > maybe know how to solve this? \definemakeup [Titl

Re: [NTG-context] hyphenating \ConTeXt

2014-01-15 Thread Marco Patzer
On 2014–01–15 Pablo Rodriguez wrote: > how should I invoke \hyphenation so it hyphens the \ConTeXt command? \ConTeXt is defined as “Con\TeX t” and \TeX uses kerns and boxes, both of which suppress hyphenation. AFAIK there's no easy way around it. That having said you can surely redefine the \TeX

Re: [NTG-context] Compiling to EPUB

2014-01-16 Thread Marco Patzer
On 2014–01–16 Henning Hraban Ramm wrote: > 7zip is not called as „zip“, but „7zip“, On my (Unix) machine it's called as “7z” not “7zip”. I don't know if the binary name differs between the platforms. > but ConTeXt’s script relies on an executable „zip“ and probably exactly the > syntax of InfoZ

Re: [NTG-context] No bibliography in the output, depends on file name

2014-01-17 Thread Marco Patzer
On 2014–01–15 Nicola wrote: > maybe this is a known issue, It's a known fact that context has a different notion of valid file names than your operating system does. This is by design. To quote the manual: “It is highly recommended, that all input files, i.e. the ConTEXt source and other inc

Re: [NTG-context] hyphenating \ConTeXt

2014-01-17 Thread Marco Patzer
On 2014–01–17 Pablo Rodriguez wrote: > On 01/15/2014 11:56 PM, Marco Patzer wrote: > > On 2014–01–15 Pablo Rodriguez wrote: > > > >> how should I invoke \hyphenation so it hyphens the \ConTeXt command? > > > > \ConTeXt is defined as “Con\TeX t” and \TeX use

Re: [NTG-context] footnotes in appendices

2014-01-19 Thread Marco Patzer
On 2014–01–19 Pablo Rodriguez wrote: > on a document I have, I want to have footnotes in appendices, but they > are numbered in uppercase Roman numbers. Here is a sample: > > \starttext > \startappendices > a\footnote{b.} > \stopappendices > \stoptext > > How can I change it to Arabic numbers?

Re: [NTG-context] Project structure

2014-02-06 Thread Marco Patzer
On 2014–02–05 pol stra wrote: > The problem is that only text of first introduction is used. You can use \allinputpaths to see what's going on. The paths are indeed added and ConTeXt walks through the list and uses a matching file, if found. This happens to always be the file of the first chapter

Re: [NTG-context] Problem with integral sign

2014-02-09 Thread Marco Patzer
On 2014–02–09 Jaroslav Hajtmar wrote: > How can type big integral sign to result looked good? > > Here is my example: > > \startformula > \int \frac{P_n(x)}{Q_m(x)} \, \mathrm{d}x, \quad n \stopformula I don't know how to reduce the space between the integral sign and the fraction (I assume tha

Re: [NTG-context] Race Condition: Incorrect float numbering

2014-02-18 Thread Marco Patzer
On 2014–02–18 Andreas Schneider wrote: > after many experiments I finally was able to extract a (kinda) minimal example > that reproduces a problem which is haunting one of my documents. > > Under certain conditions (apparently a bunch of floats and page breaks) it > happens, that a float is re-p

Re: [NTG-context] \doiftext vs. \doifemtpy

2016-01-13 Thread Marco Patzer
On Wed, 13 Jan 2016 23:18:03 +0100 Pablo Rodriguez wrote: > which is the difference between \doiftext and \doifempty? First of all, the logic is reversed, \doiftext prints the second argument if the first one contains text, \doifempty does print the second argument if the first one *does not* co

Re: [NTG-context] invert colors in \externalfigure

2016-01-20 Thread Marco Patzer
> How can I invert the colors in the external figure without having > to edit the image file? Based on Peter Münster's grph-downsample.lua here some lines that should get you started. Note that you'll need graphicsmagick (or imagemagick for that matter. In the latter case change the call from `gm

[NTG-context] Shading to transparent using withshademethod

2016-01-27 Thread Marco Patzer
Hi, some months ago the withshading, withfromshadecolor etc. have apparently been replaced by the more general withshademethod, withshadevector, withshadecolors, etc. methods. I have issues converting the old withshading code to the withshademethod version. The old code had no problems shading to

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 09:43:24 +0100 Hans Hagen wrote: > On 1/27/2016 10:05 PM, Marco Patzer wrote: > > The new code appears to work in general, but only if no shading to > > transparent is being used: > > > > \definecolor [trans] [a=multiply, t=.5, s=.5] > &g

Re: [NTG-context] Distance between items

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 11:48:12 +0100 Otared Kavian wrote: > I don’t remember how to tweak the distance between items: What I > would like to have is a distance between items a little bit bigger > than the distance between them when the option « packed » is given, > but smaller than the distance bet

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 12:33:39 +0100 Hans Hagen wrote: > >>> How to make transparent shadings work with the new mechanism? > >> > >> withtransparency (1,.5) > > > > However, this makes the entire shade transparent. How to shade from > > one colour to transparent using withtransparency t

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 12:29:46 +0100 Hans Hagen wrote: > >> How to make transparent shadings work with the new mechanism? > > > >withtransparency (1,.5) > > next beta > > \definecolor [trans] [a=multiply, t=.5, g=.5] > > \startMPpage > fill fullcircle scaled 12cm withcolor \MPco

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 14:45:13 +0100 Hans Hagen wrote: > On 1/28/2016 1:53 PM, Marco Patzer wrote: > > On Thu, 28 Jan 2016 12:33:39 +0100 > > Hans Hagen wrote: > > > >>>>> How to make transparent shadings work with the new mechanism? > &

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 18:26:28 +0100 Hans Hagen wrote: > On 1/28/2016 3:34 PM, Marco Patzer wrote: > > On Thu, 28 Jan 2016 14:45:13 +0100 > > Hans Hagen wrote: > > > >> On 1/28/2016 1:53 PM, Marco Patzer wrote: > >>> On Thu, 28 Jan 2

Re: [NTG-context] anglestriped shifts path

2016-02-04 Thread Marco Patzer
On Wed, 3 Feb 2016 15:27:36 -0500 John Kitzmiller wrote: > I expect anglestriped to work more like fill, but it shifts the path. > Is it intended behavior? > > \startMPpage[offset=2mm] > path p; > p = unitsquare scaled 4cm ; p = fullsquare scaled 4cm ; Marco ___

Re: [NTG-context] horizontal list of sections/topics?

2016-02-14 Thread Marco Patzer
On Fri, 12 Feb 2016 23:36:47 +0100 "Thomas A. Schmitz" wrote: > for my next presentation style, I would like to have a list of > topics with the current topic highlighted. There are already two > styles in simpleslides doing this, but this time, I'd like the > list to be horizontal, at the bottom

Re: [NTG-context] Character rotation font feature available?

2016-02-14 Thread Marco Patzer
On Mon, 15 Feb 2016 04:42:31 +0800 Zhichu Chen wrote: > I have some special needs that requires all the characters be rotated > by 90 degrees. I've searched around the web and maybe adding > /FontMatrix [0 1 -1 0 0 0] > to the font descriptor dictionary is helpful. But I can't find a > \pdf??? pr

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-16 Thread Marco Patzer
On Tue, 16 Feb 2016 09:22:23 +0100 Nicola wrote: > I read in the wiki (http://wiki.contextgarden.net/Math) that $…$ > for inline math is deprecated in favor of \m{…} and more verbose > variants. Is that really the case? If so, what is the reason and > what are the differences? When \asciimode is

Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-16 Thread Marco Patzer
On Tue, 16 Feb 2016 08:21:42 -0700 Alan BRASLAU wrote: > I do note that the VIM syntax highlighting routine is pretty poor and > has difficulties around $, which is a symbol that I like using > (unpaired) quite a lot in MetaPost (\startMPcode...\stopMPcode). The stock vim context syntax highligh

Re: [NTG-context] Buffer with syntax highlighting

2016-02-17 Thread Marco Patzer
On Wed, 17 Feb 2016 13:16:03 +0100 Procházka Lukáš Ing. wrote: > is it possible to \typebuffer with a syntax highlighting? \typebuffer [demo] [option=context] Also have a look at Aditya's vim syntax highlighter module which is great. Marco __

Re: [NTG-context] Vertically centered text in each page

2016-02-19 Thread Marco Patzer
On Fri, 19 Feb 2016 11:54:12 +0100 Nicola wrote: > How do I setup the slide command to do that by default? I have tried > putting {before,after,beforesection,aftersection}=\vfill in various > combinations in \setuphead, but I cannot obtain the desired effect. \setuphead[slide][ style=\ssb, c

Re: [NTG-context] Vertically centered text in each page

2016-02-19 Thread Marco Patzer
On Fri, 19 Feb 2016 12:51:14 +0100 Nicola wrote: > On 2016-02-19 11:23:18 +0000, Marco Patzer said: > > > On Fri, 19 Feb 2016 11:54:12 +0100 > > Nicola wrote: > > > >> How do I setup the slide command to do that by default? I have > >> tried puttin

[NTG-context] Expansion in PDF metadata

2016-03-03 Thread Marco Patzer
Hi! How to expand \translate so that it doesn't show up in the PDF metadata? Example: \setupdocument [metadata:title=\documentvariable{title}] \mainlanguage [sv] \startdocument [title={\translate[en=Foo, sv=Bar]}] \input knuth \stopdocument This literally shows: Title: \translate [en=Foo,

Re: [NTG-context] Expansion in PDF metadata

2016-03-04 Thread Marco Patzer
On Fri, 4 Mar 2016 10:34:49 +0100 Hans Hagen wrote: > On 3/4/2016 7:58 AM, Marco Patzer wrote: > > Hi! > > > > How to expand \translate so that it doesn't show up in the PDF > > metadata? Example: > > > > \setupdocument [metadata:title=\doc

Re: [NTG-context] help on def & buffer

2016-03-30 Thread Marco Patzer
On Wed, 30 Mar 2016 10:34:46 +0200 Erik Margraf wrote: > My plan is simply to use the output of a sagemath run in this way. A > run should produce > several files containing TeX code. I only wanted to shorten the > \startbuffer \input ... \stopbuffer > sequence. Maybe this (including sagemath out

Re: [NTG-context] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Marco Patzer
On Thu, 14 Apr 2016 09:46:34 +0200 Michael Guravage wrote: > I would like to use a variable for the value of the list argument in, > e.g., the \startsection command. If you compile my little example you > will see that the first 'literal' assignment works, while the second > 'variable' assignment

[NTG-context] listalternative and filler throws error

2016-05-05 Thread Marco Patzer
Hi, the following used to work with 2014.02.14 17:07 but a current 2016.05.01 09:52 throws the error: Use of \syst_helpers_set_local_hsize_yes doesn't match its definition \definefiller [myfiller] \setupcombinedlist [content] [alternative=c] \setuplistalternative [c] [filler={\filler[myfiller]

Re: [NTG-context] headline and no indent

2016-05-09 Thread Marco Patzer
On Mon, 9 May 2016 17:19:15 +0200 Andrea Valle wrote: > When opting for paragraph indents, paragraphs following directly > after a headline should no show the indent. > > I guess that the first line of chapter/section/subsection should have > no indent. Hmm, how to get this? That's actually th

Re: [NTG-context] starting a chapter on odd page

2016-05-11 Thread Marco Patzer
On Wed, 11 May 2016 12:38:17 +0200 Andrea Valle wrote: > in the book I’m finishing I’m using a structure like this > > \starttext > > \input c_preface.tex > > \input c_chapter1.tex > > [etc] > > \stoptext > > > where each .tex file contains > > \startchapter[various options] > \section{Fi

Re: [NTG-context] starting a chapter on odd page

2016-05-11 Thread Marco Patzer
On Wed, 11 May 2016 13:19:41 +0200 Andrea Valle wrote: > Thanks marco, should I rather use > > > \definepagebreak > [chapterpagebreak] > [yes, odd] I don't know what the actual difference is. According to the source it has something to do with floats. Marco _

Re: [NTG-context] starting a chapter on odd page

2016-05-11 Thread Marco Patzer
On Wed, 11 May 2016 18:02:00 +0200 Wolfgang Schuster wrote: > > Marco Patzer <mailto:li...@homerow.info> > > 11. Mai 2016 um 13:59 > > On Wed, 11 May 2016 13:19:41 +0200 > > > > I don't know what the actual difference is. According to the source > &

Re: [NTG-context] define vs setup

2012-07-26 Thread Marco Patzer
On 2012-07-26 Bill Meahan wrote: Hi Bill, it's a typo: > \stopmakup \stopmakeup Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / htt

Re: [NTG-context] alternative=d gives "attr"

2012-07-30 Thread Marco Patzer
On 2012-07-30 Steffen Wolfrum wrote: Hi Steffen, > Any idea where this "attr2 comes from, and how to get rid of it?? Sorry, no clue. > Second question: how can I add a separator, like this: > > a) Test one 47– b) Test two 51 \setuplist [section] [alternative=d, textcomm

Re: [NTG-context] footnote numbers turn red

2012-07-31 Thread Marco Patzer
On 2012-07-31 Martin wrote: Hi Martin, > The footnote numbers turn red(ish) as soon as \setupinteraction is present. > > Is that intended? Yes, it is. There is a special setting, when the link appears on the same page, it's contrastcolor. \setupinteraction [state=start, color=darkblue,

Re: [NTG-context] footnote numbers turn red

2012-07-31 Thread Marco Patzer
On 2012-07-31 Martin Althoff wrote: > With the definition, as you give it, the footnote numbers at the > bottom of the page turn green, but the ones in the text remain > black. Not here with 2012.07.27 16:41. Which context version are you running? Marco ___

[NTG-context] Left margin of vim module output

2012-08-01 Thread Marco Patzer
Hi, how can I adjust the left margin of the output of the vim module? The core typing mechanism implements a “margin” key for this. The vim output also does not react to the “leftoffset” setting of the background mechanism. \usemodule [vim] \definetextbackground [code] [location=paragraph,

Re: [NTG-context] Left margin of vim module output

2012-08-01 Thread Marco Patzer
On 2012-08-01 Aditya Mahajan wrote: > > I'll add a margin key to vim module (but not the oddmargin and > > evenmargin keys; they would require a complete low-level rewrite > > of the module). Thanks a million. That was fast :) > The dev version on github now includes a margin key, Does it? I j

Re: [NTG-context] Using MPgraphics as externalfigures?

2012-08-02 Thread Marco Patzer
On 2012-08-02 Mari Voipio wrote: Hi Mari, > I'm being a bit clueless about the MPgraphics again... Read http://wiki.contextgarden.net/Metapost and 3.3 Integrated Graphics in the MetaFun Manual. > Any ideas of how to do this in a smart way? Preferably without having > to go into the bowels of C

Re: [NTG-context] Argument of \myheading has an extra }

2012-08-02 Thread Marco Patzer
On 2012-08-02 "Jan Pohanka" wrote: Hi Jan, > \def\myheading#1#2{% > #1 #2} \define[2]\myheading{% #1 #2} Also interesting in this context: http://article.gmane.org/gmane.comp.tex.context/77610 Marco __

Re: [NTG-context] Marking a textfragment for later reference

2012-08-05 Thread Marco Patzer
Hi Robert, \starttext See \in{section}[sec:foo] on \at{page}[sec:foo] or the text on \at{page}[ref:a]. \page \startsection [title=Foo, reference=sec:foo] \stopsection \page Some text\reference[ref:a] \stoptext Marco _

[NTG-context] Multiple arguments bug in \showhyphens

2012-08-30 Thread Marco Patzer
The following example throws a LuaTeX error: \starttext \showhyphens{foolish bartender} \stoptext Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-contex

Re: [NTG-context] Divided cells and bullet points in tables

2012-08-30 Thread Marco Patzer
On 2012-08-30 Malte Stien wrote: Hi Malte, > 1. The top left cell is divided in two by a diagonal line with > separate text into each triangle This should get you started: http://article.gmane.org/gmane.comp.tex.context/67721 > 2. Another cell in the table body has a bulleted list This is pos

[NTG-context] Disappearing content when floats are used in columnset

2012-08-30 Thread Marco Patzer
Hi, in the following example the AAAs disappear. Column sets without float and floats without column sets work fine. \definecolumnset [Columns] [n=2] \starttext \startcolumnset [Columns] AAA \startplacefigure [title=Some figure] \stopplacefigure BBB \stopcolumnset \stoptext

Re: [NTG-context] Diagonal rule in table (was: Divided cells and bullet points in tables)

2012-08-31 Thread Marco Patzer
> Hi Malte, > > > 1. The top left cell is divided in two by a diagonal line with > > separate text into each triangle > > This should get you started: > http://article.gmane.org/gmane.comp.tex.context/67721 That solution is very hackish and the result ugly. Here is a more clean solution. It has

[NTG-context] Subfootnotes broken

2012-08-31 Thread Marco Patzer
Hi, the subfootnote feature is broken or changed the interface. Is there a workaround or fix? \starttext Alpha\footnote{alpha} Beta\subfootnote{beta} \stoptext Marco ___ If your question is of interest to other

[NTG-context] Page number in the edge

2012-09-03 Thread Marco Patzer
Hi, moving the page number into the edge in the following way seems straightforward, but fails. “edge” is not recognised as “margin” or “header” is. I wonder why. Is this intended or am I misusing the command? \setuplayout [backspace=5cm, width=10cm, edge=1cm] \setuppagenumbering [loc

[NTG-context] Include chapter number in figure numbering

2012-09-03 Thread Marco Patzer
Hi, how do I include the chapter number in the figure numbering? The following example used to produce (as of November 2011) “Figure 1.1”. A current beta yields merely “Figure 1”. \starttext \startchapter [title=Foo] \startplacefigure [title=Bar] \stopplacefigure \stopchapter \stopte

Re: [NTG-context] Include chapter number in figure numbering

2012-09-03 Thread Marco Patzer
On 2012-09-04 Sietse Brouwer wrote: Hi Sietse, > > how do I include the chapter number in the figure numbering? > > Untested: > \setupcaptions[prefixsegment=chapter] This works with beta 2011-11-29, but unfortunately not in a current one. Does it work for you? Marco

Re: [NTG-context] \startchapter[title=Test] is not working inside \startcomponent

2012-09-04 Thread Marco Patzer
On 2012-09-04 Jeong Dalyoung wrote: Hi Jeong, > \startchapter[title=Test] is working inside \starttext and \stoptext. > But it is not working inside \startcomponent and \stopcomponent. > Is it a natural behavior? Yes. \startcomponent expects an argument. \startcomponent somecomponent or \st

Re: [NTG-context] Include chapter number in figure numbering

2012-09-04 Thread Marco Patzer
On 2012-09-04 "Rogers, Michael K" wrote: Hi Rogers, > I think the key name is plural, and you need to turn on prefixes. > > \setupcaptions[prefix=yes,prefixsegments=chapter] Thanks, that works. I updated the wiki. Marco ___

[NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
Hi, I discovered strange behaviour concerning Lua conditionals within texdefinitions. ConTeXt complains: 'then' expected near 'thenelseend'. I guess it has something to do with how the content of a texdefinitions is grabbed. Seems like a bug or is this by design? % This works fine \def\mycmd{%

[NTG-context] \startluacode and macro names with underscores

2012-09-04 Thread Marco Patzer
Hi, the luacode environment chokes on macro names with underscores. Example: \starttext \unprotect \def\number_two{two} \startluacode userdata = userdata or { } function userdata.number_one() context("one") end -- works userdata.number_one() -- fails -- context.number_two() --

[NTG-context] TeX expansion within lua

2012-09-04 Thread Marco Patzer
Hi, please have a look at the following example: \starttext \def\cmd{% \def\mymacro{Foobar} \newtoks\mytoks \mytoks={mytoks}} \startluacode context.cmd() context.mymacro() -- this fails -- context(tex.toks.mytoks) \stopluacode -- this works \startluacode context(tex.toks.mytoks

Re: [NTG-context] TeX expansion within lua

2012-09-04 Thread Marco Patzer
On 2012-09-04 Aditya Mahajan wrote: Hi Aditya, > Instead of > >context(tex.toks.mytoks) > > use > >context(function () context(tex.toks.mytoks) end) > > See the ConTeXt Lua Document manual for explanation. Thanks. This works indeed. But what to do in the following case? It's hard to

Re: [NTG-context] TeX expansion within lua

2012-09-04 Thread Marco Patzer
On 2012-09-04 Martin Schröder wrote: Hi Martin, > http://tracker.luatex.org/view.php?id=682 It seems that I just hit a very hard to solve issue which needs not yet available support from the luatex side. Patricks solution seems not very practical and error prone, so I settled with this ugly bu

Re: [NTG-context] TeX expansion within lua

2012-09-04 Thread Marco Patzer
On 2012-09-04 Wolfgang Schuster wrote: > Is there a good reason why you put \newdimen because dimen/count > etc. registers should always be defined once. The definitions are not in a macro, they are defined at the top of the file. I messed around while creating a minimal example. However, the pr

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Wolfgang Schuster wrote: > > Why does adding semicolon not work? > > Do you have a example? \starttext \startluacode if true then; context("true") else; context("false") end \stopluacode \stoptext Marco

Re: [NTG-context] TeX expansion within lua

2012-09-04 Thread Marco Patzer
On 2012-09-04 Wolfgang Schuster wrote: > What prevents you from setting the dimen value in Lua? Some background: The code is part of a smarter float placement. It takes the size of the float into account and decides for a location. For example, it positions the float in the margin if it fits or

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss wrote: Hi Herbert, > > \starttext > > \startluacode > >if true then; > > context("true") > >else; > > context("false") > >end > > \stopluacode > > \stoptext > > that is no Lua syntax if true then; print("true") else; print("false") end This

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss wrote: > voss@shania:~/ConTeXt> lua zzz.lua > lua: zzz.lua:1: unexpected symbol near ';' marco@homerow:/tmp$ lua t.lua true > voss@shania:~/ConTeXt> lua -v > Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio marco@homerow:/tmp$ lua -v Lua 5.2.1 Copyright (C) 1994-

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss wrote: > >> voss@shania:~/ConTeXt> lua -v > >> Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > > > > marco@homerow:/tmp$ lua -v > > Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio > > the syntax changes, see http://www.lua.org/manual/5.2/manual.html#9 You're

[NTG-context] Automatic margin floats using the criterium parameter

2012-09-05 Thread Marco Patzer
Hi, I am working on some float placement code for a project. To not reinvent the wheel I like to know what is currently possible in ConTeXt. Small floats should be placed in the margin and bigger ones centred in the text. Captions always go into the margin. That is the idea. The key to automate t

Re: [NTG-context] TeX expansion within lua

2012-09-05 Thread Marco Patzer
On 2012-09-05 Hans Hagen wrote: Hi Hans, > you probably over code things Yes, that's not unlikely, I tend to do that (unintentional). > instead of storing you can pass the valus directly > > \def\largerthantextwidth#1% >{\cldcontext > {if \number\dimexpr#1 "is smaller" >

Re: [NTG-context] Automatic margin floats using the criterium parameter

2012-09-05 Thread Marco Patzer
On 2012-09-05 Hans Hagen wrote: Hi Hans, > > I am working on some float placement code for a project. To > > not reinvent the wheel I like to know what is currently possible in > > ConTeXt. > > fyi: As I often need conditional placement in projects (mostly width > related), it's likely that th

[NTG-context] Promotion of the ConTeXt IRC channel

2012-09-07 Thread Marco Patzer
Hi, I was wandering if we should promote the ConTeXt IRC channel on the contextgarden home page, e.g. underneath “Welcome to ConTeXt garden” or “External Help”. The current page (http://wiki.contextgarden.net/IRC) is unlikely to be found by anyone. I think most questions should stay on the mailin

Re: [NTG-context] Promotion of the ConTeXt IRC channel

2012-09-07 Thread Marco Patzer
On 2012-09-07 Bill Meahan wrote: > After being on the internet since the early 1980's I can say with > certainty if one person is having a particular problem others have or > will have it, too. A searchable archive of answers (like a mailing list > archive) is far more valuable than the epheme

Re: [NTG-context] Promotion of the ConTeXt IRC channel

2012-09-08 Thread Marco Patzer
> I've added a note to the [[Main Page]] (edit it at > http://wiki.contextgarden.net/Template:Main_Page), and a note to the > [[IRC]] page. How does that look to you guys? Looks good to me. Future will show if this leads to interesting conversations. Everyone is invited. > I think that someone wh

Re: [NTG-context] Passing variables on invocation- and reading them in ConTEXt

2012-09-10 Thread Marco Patzer
On 2012-09-10 Ian Lawrence wrote: Hi Ian, > I'd like to pass variables into context on invocation, just as you can do > with setting modes > > So > > context --arguments="number=8", "time=full-time" --mode=trial test.tex context --number=8 --time=full-time test.tex > \starttext > > Hello w

Re: [NTG-context] Passing variables on invocation- and reading them in ConTEXt

2012-09-10 Thread Marco Patzer
2012-09-10: Peter Münster > Then you have to be sure, that --number and --time will never be special > parameters for context. Indeed. > Alternatives: > > "--MarcoPatzerNumber=8 --MarcoPatzerTime=full-time" > > Or: > > % context --arguments=number=8,time=full-time test.tex This seems the be

[NTG-context] Wrong spacing in \unit

2012-09-13 Thread Marco Patzer
Hi, when \unit is used just with a unit, without a number, the spacing at the left is wrong. Example: \starttext % wrong spacing (\unit{micro mol per second}) % spacing OK (\unit{3 micro mol per second}) \stoptext Marco _

[NTG-context] Adaptive section structuring

2012-09-13 Thread Marco Patzer
Hi, I am often surprised that some nice-to-have feature is already present in ConTeXt and I just wasn't aware. But I am not sure about this one. Is there something like an adaptive structure code which keeps track of the nesting level? In this example the first structure would become the chapter,

Re: [NTG-context] Adaptive section structuring

2012-09-13 Thread Marco Patzer
> > Is there something like an adaptive structure code which keeps track > > of the nesting level? In this example the first structure would > > become the chapter, the second one a section, etc. > \startstructurelevel [title=first lower level] > \startstructurelevel [title=second lower level

[NTG-context] Referring to multiple elements

2012-09-13 Thread Marco Patzer
Hi, how can I refer to multiple elements at the same time? \starttext \startplacefigure [title=foo, reference=alpha] \stopplacefigure \startplacefigure [title=bar, reference=beta] \stopplacefigure \startplacefigure [title=bar, reference=gamma] \stopplacefigure \in{figure}[alpha,beta,gamma] \st

Re: [NTG-context] Referring to multiple elements

2012-09-14 Thread Marco Patzer
2012-09-13 Andreas Mang : > I do not know if there is a solution to this. The following would > work for your example: > > \in{figure}[alpha]--\in[gamma] > > Of course this is a quite rigid solution, that does not safeguard > against changes in figure order That's what I am using at the moment.

[NTG-context] Wide descriptions protruding into the margin

2012-09-14 Thread Marco Patzer
Hi, with wide description heads I have the problem that the following description protrudes into the margin. \definedescription [description] [alternative=hanging, width=broad] \starttext \startdescription{conclusion that} \input knuth \stopdescription \startdescription{conclusion that

Re: [NTG-context] Wide descriptions protruding into the margin

2012-09-14 Thread Marco Patzer
2012-09-14 Philipp Gesang : Hi Philipp, > you can hack the hanging alternative and substitute a glue for > the kern that is used for spacing (strc-con.mkvi): > > […] > This works perfectly. Thanks a lot for digging into the sources. > But maybe this could be made an option? \dorecurse{10}{+1

Re: [NTG-context] Referring to multiple elements

2012-09-16 Thread Marco Patzer
2012-09-14 Sietse Brouwer : Hi Sietse, I'm sorry for my late reply. > The heart of what you need is a lua function that will take an array > of numbers, and return an array of consective-number runs, like so: > > […] > > I've written one below, plus the scaffolding required to feed it the > righ

Re: [NTG-context] Wrong spacing in \unit

2012-09-17 Thread Marco Patzer
2012-09-13 Marco Patzer : > when \unit is used just with a unit, without a number, the spacing > at the left is wrong. Still the same in 2012.09.16 23:18, it doesn't seem that hard to fix. Maybe just an if-statement to check if the number is provided and add a space in that case. S

[NTG-context] Formulas include chapter number

2012-09-17 Thread Marco Patzer
Hi, the last beta includes the chapter number in formulas, former betas didn't. Example: \starttext \startchapter [title=Foo] \startplaceformula \startformula E=mc^2 \stopformula \stopplaceformula \stopchapter \stoptext ∙ Is this intended? ∙ How to remove the chapter number fro

Re: [NTG-context] Formulas include chapter number

2012-09-17 Thread Marco Patzer
2012-09-17 Sietse Brouwer : Hi Sietse, > It's a bug, I think. > The keys that control this are way and prefixsegments: > \setupformulas[way=bychapter, prefixsegments=chapter] > > way=bychapter means 'resume numbering at each chapter' > prefixsegments=chapter means 'precede each formula number wi

Re: [NTG-context] international documents

2012-09-17 Thread Marco Patzer
2012-09-17 Pavel Dohnal : Hi Pavel > Problem is that users enter international texts into database and > some characters are not present in final pdf. > Here is my minimal example: > > %interface=en translate-file=utf-8 > \enableregime[utf] ConTeXt MkIV uses UTF-8 by default. > \starttext >

Re: [NTG-context] Ctx: list of commands

2012-09-17 Thread Marco Patzer
2012-09-17 Procházka Lukáš Ing. - Pontex s. r. o. : Hi Lukáš > 1) is there a Ctx command/switch which would generate list of all > current ConTeXt commands? E.g. Not that I'm aware of. Wolfgang started to maintain a list of ConTeXt commands, but I'm not sure if he's still on it: https://bitbuck

[NTG-context] Bibliography, unicode strings, @ELECTRONIC, sorting and bibtex

2012-09-18 Thread Marco Patzer
Hi, I have some questions regarding the bibliography. 1) The style files bibl-ams.tex, bibl-ssa.tex, etc contain strings like ``, ~. This does not make sense to me. The `` ends up like that in the output and the tilde might interfere with the \asciimode setting. Wouldn't it be better to use the p

Re: [NTG-context] Bibliography, unicode strings, @ELECTRONIC, sorting and bibtex

2012-09-18 Thread Marco Patzer
2012-09-18 "Schmitz Thomas A." : Hi Thomas > The problem is that users of bibtex in ConTeXt are a minority, and > users of such precooked styles a tiny minority With a handful of up-to-date working common citation styles citations would be much more easy. But I get your point. > I use bibtex qu

<    1   2   3   4   5   6   7   8   >