Re: [NTG-context] need help with creating a grid with context
Perhaps I ought to tell what I'm expecting :-) ... Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately over the whole page. The context code supplied produces successive rows with an offset to the right. Have I missed something obvious? IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The RTA is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the RTA. If you receive this e-mail in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
On 10/10/07, MASON Peter J wrote:
Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately over the whole page.
Why not using MetaPost? \starttext \startMPcode % or \startMPpage for i=0 upto 10: for j=0 upto 20: fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm); endfor; endfor; \stopMPcode \stoptext Mojca
2007/10/10, Mojca Miklavec
On 10/10/07, MASON Peter J wrote:
Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately over the whole page.
Why not using MetaPost?
\starttext \startMPcode % or \startMPpage for i=0 upto 10: for j=0 upto 20: fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm); endfor; endfor; \stopMPcode \stoptext
Mojca
Because TeX is faster in this situation and it takes more time to write the Metapost code in external file, process this file, convert it into a PDF file and include it into the document etc. I know what I say because this was one of the reasons why the sgf module place the field within TeX and not with Metapost, a matter of speed and you can reuse the objects. You should also replace the fullcircle with drawdot in your example, drawdot renders better on screen and looks better. Wolfgang
On 10/10/07, Wolfgang Schuster wrote:
2007/10/10, Mojca Miklavec:
On 10/10/07, MASON Peter J wrote:
Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately over the whole page.
Why not using MetaPost?
\starttext \startMPcode % or \startMPpage for i=0 upto 10: for j=0 upto 20: fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm); endfor; endfor; \stopMPcode \stoptext
Mojca
Because TeX is faster in this situation and it takes more time to write the Metapost code in external file, process this file, convert it into a PDF file and include it into the document etc.
I know what I say because this was one of the reasons why the sgf module place the field within TeX and not with Metapost, a matter of speed and you can reuse the objects.
OK, that's a good point, and I fully agree with it. It's only that I would probably use something like that for really simple, short, one-page documents, where I would be concerned about the speed I need to come to a solution, not with the speed of document processing - half a second more or less. With the route tex -> .plt file -> gnuplot -> tex (metafun) -> metapost (-> mpto or \sometxt) -> pdf, which I frequently use, the situation is much much worse, but it's still acceptable. ConTeXt became at least 10 times faster during the last three or four years. (Or at least that's my impression.)
You should also replace the fullcircle with drawdot in your example, drawdot renders better on screen and looks better.
Thanks. I always use fill fullcircle for some reason. Perhaps I should changle my habit :) Mojca
2007/10/10, Mojca Miklavec
On 10/10/07, Wolfgang Schuster wrote:
2007/10/10, Mojca Miklavec:
On 10/10/07, MASON Peter J wrote:
Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately over the whole page.
Why not using MetaPost?
\starttext \startMPcode % or \startMPpage for i=0 upto 10: for j=0 upto 20: fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm); endfor; endfor; \stopMPcode \stoptext
Mojca
Because TeX is faster in this situation and it takes more time to write the Metapost code in external file, process this file, convert it into a PDF file and include it into the document etc.
I know what I say because this was one of the reasons why the sgf module place the field within TeX and not with Metapost, a matter of speed and you can reuse the objects.
OK, that's a good point, and I fully agree with it. It's only that I would probably use something like that for really simple, short, one-page documents, where I would be concerned about the speed I need to come to a solution, not with the speed of document processing - half a second more or less.
This was in my case also a one page document but I created over hundret full page graphics (needed for fieldstacks) and it is a real problem in this case, the other problem for this solution was, I had to pass dozen graphic position to Metapost and it was easier to do the whole work within TeX and use Metapost only to create the needed graphics one and reuse them.
With the route tex -> .plt file -> gnuplot -> tex (metafun) -> metapost (-> mpto or \sometxt) -> pdf, which I frequently use, the situation is much much worse, but it's still acceptable. ConTeXt became at least 10 times faster during the last three or four years. (Or at least that's my impression.)
I don't use gnuplot and I think a lua driven Tikz should solve this in the future, calculate the graphs with lua definition and draw the graphics with TeX macros.
You should also replace the fullcircle with drawdot in your example, drawdot renders better on screen and looks better.
Thanks. I always use fill fullcircle for some reason. Perhaps I should changle my habit :)
Sorry, my fault. What I meant was the difference between draw point and drawpoint point where the first should be replaced in this situation with the later, fullcircle produce nice circles and Donald Knuth took care about this. Wolfgang
participants (3)
-
MASON Peter J
-
Mojca Miklavec
-
Wolfgang Schuster