Re: [NTG-context] Issues: framedtext and tables inside itemized list
Thanks, Hans! To make it work I had to use your suggestion given in this lest earlier \startlinecorrection \setlocalhsize \hsize\localhsize \startframedtext ... \stopframedtext \stoplinecorrection However, is there any chance to get an answer to my second question about splitting natural tables placed inside itemized list? it is in the original message for the thread. Any ideas? Thanks in advance.On 8/29/05, Hans Hagen <[EMAIL PROTECTED]> wrote: Mojca Miklavec wrote:>Taco Hoekwater wrote:>Yes, I think so. Something like \localtextwidth maybe.there is already \setlocalhsize and \localhsize Hans- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl-___ntg-context mailing list ntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context-- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Issues: framedtext and tables inside itemized list
Wow, that's really something! And it works! Do you think such "thing" telling the real text width could be useful in ConTeXt? A big thank you once again!On 8/26/05, Taco Hoekwater <[EMAIL PROTECTED]> wrote: Mojca Miklavec wrote:>> However, in ConTeXt the linewidth is reserved for "rule thickness" or> something similar. Which is the ConTeXt alternative to LaTeX's> \linewidth? There is no such thing, I believe. There is \columnwidth when incolums, but outside that I normally do something like \the\dimexpr \hsize-\leftskip-\rightskip\relaxGreetings, Taco -- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] How to customize the default verbatim colors
Thanks a lot, Taco! I knew there should be a good way! Maybe it would be useful to add it to http://contextgarden.net/Verbatim_text ? I also noticed that XML verbatim does not correctly handle tags with namespace. In the xml like the "ns" gets colored with tag-color, the "tag" with attr-color. I think the whole "ns:tag" should be of tag-color. Best wishes, EugeneOn 8/25/05, Taco Hoekwater <[EMAIL PROTECTED]> wrote: Hi!Eugene Toporov wrote:> I expect there is a way to redefine whole palette or something.Yes, sure (you need to define an XXXcolorpretty palet for each typeyou want to change): ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] How to customize the default verbatim colors
Hi all! I recently started using Verbatim Macroses to make source code pieces look prettier in my docs. I use things like \setuptyping[JV] and then \startJV - \stopJV But I'd like to change the default colors in the macroses to my own. I only found that redefining some colors like this \definecolor [colorprettyone] [green] \definecolor [colorprettytwo] [navy] \definecolor [colorprettythree] [r=0,g=0,b=.9] makes effect, but that seems not very effective and affects all verbatims. 1) I could not find all colors. 2) I need several different schemes (palettes) for different verbatims (XML, Java, SQL). I expect there is a way to redefine whole palette or something. What's the easiest and the right way to do it? Thanks in advance!-- Eugene ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Issues: framedtext and tables inside itemized list
Hi!On 8/24/05, Mojca Miklavec <[EMAIL PROTECTED]> wrote: Eugene Toporov wrote:> I have some issues with different things but both inside itemized lists:>> 1. Framed text width is calculated not as I expect. The sample below makes> framedtext box appear partially on right margin > \textwidth is a constant that doesn't change when you enter a smaller box. Do you want to get rid of the space left of the box or do you want tohave a frame, narrower than textwidth? I want the narrower frame with the right edge always at the same place. a)\startitemize[n,packed]\item A normal item paragraph, which normaly gets wrapped ok. \stopitemize\startframedtext[background="">Some listing as framedtext whose width seems calculated incorrectly.\stopframedtext\startitemize[n,packed,continue]\item something else \stopitemize I did not know about the startitemize's continue option. May be useful someday. So, thanks! b) You can access \leftskip to get idea how much space is left on theleft side, there is also a \hsize, but there must be some better solution. Will try playing with this if no other solutions. Thanks for your suggestions. Eugene ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] What's the easiest way to create numbered captions?
Thanks Taco, Hans! I did not really get what you both meant in your replies but having added \testpage[5] before the table title seems to be doing the trick. Is this something that can be used here? >> One small issue appeared, though. >> Sometimes I get title on one page and the table on the following.>>> I'd opt for some judicious use of the \page command where this> happens.or (in the case of natural tables) try splitmethod=b or set \extratblsplitheight to some value-- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Issues: framedtext and tables inside itemized list
I have some issues with different things but both inside itemized lists: 1. Framed text width is calculated not as I expect. The sample below makes framedtext box appear partially on right margin \setupcolors[state=start] \setuplayout[width=9cm] \showframe \starttext \startitemize[n,packed] \item A normal item paragraph, which normaly gets wrapped ok.\par \startframedtext[background=""> Some listing as framedtext whose width seems calculated incorrectly. \stopframedtext \stopitemize \stoptext In my docs I represent programlistings using these framedtexts and need them all to be the same width (\textwidth). Is there a way to make those framedtexts that appear inside itemization remain in boundaries? The same concerns tables (natural). 2. Another question with natural tables inside itemized list..If I set [split=repeat] or [split=yes] for table it is not correctly aligned inside itemized list. The below example shows this. \setuplayout[width=9cm] \showframe \starttext \startitemize[n,packed] \noindent \bTABLE \bTR \bTH Operation\eTH \bTH[align=middle] Result\eTH \eTR \bTR \bTD The "Librarian" application starts with the {\tt{}Index} page.\eTD \bTD[align=middle] OK \eTD \eTR \bTR \bTD When clicking the links on the {\tt{}Index} page, the empty {\tt{}List\-All} and {\tt{}Add\-Book} pages open.\eTD \bTD[align=middle] OK \eTD \eTR \eTABLE \noindent \stopitemize \stoptext I'm currently obliged to have non-splittable tables in lists. tIs there a way to make it render better? Thank you in advance!-- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] What's the easiest way to create numbered captions?
Taco, This really helped! Thanks! One small issue appeared, though. Sometimes I get title on one page and the table on the following. -- Regards. Eugene ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Verbatim with linebreaks sillyness
Taco, Just tried this and it is really cool! But how can I make spaces without the special space character? ThanksOn 7/29/05, Taco Hoekwater <[EMAIL PROTECTED]> wrote: Hi,I saw this on the wiki: http://contextgarden.net/Verbatim_with_line_breaksand it seemed like a fun idea to play with for a bit. How's this?Cheers, Taco%% BREAK is a special pretty handler that auto-wraps lines% to fit the current hsize.\gdef\BREAKsetspecials% {\dorecurse{256}{\setpretty\numexpr \recurselevel-1\relax=10 }} \gdef\BREAKsethandlers% {\installprettyhandler 10 \BREAKtypeone }\newcount\BREAKcharcounter\newcount\BREAKmaxcharcount\def\BREAKtypeone#1% {\advance\BREAKcharcounter 1\ifnum\BREAKcharcounter > \BREAKmaxcharcount \hfil\break \BREAKcharcounter=1\fi\getpretty{#1}}\def\BREAKsetcounters% {\setbox\scratchbox=\hbox{0}%\BREAKmaxcharcount=\hsize\divide\BREAKmaxcharcount \wd\scratchbox \def\flushrestofverbatimline{\BREAKcharcounter=0 }%\BREAKcharcounter=0 }\gdef\setupprettyBREAKtype% {\def\prettyidentifier{BREAK}%\BREAKsetcounters\BREAKsethandlers\BREAKsetspecials} \installprettytype [BREAK] [BREAK]\starttext\framed[width=8cm, align=flushleft]{%\setuptyping[option=BREAK]\starttypinghööah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohalölo \stoptyping}\stoptext___ntg-context mailing listntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context-- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] What's the easiest way to create numbered captions?
Hello! I've faced a problem briefly discussed before... when the table (natural table) placed using sample below is not split to pages: \placetable[here][mytable1]{Table Caption}{ \bTABLE[split=repeat] \bTR \bTH Header\eTH \eTR \dorecurse{150}{ \bTR \bTD row text \eTD \eTR} \eTABLE } Everything works fine if I do not use \placetable. But I do not have the numbered caption in this case and cannot reference this table in a link. Is there any other simple way to give tables (even not only tables) a caption with number? I almost made it using the numbered labels the like below: \definelabel[tableLable][text=Table,headstyle=boldslanted] \tableLable \em{ Table Caption} \reference[mytable1]{Table Caption} \bTABLE[split=repeat] \bTR \bTH Header\eTH \eTR \dorecurse{150}{ \bTR \bTD row text \eTD \eTR} \eTABLE This way I can have numbered caption where I need, which is almost cool. But the problem is that I cannot create table link with text "Table N.N Table_Caption" \in{Table}[mytable1] gives the link like "Table Table_Caption" and I cannot add number there :( I hope I miss something really obvious, Thanks everyone in advance! -- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Position margin text block near previous paragraph
Hello! This time I have a task like this: I have margin text blocks (like Note, Tip) that follow some paragraph in my document flow. In the produced document I get them in margin, but vertically they are just below the paragraph (as in text flow) I really need then to start exactly where the previous paragraph starts (vertically). I.e. I need to move them several (unknown number) lines higher. My realization: \setupinmargin[style=\sl\tx\setupinterlinespace,location=left,align=right] \def\Note#1{ \strut \inmargin{ \em{#1} } \strut} \starttext This is the para with unknown length that can be any number of lines high. And I have a note below it that should be located to the left of this paragraph and not just below it. That's the case. \par \Note{ And here is the note that should be in margin.} \stoptext The easiest would to put it above the target paragraph, but that's not the solution for me as the same text is rendered to HTML where no margins exist. Can I do it plainly in tex code? Thanks a lot. I appreciate your help-- Regards.Eugene Toporov ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Natural Table does not allow using defined typing in its cell
Hello, I found a strange (to me) bTABLE behaviour. I'm defining the "programlisting" typing and it works when used like below \def\BeforeProgramListing{\startframedtext[background=screen,width=\hsize,style=\tttf\small]} \def\AfterProgramListing{\stopframedtext} \definetyping[programlisting][before=\BeforeProgramListing,after=\AfterProgramListing] \startprogramlisting "Hello World! Hello" + txtName.text + "!" \stopprogramlisting When I'm trying to insert a programlisting into a table cell using the following code -- it fails to create PDF. \bTABLE \bTR \bTD Set the value to \eTD \bTD \startprogramlisting "Hello World! Hello" + txtName.text + "!" \stopprogramlisting \eTD \eTR \eTABLE When I replace \start\stopprogramlisting with in place \start\stopframedtext -- it works ok. \bTD \startframedtext[background=screen,width=\hsize,style=\tttf\small] "Hello World! Hello" + txtName.text + "!" \stopframedtext \eTD Why is this so? Do I miss something important? Thanks a lot. -- Regards. Eugene Toporov ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Placing figure inside a table cell, centered
Hello, I'm doing a quest. What I intend to do is a table (using Natural Tables) where one of the columns contains a small icon centered within the cell with no other data there. My table looks like this: \bTABLE \bTR \bTH Operation\eTH \bTH[align=middle] Result\eTH\eTR \bTR \bTD HelloWorld! \eTD \bTD[align=middle] \externalfigure[checkbox] \eTD \eTR \eTABLE "align=middle" for TD gives the expected result for the text, but not for the image. I've managed to center the image using \midaligned command, like below. But the table columns width in this case is set to 50% each. And the only way I found is to add [width=50pt] to each cell. \bTABLE \bTR \bTH Operation\eTH \bTH[align=middle][width=50pt] Result\eTH\eTR \bTR \bTD HelloWorld! \eTD \bTD[width=50pt] \midaligned {\externalfigure[checkbox]} \eTD \eTR \eTABLE I'm afraid I make things too complicated. Is there a simpler way to do what I need? Thanks a lot. -- Regards. Eugene Toporov ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context