I want to put to some paragraphs, each as framed text, on one line. Such as: \startframedtext[width=...] para 1 \startitemize ....etc \stopframedtext \startframedtext[width=...] para 2 \startitemize ....etc \stopframedtext I tried some things but the two frames will not come out on one line. How to do this? yours sincerely, dr. H. van der Meer
Hans van der Meer wrote:
I want to put to some paragraphs, each as framed text, on one line. Such as:
\startframedtext[width=...] para 1 \startitemize ....etc \stopframedtext \startframedtext[width=...] para 2 \startitemize ....etc \stopframedtext
I tried some things but the two frames will not come out on one line. How to do this?
\placesidebyside (context manual p.228) should work. A \hbox is another option, but maybe too unhandy for this. Greetings, Peter
yours sincerely, dr. H. van der Meer
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
On Jan 6, 2006, at 18:20, Peter Rolf wrote:
Hans van der Meer wrote: I want to put to some paragraphs, each as framed text, on one line. Such as:
\startframedtext[width=...] para 1 \startitemize ....etc \stopframedtext \startframedtext[width=...] para 2 \startitemize ....etc \stopframedtext
I tried some things but the two frames will not come out on one line. How to do this?
\placesidebyside (context manual p.228) should work. A \hbox is another option, but maybe too unhandy for this.
Greetings, Peter
No, that will not work. After much probing I found the culprit. The framedtext takes the full linewidth and apparently does not reduces it to the given size. Therefore enclosing in a vbox seems necessary: \vbox{\hsize=framesize\startframedtext{width=framesize ... Question for Hans Hagen: is it an option letting framedtext set the hsize when a specific width is given? yours sincerely, dr. H. van der Meer
Hans van der Meer wrote:
On Jan 6, 2006, at 18:20, Peter Rolf wrote:
Hans van der Meer wrote: I want to put to some paragraphs, each as framed text, on one line. Such as:
\startframedtext[width=...] para 1 \startitemize ....etc \stopframedtext \startframedtext[width=...] para 2 \startitemize ....etc \stopframedtext
I tried some things but the two frames will not come out on one line. How to do this?
\placesidebyside (context manual p.228) should work. A \hbox is another option, but maybe too unhandy for this.
Greetings, Peter
No, that will not work. After much probing I found the culprit. The framedtext takes the full linewidth and apparently does not reduces it to the given size. Therefore enclosing in a vbox seems necessary: \vbox{\hsize=framesize\startframedtext{width=framesize ...
Question for Hans Hagen: is it an option letting framedtext set the hsize when a specific width is given?
\hbox to \hsize \bgroup \startframedtext[none][width=.5\textwidth] \input tufte \stopframedtext \startframedtext[none][width=.5\textwidth] \input zapf \stopframedtext \egroup
Le 7 janv. 06 à 13:50, Hans Hagen a écrit :
No, that will not work. After much probing I found the culprit. The framedtext takes the full linewidth and apparently does not reduces it to the given size. Therefore enclosing in a vbox seems necessary: \vbox{\hsize=framesize\startframedtext{width=framesize ...
Question for Hans Hagen: is it an option letting framedtext set the hsize when a specific width is given?
\hbox to \hsize \bgroup \startframedtext[none][width=.5\textwidth] \input tufte \stopframedtext \startframedtext[none][width=.5\textwidth] \input zapf \stopframedtext \egroup
Why is it not possible to simply use the \framed command (with some magic option to put text into it) to do the obove thing? \startframed[width=.5\textwidth, xxxx] \input tufte \stopframed \startframed[width=.5\textwidth, xxxx] \input zapf \stopframed If it is impossible, is there any equivalent to de minipage or \parbox LaTeX equivalent? -- Maurice
Maurice Diamantini (dom) wrote:
Le 7 janv. 06 � 13:50, Hans Hagen a �crit :
No, that will not work. After much probing I found the culprit. The framedtext takes the full linewidth and apparently does not reduces it to the given size. Therefore enclosing in a vbox seems necessary: \vbox{\hsize=framesize\startframedtext{width=framesize ...
Question for Hans Hagen: is it an option letting framedtext set the hsize when a specific width is given?
\hbox to \hsize \bgroup \startframedtext[none][width=.5\textwidth] \input tufte \stopframedtext \startframedtext[none][width=.5\textwidth] \input zapf \stopframedtext \egroup
Why is it not possible to simply use the \framed command (with some magic option to put text into it) to do the obove thing? \startframed[width=.5\textwidth, xxxx] \input tufte \stopframed \startframed[width=.5\textwidth, xxxx] \input zapf \stopframed
in most cases you can use framed (make sure that you set 'align' to something in order to enter vmode) framedtext is a bit more clever and handles some spacing issues
If it is impossible, is there any equivalent to de minipage or \parbox LaTeX equivalent?
i dunno what those are, vboxes? Hans
Le 9 janv. 06 à 11:52, Hans Hagen a écrit :
If it is impossible, is there any equivalent to de minipage or \parbox LaTeX equivalent?
i dunno what those are, vboxes?
Not sure what exactly is "vboxes" (something you can put in hbox? yes it is) but LaTeX raisebox, parbox, minipage can be put inside a text line. minipage can manage its ones footnote, but this is not the question here. As the "LaTeX++" concurrent package designer, you should read some page of the LaTeX reference documentation "A document Preparation System" It is little book (272 pages with the index !) and cover the core of the package. Page 103 to 110 are related to boxes, and is what is missing in context. I'm not sure that ConTeXt \framed command is able to reproduce the parbox behavior (position a framed box relatively to its internal top or bottom line and the outside baseline)
in most cases you can use framed (make sure that you set 'align' to something in order to enter vmode)
framedtext is a bit more clever and handles some spacing issues
With your help, and some old reference doc and the wiki (http://wiki.contextgarden.net/Vertically_Centered_Boxes) I tested the following "one line text" which works. (My version of TeXExec 5.2.4 doesn't seem to support \startframed and \stopframed so I use \framed instead). \starttext % align: no left right middle normal high low lohi justified % location: low depth hanging a word and --% \framed[width=.2\textwidth, align=flushright, location=depth]{ some stuff }% --% \framed[height=3em,width=11em, align={flushleft,lohi}, location=hanging]{ other stuff }% --% another word, same line \stoptext But more generaly, there is a frequent need about boxing stuff and it seems that the \framed command is the way to go. But it's not always easy to guess the various parameters to get an expected behavior. So what is the current reference documentation about framed - Context the manual (page 206) ? - ConTeXt an excursion (page 45) ? Such a command is usefull inside some "hardcoded" slide. And there could be a "\boxed" or "\cell" macro with default "frame=off" parameters just to serve as special tabular cell. I think there has to be two pairs of informations to position a box (i.e. a "cell" text): - how is the box is positioned relatively to its environment (the location= keyword I think), - how to position the stuff **inside** the box (align= keyword) What is the need for these 2 parameters : - inside the box : everywhere. that implies two reals numbers between 0.0 and 1.0 (perhaps wider?) with some keyword for predefined values (flushleft, middle, flushright low, high, lohi and baseline, (vjustified, justified=hjustified serve another feature) - outside the box : only verticaly ? one real number [0.0..1.0] plus low depth (=base?) hanging (=top) Here a parbox provide an option for aligning the external baseline on the "top" ou "bottom" internal line. How can I simply optain the "0.5 = vertical middle" Probably the positionning parameters for outside the box are more complicated : more than the internal reference point mention above is to which external reference point the inetrenal point should be aligned to ? Generaly the baseline of the parent is the choosen one, but perhaps one like to use the "0.5ex hight" one as in minus sign in the "3-2," string (but the TeX command \raise0.5ex could do that) -- Maurice
Maurice Diamantini (dom) wrote:
Not sure what exactly is "vboxes" (something you can put in hbox? yes it is) but LaTeX raisebox, parbox, minipage can be put inside a text line. minipage can manage its ones footnote, but this is not the question here. As the "LaTeX++" concurrent package designer, you should read some page of the LaTeX reference documentation "A document Preparation System" It is little book (272 pages with the index !) and cover the core of the package.
hm, i prefer to start from user demands and personal needs; we used latex for a very short time and i don't remember mini pages -)
Page 103 to 110 are related to boxes, and is what is missing in context.
I'm not sure that ConTeXt \framed command is able to reproduce the parbox behavior (position a framed box relatively to its internal top or bottom line and the outside baseline)
i think we can safely assume that all these things are available somehow (supp-box.tex implements a lot of box types) normally \framed can do what's needed, so in your case, if you can make clear what you want to achieve i'm sure that someone on this list can provide the answer
in most cases you can use framed (make sure that you set 'align' to something in order to enter vmode)
framedtext is a bit more clever and handles some spacing issues
With your help, and some old reference doc and the wiki (http://wiki.contextgarden.net/Vertically_Centered_Boxes) I tested the following "one line text" which works.
(My version of TeXExec 5.2.4 doesn't seem to support \startframed and \stopframed so I use \framed instead).
\starttext
% align: no left right middle normal high low lohi justified % location: low depth hanging a word and --% \framed[width=.2\textwidth, align=flushright, location=depth]{ some stuff }% --% \framed[height=3em,width=11em, align={flushleft,lohi}, location=hanging]{ other stuff }% --% another word, same line
\stoptext
But more generaly, there is a frequent need about boxing stuff and it seems that the \framed command is the way to go. But it's not always easy to guess the various parameters to get an expected behavior. So what is the current reference documentation about framed - Context the manual (page 206) ? - ConTeXt an excursion (page 45) ?
the manual as well as examples inside the core-ful.tex file the most important properties of framed are - offset (none,overlay, dimension) - align (all kind of combinations) - width/height (dimension or keyword) - strut (yes|no) just play a bit with it and you'll see the picture
Such a command is usefull inside some "hardcoded" slide. And there could be a "\boxed" or "\cell" macro with default "frame=off" parameters just to serve as special tabular cell.
I think there has to be two pairs of informations to position a box (i.e. a "cell" text): - how is the box is positioned relatively to its environment (the location= keyword I think),
no, location is limited to a few options; you can use macros like \offset[...]{} or other box positioning macros; layers are also an option
- how to position the stuff **inside** the box (align= keyword)
What is the need for these 2 parameters :
- inside the box : everywhere. that implies two reals numbers between 0.0 and 1.0 (perhaps wider?)
what are those numbers representing?
with some keyword for predefined values (flushleft, middle, flushright low, high, lohi and baseline, (vjustified, justified=hjustified serve another feature)
- outside the box : only verticaly ? one real number [0.0..1.0] plus low depth (=base?) hanging (=top) Here a parbox provide an option for aligning the external baseline on the "top" ou "bottom" internal line. How can I simply optain the "0.5 = vertical middle"
Probably the positionning parameters for outside the box are more complicated : more than the internal reference point mention above is to which external reference point the inetrenal point should be aligned to ? Generaly the baseline of the parent is the choosen one, but perhaps one like to use the "0.5ex hight" one as in minus sign in the "3-2," string (but the TeX command \raise0.5ex could do that)
indeed, \raise and \lower and cousins can come in handy (what do you use those mini mages for?) Hans
Le 10 janv. 06 à 00:01, Hans Hagen a écrit :
Maurice Diamantini (dom) wrote:
As the "LaTeX++" concurrent package designer, you should read some page of the LaTeX reference documentation "A document Preparation System" It is little book (272 pages with the index !) and cover the core of the package. Page 103 to 110 are related to boxes, and is what is missing in context.
hm, i prefer to start from user demands and personal needs; we used latex for a very short time and i don't remember mini pages -)
Ok, but what I mean is the need of such a documentation on the ConTeXt core, not reimplementing LaTeX in ConTeXt !
I'm not sure that ConTeXt \framed command is able to reproduce the parbox behavior (position a framed box relatively to its internal top or bottom line and the outside baseline)
i think we can safely assume that all these things are available somehow (supp-box.tex implements a lot of box types)
I saw this source file thanks to the following URL: http://source.contextgarden.net/supp-box.tex There is very much interesting macro, but I see some %D \macros %D {strutdp,strutht,strutwd} %D ... Does it mean that an automatic generated documentation is available somewhere on the web? Or is it mondatoryto browse the source for using these command.
normally \framed can do what's needed, so in your case, if you can make clear what you want to achieve i'm sure that someone on this list can provide the answer
... So what is the current reference documentation about framed - Context the manual (page 206) ? - ConTeXt an excursion (page 45) ?
the manual as well as examples inside the core-ful.tex file
I haven"t been able to find this file! core-fil.tex exists but doesn't seem to be about using boxes!
the most important properties of framed are
- offset (none,overlay, dimension) - align (all kind of combinations) - width/height (dimension or keyword) - strut (yes|no)
just play a bit with it and you'll see the picture
Thank you for these informations, I reread the (box related) reference manual, and better understand the thing!
... I think there has to be two pairs of informations to position a box (i.e. a "cell" text): - how is the box is positioned relatively to its environment (the location= keyword I think),
no, location is limited to a few options; you can use macros like \offset[...]{} or other box positioning macros; layers are also an option
Although I guess what it mean, I didn't found the \offset command doc neither. I suppose it has numerous interesting options (on http://texshow.contextgarden.net/)?
- inside the box : everywhere. that implies two reals numbers between 0.0 and 1.0 (perhaps wider?)
what are those numbers representing?
It could just be a way to specify arbitrary position between left (0.0) and right (1.0) or between bottom (0.0) ant top (1.0) But the more important whould be a (uptodate) reference documentation about the already existing commands.
(but the TeX command \raise0.5ex could do that)
indeed, \raise and \lower and cousins can come in handy
(what do you use those minipages for?) These are just (v?)boxes which can contain several paragraphs and theyre own footnotes. Some options can be use to position
Yes, I always forget TeX command! thank you very much ! theyre internal (top or bottom) line relatively to the external base line. No need for now, I only used them in LaTeX for building some boxing construction. But in context I used vboxex into hboxes (because I didn't kwox enough about standard \framed command) In fact, ConTeXt already contains all the needed stuffs, and only some centralised documentation for using them is missing! I'm waiting for the future ConTeXt book ;-) -- Maurice PS. Also the ConTeXt wiki becomme more and more rich in information! Thank you very much for all that !
I have translated some docs from LaTeX to ConTeXt and I found that the PDF files generated by ConTeXt are almost 3 times bigger than the ones generated by LaTeX (*). Why all this difference? jk (*) MikTeX under Windows -- Jilani KHALDI http://jkhaldi.oltrelinux.com
Jilani Khaldi wrote:
I have translated some docs from LaTeX to ConTeXt and I found that the PDF files generated by ConTeXt are almost 3 times bigger than the ones generated by LaTeX (*). Why all this difference?
for that you need to look into the pdf file - are fonts embedded - how many fonts are used (maybe context has more granularity) - is the number of pages the same - is the compression level set to 9 - context uses a different hyperlink model etc best compare two 10 page docs and two 100 page docs another possibility is that there are more 'redundant' cm transforms (depends a bit); this is actually a pdftex problem but the latest/future versions will behave better also, the next version of pdftex will do object compression which means that files can get much smaller so, without examples i can't say much (how do 'hello world' docs compare?) Hans
best compare two 10 page docs and two 100 page docs
The best rate I got is in a scientific pubblication with many formulas. LaTeX: 60 pages (260 kb) ConTeXt: 61 pages (478 kb) Instead under Linux (TeTeX) the size is almost the same. jk -- Jilani KHALDI http://jkhaldi.oltrelinux.com
Jilani Khaldi wrote:
best compare two 10 page docs and two 100 page docs
The best rate I got is in a scientific pubblication with many formulas. LaTeX: 60 pages (260 kb) ConTeXt: 61 pages (478 kb) Instead under Linux (TeTeX) the size is almost the same.
so what do you use otherwise (instead of tetex)? are the same versions of pdftex used? Can you post the files someplace (tetex and non tetex variants). (maybe the tetex context is an old one and does not use latin modern; latin modern gives larger files due to extensive hinting - read: better quality; if so, a 600 page doc will have the same difference of about 218 kb) you can run pdffonts to check this Hans
so what do you use otherwise (instead of tetex)?
Under Linux (Slackware 10.2) I have only TeTeX: pdftex => This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) pdflatex => This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) Under Windows (2000 Pro) using MikTeX: pdftex => This is pdfTeX, Version 3.141592-1.21a (MiKTeX 2.4) pdflatex => This is pdfeTeX, Version 3.141592-1.21a-2.2 (MiKTeX 2.4) (*) (*) I am using this one to create PDF files from LaTeX docs. For this reason, I think, I have almost the same size of PDF files under Windows (MiKTeX/LaTeX) and Linux (TeTeX/ConTeXt). ConTeXt premable: \mainlanguage[italian] \setupbodyfont[12pt] \setuppapersize[A4] \enableregime[il1] LaTeX preamble: \documentclass[a4,10pt,fleqn]{report} \setcounter{secnumdepth}{2} \usepackage[latin1]{inputenc} \usepackage[italian]{babel} ... other packages
you can run pdffonts to check this
ConTeXt/MiKTeX (Windows) name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- DTTIEI+LMSans12-Regular Type 1 yes yes no 39 0 EETXYV+LMSans12-Oblique Type 1 yes yes yes 42 0 DXNZSG+LMSans10-Bold Type 1 yes yes yes 45 0 BBOGPU+Utopia-Italic Type 1 yes yes no 9 0 YTDIBL+Utopia-Regular Type 1 yes yes no 14 0 SODXLF+Fourier-Math-Symbols Type 1C yes yes no 15 0 CJFCZI+Fourier-Math-Letters-Italic Type 1C yes yes no 16 0 YYSITY+Fourier-Math-Extension Type 1C yes yes no 17 0 NMJDRH+LMRoman12-Regular Type 1 yes yes yes 87 0 DQFNRX+LMRoman12-Italic Type 1 yes yes no 90 0 IHGOTS+LMSans10-Regular Type 1 yes yes yes 137 0 BLEFMM+LMSans10-Oblique Type 1 yes yes yes 140 0 TGZULI+LMRoman12-Bold Type 1 yes yes no 194 0 FHYPVG+LOGO10 Type 1 yes yes no 197 0 JDIEUM+LMRoman10-Bold Type 1 yes yes no 205 0 ERNOBW+CMMI12 Type 1 yes yes no 209 0 IYOQET+LMRoman12-Regular Type 1 yes yes no 212 0 HUKRQA+CMEX10 Type 1 yes yes no 215 0 FKFBNU+LMRoman9-Regular Type 1 yes yes no 218 0 CNWZSY+CMSY10 Type 1 yes yes no 221 0 SQCOBF+CMMI9 Type 1 yes yes no 224 0 IAKFGB+LMRoman7-Regular Type 1 yes yes no 227 0 UTYJTI+CMSY9 Type 1 yes yes no 274 0 ZCMOAX+CMMI7 Type 1 yes yes no 326 0 HFGQHV+CMSY7 Type 1 yes yes no 329 0 =================================================== ConTeXt/TeTeX (Linux) name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- ZODZLY+CMSSBX10 Type 1 yes yes no 34 0 GDNCCV+CMSSI12 Type 1 yes yes no 37 0 DCDFAR+CMSS12 Type 1 yes yes no 40 0 ASKJEX+CMR12 Type 1 yes yes no 43 0 AQWQFQ+CMR9 Type 1 yes yes no 46 0 QTBLYG+Utopia-Italic Type 1C yes yes no 4 0 ESSWFP+Utopia-Regular Type 1C yes yes no 5 0 SODXLF+Fourier-Math-Symbols Type 1C yes yes no 6 0 CJFCZI+Fourier-Math-Letters-Italic Type 1C yes yes no 7 0 YYSITY+Fourier-Math-Extension Type 1C yes yes no 8 0 WXACZF+CMTI12 Type 1 yes yes no 88 0 RTVTJB+CMSS10 Type 1 yes yes no 135 0 FGDGJS+CMBX10 Type 1 yes yes no 189 0 CEDOCE+CMMI12 Type 1 yes yes no 193 0 FWWPUA+CMEX10 Type 1 yes yes no 196 0 LFQGNZ+CMSY10 Type 1 yes yes no 199 0 SQAFLI+CMMI9 Type 1 yes yes no 202 0 BYRSZI+CMR7 Type 1 yes yes no 205 0 SSTBGA+CMSY9 Type 1 yes yes no 251 0 SEIPGZ+CMMI7 Type 1 yes yes no 304 0 EWUBSW+CMSY7 Type 1 yes yes no 307 0 RELHCG+CMBX12 ps. I see that the PDF generated by MiKTeX (the bigger one) looks a little better than the one generated by TeTeX. So I understand now why this difference between their sizes. Thank you. jk -- Jilani KHALDI http://jkhaldi.oltrelinux.com
Jilani Khaldi wrote:
I see that the PDF generated by MiKTeX (the bigger one) looks a little better than the one generated by TeTeX. So I understand now why this difference between their sizes.
Can you make an entry in the wiki summarizing this? Hans
Maurice Diamantini (dom) wrote:
Although I guess what it mean, I didn't found the \offset command doc neither. I suppose it has numerous interesting options (on http://texshow.contextgarden.net/)?
that;s a new one indeed (that is, old but not yet documented which makes it new -)
It could just be a way to specify arbitrary position between left (0.0) and right (1.0) or between bottom (0.0) ant top (1.0) But the more important whould be a (uptodate) reference documentation about the already existing commands.
hm, such things are always 'relative' because optimal heights and depth of lines are involved: i will think about it
These are just (v?)boxes which can contain several paragraphs and theyre own footnotes. Some options can be use to position theyre internal (top or bottom) line relatively to the external base line.
ok, so inmost cases framed with frame=off will do; local footnotes can be provides with the appropriate commands
I'm waiting for the future ConTeXt book ;-)
press Steve and Adam and hope for many cold and dark nights Hans
On 1/10/06, Maurice Diamantini (dom) wrote:
Ok, but what I mean is the need of such a documentation on the ConTeXt core, not reimplementing LaTeX in ConTeXt !
Add to the wiki what you've learned! Hans codes much faster than he manages to document things, so it's up to the community to keep the documentation up-to-date ;)
I saw this source file thanks to the following URL: http://source.contextgarden.net/supp-box.tex There is very much interesting macro, but I see some %D \macros %D {strutdp,strutht,strutwd} %D ... Does it mean that an automatic generated documentation is available somewhere on the web? Or is it mondatoryto browse the source for using these command.
See http://www.logosrl.it/context/modules/ that Luigi kept preparing last summer (perhaps gave up afterwards?) But it's HUUUUGE (I would guess that reading the source is faster even if you see no picture).
I'm waiting for the future ConTeXt book ;-)
:)
PS. Also the ConTeXt wiki becomme more and more rich in information! Thank you very much for all that
Feel free to become one of those who make the wiki better. Mojca
On Jan 9, 2006, at 5:01 PM, Hans Hagen wrote:
hm, i prefer to start from user demands and personal needs; we used latex for a very short time and i don't remember mini pages -)
a minipage is a box, but i think it's in paragraph mode. \begin{minipage}[position]{width} text \end{minipage} Put two together \begin{minipage}[t]{.30\linewidth} text and images \end{minipage}\hfill % \begin{minipage}[t]{.60\linewidth} text and images \end{minipage} and you get two boxes horizontally across the page with the hfill space between them Put three together: \begin{minipage}[t]{.30\linewidth} text and images \end{minipage}\hfill % \begin{minipage}[t]{.30\linewidth} text and images \end{minipage}\hfill % \begin{minipage}[t]{.30\linewidth} text and images \end{minipage} and you get three boxes horizontally across the page with the hfill space between them Their vertical dimensions depend on the amount of content. They don't cross page breaks.
participants (7)
-
Bob Kerstetter
-
Hans Hagen
-
Hans van der Meer
-
Jilani Khaldi
-
Maurice Diamantini (dom)
-
Mojca Miklavec
-
Peter Rolf