[NTG-context] Bug? thinrule in natural table MKIV
I put a thinrule in a table as follows: \starttext \bTABLE \bTR\bTD\thinrule\eTD\eTR \eTABLE \stoptext It worked fine under MKII. However, when I switched to MKIV (both current and beta) I got the following error message: ! Missing { inserted. inserted text { to be read again inserted text ...blrow \makeTBL 1 1 \nexttblcol \endtblrow \flushtbltoks -\begintbl \the \tbltoks \endtbl \endTBL ...x {\trialtypesettingtrue \flushtbltoks }\lettbldis \maximumcol \z... \eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL \stopTBLprocessing \fi \eg... l.4 \eTABLE Is this a bug? Is there a workaround? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Remove leading spaces
When a function is called, I would like to remove any leading space. Then the function can control the spacing. If I don't remove spaces, it then makes a difference whether or not I have a space before the function is called. I would like the output of the following two lines to be equal: This is a \MyFunction[1] test. This is a\MyFunction[1] test. However, they are not because the first line has a space before the function call. \def\MyFunction{\dosingleempty\doMyFunction} \def\doMyFunction[#1]{% \processaction[#1]% [1=\medspace dog ,% 2=\medspace cat ,% default=\ldots]% } \starttext Test1: This is a\MyFunction[1] test. Test2: This is a \MyFunction[1] test. Test3: This is a \MyFunction test. Test4: This is a\MyFunction test. \stoptext Is there a way to do this and not cause any side effects? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering a defined text frame
On Mon January 26 2009 8:14:11 am Wolfgang Schuster wrote: Hi Bart, Is there a way to pass in my own defined parameters to such a function? I would like to be able to do something similar to the following: \startCenteredText[myownparm=This is a test] \startlines My own parm is: \myownparm \stoplines \stopCenteredText Not with framedtext but you define your environment with a optional argument. ConTeXt has the command \definestartstop but it did not help in your case, something like LaTeXs \newenvironment, I wrote a simple version below. \unprotect \def\ev{ev} \def\environmentparameter#1% {\csname\ev\currentenvironment#1\endcsname} \def\defineenvironment {\dodoubleempty\dodefineenvironment} \def\dodefineenvironment[#1][#2]% {\getparameters [\ev#1] [\c!before=, \c!after=, #2]% \setvalue{\e!start#1}{\dodoubleempty\dostartenvironment[#1]}% \setvalue{\e!stop #1}{\dostopenvironment}} \def\setupenvironment {\dodoubleargument\dosetupenvironment} \def\dosetupenvironment[#1][#2]% {\getparameters[\ev#1][#2]} \def\dostartenvironment[#1][#2]% {\bgroup \edef\currentenvironment{#1}% \ifsecondargument \setupenvironment[\currentenvironment][#2]% \fi \environmentparameter\c!before} \def\dostopenvironment {\environmentparameter\c!after \egroup} \protect \defineframedtext [CenteredTextFrame] [width=fit, location=middle] \defineenvironment [CenteredText] [before=\startCenteredTextFrame\startlines, after=\stoplines\stopCenteredTextFrame] \starttext \startCenteredText[text={This is a test}] My own parm is: \environmentparameter{text} \stopCenteredText \stoptext Thanks Wolfgang for the insight. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Dimensions
How do I specify a dimension that is an arithmetic expression? For example, \framed[width=\textwidth-12pt]{} Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering a defined text frame
On Mon January 26 2009 10:57:23 am Wolfgang Schuster wrote: Am 26.01.2009 um 17:51 schrieb Bart C. Wise: Thanks Wolfgang for the insight. Here is one that did exactly you wrote, nothing else. \defineframedtext[CenteredTextFrame][width=fit,location=middle] \def\startCenteredText {\dosingleempty\dostartCenteredText} \def\dostartCenteredText[#1]% {\bgroup \iffirstargument \def\docommand##1{\getparameters[][##1]}% \processcommalist[#1]\docommand \fi \startCenteredTextFrame} \def\stopCenteredText {\stopCenteredTextFrame \egroup} \starttext \startCenteredText[myownparm=This is a test] \startlines My own parm is: \myownparm \stoplines \stopCenteredText \stoptext Yes, a much simpler solution, but I appreciate having both. Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Dimensions
On Mon January 26 2009 11:12:48 am Hans Hagen wrote: Bart C. Wise wrote: How do I specify a dimension that is an arithmetic expression? For example, \framed[width=\dimexpr\textwidth-12pt\relax]{} Thanks Hans. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Centering a defined text frame
I'm trying to have a centered text frame. There are two examples in the code below. 1) This one works. It uses a text frame that is in line in the code. 2) This one does not work! It's using a defined text frame and flushes the text frame to the left. How do I fix this? Thanks, Bart \defineframedtext[CenteredText][width=fit] \starttext % This one works! \startalignment[center] \dontleavehmode \framedtext[width=fit]{ \startlines The quick brown fox jumps over the lazy dog. \stoplines } \stopalignment % This one fails! \startalignment[center] \dontleavehmode \startCenteredText \startlines The quick brown fox jumps over the lazy dog. \stoplines \stopCenteredText \stoptext ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering a defined text frame
Oh, I feel stupid. I think I need some more sleep. Thanks for the tip. Bart In analogy to \framedtext after a define of a framedtext I expect that that you should use \CenteredText{...} And indeed. \defineframedtext[CenteredText][width=fit] % This one fails! \startalignment[center] \dontleavehmode \CenteredText{ \startlines The quick brown fox jumps over the lazy dog. \stoplines} %\stopCenteredText Willi On Jan 24, 2009, at 3:30 PM, Bart C. Wise wrote: \defineframedtext[CenteredText][width=fit] \starttext % This one works! \startalignment[center] \dontleavehmode \framedtext[width=fit]{ \startlines The quick brown fox jumps over the lazy dog. \stoplines } \stopalignment % This one fails! \startalignment[center] \dontleavehmode \startCenteredText \startlines The quick brown fox jumps over the lazy dog. \stoplines \stopCenteredText \stoptext ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] New wiki
Is the google search going to be moved to the new wiki? I found it to be an invaluable tool. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Questions about tables
On Wednesday 21 January 2009 06:16:36 pm Cecil Westerhof wrote: I have the following table: \starttable[|cp(.12\textwidth)|cp(.12\textwidth)|cp(.18\textwidth)|cp(.18\t extwidth)|cp(.12\textwidth)|cp(.12\textwidth)|cp(.12\textwidth)|] \HL \CL[darkyellow]\SR \VL Verwerkt \VL Datum \VL Km-stand \VL Kilometers \VL c/l \VL Liter \VL Prijs \VL \SR \HL \VL \VL \VL \VL\VL \VL \VL \VL \SR \HL \stoptable There are two problems with it: - The horizontal line at the top disappears because of the color. Is there a way to get it back? - The table is on the right side of the paper. How can I get it centered on the page? Also is it possible to let the rows fill the complete page? I mean: if there is room for 40 rows, that there are automatically 40 rows. Cecil, Here's a stab. It uses a macro that Wolfgang wrote on getting the line count to automatically populate the page. However, there's one caveat, I could not start the table at the beginning of the page, I had to put a .\par in first. Other than that, it works. \setupcolors[state=start] \showframe \def\TEntry#1#2#3#4#5#6{ \bTR \bTD #1 \eTD \bTD #2 \eTD \bTD #3 \eTD \bTD #4 \eTD \bTD #5 \eTD \bTD #6 \eTD \eTR } \setupTABLE[c][each][align=middle,height=\lineheight] \setupTABLE[r][1][background=color,backgroundcolor=darkyellow] \setupTABLE[c][each][width=0.12\textwidth] \setupTABLE[c][3,4][width=0.18\textwidth] \starttext .\par \startalignment[middle] \dontleavehmode \bTABLE \bTR \bTD Verwerkt \eTD \bTD Datum \eTD \bTD Km-stand \eTD \bTD Kilometers \eTD \bTD c/l \eTD \bTD Liter \eTD \eTR \getnoflines{\dimexpr\pagegoal-\pagetotal-3\lineheight\relax}% \dorecurse{\noflines}{\TEntry{}{}{}{}{}{}} \eTABLE \stopalignment \stoptext Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF Meta Tags
On Tue January 20 2009 7:06:58 am Henning Hraban Ramm wrote: 2009/1/20 Bart C. Wise bntgcont...@wiseguysweb.com: I talked to the publisher again and he said that he would send me the exact error message, but I have not received it yet. But he did say that his printing shop wants the ability to download just the header information from a pdf rather than the whole pdf file which may be up to 80 mbytes. From that header information they will have the ability to render individual pages rather than the whole document. For example, they could request page 264 and render that single page as a jpeg. This sounds like web optimized PDFs, those contain a second object index at the start (normal PDFs have it at the end), so a *browser* can request selected pages from the *webserver* without loading the whole document. It's meant as a web technology, and I never heard of anyone using it in a print workflow. But it's not impossible. Tha has *nothing* to do with tagged PDF! Tagged is a technology to enable re-flowing text contents to e.g. small devices or extracting of content for alternative readers, e.g. screenreaders. PDFs for print should *not* be tagged in this way, for it can confuse a print workflow. Printshops should adhere to printing standards like PDF/X-1a and PDF/X-3 - and these never need web optimization or tagging! Excuse the ignorance, but does LuaTeX produce a PDF based on the PDF/X-1a and PDF/X-3 standards? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF Meta Tags
On Tue January 20 2009 4:33:27 am luigi scarso wrote: On Tue, Jan 20, 2009 at 12:10 PM, Arthur Reutenauer arthur.reutena...@normalesup.org wrote: I call that BS: I've never heard of such meta tags for PDF giving the page count. The page count is in the root /Pages object per PDF specification. I still suspect Bart's publisher means the tags that are part of Tagged PDF, even if he doesn't know their actual name, and has clearly a wrong idea of what they really contain. to avoid confusione (at least to me): xmp and Tagged pdf are different things. Thanks to all for the information so far, although from all indications, it doesn't look promising. I talked to the publisher again and he said that he would send me the exact error message, but I have not received it yet. But he did say that his printing shop wants the ability to download just the header information from a pdf rather than the whole pdf file which may be up to 80 mbytes. From that header information they will have the ability to render individual pages rather than the whole document. For example, they could request page 264 and render that single page as a jpeg. Note that this is information from the publisher, not the printing shop that is doing the work, so technically, the publisher's jargon may be inaccurate, but a basic understanding of the needed functionality is there. When I get specific information from the printing shop, I'll pass it along. As a side note, I have published with them in the past, and this seems to be a recent change on their part. So I may be able to talk my way into letting them take the pdf file without the tagged information. But needless to say, I'm very concerned. If tagged pdf support is not available in ConTeXt/LuaTeX, I feel that difficulties are either here now, or at best, looming on the horizon. Thanks so much, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF Meta Tags
On Tuesday 20 January 2009 08:19:04 am Arthur Reutenauer wrote: But he did say that his printing shop wants the ability to download just the header information from a pdf rather than the whole pdf file which may be up to 80 mbytes. OK. That's not Tagged PDF. Tagged PDF's main features focus on accessibility, adding information for the visually impaired (you can, for example, tag some text as part of the page header, by contrast to the page body: an application that reads the document out loud would know not to read that part). It also allows better archiving (the PDF/A standard). All concerns very distinct from the needs of publishers. I'm just learning about XMP (Extensible Metadata Platform) which Luigi mentioned, but it doesn't really look like it contains the information you mention (although you can apparently add all sort of metadata, including images). Actually, the kind of information the printing shop asks for is available in any PDF file in a straightforward way: the very format has been designed so that all the PDF objects can be accessed directly with extreme efficience (there is a cross-reference table with the byte offsets to every object inside the file). Individual pages are objects in a PDF file; they contain references to the resources needed to render them (fonts, images, etc.), so the basic functionality to render each page individually is already present in the format. And it's been there from day one -- which is, by the way, the reason why the insides of a PDF file look so undecipherable to the human eye: it's designed to be efficient to process automatically, not to be read by a programmer. By contrast, an XML-based format would be (somewhat) more human-friendly, but much slower to parse. There's a variation on this basic feature: if you look at a PDF file over the Internet, the cross-reference table isn't conveniently located because it is at the very end of the file; so you need to download the entire file before your PDF viewer can start displaying it (I think the argument behind that design decision was that a PDF-producing application only knows the entire list of objects at the end of the first pass, and can thus output the whole file sequentially in a single pass. Of course that clashes directly with the needs of PDF-consuming applications). To circumvent this, Adobe devised a special type of object that contains the same information as the cross-reference table, which you can put at the very beginning of the file, together with the material needed to render the first pages. This is Linearized PDF (sometimes, confusingly enough, called optimized PDF). It's rather unlikely that it'd be what your printer wants (I suppose the file is already available on disk somewhere), but in any case, Ghostscript can produce it with the utility pdfopt. ConTeXt isn't able to produce it; it has been ruled that it was beyond the scope of pdfTeX and luaTeX. When I get specific information from the printing shop, I'll pass it along. I'm interested, too. But needless to say, I'm very concerned. If tagged pdf support is not available in ConTeXt/LuaTeX, I feel that difficulties are either here now, or at best, looming on the horizon. Why? There's progress made every day. Tagged PDF is indeed a problem for the moment, but it's clearly not the feature your printer asks for, and as a rule, you can be sure that if some functionality is essential to publishers, it will be added quickly to ConTeXt :-) Thanks again to all for the responses. The information has been very enlightening. I have sent an optimized (I know, badly named,) PDF file off to the publisher and I'm waiting for his response. From all indications on this thread, I'm somewhat optimistic that it will solve the problem. I'll let you know what I hear back. Thanks so much again, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] PDF Meta Tags
I received the following message from a publisher: [The PDF generator] you used flattens the file such that is has no meta tags whatsoever. We need the tags that give page separations, page count, header info, etc. How do I get those meta tags enabled? Would setting \interaction[state=start] do what's needed? Running minimals-beta. Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] t-lettrine - broken?
A while back, there was a thread that was dealing with an Findent problem in the t-lettrine package (http://www.ntg.nl/pipermail/ntg- context/2005/009097.html). The problem was that the Findent was indenting the dropped-capital then indenting the first line of text. It should only indent from the dropped- capital to the first line of text. Taco provided a fix which works. Version: 2005.02.27 However, the current t-lettrine package in the minmals - beta exhibits the old problem again: Current beta version: 2006.01.27 Can we get the minimals-beta (and subsequent versions) fixed? Thanks, Bart P.S. Much thanks to Taco for providing the t-lettrine package! ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TreatFirstLine: loss of spaces
On Thursday 15 January 2009 10:44:07 am Wolfgang Schuster wrote: Am 15.01.2009 um 18:06 schrieb Bart C. Wise: The code below changes the first line. However, there are no spaces between words and therefore, the justification is also off. You can even leave the first parameter empty and you get the same results. Am I missing something? \starttext \TreatFirstLine {\sc} {} {} {} The combined color and font effect is also possible, although one must be careful in using macros that accumulate grouping, but the commands used here are pretty save in that respect. \stoptext http://archive.contextgarden.net/message/20060102.122124.6585f872.en.html That works, but it doesn't have the options that TreatFirstLine has. Is TreatFirstLine broken? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TreatFirstLine: loss of spaces
On Thursday 15 January 2009 12:18:20 pm Hans Hagen wrote: Bart C. Wise wrote: \TreatFirstLine {\sc} {} {} { } ^ space Your output looks great. However, with the code below, I still get no spaces on the first line. because (as i mentioned in the mail) you need to add a space as fourth argument \TreatFirstLine {\sc} {} {} { } or \TreatFirstLine {\sc} {} {} {\space} (i get the impression that your mail client behaves strange and mangles the mails; at least here i get funny formatted mails; do you use html mail?) I don't use html mail (kmail), so it used a proporational font. So your ^ space was pointing to the space between the first and second paragraphs! My bad. It works! Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Framing the text area of a part page w/ tikz/pgf.
On Wednesday 14 January 2009 11:21:02 am Wolfgang Schuster wrote: \defineframedtext [partframed] [width=\textwidth, height=\textheight, rulethickness=5pt, top=\vfill, bottom=\vfill\vfill] \setuphead [part] [before=\startpartframed, after=\stoppartframed, align=middle, footer=high, header=high, placehead=yes] \starttext \part{This is part one} \stoptext Thanks Wolfgang. I like the way you implemented the solution; however, if I load the pgf/tikz libraries with your solution, it still forces the frame to the next page. Ultimately I want to load an image and have it framed for the background on the part page. I like the ability that tikz gives me to adjust the opacity of the image, which is why I tried to find a solution using tikz. So I can find a solution without tikz, but is there one that will work with tikz? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Framing the text area of a part page w/ tikz/pgf.
On Wednesday 14 January 2009 12:03:51 pm Wolfgang Schuster wrote: Am 14.01.2009 um 19:42 schrieb Bart C. Wise: Ultimately I want to load an image and have it framed for the background on the part page. I like the ability that tikz gives me to adjust the opacity of the image, which is why I tried to find a solution using tikz. So I can find a solution without tikz, but is there one that will work with tikz? How about this? \setupexternalfigures[location={local,global,default}] \setupcolors[state=start] \definecolor[partwhite][s=1,t=.8,a=1] \defineoverlay[partimage][\overlayfigure{mill}] \defineframedtext [partframed] [width=\textwidth, height=\textheight, rulethickness=5pt, background={partimage,color}, backgroundcolor=partwhite, top=\vfill, bottom=\vfill\vfill] \setuphead [part] [before=\startpartframed, after=\stoppartframed, align=middle, footer=high, header=high, placehead=yes] \starttext \part{This is part one} \stoptext Wolfgang, Thanks! That one works. And much more elegant than what I was developing. Just so I understand: background={partimage,color} : This creates the background from both the image and the backgroundcolor, correct? What does the s=1 and the a=1 do in defining the color partwhite? I can't find anything on the web. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Dynamic frame height
I'm trying to create a section at the bottom of a page that has a number of blank lines for writing notes. However, I want the frame and the lines to be automatically generated from the remaining space on the page. How do I control the number of lines and the frame height to achieve the desired results? \starttext \input tufte \blank \framed[ corner=00 ]{ \vbox{ Notes:\crlf \dorecurse{4}{\crlf\thinrule} }} \stoptext Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Dynamic frame height
Thanks Wolfgang! Bart On Monday 15 December 2008 04:48:03 pm Wolfgang Schuster wrote: Am 16.12.2008 um 00:29 schrieb Bart C. Wise: I'm trying to create a section at the bottom of a page that has a number of blank lines for writing notes. However, I want the frame and the lines to be automatically generated from the remaining space on the page. How do I control the number of lines and the frame height to achieve the desired results? \starttext \input tufte \blank \framed[ corner=00 ]{ \vbox{ Notes:\crlf \dorecurse{4}{\crlf\thinrule} }} \stoptext Thanks, Bart %\showframe \starttext \input tufte \blank \framed[corner=00,align=right,width=\textwidth] {\getnoflines{\dimexpr\pagegoal-\pagetotal-2\lineheight\relax}% Notes:\crlf \thinrules[n=\noflines]} \stoptext Wolfgang ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ! Extra \else error
When I run the code below (via minimals), I get the following error, why? enter loop ! Extra \else. \@@plniterate ...\expandafter \@@plniterate \else \fi \myloop ...by 1 \ifnum \tempcnta #1\else \repeat \fi \message {exit} l.16 \myloop{2008} Code: \newcount\startcnt \newcount\tempcnta \def\myloop#1{% \message{enter} \tempcnta=\the\startcnt% \loop \message{loop} \advance \tempcnta by 1 \ifnum\tempcnta#1\else \repeat\fi \message{exit} } \starttext \startcnt=1800 \myloop{2008} \stoptext Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ! Extra \else error
On Thursday 11 December 2008 07:17:51 am Hans Hagen wrote: Zhichu Chen wrote: Hi Bart On Thu, Dec 11, 2008 at 9:50 PM, Bart C. Wise [EMAIL PROTECTED] wrote: When I run the code below (via minimals), I get the following error, why? enter loop ! Extra \else. \@@plniterate ...\expandafter \@@plniterate \else \fi \myloop ...by 1 \ifnum \tempcnta #1\else \repeat I think the loop structure should be: \loop ... \if... ... \repeat just use: \doloop { \ifwhateveryoulike \exitloop \fi Hans, Thanks, that works. But shouldn't the other one work as well? Is there something wrong with the syntax? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ! Extra \else error
On Thursday 11 December 2008 07:29:15 am Zhichu Chen wrote: Hi Bart, On Thu, Dec 11, 2008 at 10:21 PM, Bart C. Wise [EMAIL PROTECTED] wrote: If I change the loop to be the following, I still get the same error: \def\myloop#1{% \tempcnta=\the\startcnt% \loop \advance \tempcnta by 1 \if\tempcnta=#1\else \repeat\fi } Bart No, you should define like: \def\myloop#1{% \tempcnta=\the\startcnt% \loop \advance \tempcnta by 1 \if\tempcnta#1\repeat } No \else before \repeat in this case and no \fi outside the loop. Taking a look at the definition, you could find the following code (something like that, I can't remember clearly): \def\loop#1\repeat{\def\body{#1}\iterate} \def\iterate{something to do with \body} You can see there should not be an extra \else in the \body, and you don't need the \fi to enclose it. I don't know whether I've made my point clear. Chen, Thanks. That makes sense now. However, when I take your code and run it, it only goes through 1 iteration of the loop and exits. I'm puzzled. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ! Extra \else error
On Thursday 11 December 2008 08:28:40 am Zhichu Chen wrote: Hi Bart, On Thu, Dec 11, 2008 at 11:05 PM, Bart C. Wise [EMAIL PROTECTED] wrote: Chen, Thanks. That makes sense now. However, when I take your code and run it, it only goes through 1 iteration of the loop and exits. I'm puzzled. Bart Really? 'cause when I run the following code === \newcount\startcnt \newcount\tempcnta \def\myloop#1{% \message{enter} \tempcnta=\the\startcnt% \loop \message{loop} \advance \tempcnta by 1 \ifnum\tempcnta#1 \repeat \message{exit}} \starttext \startcnt=1800 \myloop{2008} \stoptext === I got === systems: begin file test2 at line 14 enter loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop loop exit systems: end file test2 at line 20 ) === which infers it works for me. Anyway, I recommand you take the advanced interface as Hans has suggested. It's easier to use, makes more sense and is more ConTeXt-like. Chen, Just to make sure I wasn't going too insane, I took your code and ran it. It worked. The difference is that in the previous email you sent, you had the code like this: \if\tempcnta#1\repeat instead of this newer one: \ifnum\tempcnta#1\repeat That's why it didn't work. Thanks to all! Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Building tables at runtime via --mode= option
I'm trying to build a table in a project that will be built based on a commandline parameter. Currently, I'd like to use the --mode= command. However, I've run into a number of snags that I have attempted to solve without any luck. I've included some sample code of what I would like to do. I can do all of what I need using \doifmodeelse, etc. However, I'm looking for a more elegeant solution. Any hints/solutions are welcomed! Problems: 1) \currentmode: I cannot use this variable in my file, but it works in the source code. Question: Is the mode option okay, or is there a better way? 2) CellWidth (below) needs to be a floating point dimension, based the size of the paper. So I need to divide the size of the paper (\textwidth) by a number and make sure it stays as a dimension. 3) I tried to use \getnumber[Rounds] to span a number of columns ( \bTD[nc=\getnumber[Rounds]]) but this would not compile. Here's the error: Runaway argument? Rounds=\plusone \ifnum \tblny =\plusone \ifnum \currentcol \maximumcol \ETC. ! Paragraph ended before \getnumber was complete. Sample: \definenumber[Rounds] \setnumber[Rounds]{6} % desire: \setupnumber[Rounds]{\currentmode} % and verify that it's a number between a given range. % \currentmode comes back as undefined \definenumber[TotalCol] \setnumber[TotalCol]{\getnumber[Rounds] + 2} \def\CellWidth{0.625in} % desire: based on textwidth: \textwidth / \getnumber[TotalCol] % Needs to be floating point \starttext Rounds: \getnumber[Rounds]\crlf TotalCol: \getnumber[TotalCol]\crlf CellWidth: \CellWidth\crlf \bTABLE[align={middle,lohi},strut=no,width=\CellWidth] % Row 1 \bTR[frame=off] \bTD\eTD \bTD[nc=6] Title\eTD %desire: \bTD[nc=\getnumber[Rounds]] Title\eTD \eTR %Row 2 \bTR \bTD\eTD \dorecurse{\getnumber[Rounds]}{\expanded{\bTD\recurselevel\eTD}} \bTD\eTD \eTR %Row 3 \bTR \dorecurse{\getnumber[TotalCol]}{\expanded{\bTD\recurselevel\eTD}} \eTR \eTABLE \stoptext Thanks! Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Dangling lines.
On Monday 08 December 2008 03:40:55 am Taco Hoekwater wrote: Bart C. Wise wrote: Is there a way to tell ConTeXt to treat the author's signature (the dangling line) as part of the previous paragraph? If \nobreak didn't work, then your paragraph wasn't ended yet, and you need an extra empty line or an \endgra. Try this: \definestartstop[AuthorNote] [before={\bgroup \startnarrower\switchtobodyfont[10pt]}, after={\endgraf\nobreak\vskip-0.2ex\nobreak Author \stopnarrower \egroup \blank \noindentation}] Excellent! That works! Now the only problem I have is I have no idea what \endgraf does. I've searched the web and I'm having a difficult time getting a search term that will point me to the information. Will you give me a brief explanation or point me where to look Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Dangling lines.
On Sunday 07 December 2008 03:56:11 am Taco Hoekwater wrote: Bart C. Wise wrote: I created an Author's note (code below). It is designed to print out a note, skip a line, and then follow with the Author's signature. The problem I'm having is that ConTeXt will break the page just before the author's signature leaving it dangling on the next page. If I use a \vbox, that has problems when the notes need to go more than the current page. How do I fix the code below? \definestartstop[AuthorNote][ before={\bgroup \startnarrower \switchtobodyfont[10pt] }, after={% \vskip-0.2ex You can try adding \nobreak commands before and after the \vskip command. I added those, but it had no effect. I also tried replacing \vskip with \blank and that had no effect either (I didn't think it would). Other thoughts? Is there a way to tell ConTeXt to treat the author's signature (the dangling line) as part of the previous paragraph? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \recurselevel in a table
I'm trying to get the \recurselevel in a table; however, every time it's called, the number returned is zero. How do I get the recurselevel? \starttext \bTABLE \bTR \dorecurse{3}{\bTD Cell: \recurselevel\eTD} \eTR \eTABLE \stoptext Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Dangling lines.
I created an Author's note (code below). It is designed to print out a note, skip a line, and then follow with the Author's signature. The problem I'm having is that ConTeXt will break the page just before the author's signature leaving it dangling on the next page. If I use a \vbox, that has problems when the notes need to go more than the current page. How do I fix the code below? \definestartstop[AuthorNote][ before={ \bgroup \startnarrower \switchtobodyfont[10pt] }, after={ \vskip-0.2ex Author \stopnarrower \egroup \blank \noindentation }, ] Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] definepagebreak: problem at the end of front, body backmatter
On Wednesday 03 December 2008 05:11:23 am Wolfgang Schuster wrote: Am 02.12.2008 um 15:43 schrieb Bart C. Wise: In the sample code below, I defined the document to be doublesided and that chapters should open on the right. If the chapter ends on an odd page, I want to leave the even page completely blank (no headers, footers, page numbers, etc.). The code below works except for the last chapter in the frontmatter, bodymatter, and backmatter. For the last chapter in those divisions, the page is not blank, but has the header footers. How do I get definepagebreak to work at the end of a division? \setupheadertexts[][chapter][Deluxe Header][] \definepagebreak [ChapterPageBreak] [yes,header,footer,right]% works! except for last page in a division \setuphead[chapter][ header=empty, footer=empty, number=yes, page=ChapterPageBreak, ] \setuplayout[location=doublesided] \setuppagenumbering[ location={footer,middle}, alternative=doublesided, option=doublesided, style=\em\tfx, way=bytext, ] \starttext \startfrontmatter \completecontent \chapter {Introduction} \dorecurse{10}{\input tufte } \chapter {Second Introduction} \dorecurse{10}{\input tufte } \stopfrontmatter \startbodymatter \chapter {First Chapter} \dorecurse{10}{\input tufte } \chapter {Second Chapter} \dorecurse{9}{\input tufte } \chapter {Third Chapter} \dorecurse{8}{\input tufte } \chapter {Fourth Chapter} \dorecurse{10}{\input tufte } \stopbodymatter \startbackmatter \chapter {First Appendix} \dorecurse{10}{\input tufte } \chapter {Second Appendix} \dorecurse{10}{\input tufte } \stopbackmatter \stoptext You tried to enable doublesided documents with \setuplayout but the option location control the location of your document on the real paper, this option is usefull if you use different sizes your document and paper e.g. \setupapersize[A4][A3]. Thanks Wolfgang for your response. I'm having a little trouble understanding your response, so let me tell you what I think you said. \setuplayout should not be used to enable doublesided documents. Because that option (\setuplayout[location=doublesided] is used to control the location of your document on real paper. Is that correct? If so, then I don't need to use the \setuplayout[location=doublesided] option for the example. Correct? Doublesided documents are enable with \setuppagenumbering[alternative=doublesided], ConTeXt has also a special settings alternative={singlesided,doublesided}, this this a normal single sided document with the same margins on every page but you can use the left and right keys for \page, \setuplayer etc. So I did the following with the above code: % \setuplayout[location=doublesided] \setuppagenumbering[ location={footer,middle}, alternative=doublesided, option=doublesided, style=\em\tfx, way=bytext, ] What does the option=doublesided do? Do I need it? I'm not sure where I found that one. I still have the same problem with the last chapter in a division, the headers and the footers print out. I also tried with/without the option=doublesided. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] definepagebreak: problem at the end of front, body backmatter
On Wednesday 03 December 2008 12:09:53 pm Wolfgang Schuster wrote: Am 03.12.2008 um 19:43 schrieb Bart C. Wise: You tried to enable doublesided documents with \setuplayout but the option location control the location of your document on the real paper, this option is usefull if you use different sizes your document and paper e.g. \setupapersize[A4][A3]. Thanks Wolfgang for your response. I'm having a little trouble understanding your response, so let me tell you what I think you said. \setuplayout should not be used to enable doublesided documents. Because that option (\setuplayout[location=doublesided] is used to control the location of your document on real paper. Is that correct? Yes. If so, then I don't need to use the \setuplayout[location=doublesided] option for the example. Correct? Yes. Doublesided documents are enable with \setuppagenumbering[alternative=doublesided], ConTeXt has also a special settings alternative={singlesided,doublesided}, this this a normal single sided document with the same margins on every page but you can use the left and right keys for \page, \setuplayer etc. So I did the following with the above code: % \setuplayout[location=doublesided] \setuppagenumbering[ location={footer,middle}, alternative=doublesided, option=doublesided, style=\em\tfx, way=bytext, ] What does the option=doublesided do? Do I need it? I'm not sure where I found that one. \setuppagenumbering has no option parameter. I still have the same problem with the last chapter in a division, the headers and the footers print out. I also tried with/without the option=doublesided. Add, ConTeXt goes by default to the next right page after a sectionblock and insert the header and your pagebreak for the first chapter can't work because you're past the left page after the frontmatter you wanted to be empty. \setupsectionblock[frontpart][page=yes] \setupsectionblock[bodypart] [page=yes] \setupsectionblock[backpart] [page=yes] Wolfgang Excellent! Thanks again for your patience and wealth of knowledge! Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] definepagebreak: problem at the end of front, body backmatter
In the sample code below, I defined the document to be doublesided and that chapters should open on the right. If the chapter ends on an odd page, I want to leave the even page completely blank (no headers, footers, page numbers, etc.). The code below works except for the last chapter in the frontmatter, bodymatter, and backmatter. For the last chapter in those divisions, the page is not blank, but has the header footers. How do I get definepagebreak to work at the end of a division? \setupheadertexts[][chapter][Deluxe Header][] \definepagebreak [ChapterPageBreak] [yes,header,footer,right]% works! except for last page in a division \setuphead[chapter][ header=empty, footer=empty, number=yes, page=ChapterPageBreak, ] \setuplayout[location=doublesided] \setuppagenumbering[ location={footer,middle}, alternative=doublesided, option=doublesided, style=\em\tfx, way=bytext, ] \starttext \startfrontmatter \completecontent \chapter {Introduction} \dorecurse{10}{\input tufte } \chapter {Second Introduction} \dorecurse{10}{\input tufte } \stopfrontmatter \startbodymatter \chapter {First Chapter} \dorecurse{10}{\input tufte } \chapter {Second Chapter} \dorecurse{9}{\input tufte } \chapter {Third Chapter} \dorecurse{8}{\input tufte } \chapter {Fourth Chapter} \dorecurse{10}{\input tufte } \stopbodymatter \startbackmatter \chapter {First Appendix} \dorecurse{10}{\input tufte } \chapter {Second Appendix} \dorecurse{10}{\input tufte } \stopbackmatter \stoptext Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Centering an image in framed.
I am using framed and externalfigure commands. I want to put a rule around the image; however, the image has space around all sides. It appears that the top, right, and left sides has the same gap. However, the bottom side has a huge (by comparison) gap. So I can't use a negative offset to fix the problem. How do I center the image place a border? \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{% \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm] } Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering an image in framed.
On Wednesday 03 December 2008 12:23:05 am Bart C. Wise wrote: I am using framed and externalfigure commands. I want to put a rule around the image; however, the image has space around all sides. It appears that the top, right, and left sides has the same gap. However, the bottom side has a huge (by comparison) gap. So I can't use a negative offset to fix the problem. How do I center the image place a border? \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{% \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm] } Thanks, Bart Solved! I figured it out (after 400 attempts). By adding the strut=no, that centered the picture without differing offsets, then I added the offset=0pt. Now the image is centered with a border. \framed[ frameoffset=0pt, height=fit, location=middle, rulethickness=1.0pt, offset=0pt, strut=no, width=fit, ]{% \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm] } ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] End Notes and Minimals
Hans, I tried the changes, but now footnotes do not appear at all! Here's a copy of the code that I used (combining both Hans' and Taco's changes -- although I tried several variants). local s = lpeg.Ct(lpeg.splitat(,)) local h = { } function commands.doifcommonelse(a,b) local ha = h[a] local hb = h[b] if not ha then ha = {s:match(a)} h[a] = ha end if not hb then hb = {s:match(b)} h[b] = hb end for i=1,#ha do for j=1,#hb do if ha[i] == hb[j] then return cs.testcase(true) end end end return cs.testcase(false) end function commands.doifinsetelse(a,b) local hb = h[b] if not hb then hb = {s:match(b)} h[b] = hb end for i=1,#hb do if a == hb[i] then return cs.testcase(true) end end return cs.testcase(false) end Ideas? Thanks, Bart On Thursday 27 November 2008 03:17, Hans Hagen wrote: local s = lpeg.Ct(lpeg.splitat(,)) local h = { } function commands.doifcommonelse(a,b) local ha = h[a] local hb = h[b] if not ha then ha = s:match(a) h[a] = ha end if not hb then hb = s:match(b) h[b] = hb end for i=1,#ha do for j=1,#hb do if ha[i] == hb[j] then return cs.testcase(true) end end end return cs.testcase(false) end function commands.doifinsetelse(a,b) local hb = h[b] if not hb then hb = s:match(b) h[b] = hb end for i=1,#hb do if a == hb[i] then return cs.testcase(true) end end return cs.testcase(false) end ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] End Notes and Minimals
Thanks Wolfgang. I looked at Taco's diff file and changed the routines in syst-lua.lua. However, I followed you're lead and changed core-job.lua and it works! Yes the footnotes come out. New problem (also happens on MkII), if there are a lot of end notes, instead of going to the next page after the first page is filled, they go to the bottom of the first page and dissappear off the bottom. The page count appears to be correct, but the notes are the second page. How to I get the footnotes (end notes) to appear on more than one page. I'm using footnote/placefootnotes combination to product the end notes. Help! Bart On Thursday 27 November 2008 13:04, Wolfgang Schuster wrote: Am 27.11.2008 um 20:44 schrieb Bart C. Wise: Hans, I tried the changes, but now footnotes do not appear at all! Here's a copy of the code that I used (combining both Hans' and Taco's changes -- although I tried several variants). local s = lpeg.Ct(lpeg.splitat(,)) local h = { } function commands.doifcommonelse(a,b) local ha = h[a] local hb = h[b] if not ha then ha = {s:match(a)} h[a] = ha end if not hb then hb = {s:match(b)} h[b] = hb end for i=1,#ha do for j=1,#hb do if ha[i] == hb[j] then return cs.testcase(true) end end end return cs.testcase(false) end function commands.doifinsetelse(a,b) local hb = h[b] if not hb then hb = {s:match(b)} h[b] = hb end for i=1,#hb do if a == hb[i] then return cs.testcase(true) end end return cs.testcase(false) end Ideas? You should tell us what you have done, I replaced the old function in core-job.lua with the new from Hans and I get endnotes with your test file. Wolfgang ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] End Notes and Minimals
On Thursday 27 November 2008 14:00, Wolfgang Schuster wrote: Am 27.11.2008 um 21:43 schrieb Bart C. Wise: Thanks Wolfgang. I looked at Taco's diff file and changed the routines in syst-lua.lua. However, I followed you're lead and changed core-job.lua and it works! Yes the footnotes come out. New problem (also happens on MkII), if there are a lot of end notes, instead of going to the next page after the first page is filled, they go to the bottom of the first page and dissappear off the bottom. The page count appears to be correct, but the notes are the second page. Do you know if this is font dependent, I had a similiar problem with footnotes and Garamond not so long ago (also MkII and MkIV). How to I get the footnotes (end notes) to appear on more than one page. I'm using footnote/placefootnotes combination to product the end notes. Help! Example!!! Yes, I should have given an example. I tried a test program and it worked just fine. So I'll take my current project and attempt to reduce it down to something simple. It's probably something I'm doing wrong. I'll start a new thread if I can't figure it out. Thanks to Hans, Taco and Wolfgang for helping with the issue. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] End Notes and Minimals
Hans, What's the chances on getting this fixed? Or is there a stable branch somewhere that I can grab? Thanks! Bart On Tuesday 25 November 2008 11:47:38 am Wolfgang Schuster wrote: Am 25.11.2008 um 19:39 schrieb Bart C. Wise: Below are four different ways I've tried to get endnotes to work. When I compile with texexec it work fine --- I get endnotes. However, when I compile with texexec --lua the footnotes are placed on the page where they are referenced. I would prefer to have the footnote/placefootnotes work so that I can easily change the output. Any ideas? *** #1 \setupfootnotes[location=none] \starttext \dorecurse{100}{test \footnote{eee}\endgraf} \page \placefootnotes[location=none] \stoptext *** #2 \setupfootnotes[location=none] \starttext \dorecurse{100}{test \footnote{eee}\endgraf} \page \placefootnotes \stoptext *** #3 \setupnote[endnote][location=none] \starttext \dorecurse{100}{test \endnote{eee}\endgraf} \page \placenotes[endnote] \stoptext *** #4 \starttext \dorecurse{6}{ \input tufte \endnote{\input knuth\relax} } \page \placenotes[endnote] \stoptext It's a bug in the \expdoifcommonelse macro used in MkIV, it evaluates always the true value and you get footnotes. Here is a example for Hans: \starttext \doifcommonelse{text,page}{none} {true} {false} \expdoifcommonelse{text,page}{none} {true} {false} \stoptext Wolfgang ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimals, Linux OSFONTDIR
Taco, Thanks for the hint. It works! Bart On Tuesday 25 November 2008 12:20:01 am Taco Hoekwater wrote: Bart C. Wise wrote: I have more that two path for my fonts: - /usr/local/share/fonts -/usr/share/fonts When I do one path, it works fine; however, if I put two paths as follows: export OSFONTDIR=/usr/local/share/fonts:/usr/share/fonts it does not pick up the fonts in both directories. Admitedly, this is my fault, but could someone help out? You could create a new directory, say: /home/bart/context-os-fonts and add (sym)links to /usr/local/share/fonts and /usr/share/fonts in that (I myself have added extra symlinks inside /usr/share/fonts). Best wishes, Taco ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimals \placefootnotes
Anyone have any thoughts? On Monday 24 November 2008 01:30:09 pm Bart C. Wise wrote: I have loaded the minimals packaging on my system. In running through some code I'm finding that \placefootnotes does not appear to be working (or at least it's different than MkII. With the minimals, the footnotes always appear at the bottom of the page, not where the \placefootnotes command is placed. Is this a bug, or do I need to make some changes? \setupfootnotes[location=text] \starttext Here is a footnote.\footnote{Here's the first footnote} And yet, another. \footnote{The second.} \placefootnotes Here is some more text, with another footnote.\footnote{The third footnote.} \placefootnotes \stoptext Thanks, Bart ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimals, Linux OSFONTDIR
On Tuesday 25 November 2008 03:48:29 am Khaled Hosny wrote: On Mon, Nov 24, 2008 at 09:56:20PM -0700, Bart C. Wise wrote: I have more that two path for my fonts: - /usr/local/share/fonts -/usr/share/fonts When I do one path, it works fine; however, if I put two paths as follows: export OSFONTDIR=/usr/local/share/fonts:/usr/share/fonts use ; not : export OSFONTDIR=/usr/local/share/fonts;/usr/share/fonts Regards, Unfortunately, in a bash shell under Linux, the semi-colon (;) is used to separate commands, so this sets the OSFONTDIR to /usr/local/share/fonts and then tries to execute the command /usr/share/fonts, which of course it cannot do because it's a directory. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimals, Linux OSFONTDIR
On Tuesday 25 November 2008 06:45:23 am Khaled Hosny wrote: On Tue, Nov 25, 2008 at 06:24:51AM -0700, Bart C. Wise wrote: On Tuesday 25 November 2008 03:48:29 am Khaled Hosny wrote: On Mon, Nov 24, 2008 at 09:56:20PM -0700, Bart C. Wise wrote: I have more that two path for my fonts: - /usr/local/share/fonts -/usr/share/fonts When I do one path, it works fine; however, if I put two paths as follows: export OSFONTDIR=/usr/local/share/fonts:/usr/share/fonts use ; not : export OSFONTDIR=/usr/local/share/fonts;/usr/share/fonts Regards, Unfortunately, in a bash shell under Linux, the semi-colon (;) is used to separate commands, so this sets the OSFONTDIR to /usr/local/share/fonts and then tries to execute the command /usr/share/fonts, which of course it cannot do because it's a directory. I should have escaped it, sorry: export OSFONTDIR=/usr/local/share/fonts;/usr/share/fonts That works! Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] End Notes and Minimals
I've tried several things to get end notes working with the Minimals distribution (MkIV). However, nothing seems to work and what worked for MkII does not work now. Is there a new method for getting end notes in MkIV? Thank, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] End Notes and Minimals
Below are four different ways I've tried to get endnotes to work. When I compile with texexec it work fine --- I get endnotes. However, when I compile with texexec --lua the footnotes are placed on the page where they are referenced. I would prefer to have the footnote/placefootnotes work so that I can easily change the output. Any ideas? *** #1 \setupfootnotes[location=none] \starttext \dorecurse{100}{test \footnote{eee}\endgraf} \page \placefootnotes[location=none] \stoptext *** #2 \setupfootnotes[location=none] \starttext \dorecurse{100}{test \footnote{eee}\endgraf} \page \placefootnotes \stoptext *** #3 \setupnote[endnote][location=none] \starttext \dorecurse{100}{test \endnote{eee}\endgraf} \page \placenotes[endnote] \stoptext *** #4 \starttext \dorecurse{6}{ \input tufte \endnote{\input knuth\relax} } \page \placenotes[endnote] \stoptext Help!! Bart On Tuesday 25 November 2008 06:57:58 am Bart C. Wise wrote: I've tried several things to get end notes working with the Minimals distribution (MkIV). However, nothing seems to work and what worked for MkII does not work now. Is there a new method for getting end notes in MkIV? Thank, Bart ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Minimals \placefootnotes
I have loaded the minimals packaging on my system. In running through some code I'm finding that \placefootnotes does not appear to be working (or at least it's different than MkII. With the minimals, the footnotes always appear at the bottom of the page, not where the \placefootnotes command is placed. Is this a bug, or do I need to make some changes? \setupfootnotes[location=text] \starttext Here is a footnote.\footnote{Here's the first footnote} And yet, another. \footnote{The second.} \placefootnotes Here is some more text, with another footnote.\footnote{The third footnote.} \placefootnotes \stoptext Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Minimals, Linux OSFONTDIR
I have more that two path for my fonts: - /usr/local/share/fonts -/usr/share/fonts When I do one path, it works fine; however, if I put two paths as follows: export OSFONTDIR=/usr/local/share/fonts:/usr/share/fonts it does not pick up the fonts in both directories. Admitedly, this is my fault, but could someone help out? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.
I think the error I got was not having enough sleep :-) because I worked on it this morning and it's working. I'll tack on my current file below. The font features does not seem to make any difference. However, I took the same typescript and modified it for the Tallys font and I can turn ligatures on/off, kerning on/off, etc. But the same typescript for the Adobe Garamond does not work, I'm perplexed and a bit frustrated. I greatly appreciate your help thus far. Bar \definefontfeature[default] [liga=yes, kern=yes, tlig=yes, script=latn, mapping=tex-text] \starttypescript[serif][agaramond] \definefontsynonym[AGaramondRegular] [name:AGaramond-Regular] [features=default] \stoptypescript \starttypescript[serif][agaramond][name] \definefontsynonym [Serif] [AGaramondRegular] [features=default] \stoptypescript \starttypescript[AGaramond] \definetypeface[MyGaramond][rm][serif][agaramond][default][features=default] \stoptypescript \usetypescript[AGaramond]%[ec] \setupbodyfont[MyGaramond, 12pt] \starttext Ydes, Yffignac and Ygrande fi ff ffi Two of [of] (of) \quote{of} \quotation{of} of? of! of*. \quote{Ask Jeff} \quotation{Ask Jeff} \stoptext On Friday 21 November 2008 09:01:13 am Mojca Miklavec wrote: On Fri, Nov 21, 2008 at 6:40 AM, Bart C. Wise wrote: Mojca, Thanks for all you time in helping out. I'm still having problems. The \quote and \quotation work. However, as you pointed out, the en, em and apostrophe do not work. In addition, [features=default] did not compile, but [feature=default] did. What error did you get? In that case feature=default has been ignored (unknown parameters get ignored in ConTeXt), that's why it didn't complain, but it didn't work either. Here's what I'm working with: \starttypescript[serif][agaramond] \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] [feature=default] \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][feature=default] \definefontsynonym[AGaramondBold] [name:AGaramond-Bold] [feature=default] \definefontsynonym[AGaramondBoldIt] [name:AGaramond-BoldItalic] [feature=default] \stoptypescript \starttypescript[serif][agaramond][name] \definefontsynonym [Serif] [AGaramondRegular] \definefontsynonym [SerifItalic] [AGaramondItalic] \definefontsynonym [SerifBold] [AGaramondBold] \definefontsynonym [SerifBoldItalic] [AGaramondBoldIt] \stoptypescript \starttypescript[agaramond] \definetypeface[agaramond][rm][serif][agaramond][default][feature=default ] \stoptypescript \usetypescript[agaramond] \setupbodyfont[agaramond, 12pt] \definefontfeature[default] [liga=yes, kern=yes, tlig=yes, script=latn, mapping=tex-text] Any more hints? I don't see anything else being fundamentally wrong (you don't need both mapping=tex-text and tlig=yes though, but that should not break compilation). May I ask for the logs? Mojca ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.
Fontforge shows no ligatures for Adobe Garamond; however, it does show ligatures for the Tallys fonts. So that probably explains why there are no ligatures. However, the font has a lot of kerning pairs, but I don't seem to be able turn those on/off with the \definefontfeature directive as I could do in the Tallys font. And back to the original problem, en dash, em dash, quotes that work in other fonts don't work here. I can use \emdash, \endash, \quotesingle, etc., but this creates more work when you get text from an author and is more prone to error. So is this a font problem? Or is this something I'm doing wrong (and what)? Thanks once again, Bart On Friday 21 November 2008 10:00:14 am Mojca Miklavec wrote: On Fri, Nov 21, 2008 at 5:47 PM, Bart C. Wise wrote: I think the error I got was not having enough sleep :-) because I worked on it this morning and it's working. I'll tack on my current file below. The font features does not seem to make any difference. However, I took the same typescript and modified it for the Tallys font and I can turn ligatures on/off, kerning on/off, etc. But the same typescript for the Adobe Garamond does not work, I'm perplexed and a bit frustrated. I'm not sure if we're talking about the same problem, but I remember that I had to try *all* different variants of Garamond when I needed fi ligature and only a single font had the proper weight and that ligature (I ended up using ITCGaramondStd-Lt and ITCGaramondStd-LtIta after wasting way too much time trying to figure out what was wrong). Did you check if the desired ligatures are available at all in the font you are using? Mojca ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.
On Friday 21 November 2008 11:11:39 am Wolfgang Schuster wrote: Am 21.11.2008 um 18:25 schrieb Bart C. Wise: Fontforge shows no ligatures for Adobe Garamond; however, it does show ligatures for the Tallys fonts. So that probably explains why there are no ligatures. However, the font has a lot of kerning pairs, but I don't seem to be able turn those on/off with the \definefontfeature directive as I could do in the Tallys font. And back to the original problem, en dash, em dash, quotes that work in other fonts don't work here. I can use \emdash, \endash, \quotesingle, etc., but this creates more work when you get text from an author and is more prone to error. So is this a font problem? Or is this something I'm doing wrong (and what)? Give us more information, what format does your Garamond font has (type1, truetype or opentype). Have you tried to load the font without ConTeXts interface: \font\garamond=AGaramond-Regular:mapping=tex-text \garamond fi ffi -- --- ``text'' fl \bye Can you try to test your typescript with MkIV if this makes a difference and finally, what is the output from mtxrun --script fonts --list AGaramond* --info. Wolfgang The above code works, the -- and --- get translated to endash and emdash, the quotes look great. Still no ligatures, but it doesn't seem that the font has any. I have no MkIV setup, and I'm in the middle of a project, so now is not a good time to switch. Is there a convenient way to try on TeXLive2008 without changing my current setup? If so, I'll give it a whirl. $ mtxrun --script fonts --list AGaramond* --info MtxRun | error unable to identify cnf file MtxRun | error unable to identify cnf file MtxRun | no cnf files found (TEXMFCNF may not be set/known) MtxRun | unknown script: fonts Something wrong with my TeXLive2008 installation? Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] startstandardmakeup and page numbering
I use a standardmakeup to define a part page. However, when I do so, the page counter does not get incremented. Therefore, after every part, the page numbers are inaccurate. Is there a way to keep the page counter incrementing on a standardmakeup? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \placecontent doesn't place content after \chapter{}
The code below displays the Contents chapter header; however, the table of contents is not shown. If I remove the \chapter{Contents}, then the table of contents is displayed. What's wrong? \starttext \chapter{Contents} \placecontent \chapter{One}\input tufte \chapter{Two}\input tufte \chapter{Three}\input tufte \stoptext Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \placecontent doesn't place content after \chapter{}
On Thursday 20 November 2008 03:05:20 pm Hans Hagen wrote: Bart C. Wise wrote: The code below displays the Contents chapter header; however, the table of contents is not shown. If I remove the \chapter{Contents}, then the table of contents is displayed. What's wrong? by default you will get a local table of contents (add some section and you will see it) \starttext \chapter{Contents} \placecontent \placelist[criterium=text] I had to do this: \placelist[chapter][criterium=text] Thanks for the hint! Bart \chapter{One}\input tufte \chapter{Two}\input tufte \chapter{Three}\input tufte \stoptext Thanks, Bart _ __ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.
Mojca, Thanks for all you time in helping out. I'm still having problems. The \quote and \quotation work. However, as you pointed out, the en, em and apostrophe do not work. In addition, [features=default] did not compile, but [feature=default] did. Here's what I'm working with: \starttypescript[serif][agaramond] \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] [feature=default] \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][feature=default] \definefontsynonym[AGaramondBold] [name:AGaramond-Bold] [feature=default] \definefontsynonym[AGaramondBoldIt] [name:AGaramond-BoldItalic] [feature=default] \stoptypescript \starttypescript[serif][agaramond][name] \definefontsynonym [Serif] [AGaramondRegular] \definefontsynonym [SerifItalic] [AGaramondItalic] \definefontsynonym [SerifBold] [AGaramondBold] \definefontsynonym [SerifBoldItalic] [AGaramondBoldIt] \stoptypescript \starttypescript[agaramond] \definetypeface[agaramond][rm][serif][agaramond][default][feature=default] \stoptypescript \usetypescript[agaramond] \setupbodyfont[agaramond, 12pt] \definefontfeature[default] [liga=yes, kern=yes, tlig=yes, script=latn, mapping=tex-text] Any more hints? Bart On Thursday 20 November 2008 09:44:05 pm Mojca Miklavec wrote: On Fri, Nov 21, 2008 at 5:14 AM, Bart C. Wise wrote: The code below is used to load the Adobe Garmond fonts. The problem is that quotes (``) produces two single quotes. Similar with dashes: an en dash produces to dashes, an em dash likewise produces three dashes. What am I doing wrong (again)! Hello, If you are using pdfTeX, then it's the fault of your fonts. (The one that prepared the metrics forgot to add the proper ligatures to the font. This is not trivial to make.) But then - if you are using pdfTeX, there should be no name: in font declaration. name: is more or less reserved for filename of otf/ttf fonts in XeTeX and LuaTeX. If you are using XeTeX or LuaTeX, then you should remove all the [ec] brackets and replace [encoding=ec] with [features=default]. Some clarification is needed though: 1.) You could (in theory) use some replacements for `` and to produce proper quotation marks, but for Unicode-aware engines that's highly deprecated. Better use \quotation{Here's a nicely looking quote.} or proper quotation marks. The sequence `` was a pure hack (in my opinion), but a sensible one in that time since there were no quotation marks neither on keyboards nor in encodings when Knuth wrote TeX. \quotation is a cleaner way to produce quotation marks. (I'm a bit biased though. Knuthian quotation marks never worked for my language, so I always had to figure out how to get the proper ones, and \quotation was the proper solution for me.) 2.) in LuaTeX and XeTeX there are three replacements left by default: endash, emdash and apostrophe. The main reason being that it's still a bit too difficult to: - find endash and emdash on keyboards - see the difference between the two, esp. in fixed width fonts - change the habit and type proper apostrophe instead of corresponding ascii character: ' 3.) For some reason, features=default doesn't work as it should since script=latn has been left out some time ago, so you need to fix definition of default font features. (Or maybe someone else knows how to handle this in a better way. This is what I do. I do not claim that it's the right way to do it.) \definefontfeature [default] [liga=yes,kern=yes,tlig=yes,script=latn] \starttypescript[serif][agaramond][ec] \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] [encoding=ec] \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][encoding=ec] \definefontsynonym[AGaramondBold] [name:AGaramond-Bold] [encoding=ec] \definefontsynonym[AGaramondBoldIt] [name:AGaramond-BoldItalic] [encoding=ec] \stoptypescript \starttypescript[serif][agaramond][name] \definefontsynonym [Serif] [AGaramondRegular] \definefontsynonym [SerifItalic] [AGaramondItalic] \definefontsynonym [SerifBold] [AGaramondBold] \definefontsynonym [SerifBoldItalic] [AGaramondBoldIt] \stoptypescript \starttypescript[agaramond][ec] \definetypeface[agaramond][rm][serif][agaramond][default][encoding=ec] \stoptypescript \usetypescript[agaramond][ec] \setupbodyfont[agaramond, 12pt] \starttext ``Here's a lousy looking quote.'' Here are a couple of dashes: -- Here are three: --- \stoptext Thanks, Bart Mojca ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
[NTG-context] XeTeX and lmtypewriter10-regular
I'm running TeXLive 2008. When I compile for XeTeX (texexec --xtx) I get the following output that appears to be generating the lmtypewriter10-regular font. The bad part is that this is very slow. The part that's even worse, it does this probably 20...30...40 times? A compilation takes 145 seconds, and about 130+ seconds of time seem to be dealing with lmtypewriter10-regular. This doesn't happen on small test files, so I know I'm doing something wrong. Any ideas? Thanks, Bart kpathsea: Running mktextfm lmtypewriter10-regular mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input lmtypewriter10-regular This is METAFONT, Version 2.718281 (Web2C 7.5.7) kpathsea: Running mktexmf lmtypewriter10-regular ! I can't find file `lmtypewriter10-regular'. * ...; nonstopmode; input lmtypewriter10-regular Please type another input file name ! Emergency stop. * ...; nonstopmode; input lmtypewriter10-regular Transcript written on mfput.log. grep: lmtypewriter10-regular.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input lmtypewriter10-regular' failed to make lmtypewriter10-regular.tfm. kpathsea: Appending font creation commands to missfont.log. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] XeTex Mara Font
I am currently trying to get the mara font loaded into XeTeX. Here's some information about the font (via fontforge): file: marafont.ttf Fontname: MaraFontNFPlain: Family Name: MaraFontNF Plain: (yes, the colons are in the name) I've tried a couple of ways, using both the fontname and the family name, both with and without the ending semi-colons; however, it fails at compile time. Here's some sample code: \definetypeface[Mara][rm][Xserif][MaraFontNF Plain] \starttext \startfont[Mara] This is a test. \stoptext Here's the relevant output from the log file, which looks very similar to the output of a font that works: ! Font \**\thedefinedfont**:=Mara at 12.0pt not loadable: Metric (TFM) file or installed font not found. to be read again \relax \dododefinefont ...ontspec {#2}\rawfontidentifier \let \localrelativefontsiz... \redodefinefont #1#2#3-\dododefinefont {#1}{#2} \doifsetupselse {#3} {\setup... \dodefinedfont ...ring \thedefinedfont \endcsname \the \everydefinedfont l.7 \startfont[Mara] ? ! Emergency stop. to be read again \relax \dododefinefont ...ontspec {#2}\rawfontidentifier \let \localrelativefontsiz... \redodefinefont #1#2#3-\dododefinefont {#1}{#2} \doifsetupselse {#3} {\setup... \dodefinedfont ...ring \thedefinedfont \endcsname \the \everydefinedfont l.7 \startfont[Mara] End of file on the terminal! How do I get the font loaded? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTex Mara Font
I tried prepending name and it didn't work. I also tried file:marafont, but that didn't work either. Your code yesterday was great and I have not tried to plug in the mara font into a typescript. There are some fonts that I just want to put in one section of the text without having to write a typescript. That's why I used the \definetypeface and \startfont routines. I just don't know what I'm doing wrong. Bart On Tuesday 18 November 2008 11:54:49 am Arthur Reutenauer wrote: I've tried a couple of ways, using both the fontname and the family name, both with and without the ending semi-colons; however, it fails at compile time. Have you tried prepending name: to the font name, like I explained yesterday? Arthur ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTex Mara Font
I also tried plugging it into the typescript (not what I want), but that didn't work either. I tried both the name: and the file: options. Still lost, Bart On Tuesday 18 November 2008 11:54:49 am Arthur Reutenauer wrote: I've tried a couple of ways, using both the fontname and the family name, both with and without the ending semi-colons; however, it fails at compile time. Have you tried prepending name: to the font name, like I explained yesterday? Arthur ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTex Mara Font
One thing of possible interest is that when I load the font in fontforge, I get the following warning: Bad Font Name The Postscript font name MaraFontNF Plain: is invalid. It should be printable ASCII, must not contain (){}[]%/ or space and must be shorter than 63 characters. Is the colon at the end of the name a problem? The font does work on other program on my system. Bart On Tuesday 18 November 2008 11:54:49 am Arthur Reutenauer wrote: I've tried a couple of ways, using both the fontname and the family name, both with and without the ending semi-colons; however, it fails at compile time. Have you tried prepending name: to the font name, like I explained yesterday? Arthur ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTex Mara Font
That seems to work. I just renamed the fontname and family (removing the colon), generated a new ttf and loaded that into the system. So this works: \definetypeface[MaraFontNFPlain][rm][Xserif][MaraFontNFPlain] \starttext \startfont[MaraFontNFPlain] This is a test. \stoptext And yes, the url is correct as far as where I got the font from. And yes, there were other errors (or warnings) when I generated the font; however, it does work. One quick question (again expressing my ignorance). Why can't I take the code above and change it to the following: \definetypeface[Mara][rm][Xserif][MaraFontNFPlain] \starttext \startfont[Mara] This is a test. \stoptext Thanks, Bart On Tuesday 18 November 2008 01:13:02 pm Arthur Reutenauer wrote: Is the colon at the end of the name a problem? No, the message says the problem is with the space character, but it is of little concern here (XeTeX doesn't use PostScript font names at all). Is it the font from http://www.perry.com/disney/indy/marafont.html? It seems to have quite a number of other problems actually (xdvipdfmx protests heavily when I try loading it with plain XeTeX). You could try saving it again from FontForge, and installing that modified font (you of course need to uninstall the original one from your system, or more problems will likely happen). While doing so, you can of course modify whatever seems suspicious (like the trailing colon, etc.). Arthur ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XeTex Mara Font
Wolfgang, This one does work. Thanks again, Bart On Tuesday 18 November 2008 03:28:45 pm Wolfgang Schuster wrote: Am 18.11.2008 um 23:00 schrieb Arthur Reutenauer: One quick question (again expressing my ignorance). Why can't I take the code above and change it to the following: \definetypeface[Mara][rm][Xserif][MaraFontNFPlain] \starttext \startfont[Mara] This is a test. \stoptext I have no idea ... Does it really not work? \definefontsynonym[Mara][name:MaraFontNFPlain] \starttext \startfont[Mara] This is a test. \stopfont \stoptext Wolfgang ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Fonts with XeTeX
I am having difficulties writing a typescript for the Caslon font that's on my system. The following works: \definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy] \definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic] \definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman] \starttext Testing \switchtobodyfont[Caslon-Regular] Testing \switchtobodyfont[Caslon-Bold] Testing \switchtobodyfont[Caslon-Italic] Testing \stoptext However, I tried to write a simple typescript for the same font. I came up with the following: \starttypescript[serif][caslon][uc] \definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc] \definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc] \definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc] \stoptypescript \starttypescript[serif][caslon][name] \definefontsynonym [Serif] [CaslonRegular] \definefontsynonym [SerifItalic] [CaslonItalic] \definefontsynonym [SerifBold] [CaslonBold] \stoptypescript \starttypescript[caslon][uc] \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] \stoptypescript \usetypescript[caslon][uc] \setupbodyfont[caslon, 12pt] \starttext Testing {\bf Testing} {\it Testing} \stoptext It fails to compile on the \setupbodyfont line. I know I'm doing something wrong, but every variation I've tried ends up with a compile error, or the caslon font is never loaded and it reverts back to the default font. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fonts with XeTeX
Arthur, This works! Thanks for your help. Bart On Monday 17 November 2008 02:25:15 pm Arthur Reutenauer wrote: Hello Bart, Try \starttypescript[serif][caslon][uc] \definefontsynonym[CaslonRegular][name:CaslonOldFaceBT-Roman][encoding=uc] \definefontsynonym[CaslonItalic][name:CaslonOldFaceBT-Italic][encoding=uc] \definefontsynonym[CaslonBold][name:CaslonOldFaceBT-Heavy][encoding=uc] \stoptypescript \starttypescript[serif][caslon][name] \definefontsynonym [Serif] [CaslonRegular] \definefontsynonym [SerifItalic] [CaslonItalic] \definefontsynonym [SerifBold] [CaslonBold] \stoptypescript \starttypescript[caslon][uc] \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] \stoptypescript \usetypescript[caslon][uc] \setupbodyfont[caslon, 12pt] \starttext Testing {\bf Testing} {\it Testing} \stoptext Note the two changes: \definetypeface's in the first typescript have been replaced with \definefontsynonym commands, and the font names have been prepended with name:, forcing XeTeX to look for an installed font instead of a TFM (in plain XeTeX, you get the same result by surrounding the font name with double quotes). I am unable to test the typescript because I don't have Caslon Old Face, but it works when I replace the font names with the appropriate faces from Adobe Caslon, which I have. Arthur ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning
Wolfgang, Thanks so much for your help! It works exactly as I desire. Bart On Thursday 13 November 2008 01:36:11 am Wolfgang Schuster wrote: On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise [EMAIL PROTECTED] wrote: Wolfgang, thanks so much for your help so far. I was able to take the code and make it work correctly to stretch the chapter title. What I want is two lines for a chapter head. For example, Line 1: Chapter One Line 2: Title for Chap 1 I want line 1 to be stretched. Everything I have tried does not work. I can get the Chapter word to stretch, but not the whole line (and it should probably be treated as a whole line when stretching). I was never able to get the chapter number (now a word) to stretch. So how do I grab the output for line 1 and then stretch it? Here's a sample of what I have without any stretching: \def\Myheader#1#2{% \framedtext[width=0.60\textwidth, frame=off, align=middle]{% \vbox{\headtext{chapter}~#1 \blank #2}}} \def\englishnumbers#1{ \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi} \defineconversion[englishnumbers][\englishnumbers] \setupsection[chapter][conversion=englishnumbers] \setuphead [chapter][ command=\Myheader, textcommand=\bfd, ] \setupheadtext[chapter=CHAPTER] % used by \headtext \starttext \chapter{Title for Chap 1} \processfile{tufte} \stoptext \def\Myheader#1#2% {\framed [width=0.60\textwidth, frame=off, align=middle] {\determineheadnumber[chapter] \expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\curr entheadnumber}}} \blank#2}} \def\englishnumbers#1{ \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi} \defineconversion[englishnumbers][\englishnumbers] \setuphead [chapter] [command=\Myheader, deeptextcommand=\stretchednormalcase, textstyle=\bfd] P.S. If there's a better way to do the number-word conversion, let me know. Search for \numprint in the list archive. Wolfgang ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning
On Thursday 13 November 2008 12:46:27 am Hans Hagen wrote: Bart C. Wise wrote: Wolfgang, thanks so much for your help so far. I was able to take the code and make it work correctly to stretch the chapter title. What I want is two lines for a chapter head. For example, Line 1: Chapter One Line 2: Title for Chap 1 I want line 1 to be stretched. Everything I have tried does not work. I can get the Chapter word to stretch, but not the whole line (and it should probably be treated as a whole line when stretching). I was never able to get the chapter number (now a word) to stretch. So how do I grab the output for line 1 and then stretch it? Here's a sample of what I have without any stretching: \def\Myheader#1#2{% \framedtext[width=0.60\textwidth, frame=off, align=middle]{% \vbox{\headtext{chapter}~#1 \blank #2}}} \def\englishnumbers#1{ \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi} \defineconversion[englishnumbers][\englishnumbers] \setupsection[chapter][conversion=englishnumbers] \setuphead [chapter][ command=\Myheader, textcommand=\bfd, ] \setupheadtext[chapter=CHAPTER] % used by \headtext \starttext \chapter{Title for Chap 1} \processfile{tufte} \stoptext P.S. If there's a better way to do the number-word conversion, let me know. On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote: Am 12.11.2008 um 18:03 schrieb Bart C. Wise: Okay, it works until I place an an argument in the stretched command. def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ fails-- \stretched{#2} works-- \stretched{This is a Test} } } \setuphead[chapter][ command=\MyChapterCommand } I get the following error when I run texexec: ! Missing \endcsname inserted. to be read again \let \nextprocessedtoken ...oup \ifincolor \ifcsname #1 #3\endcsname \let \dostopa... \dodoprocesstokens ...token \let \before \between \fi \let \nextprocessedtok... argument This is a test: \dostartattributes {\??ko \v!title }\c!style \c!c... \processtokens ...fore \before \doprocesstokens #5 \lastcharacter \endgroup \stretched ... \relax \hss \relax {\hss \hss }{#1} \egroup ... How can I use the #1 #2 arguments in the stretched command? You could use it only with \deeptextcommand, here is a old mail with a example from Hans (you could ignore the other code). http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.htm l look for the property mechanism \startproperty[stretch]stretched\stopproperty token processing is always tricky since the parser does not know what to expect; properties use a pdf trick; in mkiv we have more clever stretching Hans, I tried the above code and it failed. I looked around on the ConTeXt site and the web in general. It seems like a \defineproperty[stretch] needs to be declared, but I can't find it anywhere. You'll have to excuse my ignorance, but will you be explicit on how to use the \startproperty[stretch] stretch \stopproperty. Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Kerning
I am trying to change the spacing of a chapter title head. I found the \kern command; however, I could not get that to work over a string of text. Then I found the following code: \def\dolist{\afterassignment\dodolist\let\next= } \def\dodolist{\ifx\next\endlist \let\next\relax \else \\\let\next\dolist \fi \next} \def\endlist{\endlist} \def\track#1\by#2{\def\\{\next\kern#2}% \leavevmode \hbox{\expandafter\dolist#1\endlist}} Then I tried: def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ \track{This is a Test} \by{.2em} \track #2 \by{.2em} } } \setuphead[chapter][ command=\MyChapterCommand } The output from the \track{This is a Test} \by{.2em} works. However, the second track command (\track #2 \by{0.2em}) fails. I spent many hours last night trying to change the kerning. What I want is something like: \kern{TEXT}{KERNING AMOUNT}. What's available, or how do I fix the track command above. By the way,I'm running mkii. Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning
Wolfgang, It works! Thanks, Bart On Wednesday 12 November 2008 08:54:49 am Wolfgang Schuster wrote: Am 12.11.2008 um 16:48 schrieb Bart C. Wise: I am trying to change the spacing of a chapter title head. I found the \kern command; however, I could not get that to work over a string of text. Then I found the following code: \def\dolist{\afterassignment\dodolist\let\next= } \def\dodolist{\ifx\next\endlist \let\next\relax \else \\\let\next\dolist \fi \next} \def\endlist{\endlist} \def\track#1\by#2{\def\\{\next\kern#2}% \leavevmode \hbox{\expandafter\dolist#1\endlist}} Then I tried: def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ \track{This is a Test} \by{.2em} \track #2 \by{.2em} } } \setuphead[chapter][ command=\MyChapterCommand } The output from the \track{This is a Test} \by{.2em} works. However, the second track command (\track #2 \by{0.2em}) fails. I spent many hours last night trying to change the kerning. What I want is something like: \kern{TEXT}{KERNING AMOUNT}. What's available, or how do I fix the track command above. By the way,I'm running mkii. Search for \stretched and \stretchednormalcase. http://archive.contextgarden.net/message/20080815.074940.ae67f770.en.html Wolfgang ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning
Okay, it works until I place an an argument in the stretched command. def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ fails--\stretched{#2} works--\stretched{This is a Test} } } \setuphead[chapter][ command=\MyChapterCommand } I get the following error when I run texexec: ! Missing \endcsname inserted. to be read again \let \nextprocessedtoken ...oup \ifincolor \ifcsname #1 #3\endcsname \let \dostopa... \dodoprocesstokens ...token \let \before \between \fi \let \nextprocessedtok... argument This is a test: \dostartattributes {\??ko \v!title }\c!style \c!c... \processtokens ...fore \before \doprocesstokens #5 \lastcharacter \endgroup \stretched ... \relax \hss \relax {\hss \hss }{#1} \egroup ... How can I use the #1 #2 arguments in the stretched command? On Wednesday 12 November 2008 09:28:39 am Bart C. Wise wrote: Wolfgang, It works! Thanks, Bart On Wednesday 12 November 2008 08:54:49 am Wolfgang Schuster wrote: Am 12.11.2008 um 16:48 schrieb Bart C. Wise: I am trying to change the spacing of a chapter title head. I found the \kern command; however, I could not get that to work over a string of text. Then I found the following code: \def\dolist{\afterassignment\dodolist\let\next= } \def\dodolist{\ifx\next\endlist \let\next\relax \else \\\let\next\dolist \fi \next} \def\endlist{\endlist} \def\track#1\by#2{\def\\{\next\kern#2}% \leavevmode \hbox{\expandafter\dolist#1\endlist}} Then I tried: def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ \track{This is a Test} \by{.2em} \track #2 \by{.2em} } } \setuphead[chapter][ command=\MyChapterCommand } The output from the \track{This is a Test} \by{.2em} works. However, the second track command (\track #2 \by{0.2em}) fails. I spent many hours last night trying to change the kerning. What I want is something like: \kern{TEXT}{KERNING AMOUNT}. What's available, or how do I fix the track command above. By the way,I'm running mkii. Search for \stretched and \stretchednormalcase. http://archive.contextgarden.net/message/20080815.074940.ae67f770.en.html Wolfgang _ __ 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 : https://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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning
Wolfgang, thanks so much for your help so far. I was able to take the code and make it work correctly to stretch the chapter title. What I want is two lines for a chapter head. For example, Line 1: Chapter One Line 2: Title for Chap 1 I want line 1 to be stretched. Everything I have tried does not work. I can get the Chapter word to stretch, but not the whole line (and it should probably be treated as a whole line when stretching). I was never able to get the chapter number (now a word) to stretch. So how do I grab the output for line 1 and then stretch it? Here's a sample of what I have without any stretching: \def\Myheader#1#2{% \framedtext[width=0.60\textwidth, frame=off, align=middle]{% \vbox{\headtext{chapter}~#1 \blank #2}}} \def\englishnumbers#1{ \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi} \defineconversion[englishnumbers][\englishnumbers] \setupsection[chapter][conversion=englishnumbers] \setuphead [chapter][ command=\Myheader, textcommand=\bfd, ] \setupheadtext[chapter=CHAPTER] % used by \headtext \starttext \chapter{Title for Chap 1} \processfile{tufte} \stoptext P.S. If there's a better way to do the number-word conversion, let me know. On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote: Am 12.11.2008 um 18:03 schrieb Bart C. Wise: Okay, it works until I place an an argument in the stretched command. def\MyChapterCommand#1#2{ \framed[align=center,frame=off,width=\textwidth]{ \vbox{ fails--\stretched{#2} works--\stretched{This is a Test} } } \setuphead[chapter][ command=\MyChapterCommand } I get the following error when I run texexec: ! Missing \endcsname inserted. to be read again \let \nextprocessedtoken ...oup \ifincolor \ifcsname #1 #3\endcsname \let \dostopa... \dodoprocesstokens ...token \let \before \between \fi \let \nextprocessedtok... argument This is a test: \dostartattributes {\??ko \v!title }\c!style \c!c... \processtokens ...fore \before \doprocesstokens #5 \lastcharacter \endgroup \stretched ... \relax \hss \relax {\hss \hss }{#1} \egroup ... How can I use the #1 #2 arguments in the stretched command? You could use it only with \deeptextcommand, here is a old mail with a example from Hans (you could ignore the other code). http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.html Wolfgang ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Format does not match the base files
Try: texexec --make en Bart On Friday 13 June 2008 7:54:57 pm [EMAIL PROTECTED] wrote: After updating my system with rsync to get the latest binaries of context I got this message: [EMAIL PROTECTED]:~ texexec --xtx greek_exp.tex system : cont-new loaded (/home/adsm/texmf/tex/context/base/cont-new.tex FatalError : Your format does not match the base files! FormatVersion : 2007.01.12 15:56 MKII FilesVersion: 2008.05.21 15:21 I have done texhash texexec --make --all --xtx texexec --make --all --pdftex Armando ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \noindent in startstop block is not working on the text that follows the block
I defined a startstop block. However, the text that follows the block I don't want to be indented. Code \definestartstop[Center][ before={\startalignment[center]}, after={\stopalignment\noindent} ] \starttext \startCenter This is some text! \stopCenter I don't want this paragraph indent; however, it ends up being indented. \stopText \Code However, the text that follows the block is indented. How to I declare a \noindent within the startstop block definition that will work when the block is exited? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Chapter number conversion to words
I would like to display chapter headings spelling out the numbers into words. For example: Chapter One Chapter Two Chapter Three etc. I thought that I could put a conversion in the setuphead function; however, it doesn't appear to be supported. So how to I do the conversion? Thanks, Bart ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Numbers in Tables
Peter, Thanks for you input. It works great and it would have take me forever to figure that one out! Thanks, Bart On Wednesday January 30 2008, Peter Rolf wrote: Bart Wise schrieb: The code below defines a number and then on each row, displays then increments the number. The number is defined and reset to 0 before the table is declared. However, when the number is displayed in the table, it's not zero as expected, but some other number (usually between 3 and 9). The reset at reset point #1 does reset the number to 0, but it doesn't stay that way when the table is declared. The only thing I have found to work, is to define a row and column and put the reset there (see reset point #2). I would like to declare and reset the number outside of the table definition, but it doesn't seem to work. What am I doing wrong? the table is passed several times to get the size maxima, etc. your number is also incremented in every pass (how many passes?). ;) use something like this to take care of trial typesetting: \definenumber[MyNum] \def\IncrTABLEnum[#1]% {\iftrialtypesetting \hbox{00}% allocate some space in the first pass \else \getnumber[#1]\incrementnumber[#1]% \fi} \starttext \resetnumber[MyNum] % reset point #1 \bTABLE % \bTR\bTD \resetnumber[MyNum] \eTD\eTR % reset point #2 \bTR\bTD \IncrTABLEnum[MyNum] \eTD\eTR \bTR\bTD \IncrTABLEnum[MyNum] \eTD\eTR \bTR\bTD \IncrTABLEnum[MyNum] \eTD\eTR \bTR\bTD \IncrTABLEnum[MyNum] \eTD\eTR \eTABLE \stoptext best, peter \definenumber[MyNum] \starttext \resetnumber[MyNum] % reset point #1 \bTABLE % \bTR\bTD \resetnumber[MyNum] \eTD\eTR % reset point #2 \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \bTR\bTD \getnumber[MyNum]\incrementnumber[MyNum] \eTD\eTR \eTABLE \stoptext _ __ 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 : https://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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Datenumber
I have not looked for a LuaTeX-specific solution. Since LuaTeX appears to be in beta, I feel the need to wait for it to become more stable before looking into a LuaTeX solution. So, I'm still looking for a ConTeXt solution. Bart On Tuesday November 27 2007, Aditya Mahajan wrote: On Tue, 27 Nov 2007, Bart Wise wrote: LaTeX has a package called datenumber. It basically allows you to several things: 1) convert a date into a number, 2) add and subtract from that number, in essence adding and subtracting days, and 3) converting a date number into a date string. I use this package to create a yearly lesson schedule and various other similiar things. However, I have spent a considerable amount of time trying to find the same functionality in ConTeXt with no avail. Is there a solution for this? Have you looked at a lua solution using LuaTeX? 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___