I would like to make something like the folowing in ConTeXt (you need a monospaced font to see it correctly): +------------------------------+ | | | | | | +------------------------------+------------------------------+ | | | | | | | | | +--------------+---------------+--------------+---------------+--------------+---------------+ | | | | | | | | | | | | +------------------------------+---------+----------+---------+------------------------------+ | | | | | | | | | | | | | | | | | | | | | | +__________+ How could I do this? -- Cecil Westerhof
2009/11/12 Cecil Westerhof
I would like to make something like the folowing in ConTeXt (you need a monospaced font to see it correctly): +------------------------------+ | | | | | | +------------------------------+------------------------------+ | | | | | | | | | +--------------+---------------+--------------+---------------+--------------+---------------+ | | | | | | | | | | | | +------------------------------+---------+----------+---------+------------------------------+ | | | | | | | | | | | | | | | | | | | | | | +__________+
How could I do this?
I have made a start. I have the following tex-file: \usemodule[defaults] \setupoutput[pdf] \setuplayout[header=0in, footer=0in] \starttext \defineframed [action][width=5cm, height=3cm] \defineframed [base][width=3cm, height=14.5cm] \startcombination[1*2] {\action {1}} {} \stopcombination \startcombination[2*2] {\action {2}} {} {\action {3}} {} \stopcombination \startcombination[3*2] {\action {4}} {} {\action {5}} {} {\action {6}} {} \stopcombination \base {7} \stoptext This is a start, but there are two problems with it. Everything is placed on the left side and there is room between the boxes. How can I solve this? Also, with the startcombination, I always need to have the second value to be at least two. Is this not a bug? -- Cecil Westerhof
Cecil Westerhof wrote:
I would like to make something like the folowing in ConTeXt (you need a monospaced font to see it correctly):
\starttyping
+------------------------------+ | | | | | | +------------------------------+------------------------------+ | | | | | | | | | +--------------+---------------+--------------+---------------+--------------+---------------+ | | | | | | | | | | | | +------------------------------+---------+----------+---------+------------------------------+ | | | | | | | | | | | | | | | | | | | | | | +__________+
\stoptyping
How could I do this?
But that is just a joke. Try this: \startTEXpage \setupalign[middle]\offinterlineskip \noindent \framed[width=4cm,height=2cm,offset=none]{} \noindent \dorecurse{2}{\framed[width=4cm,height=2cm,offset=none]{}} \noindent \dorecurse{3}{\framed[width=4cm,height=2cm,offset=none]{}} \noindent \framed[width=2cm,height=4cm,offset=none]{} \stopTEXpage Best wishes, Taco
2009/11/12 Taco Hoekwater
But that is just a joke. Try this:
\startTEXpage
\setupalign[middle]\offinterlineskip
\noindent \framed[width=4cm,height=2cm,offset=none]{}
\noindent \dorecurse{2}{\framed[width=4cm,height=2cm,offset=none]{}}
\noindent \dorecurse{3}{\framed[width=4cm,height=2cm,offset=none]{}}
\noindent \framed[width=2cm,height=4cm,offset=none]{}
\stopTEXpage
I made this: \usemodule[defaults] \setupoutput[pdf] \setuplayout[header=0in, footer=0in] \defineframed [action][width=5cm, height=3cm, offset=none] \defineframed [base] [width=3cm, height=2cm, offset=none] \starttext \setupalign[middle]\offinterlineskip \noindent \action{} \noindent \dorecurse{2}{\action{}} \noindent \dorecurse{3}{\action{}} \dorecurse{7}{ \noindent \base{} } \stoptext Work like a charm. There is only one minor problem: where frame's touch eachother, the line is a little bit thicker. Is there something to be done about this? In this case I wanted everything to be centered, but is it possible to define the point of the upper corner of a frame? -- Cecil Westerhof
On Thu, Nov 12, 2009 at 5:07 PM, Cecil Westerhof
Work like a charm. There is only one minor problem: where frame's touch eachother, the line is a little bit thicker. Is there something to be done about this?
In this case I wanted everything to be centered, but is it possible to define the point of the upper corner of a frame? see http://wiki.contextgarden.net/Framed
-- luigi
2009/11/12 luigi scarso
In this case I wanted everything to be centered, but is it possible to define the point of the upper corner of a frame? see http://wiki.contextgarden.net/Framed
I had allready looked there, but it has very little information. Not even the height parameter. Let alone something about placing the frame at a certain spot. So, is there a place to find all the parameters that can be used with framed? -- Cecil Westerhof
Hi, There is TeXshow-web, accessible through the contextgarden. Look for setupframed. Willi On Nov 13, 2009, at 8:47 AM, Cecil Westerhof wrote:
2009/11/12 luigi scarso
: In this case I wanted everything to be centered, but is it possible to define the point of the upper corner of a frame? see http://wiki.contextgarden.net/Framed
I had allready looked there, but it has very little information. Not even the height parameter. Let alone something about placing the frame at a certain spot. So, is there a place to find all the parameters that can be used with framed?
-- Cecil Westerhof ______________________________________________________________________ _____________ 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 ______________________________________________________________________ _____________
Willi Egger
There is TeXshow-web, accessible through the contextgarden. Look for setupframed.
At the moment the site can not be reached. I'll try it later. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
On Thu, Nov 12, 2009 at 5:07 PM, Cecil Westerhof
Work like a charm. There is only one minor problem: where frame's touch eachother, the line is a little bit thicker. Is there something to be done about this?
In this case I wanted everything to be centered, but is it possible to define the point of the upper corner of a frame?
%% save it as test.tex \starttext \hbox{% NO GOOD \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% } \blank \hbox{% GOOD ? \framed[width=6cm,height=8cm,rightframe=off,align={lohi,middle}]{\input ward }% \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% } \stoptext Try it with $>texexec test -- luigi
luigi scarso
Work like a charm. There is only one minor problem: where frame's touch eachother, the line is a little bit thicker. Is there something to be done about this?
%% save it as test.tex \starttext \hbox{% NO GOOD \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% }
\blank
\hbox{% GOOD ? \framed[width=6cm,height=8cm,rightframe=off,align={lohi,middle}]{\input ward }% \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }% }
\stoptext
Thanks. I made it now: \usemodule[defaults] \setupoutput[pdf] \setuplayout[header=0cm, footer=0.25cm] \defineframed [action][width=5cm, height=3cm, offset=none] \defineframed [base] [width=3cm, height=2cm, offset=none, topframe=off] \starttext \setupheader[state=high] \setupfootertexts[\hfill {\switchtobodyfont[6pt]\copyright Decebal Computing, http://www.decebal.nl} \hfill][] [][right header] \setupalign[middle]\offinterlineskip \noindent\action[bottomframe=off]{} \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} \noindent\dorecurse{2}{\action[rightframe=off]{}}\action{} \dorecurse{7}{ \noindent \base{} } \stoptext Still another question. I have to write: \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} because the following does not work: \noindent\action[bottomframe=off,rightframe=off]{} \action[bottomframe=off]{} But the second I find more readable. Is there a way to make it more readable? -- Decebal Computing Voor uw ICT oplossingen Cecil Westerhof Senior Software Engineer M Cecil@Decebal.nl W http://www.decebal.nl LinkedIn: http://www.linkedin.com/in/cecilwesterhof
On Fri, 13 Nov 2009, Cecil Westerhof wrote:
Still another question. I have to write: \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} because the following does not work: \noindent\action[bottomframe=off,rightframe=off]{} \action[bottomframe=off]{} But the second I find more readable. Is there a way to make it more readable?
Maybe adding a % at the end helps. \noindent\action[bottomframe=off,rightframe=off]{}% \action[bottomframe=off]{} Aditya
Still another question. I have to write: \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} because the following does not work: \noindent\action[bottomframe=off,rightframe=off]{} \action[bottomframe=off]{} But the second I find more readable. Is there a way to make it more readable?
Tex is space-sensitive. Use comment sign '%' as Aditya says , is a robust way to make code readable. When I'm writing some small macro, I use them just from the beginning, to avoid surprise after (like in this situation). Anyway your example shows some strange things about overlap of rules that I like to investigate. -- luigi
participants (7)
-
Aditya Mahajan
-
Cecil Westerhof
-
Cecil Westerhof
-
CLDWesterhof@gmail.com
-
luigi scarso
-
Taco Hoekwater
-
Willi Egger