Re: [NTG-context] using variable for subscript in math+lua
On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) - 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] using variable for subscript in math+lua
···date: 2012-10-25, Thursday···from: Hans Hagen··· On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) Right, but then if you encounter this the first time you won’t know what to google. Regards Philipp pgpVIf0TmiH7I.pgp Description: PGP signature ___ 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] using variable for subscript in math+lua
On 25-10-2012 10:01, Philipp Gesang wrote: ···date: 2012-10-25, Thursday···from: Hans Hagen··· On 25-10-2012 03:02, Philipp Gesang wrote: context.NC(string.format(schema, i, j)) context.NC(schema, i, j) Right, but then if you encounter this the first time you won’t know what to google. actually it's wrong ... only the bare context(fmt,...) supports a format .. this is what i meant: context.NC() context(schema, i, j) the thing is that NC does not take an argument (some column separators have an optional) 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 ___
Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)
Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , )); label(btex $a_{12}$ etex, ( , )); label(btex $a_{13}$ etex, ( , )); … label(btex $a_{3,3}$ etex, ( , )); Since the same command is repeated, I tested to use for iteration. But I couldn't succeed. It is OK to use the variable as a text but I couldn't find a way to use a variable as a subscript. For example, for i=1 unto 3: label(btex decimal(i) etex, (x,y)); endfor; is OK. But, for i=1 upto 3: label(btex $a_{i}$ etex, (x,y)); endfor; or for i=1 upto 3: label(btex $a_{deciaml(i)}$ etex, (x,y)); endfor; are not working as I wanted. Is there a way to use variable as a subscript in label? Thank you again. Best regards, Dalyoung ___ 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] setuphead and newline
Hello, I'm trying to insert a newline between the number and the head text (chaper). Where do I have to put the \crlf ? It sohould look like: 1 This is the chapter text Many thanks in advance WolfgangZ ___ 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 newline
2012-10-25 WolfgangZ: Hi WolfgangZ I'm trying to insert a newline between the number and the head text (chaper). Where do I have to put the \crlf ? It sohould look like: 1 This is the chapter text \defineheadalternative [mine] [renderingsetup=mine] \startsetups [mine] \headsetupspacing \startframedtext [offset=none, frame=off] \headnumbercontent\\ \headtextcontent \stopframedtext \stopsetups \setuphead [section] [alternative=mine] \starttext \startsection [title=FooBar] \stopsection \stoptext 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 ___
Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)
On 25-10-2012 13:59, Jeong Dal wrote: Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , )); label(btex $a_{12}$ etex, ( , )); label(btex $a_{13}$ etex, ( , )); … label(btex $a_{3,3}$ etex, ( , )); Since the same command is repeated, I tested to use for iteration. But I couldn't succeed. It is OK to use the variable as a text but I couldn't find a way to use a variable as a subscript. For example, for i=1 unto 3: label(btex decimal(i) etex, (x,y)); endfor; is OK. But, for i=1 upto 3: label(btex $a_{i}$ etex, (x,y)); endfor; or for i=1 upto 3: label(btex $a_{deciaml(i)}$ etex, (x,y)); endfor; are not working as I wanted. Is there a way to use variable as a subscript in label? play with code like this \starttext \startluacode context.startMPcode() for i=1,10 do for j=1,10 do context('draw (%scm,%scm) withpen pencircle scaled 2mm ;',i,j) context('draw thetextext.top(\\tt%s,%s,(%scm,%scm+2mm)) ;',i,j,i,j) end end context.stopMPcode() \stopluacode \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] using variable for subscript in math+lua (and math+MetaFun)
Dear Hans, The structure of your code is very interesting. MP code) inside ConTeXt) inside Lua) inside ConTeXt) again! It is really useful. Thank you. Best regards, Dalyoung play with code like this \starttext \startluacode context.startMPcode() for i=1,10 do for j=1,10 do context('draw (%scm,%scm) withpen pencircle scaled 2mm ;',i,j) context('draw thetextext.top(\\tt%s,%s,(%scm,%scm+2mm)) ;',i,j,i,j) end end context.stopMPcode() \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 ___
Re: [NTG-context] setuphead and newline
Am 25.10.2012 15:10, schrieb Marco Patzer: 2012-10-25 WolfgangZ: Hi WolfgangZ I'm trying to insert a newline between the number and the head text (chaper). Where do I have to put the \crlf ? It sohould look like: 1 This is the chapter text \defineheadalternative [mine] [renderingsetup=mine] \startsetups [mine] \headsetupspacing \startframedtext [offset=none, frame=off] \headnumbercontent\\ \headtextcontent \stopframedtext \stopsetups \setuphead [section] [alternative=mine] \starttext \startsection [title=FooBar] \stopsection \stoptext Marco ___ Hi Marco, it works alsmost as I need, but I don't manage to get the text on grid. I tried linecorrection=on option at the framed text as well as \startlinecorrection. I'm also wondering why the chapter number is above the first line, see screenshot. Best regards WolfgangZ PS. I'm using MKIV attachment: grid.png___ 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 newline
Am 25.10.2012 um 19:27 schrieb Wolfgang wol...@gmx.net: it works alsmost as I need, but I don't manage to get the text on grid. I tried linecorrection=on option at the framed text as well as \startlinecorrection. I'm also wondering why the chapter number is above the first line, see screenshot. Make a minimal example which demonstrates the problem because otherwise it’s not possible to tell what needs to be changed. 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 ___
Re: [NTG-context] using variable for subscript in math+lua
Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that upon saying \ctxlua{document.print_matrix(b,3)} one gets a 3x3 matrix whos coefficients are b_{11},…b_{33}. Thanks in advance: OK On 25 oct. 2012, at 03:02, Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de wrote: ···date: 2012-10-25, Thursday···from: Jeong Dal··· Dear Hans, Lucas, Wolfgang, Aditya Now, I write a matrix using \startluacode by the helps of you. Also, I can do some operations in matrices which reduced my typing job. In this code, I have to give all the entries of a matrix as a table. It is good to use in many cases. I have one more question. If the given array is as the following and it works well. However, there might be a better way to do job using for iteration. I tired to use i, j in several ways but it doesn't work. Inside a string the variables are just bytes. To print to a string you can interpolate with string.format() [1]. [1] http://www.lua.org/manual/5.1/manual.html#pdf-string.format · \startluacode document = document or { } -- recommended: use namespace document.print_matrix = function (x, y) if not y then y = x end -- default to square context.startmatrix{left = \\left(\\,, right = \\,\\right)} local schema = a_{%d%d} -- %d: prints integer part for i=1, x do for j=1, y do --- use the template defined above to print the --- row and column context.NC(string.format(schema, i, j)) end context.NR() end context.stopmatrix() end \stopluacode \starttext \startformula \ctxlua{document.print_matrix(3)} \stopformula \startformula \ctxlua{document.print_matrix(9,4)} \stopformula \startformula \ctxlua{document.print_matrix(9)} \stopformula \stoptext \endinput · Is there a way to do such a job using for iteration? Thank you for reading. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___ 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] using variable for subscript in math+lua
On 25-10-2012 20:02, Otared Kavian wrote: Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that upon saying \ctxlua{document.print_matrix(b,3)} one gets a 3x3 matrix whos coefficients are b_{11},…b_{33}. if the two of you can come up with some specs we can make a small module if needed 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 ___
[NTG-context] A few questions about itemizations
Hi all, this code: \defineitemgroup[subitems] \setupitemgroup[subitems][each][a,packed][left=(,stopper=)] \starttext \startitemize[n] \startitem Lorem ipsum \startsubitems \startitem dolor \stopitem \startitem sit \stopitem \startitem amet. \stopitem \stopsubitems \stopitem \stopitemize \stoptext behaves differently if I change \startsubitems into \startitemize[a,packed][left=(,stopper=)]. Namely, the vertical space before (a) ... does not appear when using \startsubitems. Why is that so? When I want to put the vertical space before the first subitem by means of before={\blank[small]}, nothing happens. Also, is \startitem ... \stopitem really better than \item ...? (Apart from the case when I use the [random] option.) And finally: what is the difference between right=) and stopper=)? TIA, -- 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 ___
Re: [NTG-context] Multi-page textbackground ignores topoffset
Hello all, I tried working around this by wrapping the textbackground in a background with the correct topoffset and then manually correcting for the itemize indent, but on the first page this doubles the topoffset and introduces problems with the bottomoffset. If this gives anyone an idea for a workaround, though, I'd be grateful to hear about it. Would this behavior of textbackground regarding topoffset be considered a bug, or a missing feature? Are the any plans to do anything about it in the future? Thanks, Nick On Thu, Oct 18, 2012 at 3:07 PM, Nicholas Ulle nau...@ucdavis.edu wrote: Hi, Is there any way to get a multi-page textbackground to respect topoffset on each page? From the second page onwards, it leaves no offset at the top. I don't think I can use background instead, as I'm nesting the textbackgound under itemize and also use itemize within it (correct me if this works okay?). A minimal example (note context live doesn't display the frame, which is sort of necessary to see the problem): \definetextbackground[Test][ location=paragraph, topoffset=1em, bottomoffset=1em, leftoffset=1em, rightoffset=1em, frame=on, framecolor=black] \starttext This is some text outside of a text background. \startTest \dorecurse{10}{\input tufte \par \input knuth \par} \stopTest This is more text outside of a text background. \stoptext Kip Warner started a thread about this several months ago, but it seems to have died before anyone offered a solution. Thanks, Nick ___ 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] using variable for subscript in math+lua
On Thu, 25 Oct 2012 20:02:22 +0200, Otared Kavian ota...@gmail.com wrote: Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that upon saying \ctxlua{document.print_matrix(b,3)} one gets a 3x3 matrix whos coefficients are b_{11},…b_{33}. Thanks in advance: OK Something like this? · document.print_matrix = function (x, y, name) local name = name or a if not y then y = x end -- default to square context.startmatrix{left = \\left(\\,, right = \\,\\right)} local schema = name .. _{%d%d} -- %d: prints integer part for i=1, x do for j=1, y do --- use the template defined above to print the --- row and column context.NC(string.format(schema, i, j)) end context.NR() end context.stopmatrix() end · Call with: \ctxlua{document.print_matrix(3, 3, b)} Best regards, Lukas ___ 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] using variable for subscript in math+lua
···date: 2012-10-25, Thursday···from: Otared Kavian··· Hi Philipp, Thanks to you, Dalyoung and Hans for the nice example using luacode. I was wonedring how would you modify your code in order to be able to change the name of the matrix if necessary. For instance, how to modify your code in such a way that upon saying \ctxlua{document.print_matrix(b,3)} one gets a 3x3 matrix whos coefficients are b_{11},…b_{33}. This may be overkill but you can just wrap the matrix command in some TeX macro: · % macros=mkvi \unprotect \startluacode local context = context commands.matrix_with_symbol = function (sym, x, y) if not y then y = x end -- default to square context.startmatrix{ left = \\left(\\,, right = \\,\\right) } local schema = sym .. _{%d%d} -- %d: prints integer part for i=1, x do for j=1, y do context.NC() context(schema, i, j) end context.NR() end context.stopmatrix() end \stopluacode \unexpanded\def\printsymbolmatrix{% \dotripleempty\print_symbol_matrix_indeed% } \def\print_symbol_matrix_indeed[#first][#second][#num]{% \bgroup \def\sym{a}%% set default symbol to print, could be done in Lua \def\y{nil}% \ifsecondargument \ifthirdargument \edef\sym{#first}% \edef\x{#second}% \edef\y{#num}% \else \doifnumberelse{#first}% {\edef \x{#first}\edef\y{#second}}% {\edef\sym{#first}\edef\x{#second}}% \fi \else \edef\x{#first}% \fi \ctxcommand{matrix_with_symbol(\!!bs\sym\!!es, \x, \y)}% \egroup% } \protect \starttext \startformula \printsymbolmatrix[3]%% symbol is “a”, matrix is square \stopformula \startformula \printsymbolmatrix[4][8]%% symbol is “a”, matrix is 4x8 \stopformula \startformula \printsymbolmatrix[b][8]%% symbol is “b”, matrix is square \stopformula \startformula \printsymbolmatrix[c][5][3]%% symbol is “c”, matrix is 5x3 \stopformula \stoptext \endinput · Now the symbol will default to “a” but you can specify another one. (Btw. I think the Lua part could be done as easily with dorecurse.) Regards Philipp Thanks in advance: OK On 25 oct. 2012, at 03:02, Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de wrote: ···date: 2012-10-25, Thursday···from: Jeong Dal··· Dear Hans, Lucas, Wolfgang, Aditya Now, I write a matrix using \startluacode by the helps of you. Also, I can do some operations in matrices which reduced my typing job. In this code, I have to give all the entries of a matrix as a table. It is good to use in many cases. I have one more question. If the given array is as the following and it works well. However, there might be a better way to do job using for iteration. I tired to use i, j in several ways but it doesn't work. Inside a string the variables are just bytes. To print to a string you can interpolate with string.format() [1]. [1] http://www.lua.org/manual/5.1/manual.html#pdf-string.format · \startluacode document = document or { } -- recommended: use namespace document.print_matrix = function (x, y) if not y then y = x end -- default to square context.startmatrix{left = \\left(\\,, right = \\,\\right)} local schema = a_{%d%d} -- %d: prints integer part for i=1, x do for j=1, y do --- use the template defined above to print the --- row and column context.NC(string.format(schema, i, j)) end context.NR() end context.stopmatrix() end \stopluacode \starttext \startformula \ctxlua{document.print_matrix(3)} \stopformula \startformula \ctxlua{document.print_matrix(9,4)} \stopformula \startformula \ctxlua{document.print_matrix(9)} \stopformula \stoptext \endinput · Is there a way to do such a job using for iteration? Thank you for reading. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___ If your question is of interest to others as well, please
[NTG-context] How to set the whole document flush left?
Hi, I'd like to have all my document set flush left. I know how to set a \framed flush left, or \startalign ... \stopalign - but what about the whole? (In my current case, the document is basically a (mid-aligned) title and then one big itemgroup, so I added [align={right,broad}] to the \startitemize - but what about the general case? \raggedright did not work, at least for the itemization.) 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 ___
[NTG-context] A problem with \blank
Good evening, I have something like this in my document: \startalignment[middle] ... \stopalignment \startitemize ... \stopitemize and I want some (more) vertical space in between them. Adding a \blank[big] (and even a \blank[big,force]) didn't help. Interestingly, \leavevmode\blank[big] did. What is going on? What is the canonical way to achieve what I want to have? Regards, -- 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 ___
Re: [NTG-context] How to set the whole document flush left?
Hi, I suspect the command you're looking for is \setupalign[right] Nick ___ 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] Making math smaller
Hi again, I promise this is my last question now - it's 1:00 AM here, I'm starting to sleep;). But how do I make my math smaller? {\tfx\math{a^2+b^2=c^2}} won't work. 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 ___
Re: [NTG-context] Making math smaller
Dnia 2012-10-26, o godz. 00:52:30 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): Hi again, I promise this is my last question now - it's 1:00 AM here, I'm starting to sleep;). But how do I make my math smaller? {\tfx\math{a^2+b^2=c^2}} won't work. OK, one more;). It turned out that \switchtobodyfont[small] did work. So my question now becomes: why is that so? Best, Even better;), -- 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 ___
Re: [NTG-context] How to set the whole document flush left?
Dnia 2012-10-25, o godz. 15:50:49 Nicholas Ulle nau...@ucdavis.edu napisał(a): Hi, I suspect the command you're looking for is \setupalign[right] Nope - it didn't work. (Maybe it just does nothing for itemizations, and my document was basically one big itemization?) Nick -- 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 ___
Re: [NTG-context] How to set the whole document flush left?
Dnia 2012-10-26, o godz. 00:56:41 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): Dnia 2012-10-25, o godz. 15:50:49 Nicholas Ulle nau...@ucdavis.edu napisał(a): Hi, I suspect the command you're looking for is \setupalign[right] Nope - it didn't work. (Maybe it just does nothing for itemizations, and my document was basically one big itemization?) OK, tested - I was right, it doesn't affect itemizations. Isn't it a bug? Nick Regards, -- 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 ___
Re: [NTG-context] How to set the whole document flush left?
Hi Marcin, I'd like to have all my document set flush left. I know how to set a \framed flush left, or \startalign ... \stopalign - but what about the whole? (In my current case, the document is basically a (mid-aligned) title and then one big itemgroup, so I added [align={right,broad}] to the \startitemize - but what about the general case? \raggedright did not work, at least for the itemization.) I assumed by the general case you meant text outside the itemgroup. What specifically are you trying to align? Could you please give a minimal example? Regards, Nick ___ 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] \setuplayout question
Am 26.10.2012 um 00:35 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl: Hello, what is the *default* layout? (I am especially interested in bottomspace - in page-lay.mkiv I found bottomspace=0pt, but this seems not to be the case - even after \setupfooter[state=stop] text does not go to the bottom of the sheet. Which parameter is responsible for that? When the bottomspace has a height of 0pt context assign the topspace value to the register. To have a document which goes till the bottom of the page you have to calculate the text height. \setuplayout [footer=0pt, height=\dimexpr\paperheight-\topspace-\lineheight\relax] \starttext \showgrid \dorecurse{3}{\input knuth\par} \stoptext 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 ___
Re: [NTG-context] How to set the whole document flush left?
Am 26.10.2012 um 00:12 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl: Hi, I'd like to have all my document set flush left. I know how to set a \framed flush left, or \startalign ... \stopalign - but what about the whole? (In my current case, the document is basically a (mid-aligned) title and then one big itemgroup, so I added [align={right,broad}] to the \startitemize - but what about the general case? \raggedright did not work, at least for the itemization.) Where is the minimal example? \setupalign[flushleft] \setupitemize[each][align=flushleft] \starttext \showgrid \input knuth \startitemize \startitem \input knuth \stopitem \stopitemize \stoptext 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 ___
Re: [NTG-context] A problem with \blank
Am 26.10.2012 um 00:46 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl: Good evening, I have something like this in my document: \startalignment[middle] ... \stopalignment \startitemize ... \stopitemize and I want some (more) vertical space in between them. Adding a \blank[big] (and even a \blank[big,force]) didn't help. Interestingly, \leavevmode\blank[big] did. What is going on? What is the canonical way to achieve what I want to have? Use a bigger value for the \blank because when you have two consecutive blanks (the one after \stopalignment and the one from \startitemize) the smaller value is ignored and tex uses only the bigger value. When you use \dontleavehmode it works because you switch to horizontal mode but the extra space of the normal line height and not your \blank value, the problem with this approach is also that you get the parskip before the itemize. Compare this \setupwhitespace[4cm] \starttext \showgrid \startalignment[middle] \input knuth \stopalignment \dontleavehmode \startitemize \startitem \input knuth \stopitem \stopitemize \stoptext with this \starttext \showgrid \startalignment[middle] \input knuth \stopalignment \blank[2*big] \startitemize \startitem \input knuth \stopitem \stopitemize \stoptext 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 ___
[NTG-context] Math Overruns Background
Hello, I'm trying to typeset an exam with solutions in framed or shaded boxes, using \background. However, the background doesn't stretch to the bottom of the text area when there is text preceding it, so if there is enough math inside the background, the math overruns its lower bound. How can I get everything to stay inside the background? A minimal example: \starttext \input knuth \startbackground \input knuth \dorecurse{20}{\startformula \sum_{i=0}^5 i \stopformula} \stopbackground \stoptext I've tried some of the options in \setupbackground with no luck, and have also tried Googling for an answer. Thanks, Nick ___ 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 ___