Re: [NTG-context] Arranging framed text without gaps
On 03/01/2013 04:30 AM, Marco Patzer wrote: On 2013--02--28 Matthias Weber wrote: -- without gaps between horizontal rows -- with text centered in the frames also in MkIV? See Adityas answer for how to fix your current code. -- achieve the desired layout (exact dimensions, frames, no gaps) the right way, There is no "right" way. Here's how I would approach that: \usemodule [database] \definefont [MyBigFont] [Serif at 24pt] \defineseparatedlist [MyTable] [before=\bTABLE, after=\eTABLE, first=\bTR, last=\eTR, left=\bTD, right=\eTD, setups=my:table] \startsetups [my:table] \setupTABLE [split=yes, width=5cm, height=4cm, style=MyBigFont] \setupTABLE [each] [align={middle,lohi}] \stopsetups \starttext \startMyTable Jim, Mary , John Patsy , Bob , Linda Mike , Babsy , Bill Liz, Dave , Jenny Dick , Sue , Chuck Maggie , Joe , Dolley Tom, Lisa , Chris Nancy , Paul , Betty \stopMyTable \stoptext Marco This looks really clean. I wish I had known about this neat trick while working on my thesis. I guess this is the difference between a novice user and an expert user of ConTeXt. Thank you Marco, Devendra ___ 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] Arranging framed text without gaps
Fascinating. Thanks!! Matthias On Feb 28, 2013, at 6:00 PM, Marco Patzer wrote: > On 2013–02–28 Matthias Weber wrote: > >> -- without gaps between horizontal rows >> -- with text centered in the frames also in MkIV? > > See Adityas answer for how to fix your current code. > >> -- achieve the desired layout (exact dimensions, frames, no gaps) the right >> way, > > There is no “right” way. Here's how I would approach that: > > \usemodule > [database] > > \definefont > [MyBigFont] > [Serif at 24pt] > > \defineseparatedlist > [MyTable] > [before=\bTABLE, after=\eTABLE, > first=\bTR, last=\eTR, > left=\bTD, right=\eTD, > setups=my:table] > > \startsetups [my:table] > \setupTABLE [split=yes, width=5cm, height=4cm, style=MyBigFont] > \setupTABLE [each] [align={middle,lohi}] > \stopsetups > > \starttext > > \startMyTable > Jim, Mary , John > Patsy , Bob , Linda > Mike , Babsy , Bill > Liz, Dave , Jenny > Dick , Sue , Chuck > Maggie , Joe , Dolley > Tom, Lisa , Chris > Nancy , Paul , Betty > \stopMyTable > > \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 > ___ ___ 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 trouble with setupbodyfontenvironment
On Fri, 1 Mar 2013, Alasdair McAndrew wrote: Actually, maybe my version is a bit old: context --version returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative. It is best to install ConTeXt standalone in a parallel directory. http://wiki.contextgarden.net/ConTeXt_Standalone @Mojca: What's with the name of the distribution. The wiki has a mix of minimals, standalone, and suite. Can we converge on one name for the distribution. Aditya ___ 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 trouble with setupbodyfontenvironment
Actually, maybe my version is a bit old: context --version returns 2011.05.18 18:04. I'll try to update it. (I'm using Ubuntu 12.04, but when I tried to update using apt-get the system told me that I had the latest version). In the meantime I'll try your alternative. Thanks! On Fri, Mar 1, 2013 at 12:40 AM, Marco Patzer wrote: > On 2013–03–01 Alasdair McAndrew wrote: > > > Do I have to include a special module here? > > No. I tested some versions between 2011.11.29 23:11 and 2013.02.26 > 00:17 and it worked for me. Which version are you using? > \definehighlight is nothing which was recent added. > > \setupbodyfontenvironment > [default] > [em=slantedred] > > \definehighlight > [slantedred] > [style=slanted, >color=red] > > \starttext > foo {\em bar} > \stoptext > > You cannot update, you can try this instead of \definehighlight: > > \definealternativestyle > [slantedred] > [{\slanted\color[red]}] > > > 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] Arranging framed text without gaps
On 2013–02–28 Matthias Weber wrote: > -- without gaps between horizontal rows > -- with text centered in the frames also in MkIV? See Adityas answer for how to fix your current code. > -- achieve the desired layout (exact dimensions, frames, no gaps) the right > way, There is no “right” way. Here's how I would approach that: \usemodule [database] \definefont [MyBigFont] [Serif at 24pt] \defineseparatedlist [MyTable] [before=\bTABLE, after=\eTABLE, first=\bTR, last=\eTR, left=\bTD, right=\eTD, setups=my:table] \startsetups [my:table] \setupTABLE [split=yes, width=5cm, height=4cm, style=MyBigFont] \setupTABLE [each] [align={middle,lohi}] \stopsetups \starttext \startMyTable Jim, Mary , John Patsy , Bob , Linda Mike , Babsy , Bill Liz, Dave , Jenny Dick , Sue , Chuck Maggie , Joe , Dolley Tom, Lisa , Chris Nancy , Paul , Betty \stopMyTable \stoptext Marco signature.asc Description: Digital 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] Arranging framed text without gaps
Thanks! Matthias On Feb 28, 2013, at 5:56 PM, Aditya Mahajan wrote: >> How do I >> -- achieve the desired layout (exact dimensions, frames, no gaps) the right >> way, >> -- without gaps between horizontal rows > > \setupframed > [ > overlay=none, > ... > ] > >> -- with text centered in the frames also in MkIV? > > .. align={middle,middle}, > > Aditya > ___ > 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] Arranging framed text without gaps
How do I -- achieve the desired layout (exact dimensions, frames, no gaps) the right way, -- without gaps between horizontal rows \setupframed [ overlay=none, ... ] -- with text centered in the frames also in MkIV? .. align={middle,middle}, Aditya ___ 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] Arranging framed text without gaps
Dear all, I am trying to create a table where the entries have determined width and height. They typically are something like \framed[width=5cm,height=4cm,align={center,middle}{Text} and I understand that I will be responsible for making the dimensions so that everything fits nicely. After playing around without much success with the various tables, I came up with the following which is not exactly ConTeXt-like: \setupframed[ width=5cm, height=4cm, location={middle}, align={center,middle} ] \setupbodyfont[24pt] \starttext \hbox{{\framed{Jim}}{\framed{Mary}}{\framed{John}}} \hbox{{\framed{Patsy}}{\framed{Bob}}{\framed{Linda}}} \hbox{{\framed{Mike}}{\framed{Babsy}}{\framed{Bill}}} \hbox{{\framed{Liz}}{\framed{Dave}}{\framed{Jenny}}} \hbox{{\framed{Dick}}{\framed{Sue}}{\framed{Chuck}}} \hbox{{\framed{Maggie}}{\framed{Joe}}{\framed{Dolley}}} \hbox{{\framed{Tom}}{\framed{Lisa}}{\framed{Chris}}} \hbox{{\framed{Nancy}}{\framed{Paul}}{\framed{Betty}}} \stoptext I get small gaps between the horizontal rows which I don't like. Also, in my (possibly not quite up to date) MkIV, the texts isn't centered. In MkII it is. My questions: How do I -- achieve the desired layout (exact dimensions, frames, no gaps) the right way, -- without gaps between horizontal rows -- with text centered in the frames also in MkIV? Thanks a lot - Matthias ___ 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 trouble with setupbodyfontenvironment
On 2013–03–01 Alasdair McAndrew wrote: > Do I have to include a special module here? No. I tested some versions between 2011.11.29 23:11 and 2013.02.26 00:17 and it worked for me. Which version are you using? \definehighlight is nothing which was recent added. \setupbodyfontenvironment [default] [em=slantedred] \definehighlight [slantedred] [style=slanted, color=red] \starttext foo {\em bar} \stoptext You cannot update, you can try this instead of \definehighlight: \definealternativestyle [slantedred] [{\slanted\color[red]}] Marco signature.asc Description: Digital 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] A trouble with setupbodyfontenvironment
Thanks for that, but it doesn't seem to work: I enter "context myfile.tex", and a bit later: l.26 \definehighlight [slantedred][style=slanted,color=red] ? h The control sequence at the end of the top line of your error message was never \def'ed. Do I have to include a special module here? -Alasdair On Thu, Feb 28, 2013 at 11:02 PM, Marco Patzer wrote: > On 2013–02–28 Alasdair McAndrew wrote: > > > So I've come back to using ConTeXt after a year away from it > > Welcome back :) > > > \setupbodyfontenvironment[default][em={\slanted\color[red]}] > > \setupbodyfontenvironment > [default] > [em=slantedred] > > \definehighlight > [slantedred] > [style=slanted, >color=red] > > > 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] A trouble with setupbodyfontenvironment
On 2013–02–28 Alasdair McAndrew wrote: > So I've come back to using ConTeXt after a year away from it Welcome back :) > \setupbodyfontenvironment[default][em={\slanted\color[red]}] \setupbodyfontenvironment [default] [em=slantedred] \definehighlight [slantedred] [style=slanted, color=red] Marco signature.asc Description: Digital 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 ___
[NTG-context] A trouble with setupbodyfontenvironment
So I've come back to using ConTeXt after a year away from it (publishers preferring LaTeX, y'know), and in revising some student notes I'm getting errors which seem new. For a collection of overheads, I've set up \setupbodyfontenvironment[default][em={\slanted\color[red]}] However, when I run context on my files, a command such as {\em elephant} produces: l.3 The {\em elephant} is a large gray animal ? h The control sequence marked should not appear between \csname and \endcsname. What's going on here, and how do I fix it? Thanks, Alasdair ___ 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 ___