[NTG-context] reverse page order and reverse page numbering in one part of a book
Dear all, I am producing a book that is divided into two sections. The book is published in English, and thus it runs left to right. Part one is an academic study in English. Part two is a critical edition of an Arabic text. The book is exactly 100 pages long, with fifty pages going to the English study, and fifty pages to the Arabic edition. In Part One (which includes all the front matter of the book, such as the table of contents, etc.): the page ordering runs left-to-right, the pagination runs from 1 to 50, and the page numbers should be printed in Arabic numerals. However, in Part Two (the Arabic text): the page ordering should run right-to-left, the page numbers should run in “reverse” pagination (in which “page 1 of the critical edition begins at the “back” of the book), and the page numbers should be printed in Hindi numerals. In other words, the structure of the book’s pages would be as follows (ellipses used to jump): 1 2 3 … 48 49 50 ٥٠ ٤٩ ٤٨ … ٣ ٢ ١ I would like the Table of Contents then to look something like this: Forward . . . . . . v English Study . . . 1 Arabic Edition. . . ١ Index of names. . . ٥٠ So my question is: is this currently possible in ConTeXt, to produce a single PDF, with such a TOC, from one file? Or am I bringing on too much of a headache upon myself, and it is easier to produce two separate files — but if so, how would one produce a TOC that includes the parts and page numbers of both documents? Many thanks, and best wishes, Talal___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] reverse page order and reverse page numbering in one part of a book
On Wed, 22 Jul 2015 14:54:17 +0200 Thomas A. Schmitz thomas.schm...@uni-bonn.de wrote: On 07/22/2015 02:45 PM, Alan BRASLAU wrote: The project/product/component mechanism can help somewhat. I also know that Thomas had written a streams module to handle the synchronization of texts. However, I am not so sure how to go about this in a real, full-fledged case with a complicated text. Correction: Thomas had a streams module written (by Hans). I used it for a bilingual document for my course material, but in the end, it turned out that using it for a real book would have been extremely complex. In my field, there are numerous books with a bilingual layout, but I guess they are all still handcrafted, i.e. manual page breaks etc. I just shudder to think what would happen if someone has to add three words on page 3 of such a book - they would have to redo every single darn pagebreak? There are several different issues. Synchronization can be line-by-line, paragraph-by-paragraph, sectionblock-by-sectionblock... or, as is the case with the posting of this thread, part-by-part (i.e. halves). The different products in multiple languages might only be synchronized by structure, not by rendering at all. Maybe Mari (and others) have regular experience in managing multilingual documents and maintaining them under modification. And I bring up this issue under the present thread as managing left-to-right mixed with right-to-left text is a further complication that Idris (and others) address regularly. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] reverse page order and reverse page numbering in one part of a book
Dear Talal, Salaam. See below: On Wed, 22 Jul 2015 03:49:29 -0600, tala...@fastmail.fm tala...@fastmail.fm wrote: Dear all, I am producing a book that is divided into two sections. The book is published in English, and thus it runs left to right. Part one is an academic study in English. Part two is a critical edition of an Arabic text. The book is exactly 100 pages long, with fifty pages going to the English study, and fifty pages to the Arabic edition. In Part One (which includes all the front matter of the book, such as the table of contents, etc.): the page ordering runs left-to-right, the pagination runs from 1 to 50, and the page numbers should be printed in Arabic numerals. However, in Part Two (the Arabic text): the page ordering should run right-to-left, the page numbers should run in “reverse” pagination (in which “page 1 of the critical edition begins at the “back” of the book), and the page numbers should be printed in Hindi numerals. In other words, the structure of the book’s pages would be as follows (ellipses used to jump): 1 2 3 … 48 49 50 ٥٠ ٤٩ ٤٨ … ٣ ٢ ١ I would like the Table of Contents then to look something like this: Forward . . . . . . v English Study . . . 1 Arabic Edition. . . ١ Index of names. . . ٥٠ So my question is: is this currently possible in ConTeXt, to produce a single PDF, with such a TOC, from one file? Or am I bringing on too much of a headache upon myself, and it is easier to produce two separate files — but if so, how would one produce a TOC that includes the parts and page numbers of both documents? For getting the Arabic pages to go the other way, I would leave that to the printer and/or post-pdf processing. After all, ConTeXt doesn't care about whether the book itself reads RTL or LTR. OTOH, you may have to reverse some of the \setuplayout parameters (such as margin and backspace) for the Arabic portion of the book. I'm sure you've seen Arthur Jeffery, Materials for the History of the Text of the Quran, for a nicely typeset example of what you are trying to do. Or even Revelation and Falsification edited by Kohlberg [a very misleading and sensationalist title by the way]. If you want to have two books in one, you *may* want to rethink this: Just have an Arabic TOC in the Arabic section (entirely RTL of course) and an English TOC in the English section. The English TOC need only point to the fact that the Arabic edition comes afterwards, and the Arabic TOC could do the same. That said: You could typeset both books as distinct products or components within a single project file - see page 20 of cont-eni.pdf (I once did two books this way). Then you can do cross-references between both books. IIRC you can then take the TOC in one product or component and place it in the other. So in the English book you can place the Arabic TOC and vice versa. Of course you will want to define a separate TOC control sequence for each. So you can get, e.g. \starttitle[title=Table of Contents] \start \LATINFONTOPTIONS \placeENGLISHcontent \stop \start \ARABICFONTOPTIONS \placeARABICcontent \stop \stoptitle which gives you exactly what you want. After all is said and done, the printer can reverse the order of the Arabic pages but that will not affect your TOC. Note that your example has English section names mapped to Arabic/Hindi page numerals (again, I would prefer a purely Arabic TOC). But your section titles in the Edition will not be in English. ConTeXt allows you to use dummy names for section title that will end up in your TOC, and this is documented in the manual I'm sure. Tangent: We need to start looking at the needs of Arabic indices in ConTeXt. Alan Braslau and Hans Hagen are already working on a new bibliography module that will eventually support RTL needs as well. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] reverse page order and reverse page numbering in one part of a book
On 07/22/2015 02:45 PM, Alan BRASLAU wrote: The project/product/component mechanism can help somewhat. I also know that Thomas had written a streams module to handle the synchronization of texts. However, I am not so sure how to go about this in a real, full-fledged case with a complicated text. Correction: Thomas had a streams module written (by Hans). I used it for a bilingual document for my course material, but in the end, it turned out that using it for a real book would have been extremely complex. In my field, there are numerous books with a bilingual layout, but I guess they are all still handcrafted, i.e. manual page breaks etc. I just shudder to think what would happen if someone has to add three words on page 3 of such a book - they would have to redo every single darn pagebreak? Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] footnotes in floating tables
I am using the following to style floating tables and am having some difficulties with footnotes in the tables. \enableregime[utf] \setupbodyfont[modern] \setupbodyfont[11pt] \setupfloats[location=middle,spacebefore=0ex,spaceafter=8ex] \setupcaptions[location=top,inbetween={\blank[0cm]},spaceafter=2ex,spacebefore=1ex,headstyle=\sc] \setupTABLE[frame=off,offset=0ex] \setupTABLE[c][distance=0.6em] \def\tableheadrulethickness{1.0pt} \defineframed[footnoteframed]\setupframed[footnoteframed][width=\hsize,frame=off,align=right,top=\hbox\bgroup,bottom=\egroup] % Use the set of symbols that has become customary in many publications for footnote marks, whose % origin seems to be lost in the misty dawn of history: \defineconversion[tablefootnoteconversion][*,†,‡,§,\textbar\textbar,¶] \starttext %%% Begin title page. \startalignment[center] {\ssb Title} \stopalignment %%% End title page. Hello. { \placetable[top,page][table]{ Caption 1. }{ \bTABLE% \bTR{}\bTD{}X \eTD\bTD{}Y\eTD\eTR% \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR% \eTABLE% } } { \setupfootnotes[conversion=tablefootnoteconversion] % MkII % \setupnotation[footnote][numberconversion=tablefootnoteconversion] % MkIV \startlocalfootnotes \setupTABLE[r][1][bottomframe=on,align=low,rulethickness=\tableheadrulethickness] \setupTABLE[r][each][align={flushleft,verytolerant,hyphenated}] % Hyphenate words in table body \setupTABLE[r][1][align={flushleft,low,verytolerant,nothyphenated}] % but not in header row. \placetable[top,page][table]{ Table 2 caption.\footnote{Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. }\footnote{Second footnote in caption.} \placelocalfootnotes }{ \placelegend{ \bTABLE% \bTR{}\bTD{}A\note[Footnote_mark_1] \eTD\bTD{}B\note[Footnote_mark_2]\eTD\eTR% \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR% \eTABLE% \footnotetext[Footnote_mark_1]{Footnote to column A. Footnote to column A. Footnote to column A. Footnote to column A.}\footnotetext[Footnote_mark_2]{Footnote to column B.} }{ \footnoteframed{\placelocalfootnotes} \stoplocalfootnotes } } } \stoptext MkII --- this comes close to what I want. - Captions are centered above the TABLE, more or less, and long captions are constrained to a width having reasonable relationship to the width of the TABLE. - Footnotes in the caption appear in a block of reasonable width at the bottom of the caption above the TABLE. - Footnotes in the TABLE appear in a block below the TABLE whose left margin matches the TABLE's left margin. - Symbols are being used for footnote marks. Problems: - I'd like the very short caption of the first table to be centered above the TABLE, but what I actually get seems to be paragraph with an invisible right margin that is centered over the TABLE, but at the text does not reach the paragraph's right margin, it looks misaligned. The same misaligment occurs in the second table's caption, though it is not so objectionable there as the footnotes' texts fill the width. - The block of footnote texts of the TABLE is not wrapped at a reasonable width --- they seem to be left-aligned, but their right margin runs off the page. - I'd like one numbering scheme for the for the whole table (caption and TABLE), such that the caption's notes are numbered *, † and the TABLE's notes are ‡, §. What I actually get is *, † for both, i.e., the numbering resets between caption and TABLE. - I'd like commas separating multiple footnote marks next to each other, as in the caption in the example. - Minor: I'd like to suppress the table from being placed on the the first page of the document as it floats above the title block, confusingly. A minor problem as realstically a table is unlikely to be placed this early in a real document. MkIV (with change from \setupfootnotes to \setupnotation[footnote] as noted) --- there are several new problems. - The caption's footnotes are not printed, though their marks are. - The TABLE's footnote marks are not printed (unknown references), but the notes themselves are (though wrongly). - The texts of all the footnotes in the TABLE are run together into a single line that doesn't break at all. ___ 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
Re: [NTG-context] hyphenation exceptions?
On 07/07/2015 05:41 PM, Arthur Reutenauer wrote: [...] That's because the word you're trying to hyphenate is Amsterdam-Buitenveldert, not Amsterdam. Compound words are by default hyphenated only at the hyphen in TeX. \setbreakpoints[compound] works in the following sample: \language[nl] \setbreakpoints[compound] \starttext \hyphenatedword{Amsterdam--Buitenveldert} \stoptext I don’t know whether it would make sense to use an en-dash for compound words in Dutch. I hope it helps now, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] hyphenation exceptions?
On Tue, Jul 07, 2015 at 03:29:11PM +, Meer, H. van der wrote: The \hyphenatedword works here too. But it does not work out when the word Amsterdam occurs in the text. See tthe two examples. In the first Amsterdam is not broken according to the \hyphenation{Am-ster-dam}-rule. In the second example the linebreak is forced by the explicit use of Am\-ster\-dam in the source text. That's because the word you're trying to hyphenate is Amsterdam-Buitenveldert, not Amsterdam. Compound words are by default hyphenated only at the hyphen in TeX. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] hyphenation exceptions?
Indeed, the combination Amsterdam-Buitenveldert is the culprit. The solution therefore is to use (it is ConTeXt afterall) Amsterdam|-|Buitenveldert, then the word Amsterdam doesn't even needs an exception. Thanks for the help. Hans van der Meer On 07 Jul 2015, at 18:00, Pablo Rodriguez oi...@gmx.esmailto:oi...@gmx.es wrote: On 07/07/2015 05:41 PM, Arthur Reutenauer wrote: [...] That's because the word you're trying to hyphenate is Amsterdam-Buitenveldert, not Amsterdam. Compound words are by default hyphenated only at the hyphen in TeX. \setbreakpoints[compound] works in the following sample: \language[nl] \setbreakpoints[compound] \starttext \hyphenatedword{Amsterdam--Buitenveldert} \stoptext I don’t know whether it would make sense to use an en-dash for compound words in Dutch. I hope it helps now, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] BBEdit Language Module for ConTeXt
On 16 Jun 2015, at 15:04, Paul Mazaitis p...@andrew.cmu.edu wrote: I've been working on a BBEdit language module to support editing ConTeXt files: https://github.com/pmazaitis/ConTeXtBBLM ...with binary releases here: https://github.com/pmazaitis/ConTeXtBBLM/releases If there are other BBEdit users here with interest, I'd appreciate feedback. Notes on feature gaps (math?), outright bugs, improvements, and/or fiddly details are all welcome. Hi, thanks a lot for sharing your module. I was using my own CLM for ConTeXt, but probably I’ll switch to yours now :-) (I especially love the addition of the callouts (TODO, etc.) to the functions/sections menu!) Some quick observations/suggestions/thoughts: ## Key/value options [] and content arguments {} The highlighting is broken when there is a space between the command word and the [bracketed options] {or arguments}; unfortunately that’s the way I use to write it ;-) It breaks also when there are line breaks involved, which is often the case when you write longer, vertical definitions, for example \setupitemgroup [Legtext] [each] [stopper=, before={\setupwhitespace[none]\blank[small]}, style=\bf, inbetween={\blank[small]}, after={\blank[medium]}, width=1.8em, …] ## Command words \,\;\: : In things like 3000\,mm the whole \,mm gets highlighted. [This may ne a legacy problem, as I should better use directly an appropriate Unicode space.] Highlighting should probably not include chars like ()|: For example in \starttabulate [|lw(.65\textwidth)|rw(.25\textwidth)|] the whole \textwidth)|rw(.25\textwidth)| part gets command-highlighted. ## Default highlight colors After installation the default highlight colors were all set to black, except for comments. (BBEdit 11.1.2 (3733).) (Though this might be as well a BBEdit problem, since they are still fighting highlighting bugs that have been introduced with the color scheme changes of vs. 11) ## Commands / keywords It’s interesting that you are offering both Command words (via pattern) and Keywords (custom list). In ConTeXt I always thought of them as the same. I’ll surely find a nice use for that :-) Thanks again, best, -- Tom ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in latest beta?
On 06/01/2015 08:45 AM, Otared Kavian wrote: Hi Pablo, Indeed the document I was talking about has been typeset with various versions of mkiv, but now I observe that sometimes the pagebreaks are made in a very strange way. Since I can’t make a minimal example, I put on the following link an excerpt of the PDF document where the bad pagebreaks can be seen: https://dl.dropboxusercontent.com/u/4316076/bad-pagebreak.pdf (Please see pages 19 and 32). It seems that this happens, sometimes, but as far as I can say from my experiments the bad pagebreak happens always before a « proclaim » which is defined as follows: [...] However it would be better to understand why the first definition does not work properly, in a rather random way. Hi Otared, having only three theorems my guess will be probably wrong, but I’ll try it. The theorem that doesn’t cause a wrong pagebreak is preceeded by a single line paragraph. In order to confirm whether this is the pattern, I would remove some words from the last paragraph on page 19, so that there has only one line. And I would add some words to the pagraph before theorem 2.3.2 on page 31, so this pargraph contains two lines. Could you check this? Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in latest beta?
On 01 Jun 2015, at 09:28, Pablo Rodriguez oi...@gmx.es wrote: […] Hi Otared, having only three theorems my guess will be probably wrong, but I’ll try it. The theorem that doesn’t cause a wrong pagebreak is preceeded by a single line paragraph. In order to confirm whether this is the pattern, I would remove some words from the last paragraph on page 19, so that there has only one line. And I would add some words to the pagraph before theorem 2.3.2 on page 31, so this pargraph contains two lines. Could you check this? Pablo -- http://www.ousia.tk Hi Pablo, Actually I have done what you suggest by adding or removing text, but at the end when the document changes all of a sudden the bad pagebreaks appear or disappear. The second definition of « proclaim » I sent you suppresses the bad pagebreaks, but in some other situations still I have other bad pagebreaks… Until I have not made a rela minimal example the problem cannot be understood and permanently solved. Best regards: OK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] vim module: modify line wrapping
Am 14.05.2015 17:26, schrieb Aditya Mahajan: I just released a newer version to t-vim where the `option=hypenated` is documented. It is also possible to hyphenate words by using \definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, ] Aditya Thank you for that solution. It doesn't work quite that way, though: 1. Only [...,option=hyphenated,...] breaks many, but not all lines. \setupalign[verytolerant,stretch] helps here. 2. [...,option={packed,hyphenated},align=hyphenated,...] doesn't work at all 3. Omitting packed, ie. [...,option=hyphenated,align=hyphenated,...] works as expected. Even single words are broken then. I will currently stick with option 1, since option 3 has a negative side effect: it inserts hyphen marks (-), which looks weird in source code. All in all I have two wishes regarding wordwrap and hyphenation, and hope they aren't too hard to grant :-) 1. Add an option to omit the hyphenation mark/sign (whatever it is actually called). 2. Add an option to indent the wrapped line to the line it was wrapped from. Remark for wish #2: Currently breaking lines look like: | This is an indented and | |broken line. | It would be nicer to have: | This is an indented and | | broken line.| Thanks for adjusting the documentation of the vim module and giving me all these options. I now have a ConTeXt produced document I can proudly release to the customer :-) Best regards, Andreas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] vim module: modify line wrapping
On Fri, 15 May 2015, Andreas Schneider wrote: Am 14.05.2015 17:26, schrieb Aditya Mahajan: I just released a newer version to t-vim where the `option=hypenated` is documented. It is also possible to hyphenate words by using \definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, ] Aditya Thank you for that solution. It doesn't work quite that way, though: 1. Only [...,option=hyphenated,...] breaks many, but not all lines. \setupalign[verytolerant,stretch] helps here. Depends on a bit on the breakpoints. Can you send an example where it doesn't work. 2. [...,option={packed,hyphenated},align=hyphenated,...] doesn't work at all It should. I'll look into this. 3. Omitting packed, ie. [...,option=hyphenated,align=hyphenated,...] works as expected. Even single words are broken then. I will currently stick with option 1, since option 3 has a negative side effect: it inserts hyphen marks (-), which looks weird in source code. I know. That is why, as I say in the documentation, option 3 is a last case resort. All in all I have two wishes regarding wordwrap and hyphenation, and hope they aren't too hard to grant :-) 1. Add an option to omit the hyphenation mark/sign (whatever it is actually called). This should be easy (provided someone can tell how to do this in normal text :-) 2. Add an option to indent the wrapped line to the line it was wrapped from. This is too difficult to do correctly, and I am not going to implement a half-baked solution. One option is to run your code through a formatter (prettifier) upfront. It is easy to plug that in to the t-vim module. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] vim module: modify line wrapping
On Thu, 14 May 2015, Aditya Mahajan wrote: On Wed, 13 May 2015, Andreas Schneider wrote: Here is an example: \usemodule[vim] \definevimtyping[JSON][syntax=javascript, lines=split, strip=yes] Add `option=hyphenated`. I just released a newer version to t-vim where the `option=hypenated` is documented. It is also possible to hyphenate words by using \definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, ] 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Setup narrower body text for sections
Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. I tried \setuphead[section][margin=3cm] but the margin applies to the heading, not to the body text of the section. Of course I could set margin=-3cm and make the entire page narrower, but then I'd also need to adjust the headers and footers to match. I thought I could perhaps use before= and after=, but those are of course before and after the heading, not before and after the body text. Is there a setup to wrap some commands around the body text? Or must I define my own \startxyz .. \stopxyz thingy, or is there a better way? Thanks, -- Kate ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setup narrower body text for sections
On 05/14/2015 06:16 PM, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. Hi Kate, a quick reply: %~ \setuphead[section][margin=-1cm] \setuphead[section][alternative=inmargin] \starttext \startsection[title=Synopsis] \input zapf \stopsection \stoptext Doesn’t any option suit your needs? I hope it may help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setup narrower body text for sections
On Thu, 14 May 2015, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. \setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}] 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setup narrower body text for sections
On 14 May 2015 at 21:33, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. \setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}] Aditya Thank you! That's exactly what I was hoping for! aftersection= doesn't appear to be documented in cont-enp.pdf :) -- Kate ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Simple but can't find
I've searched the garden for how to do the simple function of including a context macro file into another one for text and formats that I want to reuse. But, I can find nothing when I searched for intuitive words such as include, import , use and file , etc What is the command name? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Simple but can't find
On 2015-04-30 15:54, henman wrote: I've searched the garden for how to do the simple function of including a context macro file into another one for text and formats that I want to reuse. But, I can find nothing when I searched for intuitive words such as include, import , use and file , etc What is the command name? The \input command is used regularly in ConTeXt examples. It is documented in the wiki at http://wiki.contextgarden.net/Command/input. It is, essentially, the TeX \input command. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupheads separator and stopper
Am 24.04.2015 um 11:19 schrieb Csikos Bela bcsikos...@freemail.hu: Wolfgang Schuster írta: Am 23.04.2015 um 16:34 schrieb Csikos Bela: Hello list members: contextgarden wiki site http://wiki.contextgarden.net/Command/setupheads says that the \setupheads command has been reported non-working for some people. For me the alternative=inmargin/normal options work, but the separator= and stopper= options have no effect. I would like my chapter, section etc numbers to have a dot after them, eg 1. 1.1. etc. How could I achieve this? Just in curiousity, how can I change the separator? \setuphead [sectionstarter=(, sectionstopper=)] %\setupreferencestructureprefix[default][prefixstarter={\symbol[none]},prefixstopper={\symbol[none]}] \starttext \chapter[sec:chapter]{Chapter} \section[sec:section]{Section} \subsection[sec:subsection]{Subsection} Reference to chapter \in[sec:chapter] and section \in[sec:section]. \stoptext Thank you. This works for me. Just two questions: 1. The section part of the words sectionstarter and sectionstopper above is just a general term for any heading type and does not correspond to the heading type. Is this correct? (That is, there are no chapterstarter=, subsectionstarter= etc. options). No, it’s part of the key name and you have to use „sectionstopper” also for \part, \chapter etc. 2. The command you commented, \setupreferencestructureprefix, what does it supposed to do? It did not do anything for me, eg: \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}] It comes the starter and stopper from the reference number in the text, compare the result from \in with and without the \setupreferencestructureprefix setting. Based on the above I used this code tho achieve the required look: %%% \setuphead[sectionstopper=.] \starttext \chapter{Chapter} \section{Section} \subsection{Subsection} \stoptext %%% I found that \setupheads[sectionstopper=.] (plural) has the same effect. \setupheads is only a synonym for \setuphead. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupheads separator and stopper
Wolfgang Schuster írta: Am 23.04.2015 um 16:34 schrieb Csikos Bela: Hello list members: contextgarden wiki site http://wiki.contextgarden.net/Command/setupheads says that the \setupheads command has been reported non-working for some people. For me the alternative=inmargin/normal options work, but the separator= and stopper= options have no effect. I would like my chapter, section etc numbers to have a dot after them, eg 1. 1.1. etc. How could I achieve this? Just in curiousity, how can I change the separator? \setuphead [sectionstarter=(, sectionstopper=)] %\setupreferencestructureprefix[default][prefixstarter={\symbol[none]},prefixstopper={\symbol[none]}] \starttext \chapter[sec:chapter]{Chapter} \section[sec:section]{Section} \subsection[sec:subsection]{Subsection} Reference to chapter \in[sec:chapter] and section \in[sec:section]. \stoptext Thank you. This works for me. Just two questions: 1. The section part of the words sectionstarter and sectionstopper above is just a general term for any heading type and does not correspond to the heading type. Is this correct? (That is, there are no chapterstarter=, subsectionstarter= etc. options). 2. The command you commented, \setupreferencestructureprefix, what does it supposed to do? It did not do anything for me, eg: \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}] Based on the above I used this code tho achieve the required look: %%% \setuphead[sectionstopper=.] \starttext \chapter{Chapter} \section{Section} \subsection{Subsection} \stoptext %%% I found that \setupheads[sectionstopper=.] (plural) has the same effect. I guess \setupheads is the general setup for all types of headings, and \setupheads[heading-type][options] for the given heading-type. But if in the latter command I don't specify heading-type it will apply to all heading-types. Is this correct? By experimenting further I also found that: \setuphead[section][] will apply to section, subsection and subsubsection but not to chapter. \setuphead[chapter][] will apply to chapter only, and not to any ...section. Thank you, bcsikos ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupheads separator and stopper
Am 24.04.2015 um 14:07 schrieb Csikos Bela bcsikos...@freemail.hu: Wolfgang Schuster írta: 1. The section part of the words sectionstarter and sectionstopper above is just a general term for any heading type and does not correspond to the heading type. Is this correct? (That is, there are no chapterstarter=, subsectionstarter= etc. options). No, it’s part of the key name and you have to use „sectionstopper” also for \part, \chapter etc. I see. 2. The command you commented, \setupreferencestructureprefix, what does it supposed to do? It did not do anything for me, eg: \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}] It comes the starter and stopper from the reference number in the text, compare the result from \in with and without the \setupreferencestructureprefix setting. I compared the output of \in with commented and non-commented \setupreferencestructureprefix line. It does not make any difference, the two outputs are the same. Without the the \setupreferencestructureprefix line you get Reference to chapter (1) and section (1.1). and with the line Reference to chapter 1 and section 1.1. \setupheads is only a synonym for \setuphead. OK. I also tried to change the separator to dash but I couldn't. I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-] but they didn't work. How can I change that? You have to create a list of the separators with \defineseparatorset which can then be applied with the sectionseparatorset key. \defineseparatorset[mysectionseparator][x,y,z][?] \setuphead[sectionseparatorset=mysectionseparator] \setuphead[part] [placehead=yes,page=no] \setuphead[chapter][page=no] \starttext \part{Part} \chapter{Chapter} \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \subsubsubsection{Subsubsubsection} \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupheads separator and stopper
Wolfgang Schuste írta: Am 24.04.2015 um 14:07 schrieb Csikos Bela: Wolfgang Schuster írta: 1. The section part of the words sectionstarter and sectionstopper above is just a general term for any heading type and does not correspond to the heading type. Is this correct? (That is, there are no chapterstarter=, subsectionstarter= etc. options). No, it’s part of the key name and you have to use „sectionstopper” also for \part, \chapter etc. I see. 2. The command you commented, \setupreferencestructureprefix, what does it supposed to do? It did not do anything for me, eg: \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}] It comes the starter and stopper from the reference number in the text, compare the result from \in with and without the \setupreferencestructureprefix setting. I compared the output of \in with commented and non-commented \setupreferencestructureprefix line. It does not make any difference, the two outputs are the same. Without the the \setupreferencestructureprefix line you get Reference to chapter (1) and section (1.1). Yes. and with the line Reference to chapter 1 and section 1.1. No. I get the very same output as without the \setupreferencestructureprefix line. I attach the pdf outputs. My context version is: ConTeXt ver: 2014.01.03 00:40 MKIV current fmt: 2015.4.1 int: english/english I also tried to change the separator to dash but I couldn't. I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-] but they didn't work. How can I change that? You have to create a list of the separators with \defineseparatorset which can then be applied with the sectionseparatorset key. \defineseparatorset[mysectionseparator][x,y,z][?] \setuphead[sectionseparatorset=mysectionseparator] \setuphead[part] [placehead=yes,page=no] \setuphead[chapter][page=no] \starttext \part{Part} \chapter{Chapter} \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \subsubsubsection{Subsubsubsection} \stoptext This works nicely. Thanks, bcsikos commented.pdf Description: Adobe PDF document non-commented.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupheads separator and stopper
Wolfgang Schuster írta: 1. The section part of the words sectionstarter and sectionstopper above is just a general term for any heading type and does not correspond to the heading type. Is this correct? (That is, there are no chapterstarter=, subsectionstarter= etc. options). No, it’s part of the key name and you have to use „sectionstopper” also for \part, \chapter etc. I see. 2. The command you commented, \setupreferencestructureprefix, what does it supposed to do? It did not do anything for me, eg: \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}] It comes the starter and stopper from the reference number in the text, compare the result from \in with and without the \setupreferencestructureprefix setting. I compared the output of \in with commented and non-commented \setupreferencestructureprefix line. It does not make any difference, the two outputs are the same. \setupheads is only a synonym for \setuphead. OK. I also tried to change the separator to dash but I couldn't. I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-] but they didn't work. How can I change that? Thank you again, bcsikos ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index items
On 4/15/2015 11:41 PM, Robert Blackstone wrote: On 15 Apr 2015, at 19:51 , Alan BRASLAU alan.bras...@cea.fr wrote Hans Hagen pra...@wxs.nl wrote: On 4/14/2015 1:48 PM, Robert Blackstone wrote: Dear all, The book I am typesetting contains a very extensive and detailed index. The number of index items is probably around 1200, 16 pages. A fair number of them occur in more than one chapter. Like bibliography items, and for the sake of consistency, I have stored them in some auxiliary files and it is a matter of copy and paste to get them into the text in the proper place and way. (With always a risk of accidentally deleting or adding a spurious brace or bracket, with nasty results.) I wonder therefore whether it would be possible to handle them like bibliography items, by means of a key, and leave their expansion to ConTeXt. Would it be possible? And if it is not (yet) possible, how could I perhaps tackle it? so you want to remap given index entries to new ones? at what moment? We index pretty heavily now in the new bibliography dataset subsystem, that is one can create an index of authors, an index of keywords, an index of titles, etc. as well as index the pages on which a reference is cited. All of the information is there. So say that you want to create a database of anything: words, images, phrases. You can put these into the database structure and then insert them or any associated information wherever you want in your text, later producing lists and indexes. Can you give an example of what type of information you extensively index with detail? Alan Hi Alan, I realize that I have not yet reacted to Hans’ reply. So let me do that first (it was written but not yet sent). Hi Hans, Do I want to remap given index entries? Assuming I understand your reply correctly the answer is: Yes, in principle. I would want to be able to change them if there are errors, or if some publisher has different views about the presentation of titles of items that are in the index (titles of songs, for instance). And also when (parts of) the text has (have) to be reused for other purposes. Change them in one operation, that is, not by digging up all occurrences in the book of the item that has to be changed. In answer to Alan’s question: names, theoretical treatises and manuscripts, musical works, musical terms. Nearly all examples in the book have several features that have to be indexed: composer’s name, title of the published work (an opera for instance), title of the particular aria of which the example shows a fragment, and the special features that are shown in the example, parallel 7ths, for example. The not-so-minimal example below (best processed iwth mkiv) gives an impression, also of the optical clumsiness that makes the unprocessed text practically unreadable. That is another reason why I would like to be able to call an index entry by means of some sort of key, like in bibliographic items for footnotes. \startluacode document.indexentries = { [rule] = [[Rule(s)]], [ruleimperfect] = [[+ \quote{imperfect to perfect, from}]], [galilei] = [[Galilei, Vincenzo]], } function document.getindexentry(n) context(\\index[%s]{%s},n,document.indexentries[n] or ( .. n .. )) end \stopluacode \unexpanded\def\InEn[#1]% {\ctxlua{document.getindexentry(#1)}} \starttext That this rule \InEn[rule] \InEn[ruleimperfect] was not applied by everybody is for example shown in {\em Fronimo}% \InEn[galilei] etc etc Kind regards, Robert Blackstone \starttext That this rule% \index[Rule]{Rule(s)}%% \index[RuleImperfect]{ + \quote{imperfect to perfect, from}} was not applied by everybody is for example shown in {\em Fronimo}% \index[Galilei]{Galilei, Vincenzo}% \index[GalileiFronimo]{ +{\em Fronimo}}% \index[Cadence]{cadence(s)}%% \index[CadenceP]{ + plagal}% \index[PlagalCad]{plagal cadence}% \index[Fronimo]{{\em Fronimo} (Galilei)} (1584), Vincenzo Galileo's treatise on lute playing and the intabulation% \index[Intabulation]{intabulation} of vocal music. \page Artusi\index[Artusi]{Artusi, Giovanni Maria} showed examples (Ex.~4.34) with parallel 4th% \index[Dissonance]{dissonance(s)}% \index[Dissonance4]{ + 4th(s)}% \index[Dissonance4Parall]{ + + parallel}s and 7th% \index[Dissonance]{dissonance(s)}% \index[Dissonance7]{ + 7th(s)}% \index[Dissonance7Paral]{ + + parallel}s in a contrapuntally oriented fashion. These parallels were to appear in works with basso continuo around 1610 but now between the bass and the solo part. They occur in vocal and instrumental music as well as in works for keyboard solo. Most examples have parallel 7th% \index[Dissonance]{dissonance(s)}% \index[Dissonance7]{ + 7th(s)}% \index[Dissonance7Paral]{ + + parallel}s but some examples of parallel 4th% \index[Dissonance]{dissonance(s)}% \index[Dissonance4
Re: [NTG-context] Index items
On 16 Apr 2015, at 15:38 , Hans Hagen pra...@wxs.nl wrote To: mailing list for ConTeXt users ntg-context@ntg.nl Subject: Re: [NTG-context] Index items Message-ID: 552fbb35.9050...@wxs.nl Content-Type: text/plain; charset=utf-8; format=flowed On 4/15/2015 11:41 PM, Robert Blackstone wrote: On 15 Apr 2015, at 19:51 , Alan BRASLAU alan.bras...@cea.fr wrote Hans Hagen pra...@wxs.nl wrote: On 4/14/2015 1:48 PM, Robert Blackstone wrote: Dear all, The book I am typesetting contains a very extensive and detailed index. The number of index items is probably around 1200, 16 pages. A fair number of them occur in more than one chapter. Like bibliography items, and for the sake of consistency, I have stored them in some auxiliary files and it is a matter of copy and paste to get them into the text in the proper place and way. (With always a risk of accidentally deleting or adding a spurious brace or bracket, with nasty results.) I wonder therefore whether it would be possible to handle them like bibliography items, by means of a key, and leave their expansion to ConTeXt. Would it be possible? And if it is not (yet) possible, how could I perhaps tackle it? so you want to remap given index entries to new ones? at what moment? We index pretty heavily now in the new bibliography dataset subsystem, that is one can create an index of authors, an index of keywords, an index of titles, etc. as well as index the pages on which a reference is cited. All of the information is there. So say that you want to create a database of anything: words, images, phrases. You can put these into the database structure and then insert them or any associated information wherever you want in your text, later producing lists and indexes. Can you give an example of what type of information you extensively index with detail? Alan Hi Alan, I realize that I have not yet reacted to Hans’ reply. So let me do that first (it was written but not yet sent). Hi Hans, Do I want to remap given index entries? Assuming I understand your reply correctly the answer is: Yes, in principle. I would want to be able to change them if there are errors, or if some publisher has different views about the presentation of titles of items that are in the index (titles of songs, for instance). And also when (parts of) the text has (have) to be reused for other purposes. Change them in one operation, that is, not by digging up all occurrences in the book of the item that has to be changed. In answer to Alan’s question: names, theoretical treatises and manuscripts, musical works, musical terms. Nearly all examples in the book have several features that have to be indexed: composer’s name, title of the published work (an opera for instance), title of the particular aria of which the example shows a fragment, and the special features that are shown in the example, parallel 7ths, for example. The not-so-minimal example below (best processed iwth mkiv) gives an impression, also of the optical clumsiness that makes the unprocessed text practically unreadable. That is another reason why I would like to be able to call an index entry by means of some sort of key, like in bibliographic items for footnotes. \startluacode document.indexentries = { [rule] = [[Rule(s)]], [ruleimperfect] = [[+ \quote{imperfect to perfect, from}]], [galilei] = [[Galilei, Vincenzo]], } function document.getindexentry(n) context(\\index[%s]{%s},n,document.indexentries[n] or ( .. n .. )) end \stopluacode \unexpanded\def\InEn[#1]% {\ctxlua{document.getindexentry(#1)}} \starttext That this rule \InEn[rule] \InEn[ruleimperfect] was not applied by everybody is for example shown in {\em Fronimo}% \InEn[galilei] etc etc Wow, this is super! Great improvement, also for the readability of the text. Thank you very much, Hans. Kind regards, Robert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Synonyms - feature request?
On 3/25/2015 11:24 AM, robin.kirk...@csiro.au wrote: Folks, I use the synonym feature heavily as technical documents can have hundreds of them. It’s great I can produce a list of synonyms I actually use in a document. Proper style however requires that each synonym be “explained” (shown in full) the first time it is used — usually in a document, but sometimes in a smaller scope, like a part or chapter. This is something I frequently get wrong, and is something document reviewers are quick to complain about. So it would be great if Context could do this automatically. The attached MWE shows what I mean — with such a feature, the two paragraphs should come out the same. I’ve placed some (commented) guesses as to how this might be configured in \setupsynonyms. Maybe better key names can be imagined. Typically I would want synonym \XX\ to be expanded to XX (Xxx Xxx) the first time it is used (alternative a), but the reverse (alternative b), Xxx Xxx (XX) might be preferred. However a command could be used for a custom “explanation”. Internally to Context, I guess this means each group of synonyms actually used has to be complemented with a list of the synonyms that have been “explained” (i.e., \infull{}) would add them to this second list). The second list would be cleared each new scope (chapter, section). The \XX\ macro would explain the synonym if it wasn’t on the second list (using \infull{}, which would then add it). None of this would change the behaviour of \placelistof… where you would continue to select the criterium for the list you want output, independently of The only further tweak might be a scheme so that certain common synonyms (a third list) are never explained automatically (perhaps by example, UK in a document written in and for a UK audience). This list would silently added to the second list immediately after it was cleared, I guess. Synonyms for this this list would be added by a slightly different version of the synonym definition macro (perhaps \commonabbreviation instead of \abbreviation, in the MWE). Anyone think this would be a useful feature addition? Robin \definesynonyms[abbreviation][abbreviations][\infull] \setupsynonyms[abbreviation][ state=start, %explain=first,% first,always,never %explainscope=text,% text,part,chapter,section... %explainalternative=a, % a: XX (Xxx Xxx), b: Xxx Xxx (XX), command %explaincommand=COMMAND#1#2, % to format it yourself textstyle=normal, synonymstyle=\cap] \abbreviation [UN] {UN} {United Nations} \abbreviation [UK] {UK} {United Kingdom} \abbreviation [USA] {USA} {United States of America} \abbreviation [UAE] {UAE} {United Arab Emirates} %\commonabbreviation [OK] {OK} {okay} \abbreviation [OK] {OK} {okay} \setupwhitespace[medium] \starttext The \UK\ and the \USA\ are both founding members of the \UN. And I'm told the \UK\ and \USA\ are both English speaking countries. But that’s \OK. The \UK\ (\infull{UK}) and the \USA\ (\infull{USA}) are both founding members of the \UN\ (\infull{UN}). And I'm told the \UK\ and \USA\ are both English speaking countries. But that’s \OK. \placelistofabbreviations \stoptext The next beta has enough to get you going (lightweight extensions): \definesynonyms [myabbreviation] \setupsynonyms [myabbreviation] [headstyle=bold, headcolor=darkred, synonymstyle=boldslanted, synonymcolor=darkblue, textstyle=slanted, textcolor=darkgreen, style=normal, color=darkyellow] \definesorting [mylogo] \setupsorting [mylogo] [style=bold, color=darkmagenta] \myabbreviation [FIRST] {TheFirst} {The First Words} \myabbreviation [SECOND] {TheSecond} {The Second Words} \myabbreviation [THIRD] {TheThird} {The Third Words} \mylogo [FOURTH] {TheFourth} \starttext \setupsynonyms[myabbreviation][alternative=first] We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH. We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH. \resetshownsynonyms[myabbreviation] \setupsynonyms[myabbreviation][alternative=last] We have \FIRST\ and \THIRD\ or \FOURTH. We have \FIRST\ and \THIRD\ or \FOURTH. \placelistofsynonyms[myabbreviation] \placelistofsorts[mylogo] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr
Re: [NTG-context] Index items
On Tue, 14 Apr 2015 18:50:49 +0200 Hans Hagen pra...@wxs.nl wrote: On 4/14/2015 1:48 PM, Robert Blackstone wrote: Dear all, The book I am typesetting contains a very extensive and detailed index. The number of index items is probably around 1200, 16 pages. A fair number of them occur in more than one chapter. Like bibliography items, and for the sake of consistency, I have stored them in some auxiliary files and it is a matter of copy and paste to get them into the text in the proper place and way. (With always a risk of accidentally deleting or adding a spurious brace or bracket, with nasty results.) I wonder therefore whether it would be possible to handle them like bibliography items, by means of a key, and leave their expansion to ConTeXt. Would it be possible? And if it is not (yet) possible, how could I perhaps tackle it? so you want to remap given index entries to new ones? at what moment? We index pretty heavily now in the new bibliography dataset subsystem, that is one can create an index of authors, an index of keywords, an index of titles, etc. as well as index the pages on which a reference is cited. All of the information is there. So say that you want to create a database of anything: words, images, phrases. You can put these into the database structure and then insert them or any associated information wherever you want in your text, later producing lists and indexes. Can you give an example of what type of information you extensively index with detail? Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index items
On 15 Apr 2015, at 19:51 , Alan BRASLAU alan.bras...@cea.fr wrote Hans Hagen pra...@wxs.nl wrote: On 4/14/2015 1:48 PM, Robert Blackstone wrote: Dear all, The book I am typesetting contains a very extensive and detailed index. The number of index items is probably around 1200, 16 pages. A fair number of them occur in more than one chapter. Like bibliography items, and for the sake of consistency, I have stored them in some auxiliary files and it is a matter of copy and paste to get them into the text in the proper place and way. (With always a risk of accidentally deleting or adding a spurious brace or bracket, with nasty results.) I wonder therefore whether it would be possible to handle them like bibliography items, by means of a key, and leave their expansion to ConTeXt. Would it be possible? And if it is not (yet) possible, how could I perhaps tackle it? so you want to remap given index entries to new ones? at what moment? We index pretty heavily now in the new bibliography dataset subsystem, that is one can create an index of authors, an index of keywords, an index of titles, etc. as well as index the pages on which a reference is cited. All of the information is there. So say that you want to create a database of anything: words, images, phrases. You can put these into the database structure and then insert them or any associated information wherever you want in your text, later producing lists and indexes. Can you give an example of what type of information you extensively index with detail? Alan Hi Alan, I realize that I have not yet reacted to Hans’ reply. So let me do that first (it was written but not yet sent). Hi Hans, Do I want to remap given index entries? Assuming I understand your reply correctly the answer is: Yes, in principle. I would want to be able to change them if there are errors, or if some publisher has different views about the presentation of titles of items that are in the index (titles of songs, for instance). And also when (parts of) the text has (have) to be reused for other purposes. Change them in one operation, that is, not by digging up all occurrences in the book of the item that has to be changed. In answer to Alan’s question: names, theoretical treatises and manuscripts, musical works, musical terms. Nearly all examples in the book have several features that have to be indexed: composer’s name, title of the published work (an opera for instance), title of the particular aria of which the example shows a fragment, and the special features that are shown in the example, parallel 7ths, for example. The not-so-minimal example below (best processed iwth mkiv) gives an impression, also of the optical clumsiness that makes the unprocessed text practically unreadable. That is another reason why I would like to be able to call an index entry by means of some sort of key, like in bibliographic items for footnotes. Kind regards, Robert Blackstone \starttext That this rule% \index[Rule]{Rule(s)}%% \index[RuleImperfect]{ + \quote{imperfect to perfect, from}} was not applied by everybody is for example shown in {\em Fronimo}% \index[Galilei]{Galilei, Vincenzo}% \index[GalileiFronimo]{ +{\em Fronimo}}% \index[Cadence]{cadence(s)}%% \index[CadenceP]{ + plagal}% \index[PlagalCad]{plagal cadence}% \index[Fronimo]{{\em Fronimo} (Galilei)} (1584), Vincenzo Galileo's treatise on lute playing and the intabulation% \index[Intabulation]{intabulation} of vocal music. \page Artusi\index[Artusi]{Artusi, Giovanni Maria} showed examples (Ex.~4.34) with parallel 4th% \index[Dissonance]{dissonance(s)}% \index[Dissonance4]{ + 4th(s)}% \index[Dissonance4Parall]{ + + parallel}s and 7th% \index[Dissonance]{dissonance(s)}% \index[Dissonance7]{ + 7th(s)}% \index[Dissonance7Paral]{ + + parallel}s in a contrapuntally oriented fashion. These parallels were to appear in works with basso continuo around 1610 but now between the bass and the solo part. They occur in vocal and instrumental music as well as in works for keyboard solo. Most examples have parallel 7th% \index[Dissonance]{dissonance(s)}% \index[Dissonance7]{ + 7th(s)}% \index[Dissonance7Paral]{ + + parallel}s but some examples of parallel 4th% \index[Dissonance]{dissonance(s)}% \index[Dissonance4]{ + 4th(s)}% \index[Dissonance4Parall]{ + + parallel}s and 2nd% \index[Dissonance]{dissonance(s)}% \index[Dissonance2Parall]{ + + parallel}s can be found as well. \setupregister[index][indicator=yes] \completeindex[compress=yes] \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
[NTG-context] \version[temporary] in mkiv
Hi Hans, In mkii, we used to have the command \version[temporary] in the document, so that the labels for cross references would be printed in the margin, which is extremely useful when proof reading. In mkiv the command exists, but does not that: it prints only in small print the name of the file or the project information in the footer, and some black rules where the hyphenation of words has not been done. Is there any command which does what is needed for having informations about cross-referencing? In LaTeX for example, there is a package which puts the name of each labelled reference in the margin, and when one uses a certain cross reference it puts the name which is used in small print on top of the line where it is invoked. If you want I can send you an example of output where this is shown. If in mkiv there is a possibility to modify an existing feature, could you please give an indication where I have to look? If not, should I submit a request for this feature? Thanks for all your work and help. Best regards: OK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \version[temporary] in mkiv
Hi Hans, Thanks for your answer. Is the file strc-mat.mkiv the only place where I should look in order to try to modify something and achieve the functionality needed in maths papers? Best regards: OK On 11 Apr 2015, at 12:47, Hans Hagen pra...@wxs.nl wrote: On 4/11/2015 9:31 AM, Otared Kavian wrote: Hi Hans, In mkii, we used to have the command \version[temporary] in the document, so that the labels for cross references would be printed in the margin, which is extremely useful when proof reading. In mkiv the command exists, but does not that: it prints only in small print the name of the file or the project information in the footer, and some black rules where the hyphenation of words has not been done. Is there any command which does what is needed for having informations about cross-referencing? In LaTeX for example, there is a package which puts the name of each labelled reference in the margin, and when one uses a certain cross reference it puts the name which is used in small print on top of the line where it is invoked. If you want I can send you an example of output where this is shown. If in mkiv there is a possibility to modify an existing feature, could you please give an indication where I have to look? If not, should I submit a request for this feature? this functionality is currently not present (not too hard to do but needs time) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \version[temporary] in mkiv
On 4/11/2015 9:31 AM, Otared Kavian wrote: Hi Hans, In mkii, we used to have the command \version[temporary] in the document, so that the labels for cross references would be printed in the margin, which is extremely useful when proof reading. In mkiv the command exists, but does not that: it prints only in small print the name of the file or the project information in the footer, and some black rules where the hyphenation of words has not been done. Is there any command which does what is needed for having informations about cross-referencing? In LaTeX for example, there is a package which puts the name of each labelled reference in the margin, and when one uses a certain cross reference it puts the name which is used in small print on top of the line where it is invoked. If you want I can send you an example of output where this is shown. If in mkiv there is a possibility to modify an existing feature, could you please give an indication where I have to look? If not, should I submit a request for this feature? this functionality is currently not present (not too hard to do but needs time) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with ligatures (EBGaramond) and \mainlanguage[es]
On 3/26/2015 7:10 AM, Pablo Rodriguez wrote: On 03/26/2015 06:23 AM, Andrés Conrado wrote: Hello, list. When I try to use the EBGaramond font (http://www.georgduffner.at/ebgaramond/) in spanish (using \mainlanguage[es]), ligatures disappear. But they only disappear when they belong to a word (when alone, they look fine). See MWE, if you remove the comment in the \mainlanguage command, ligatures get screwed up: Hi Andrés, I’m afraid this is a proper bug. It isn’t related to Spanish as language. The bug is triggered when a the ligature has a hyphenation point at the end. Here is another mininmal example with German as main language: \mainlanguage[de] \loadtypescriptfile[ebgaramond] \setupbodyfont[ebgaramond,24pt] \starttext \hsize\zeropoint figura afigura \es figura afigura \en figura afigura \stoptext German only inserts a hyphenation point after three characters (and before other three characters). This is why the first word has the ligature and the second word doesn’t have it. English doesn’t show the bug, because it doesn’t find any hyphenation point in the words. Until this is fixed, you may use the new hyphenator. You need a fairly new beta. Add the following lines at the top of your preamble: \setuphyphenation[method=traditional] \sethyphenationfeatures[strict] I hope it helps, It's not a bug actually but a side effect. The way fonts implement ligatures is rather diverse (and even not always recognizable as ligature). This can interact with hyphenation especially because we not only have to take replacements into account but also relative positioning, because 1-1 replacement, many-1 replacements and positioning are all used in combination. Because it makes no sense to expand a node list into all possible permutations of (combinations) of hyphenation points, the current mechanism has some assumptions. One problem with that is that in traditional tex a discretionary comes in several disguises and at some point it doesn't even have specific hyphenation characters it its sublists which in turn interacts with whatever-hyphen replacements and kerning. So, the context reality is that there are a few strategies uses and the results depends on the combination of these strategies. Currently the defaults result in a limited analysis. Then we can have this: \setuphyphenation[method=expanded] which indeed in this example gives the results as expected. Because that method is also used in the alternative hyphenator that one also works. In a future version I will change some defaults or maybe even switch to the alternative hyphenator as it offers some advantages. Pablo has been testing it for a while and it seems to work ok. The only drawback is that I need to keep the old methods as benchmark. When multiple side-by-side hyphenation points are used the font builder can discard some but this is normally no big issue for tex. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with ligatures (EBGaramond) and \mainlanguage[es]
On 03/26/2015 06:23 AM, Andrés Conrado wrote: Hello, list. When I try to use the EBGaramond font (http://www.georgduffner.at/ebgaramond/) in spanish (using \mainlanguage[es]), ligatures disappear. But they only disappear when they belong to a word (when alone, they look fine). See MWE, if you remove the comment in the \mainlanguage command, ligatures get screwed up: Hi Andrés, I’m afraid this is a proper bug. It isn’t related to Spanish as language. The bug is triggered when a the ligature has a hyphenation point at the end. Here is another mininmal example with German as main language: \mainlanguage[de] \loadtypescriptfile[ebgaramond] \setupbodyfont[ebgaramond,24pt] \starttext \hsize\zeropoint figura afigura \es figura afigura \en figura afigura \stoptext German only inserts a hyphenation point after three characters (and before other three characters). This is why the first word has the ligature and the second word doesn’t have it. English doesn’t show the bug, because it doesn’t find any hyphenation point in the words. Until this is fixed, you may use the new hyphenator. You need a fairly new beta. Add the following lines at the top of your preamble: \setuphyphenation[method=traditional] \sethyphenationfeatures[strict] I hope it helps, Pablo %% % remove the comment below to see the effect on ligatures. %\mainlanguage[es] \loadtypescriptfile[ebgaramond] \setupbodyfont[ebgaramond,48pt] \starttext flagrantemente y figurativamente ff fl fi ffi ffl ffii figura ffla fflego \stoptext %% Thanks for any ideas you may have, I'm clueless, and really need to use those ligatures. I can edit whatever needs to be edited, but I can't find any ideas in the source, nor the mailing list. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] PLacing framed text.
I know how to place an intermezzo, e.g. \starttext \setupframed[framecorner=round, frameradius=1em, background=screen, backgroundscreen=0.70, backgroundcorner=round, backgroundradius=1em, corner=round, radius=1em] \definefloat[intermezzo]{ } \placeintermezzo[right]{} \startframedtext[width=3.2in] \centerline{\ss\tfb Life Before Specialty} \centerline{\ss\tfb Food Marketing} \tfx What food entrepeneurs did before starting a specialty food firm (in order of prevalence): ---{\bf\it Food Entrepeneur Magazine} \stopframedtext \stoptext But I don't want the word intermezzo at the bottom of the frame. In other words I want to place the framed text but not call it an intermezzo. Any suggestions? -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html Updated PDF e-book: Create Book Covers with Scribus 1.4.5 coming soon at http://www.booklocker.com/! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] setup for paragraph styles
Hello, I'd like to kwnow the commands I should use in ConTeXt to define styles for paragraphs of text that are not headers/titles nor normal text. With titles I know I must use: \definehead[MyTitle][title] \setuphead[MyTitle][...] What should I use for texts like subtitles, dates of letters, signatures? They are paragraphs often made by a few words, with a different alignment, margins, style and vertical space above and below. For a long quote I've seen that I can use: \definedelimitedtext[MySpecialText] \setupdelimitedtext[MySpecialText] Are those the right commands for my purpose in ConTeXt? In particular, I'm typesetting XHTML, where all those elements are p class=subtitle, p class=letter-date, p class=signature and so on. An example taken from my xml environment: ... \startxmlsetups xml:myenv \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body|h3|p|i}{xml:*} ... \xmlsetsetup{\xmldocument}{p[@class='letter-date']}{xml:p:letter-date} ... \stopxmlsetups ... \startxmlsetups xml:p:letter-date \page[no]\rightaligned{\noindent\xmlflush{#1}}\par\page[no] \stopxmlsetups ... Is that the right way or is it better to define and setup a style like this? \define_???_[LetterDate] \setup_???_[LetterDate][ before=..., after=..., ..., ] and use it like this: \startxmlsetups xml:p:letter-date \startLetterDate \xmlflush{#1} \stopLetterDate \stopxmlsetups And if it's better like that, what should I write instead of _???_ ? Thanks, Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
On 3/7/2015 7:22 PM, Wolfgang Schuster wrote: Am 07.03.2015 um 18:30 schrieb Jörg Weger joerg73@googlemail.com: Is that really an mkiv issue? If I understood well tikz has its own way of keeping track of positions independent of context. Normally yes. But there is TikZ’ “remember picture” mode. You can produce several independent TikZ pictures on a ConTeXt/LaTeX/plain text page. TikZ tells ConTeXt (or LaTeX or plain TeX) to give back the coordinates of those pictures on the page after the page has been typeset. TikZ can then draw interconnections between those images which are rendered in an extra run. Tikz uses the pdftex commands \pdfsavepos, \pdflastxpos and \pdflastypos to save the position of the graphics on the page. ConTeXt isn’t involved in this process which provides its own interface for this mechanism but Tikz doesn’t use it. In my example the rounded rectangles with the words inside are TikZ images which are put inline into the ConteXt text by the command \tikz[baseline] \node[form of node, draw, anchor=text] {text content} When I use \tikz[baseline, remember picture] … instead I activate the mode explained above and the arrows can be drawn according to the “remembered” coordinates after ConTeXt’s first typesetting run. According to Wolfgang Schuster in the first reply in this thread when using ConTeXt mkiv – other than mkii – file the coordinates given back after the first typesetting run look strange in TikZ’ auxiliary so there seems to be a mistake somnewhere between ConTeXt and TikZ in this regard. The problem is the \write command which differs in MkII and MkIV and Tikz way to prevent the expansion of a command which is written to the auxiliary file. The following example demonstrates the difference between MkII and MkIV. In MkII the \noexpand prevents the expansion of \dummytext when writes content is written to the external file but in MkIV \write is redefined and this doesn’t work anymore. begin example \newwrite\testwrite \starttext \immediate\openout\testwrite=\jobname-dummytext.tmp \def\dummytext{First sample text.} \immediate\write\testwrite{\noexpand\dummytext} \def\dummytext{Second sample text.} \immediate\write\testwrite{\noexpand\dummytext} \immediate\closeout\testwrite \stoptext end example this should help: \unexpanded\def\writeviatex#1#2% {\ifx\normalwrite\relax\else % the \detokenize makes sure we don't expand \noexpanded macros \normalwrite#1{\detokenize{#2}}% \fi} (in future version i might replace write completely) Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
Is that really an mkiv issue? If I understood well tikz has its own way of keeping track of positions independent of context. Normally yes. But there is TikZ’ “remember picture” mode. You can produce several independent TikZ pictures on a ConTeXt/LaTeX/plain text page. TikZ tells ConTeXt (or LaTeX or plain TeX) to give back the coordinates of those pictures on the page after the page has been typeset. TikZ can then draw interconnections between those images which are rendered in an extra run. In my example the rounded rectangles with the words inside are TikZ images which are put inline into the ConteXt text by the command \tikz[baseline] \node[form of node, draw, anchor=text] {text content} When I use \tikz[baseline, remember picture] … instead I activate the mode explained above and the arrows can be drawn according to the “remembered” coordinates after ConTeXt’s first typesetting run. According to Wolfgang Schuster in the first reply in this thread when using ConTeXt mkiv – other than mkii – file the coordinates given back after the first typesetting run look strange in TikZ’ auxiliary so there seems to be a mistake somnewhere between ConTeXt and TikZ in this regard. Greetings Jörg On 07.03.2015 15:52, Hans Hagen wrote: On 3/7/2015 1:08 PM, Jörg Weger wrote: Metapost’s learnig curve seems to be a lot steeper to me. It is really a pity that ConTeXt mkiv does not save the node coordinates correctly as Wolfgang found out. Is that really an mkiv issue? If I understood well tikz has its own way of keeping track of positions independent of context. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
Am 07.03.2015 um 18:30 schrieb Jörg Weger joerg73@googlemail.com: Is that really an mkiv issue? If I understood well tikz has its own way of keeping track of positions independent of context. Normally yes. But there is TikZ’ “remember picture” mode. You can produce several independent TikZ pictures on a ConTeXt/LaTeX/plain text page. TikZ tells ConTeXt (or LaTeX or plain TeX) to give back the coordinates of those pictures on the page after the page has been typeset. TikZ can then draw interconnections between those images which are rendered in an extra run. Tikz uses the pdftex commands \pdfsavepos, \pdflastxpos and \pdflastypos to save the position of the graphics on the page. ConTeXt isn’t involved in this process which provides its own interface for this mechanism but Tikz doesn’t use it. In my example the rounded rectangles with the words inside are TikZ images which are put inline into the ConteXt text by the command \tikz[baseline] \node[form of node, draw, anchor=text] {text content} When I use \tikz[baseline, remember picture] … instead I activate the mode explained above and the arrows can be drawn according to the “remembered” coordinates after ConTeXt’s first typesetting run. According to Wolfgang Schuster in the first reply in this thread when using ConTeXt mkiv – other than mkii – file the coordinates given back after the first typesetting run look strange in TikZ’ auxiliary so there seems to be a mistake somnewhere between ConTeXt and TikZ in this regard. The problem is the \write command which differs in MkII and MkIV and Tikz way to prevent the expansion of a command which is written to the auxiliary file. The following example demonstrates the difference between MkII and MkIV. In MkII the \noexpand prevents the expansion of \dummytext when writes content is written to the external file but in MkIV \write is redefined and this doesn’t work anymore. begin example \newwrite\testwrite \starttext \immediate\openout\testwrite=\jobname-dummytext.tmp \def\dummytext{First sample text.} \immediate\write\testwrite{\noexpand\dummytext} \def\dummytext{Second sample text.} \immediate\write\testwrite{\noexpand\dummytext} \immediate\closeout\testwrite \stoptext end example 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
Thank you very much Hans and Aditya for your efforts and sorry for only replying now — momentarily I am writing a paper (of course typeset with ConTeXt :-) ) that has to get finished. For now I have dropped the idea of using that certain type of illustration in the paper as your METAPOST examples are working, but I had forgotten to say that I need effectively two arrows from one part of a sentence two two others (I am trying to illustrate a linguistic ambiguity problem) and I did not manage to get that working starting from your examples. Then I need a shape other than a tight frame to surround the words, TikZ’ rounded rectangles were too nice for that. In the moment I don’t have the time to dive deeper into METAPOST which seems to be a mighty beast from what I see in the Metafun manual, but in future I shurely will. The nice thing about TikZ are that you can use the self explaining commands rather intuitively (at least having some experience in Lilypond and now ConTeXt), that there are many different building blocks predefined that you can use and that there are hundreds of examples in the internet that you can use as starting point. So I managed to get some things working after a self-tought one day crash course – Metapost’s learnig curve seems to be a lot steeper to me. It is really a pity that ConTeXt mkiv does not save the node coordinates correctly as Wolfgang found out. Greetings Jörg On 03.03.2015 20:28, Aditya Mahajan wrote: On Tue, 3 Mar 2015, Hans Hagen wrote: On 3/3/2015 6:12 PM, Aditya Mahajan wrote: 2. The metafun alternative is a bit inconvenient. Suppose you want to draw a bunch of such graphics (words connected by arrows). Then, you will need to ensure that node names are unique. (Is there a way to get around that?) \newcounter\connectedwordcounter \starttexdefinition unexpanded fromword [#1]#2 \expandafter\pushmacro\csname cwc#1\endcsname % nesting hack \doglobal\increment\connectedwordcounter \setxvalue{cwc#1}{\connectedwordcounter}% \startpositionoverlay{highlightoverlay} \setMPpositiongraphic {\getvalue{cwc#1}f} {highlightgraphic} {from=\getvalue{cwc#1}f,to=\getvalue{cwc#1}t} \stoppositionoverlay \hpos{\getvalue{cwc#1}f}{#2}% \stoptexdefinition \starttexdefinition unexpanded toword [#1]#2 \hpos{\getvalue{cwc#1}t}{#2} \expandafter\popmacro\csname cwc#1\endcsname % nesting hack \stoptexdefinition Thanks. 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 : http://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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
On Tue, 3 Mar 2015, Jörg Weger wrote: In the minimal working example below inside of a text two words should be printed inside of rounded TikZ rectangles and should be connected by an TikZ arrow pointing from the first word to the other. TikZ offers the remember picture/overlay option for that. I have seen a solution similar to what I want to achieve in the METAFUN manual but I don’t have a clue how to get that METAPOST alternative working. Here is how to get the metafun alternative working. 1. I don't understand why I need to manually input the mp-abck file; that should be input automatically. 2. The metafun alternative is a bit inconvenient. Suppose you want to draw a bunch of such graphics (words connected by arrows). Then, you will need to ensure that node names are unique. (Is there a way to get around that?) 3. I did not bother to set the style of the boxes and arrows. So it looks a bit dry. \startMPdefinitions % I don't know why this does not get loaded automatically. input mp-abck.mpiv; \stopMPdefinitions \defineoverlay[highlight] [\positionoverlay{highlightoverlay}] \startpositionoverlay{highlightoverlay} \setMPpositiongraphic{n1}{highlightgraphic}{from=n1,to=n2} \stoppositionoverlay \startMPpositiongraphic{highlightgraphic} save n; path n[]; initialize_box(\MPpos{\MPvar{from}}); n[1] := pxy; initialize_box(\MPpos{\MPvar{to}}); n[2] := pxy; draw n[1]; draw n[2]; drawarrow (center n[1]){dir 45} .. {dir -45}(center n[2]) cutbefore n[1] cutafter n[2]; anchor_box(\MPanchor{\MPvar{from}}); \stopMPpositiongraphic \setuppapersize[A6] \setupbackgrounds[page][background=highlight] \starttext \hpos{n1}{this} belongs to \hpos{n2}{that} \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
On 3/3/2015 6:12 PM, Aditya Mahajan wrote: On Tue, 3 Mar 2015, Jörg Weger wrote: In the minimal working example below inside of a text two words should be printed inside of rounded TikZ rectangles and should be connected by an TikZ arrow pointing from the first word to the other. TikZ offers the remember picture/overlay option for that. I have seen a solution similar to what I want to achieve in the METAFUN manual but I don’t have a clue how to get that METAPOST alternative working. Here is how to get the metafun alternative working. 1. I don't understand why I need to manually input the mp-abck file; that should be input automatically. 2. The metafun alternative is a bit inconvenient. Suppose you want to draw a bunch of such graphics (words connected by arrows). Then, you will need to ensure that node names are unique. (Is there a way to get around that?) 3. I did not bother to set the style of the boxes and arrows. So it looks a bit dry. \startMPdefinitions % I don't know why this does not get loaded automatically. input mp-abck.mpiv; \stopMPdefinitions \defineoverlay[highlight] [\positionoverlay{highlightoverlay}] \startpositionoverlay{highlightoverlay} \setMPpositiongraphic{n1}{highlightgraphic}{from=n1,to=n2} \stoppositionoverlay \startMPpositiongraphic{highlightgraphic} save n; path n[]; initialize_box(\MPpos{\MPvar{from}}); n[1] := pxy; initialize_box(\MPpos{\MPvar{to}}); n[2] := pxy; draw n[1]; draw n[2]; drawarrow (center n[1]){dir 45} .. {dir -45}(center n[2]) cutbefore n[1] cutafter n[2]; anchor_box(\MPanchor{\MPvar{from}}); \stopMPpositiongraphic \setuppapersize[A6] \setupbackgrounds[page][background=highlight] \starttext \hpos{n1}{this} belongs to \hpos{n2}{that} \stoptext \startMPdefinitions % I don't know why this does not get loaded automatically. Answer: seldom needed. input mp-abck.mpiv; \stopMPdefinitions \defineoverlay[highlight] [\positionoverlay{highlightoverlay}] \startMPpositiongraphic{highlightgraphic} save n; path n[]; initialize_box(\MPpos{\MPvar{from}}); n[1] := pxy; initialize_box(\MPpos{\MPvar{to}}); n[2] := pxy; draw n[1]; draw n[2]; if ypart center n[1] ypart center n[2] : drawarrow (center n[1]){dir 225} ... {dir -225}(center n[2]) cutbefore n[1] cutafter n[2] ; else : drawarrow (center n[1]){dir 45} ... {dir -45}(center n[2]) cutbefore n[1] cutafter n[2] ; fi ; anchor_box(\MPanchor{\MPvar{from}}); \stopMPpositiongraphic \newcounter\connectedwordcounter \starttexdefinition unexpanded fromword [#1]#2 \expandafter\pushmacro\csname cwc#1\endcsname % nesting hack \doglobal\increment\connectedwordcounter \setxvalue{cwc#1}{\connectedwordcounter}% \startpositionoverlay{highlightoverlay} \setMPpositiongraphic {\getvalue{cwc#1}f} {highlightgraphic} {from=\getvalue{cwc#1}f,to=\getvalue{cwc#1}t} \stoppositionoverlay \hpos{\getvalue{cwc#1}f}{#2}% \stoptexdefinition \starttexdefinition unexpanded toword [#1]#2 \hpos{\getvalue{cwc#1}t}{#2} \expandafter\popmacro\csname cwc#1\endcsname % nesting hack \stoptexdefinition \setuppapersize[A6] \setupbackgrounds[page][background=highlight] \starttext \fromword[foo]{this} belongs to \toword[foo]{that} \fromword[bar]{this} belongs to \toword[bar]{that} \fromword[foo]{this} belongs to \toword[foo]{that} \fromword[bar]{this} belongs \fromword[bar]{this} belongs to \toword[bar]{that} to \toword[bar]{that} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MkIV and TikZ picture remembering
On Tue, 3 Mar 2015, Hans Hagen wrote: On 3/3/2015 6:12 PM, Aditya Mahajan wrote: 2. The metafun alternative is a bit inconvenient. Suppose you want to draw a bunch of such graphics (words connected by arrows). Then, you will need to ensure that node names are unique. (Is there a way to get around that?) \newcounter\connectedwordcounter \starttexdefinition unexpanded fromword [#1]#2 \expandafter\pushmacro\csname cwc#1\endcsname % nesting hack \doglobal\increment\connectedwordcounter \setxvalue{cwc#1}{\connectedwordcounter}% \startpositionoverlay{highlightoverlay} \setMPpositiongraphic {\getvalue{cwc#1}f} {highlightgraphic} {from=\getvalue{cwc#1}f,to=\getvalue{cwc#1}t} \stoppositionoverlay \hpos{\getvalue{cwc#1}f}{#2}% \stoptexdefinition \starttexdefinition unexpanded toword [#1]#2 \hpos{\getvalue{cwc#1}t}{#2} \expandafter\popmacro\csname cwc#1\endcsname % nesting hack \stoptexdefinition Thanks. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Problem with MkIV and TikZ picture remembering
In the minimal working example below inside of a text two words should be printed inside of rounded TikZ rectangles and should be connected by an TikZ arrow pointing from the first word to the other. TikZ offers the remember picture/overlay option for that. The MWE works in MkII (command “texexec”) which I am not using, but not in the latest MkIV (command “context”). The problem might be that according to the PGF/TikZ manual “You need to use a driver that supports picture remembering and you need to run TEX twice” (16.13.1 Referencing a Node in a Different Picture). So my questions are: 1.) Does LuaTeX support TikZ picture remembering? 2.) If so, how can I get ConTeXt MkIV to “run TeX twice”? 3.) If all of the above worked, would that work also if the inline TikZ pictures to be remembered are on another file referenced via \input? I have seen a solution similar to what I want to achieve in the METAFUN manual but I don’t have a clue how to get that METAPOST alternative working. Greetings Jörg START MWE % \usemodule[tikz] \usetikzlibrary[shapes.misc,arrows] \starttext \tikz[baseline,remember picture] \node[rounded rectangle,draw,anchor=text] (n1) {this}; belongs to \tikz[baseline,remember picture] \node[rounded rectangle,draw,anchor=text] (n2) {that}; \starttikzpicture [remember picture,overlay] \draw[-] (n1.north) to [bend left] (n2.north); \stoptikzpicture \stoptext STOP MWE %% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Problem with MkIV and TikZ picture remembering
In the minimal working example below inside of a text two words should be printed inside of rounded TikZ rectangles and should be connected by an TikZ arrow pointing from the first word to the other. TikZ offers the remember picture/overlay option for that. The MWE works in MkII (command “texexec”) which I am not using, but not in the latest MkIV (command “context”). The problem might be that according to the PGF/TikZ manual “You need to use a driver that supports picture remembering and you need to run TEX twice” (16.13.1 Referencing a Node in a Different Picture). So my questions are: 1.) Does LuaTeX support TikZ picture remembering? 2.) If so, how can I get ConTeXt MkIV to “run TeX twice”? 3.) If all of the above worked, would that work also if the inline TikZ pictures to be remembered are on another file referenced via \input? I have seen a solution similar to what I want to achieve in the METAFUN manual but I don’t have a clue how to get that METAPOST alternative working. Greetings Jörg START MWE % \usemodule[tikz] \usetikzlibrary[shapes.misc,arrows] \starttext \tikz[baseline,remember picture] \node[rounded rectangle,draw,anchor=text] (n1) {this}; belongs to \tikz[baseline,remember picture] \node[rounded rectangle,draw,anchor=text] (n2) {that}; \starttikzpicture [remember picture,overlay] \draw[-] (n1.north) to [bend left] (n2.north); \stoptikzpicture \stoptext STOP MWE %% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \executesystemcommand dont work?
Thanx Ulrike for reply. I'm sending outputs from Pdflatex and lualatex consoles: I do not know what I should receive Jaroslav Hajtmar PDFLaTeX output console: Microsoft Windows [Verze 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Všechna práva vyhrazena. C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod riguez5\dddpdflatex --shell-escape latex This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) (preloaded format=pdflatex) \write18 enabled. entering extended mode (./latex.tex LaTeX2e 2014/05/01 Babel 3.9k and hyphenation patterns for 79 languages loaded. (c:/texlive/2014/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo)) No file latex.aux. (./latex.aux) ) No pages of output. Transcript written on latex.log. C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod riguez5\ddd And LuaLaTeX output console: C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod riguez5\dddlualatex --shell-escape latex This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 4971) \write18 enabled. (./latex.tex LaTeX2e 2014/05/01 Babel 3.9k and hyphenation patterns for 79 languages loaded. (c:/texlive/2014/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo)) (./latex.aux) (./latex.aux)) 262 words of node memory still in use: 2 hlist, 1 vlist, 1 rule, 2 glue, 39 glue_spec, 2 write nodes avail lists: 2:12,3:1,6:3,7:1,9:1 No pages of output. Transcript written on latex.log. C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod riguez5\ddd Dne 17.2.2015 v 11:29 Ulrike Fischer napsal(a): pdflatex --shell-escape ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bug in current beta?
Dear list, beta from 2015.01.30 15:28 isn’t able to hyphenate the second word in this sample (also beta from 2014.11.26 21:43 doesn’t hyphenate it): \mainlanguage[es] \setuplanguage[es][patterns={es, agr}] \setupdirections[bidi=on,method=two] \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] \starttext \hsize\zeropoint hola χαλεπὰ {\agr χαλεπὰ} \stoptext Beta from 2014.07.14 19:25 hypehantes all three words. I’m afraid this may be a bug. Could someone else confirm it? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in current beta?
On 2/3/2015 8:55 PM, Pablo Rodriguez wrote: Dear list, beta from 2015.01.30 15:28 isn’t able to hyphenate the second word in this sample (also beta from 2014.11.26 21:43 doesn’t hyphenate it): \mainlanguage[es] \setuplanguage[es][patterns={es, agr}] \setupdirections[bidi=on,method=two] \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] \starttext \hsize\zeropoint hola χαλεπὰ {\agr χαλεπὰ} \stoptext Beta from 2014.07.14 19:25 hypehantes all three words. I’m afraid this may be a bug. Could someone else confirm it? more a side effect of a speedup in language switching (assuming no change in patterns after enabling a language) you can put this in cont-new.mkiv \unprotect \appendtoks \global\expandafter\let\csname\??languagenumbers\currentlanguage\endcsname\undefined \to \everysetuplanguage \protect actually, a \mainlanguage after \setuplanguage would work in your case Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in current beta?
Hi Pablo, I don’t have the font FreeSerif, but with another font (stix, to be precise) I get the attached PDF. My version is 2015.01.30 15:28. I can’t say much what you really expect and where there should be a bug… Best regards: OK greek-espanish.pdf Description: Adobe PDF document On 03 Feb 2015, at 20:55, Pablo Rodriguez oi...@gmx.es wrote: Dear list, beta from 2015.01.30 15:28 isn’t able to hyphenate the second word in this sample (also beta from 2014.11.26 21:43 doesn’t hyphenate it): \mainlanguage[es] \setuplanguage[es][patterns={es, agr}] \setupdirections[bidi=on,method=two] \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] \starttext \hsize\zeropoint hola χαλεπὰ {\agr χαλεπὰ} \stoptext Beta from 2014.07.14 19:25 hypehantes all three words. I’m afraid this may be a bug. Could someone else confirm it? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
On Mon, 2 Feb 2015 17:55:35 +0100 Hans Hagen pra...@wxs.nl wrote: this feature relates to (simple) spell checking and collectign words for dedicated spell check lists and, 4 chars is nearly always avalid word which is why we discard them English is rich in four-letter words! Alan ;-) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
On Mon, 2 Feb 2015 10:20:15 +0100 Keith Schultz keithjschu...@icloud.com wrote: Hello All, As a linguist, I can say that not counting words that are shorter is an absolute NO-GO for an accurate word count and thereby character count! See below, for a non representative proof ! Am 01.02.2015 um 22:12 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com: [snip, snip] ConTeXt has an option to count the words (you find the result in jobname.words) in a document but words words shorter than four letters aren’t taken into account. word length under 4 characters : 10 word length = 4 chars : 20 here you are missing a third of the words! That is 30% regards Keith See also: Zipf, G. K. (1949), Human Behavior and the Principle of Least Effort, Cambridge, MA: Addison-Wesley. in particular, Chapter 2: On the Economy of Words. As well as: Shannon, C. E. (1951), The redundancy of English, Cybernetics, 248-272. 54% for English, so we can afford to be sloppy (wch s wy txt compr qte ll). Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
On 2/2/2015 4:39 PM, Alan BRASLAU wrote: ConTeXt has an option to count the words (you find the result in jobname.words) in a document but words words shorter than four letters aren’t taken into account. word length under 4 characters : 10 word length = 4 chars : 20 here you are missing a third of the words! That is 30% this feature relates to (simple) spell checking and collectign words for dedicated spell check lists and, 4 chars is nearly always avalid word which is why we discard them Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
Hello All, As a linguist, I can say that not counting words that are shorter is an absolute NO-GO for an accurate word count and thereby character count! See below, for a non representative proof ! Am 01.02.2015 um 22:12 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com: [snip, snip] ConTeXt has an option to count the words (you find the result in jobname.words) in a document but words words shorter than four letters aren’t taken into account. word length under 4 characters : 10 word length = 4 chars : 20 here you are missing a third of the words! That is 30% regards Keith ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
On Sun, 01 Feb 2015 14:12:54 -0700, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: \setupspellchecking[state=start,method=2] \starttext \input knuth \stoptext Slightly off-topic: Just as Wolfgang's reply came in I was setting up a new version of http://tinyspell.com/ Editor-based spell-checkers are usually not very useful (although some LaTeX-centric editors are pretty good at it.) I never knew about \setupspellchecking before now. Perhaps it could evolve into something very useful. Part of spell-checking involves getting uppercase vs lowercase right. I see that the .words output of \setupspellchecking ignores case, and treats '-' (the simple dash) as a word separator. I'd like to see this evolve into something more precise. words shorter than four letters aren’t taken into account. I get *some* words shorter than four letters in the output, so there must be some other logic going on... Thanks for pointing out this utility, Wolfgang, and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
On Sun, 01 Feb 2015 15:11:48 -0700, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 01.02.2015 um 22:32 schrieb Idris Samawi Hamid ادريس سماوي حامد isha...@colostate.edu: words shorter than four letters aren’t taken into account. I get *some* words shorter than four letters in the output, so there must be some other logic going on… Do you have a few examples? A quick one: === \setupspellchecking[state=start,method=2] \starttext Dār is the Arabic word for home. \stoptext === -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
Am 01.02.2015 um 22:32 schrieb Idris Samawi Hamid ادريس سماوي حامد isha...@colostate.edu: words shorter than four letters aren’t taken into account. I get *some* words shorter than four letters in the output, so there must be some other logic going on… Do you have a few examples? 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF document statistics (character count incl. spaces)?
Am 01.02.2015 um 22:06 schrieb Jörg Weger joerg73@googlemail.com: Is the character count “wc --char textfile” returns with or without blank spaces? (Which is important for me.) “man wc” doesn’t talk about that. I had hoped there was a better way than to edit the result of “pdftotext” in my text editor or in libreoffice writer (deleting unnecessary carriage returns and spaces by searching for regular expressions) which are able to do the count I need. In fact I had hoped that ConTeXt was able to count the characters and spaces it renders to PDF (is that theoretically possible?) … ConTeXt has an option to count the words (you find the result in jobname.words) in a document but words words shorter than four letters aren’t taken into account. \setupspellchecking[state=start,method=2] \starttext \input knuth \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interactive table of content -- jumps always 1 page too far
focus=width is the problematic part. Replace it with focus=standard and it will work better (it isnât perfect either [there is a bug reported before]). \enabletrackers[*destinations*] \setupinteraction[state=start, focus=standard] \starttext \completecontent \chapter{Chapter} \dorecurse{5}{\input knuth} \stoptext It took me a while to realized the problem, because I didnât have continious view enabled in evince. I hope it is solved now. Best, Pablo -- http://www.ousia.tk In other words the focus=width option causes the bug, and the workaround is to set it to focus=standard, so at least you go to the right page Well that is at least a solution for publicing my material. But I hope one day someone finds time to repair the bug. Thanks, Rob ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interactive table of content -- jumps always 1 page too far
focus=width is the problematic part. Replace it with focus=standard and it will work better (it isnâÂÂt perfect either [there is a bug reported before]). \enabletrackers[*destinations*] \setupinteraction[state=start, focus=standard] \starttext \completecontent \chapter{Chapter} \dorecurse{5}{\input knuth} \stoptext It took me a while to realized the problem, because I didnâÂÂt have continious view enabled in evince. I hope it is solved now. Best, Pablo -- http://www.ousia.tk In other words the focus=width option causes the bug, and the workaround is to set it to focus=standard, so at least you go to the right page Well that is at least a solution for publicing my material. But I hope one day someone finds time to repair the bug. Thanks, Rob One last word on this... Actually the focus=standard is fine, it keeps the viewer in the same status (fit width or fit height) as you had when clicking on the link. So this works fine. Greetings, Rob ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interactive table of content -- jumps always 1 page too far
On 01/31/2015 08:51 PM, Rob Heusdens wrote: [...] In other words the focus=width option causes the bug, and the workaround is to set it to focus=standard, so at least you go to the right page Hi Rob, I’m afraid that the issue with focus=width is a bug in evince or poppler. I’m afraid that link destination is miscalculated by ConTeXt. But in the previous sample, evince should behave the same either with focus=width or focus=standard. Links have internally the same top value: /D [25 0 R /XYZ 70.867 689.409 null] /D [27 0 R /FitH 70.867] I will ask to the evince developers about it. mupdf-1.6 doesn’t have this issue (and it’s way faster than evince). Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibliography: alignment of first hanging lines in publications list, hyphenation
But with \setupbtxlist[alternative=left,margin=0cm,align={hanging,hz}] there is no hanging indentation. Isn’t it possible for the first “hanging” line of an hanging indentation layout to start exactly on the very left, while the next lines are exactly indented? just the settings of descriptions To be honest, i don’t know exactly what you mean by „descriptions“. Greetings Jörg On 28.01.2015 10:00, Hans Hagen wrote: On 1/28/2015 8:42 AM, Jörg Weger wrote: Attached are a MWE using plain APA and the corresponding BibTeX file. (Don’t mind the mistakes regarding series/volumes, I got that working in my personal setup that overrides plain APA.) APA style defaults with hanging indents in the publications list. The respectively hanging first lines of each entry in the publications list are not properly aligned on the left. (The indented lines are). I would like all of those first lines to start on the very left of the textfield. If I use \hyphenation to prevent e.g. names from being hyphenated those words might be driven into the right margin. Hanging punctuation doesn’t seem to work as well. Is there anything that can be done about that? Or how can the justification be switched to flush left/ragged right with hanging indents on the left? \setupbtxlist[alternative=left,margin=0cm,align={hanging,hz}] just the settings of descriptions Greetings Jörg PS: And by the way, “\placebtxrendering[criterium=all]” is not working anymore. I think I had it working before to place all entries from the BibTeX file into the publications list regardless of their actual appearance in the text as citations–which was a good way to test only the publications list’s layout. \placebtxrendering[method=dataset] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibliography: alignment of first hanging lines in publications list, hyphenation
On 1/28/2015 8:42 AM, Jörg Weger wrote: Attached are a MWE using plain APA and the corresponding BibTeX file. (Don’t mind the mistakes regarding series/volumes, I got that working in my personal setup that overrides plain APA.) APA style defaults with hanging indents in the publications list. The respectively hanging first lines of each entry in the publications list are not properly aligned on the left. (The indented lines are). I would like all of those first lines to start on the very left of the textfield. If I use \hyphenation to prevent e.g. names from being hyphenated those words might be driven into the right margin. Hanging punctuation doesn’t seem to work as well. Is there anything that can be done about that? Or how can the justification be switched to flush left/ragged right with hanging indents on the left? \setupbtxlist[alternative=left,margin=0cm,align={hanging,hz}] just the settings of descriptions Greetings Jörg PS: And by the way, “\placebtxrendering[criterium=all]” is not working anymore. I think I had it working before to place all entries from the BibTeX file into the publications list regardless of their actual appearance in the text as citations–which was a good way to test only the publications list’s layout. \placebtxrendering[method=dataset] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibliography: alignment of first hanging lines in publications list, hyphenation
I looked in the wiki for “descriptions” and found this: http://wiki.contextgarden.net/Command/setupdescriptions I played around a lot with the parameters from there in \setupbtxlist, but the problem remains. The only way to get hanging indentation is \setupbtxlist[alternative=hanging] and no matter what else I change the respectively first lines of every publications list entry are not aligned to the very left of the full text width :( Maybe it has something to do with the numbering? If I use \setupbtxrendering[numbering=yes] the numbers are aligned properly to the very left while the following beginnings of the entries are not. Maybe the problem is that the numbers are only “hidden”, but not really “deleted”? (Excuse my probably incorrect use of terminology.) For comparison I tried the old mechanism again: \setupbibtex[database={BibTeX_file},sort=author] \setuppublications[alternative=apa] \starttext \title{Literaturverzeichnis} \placepublications[criterium=all] \stoptext Here the hanging first lines of each entry align with the title at the very left. I can live with the actual state of the new mkiv mechanism for now as my lecturers’ eyes will be blinded by the remaining perfect ConTeXt layout :) But in future it would be great to have a real hanging indentation in the publications list according to the definition that in hanging indentation in contrary to normal indentation all but the very first line (which starts as a normal line at the very left) are indented. Greetings Jörg PS: By the way, Did I thank you for making this great software freely available and for the great quick support on the mailing list? On 28.01.2015 14:39, Jörg Weger wrote: But with \setupbtxlist[alternative=left,margin=0cm,align={hanging,hz}] there is no hanging indentation. Isn’t it possible for the first “hanging” line of an hanging indentation layout to start exactly on the very left, while the next lines are exactly indented? just the settings of descriptions To be honest, i don’t know exactly what you mean by „descriptions“. Greetings Jörg On 28.01.2015 10:00, Hans Hagen wrote: On 1/28/2015 8:42 AM, Jörg Weger wrote: Attached are a MWE using plain APA and the corresponding BibTeX file. (Don’t mind the mistakes regarding series/volumes, I got that working in my personal setup that overrides plain APA.) APA style defaults with hanging indents in the publications list. The respectively hanging first lines of each entry in the publications list are not properly aligned on the left. (The indented lines are). I would like all of those first lines to start on the very left of the textfield. If I use \hyphenation to prevent e.g. names from being hyphenated those words might be driven into the right margin. Hanging punctuation doesn’t seem to work as well. Is there anything that can be done about that? Or how can the justification be switched to flush left/ragged right with hanging indents on the left? \setupbtxlist[alternative=left,margin=0cm,align={hanging,hz}] just the settings of descriptions Greetings Jörg PS: And by the way, “\placebtxrendering[criterium=all]” is not working anymore. I think I had it working before to place all entries from the BibTeX file into the publications list regardless of their actual appearance in the text as citations–which was a good way to test only the publications list’s layout. \placebtxrendering[method=dataset] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] checking the first word in a command
On 01/26/2015 10:26 PM, Hans Hagen wrote: On 1/26/2015 10:04 PM, Pablo Rodriguez wrote: [...] How can I specify that the replacer takes not only strings but complete words? local replacer = lpeg.replacer { { señora, la señora }, { señor, el señor }, } Many thanks for the advice, Hans. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bibliography: alignment of first hanging lines in publications list, hyphenation
Attached are a MWE using plain APA and the corresponding BibTeX file. (Don’t mind the mistakes regarding series/volumes, I got that working in my personal setup that overrides plain APA.) APA style defaults with hanging indents in the publications list. The respectively hanging first lines of each entry in the publications list are not properly aligned on the left. (The indented lines are). I would like all of those first lines to start on the very left of the textfield. If I use \hyphenation to prevent e.g. names from being hyphenated those words might be driven into the right margin. Hanging punctuation doesn’t seem to work as well. Is there anything that can be done about that? Or how can the justification be switched to flush left/ragged right with hanging indents on the left? Greetings Jörg PS: And by the way, “\placebtxrendering[criterium=all]” is not working anymore. I think I had it working before to place all entries from the BibTeX file into the publications list regardless of their actual appearance in the text as citations–which was a good way to test only the publications list’s layout. \setuplanguage [de] \mainlanguage [de] \usebtxdataset[testbib_daf.bib] \showframe \setbreakpoints[compound] \setupalign [hyphenated,justified,hanging,hz,] \definefontfeature[default][default][expansion=quality,protrusion=quality,] \hyphenation{Helbig Deutscher Heraus-geber} \starttext \cite[authoryears][weinrich:2006] \cite[authoryear][goethe:2008] \cite[authoryears][hoelscher:2006] \cite[authoryear][martinez:1999] \cite[authoryears][stedje:2007] \cite[authoryear][wrobel:2007] \cite[authoryears][baur:2001] \cite[authoryear][hoffmann:2000] \cite[authoryears][sereno:1994] \\ \blank \startsection[title=Literaturverzeichnis, number=no] \placebtxrendering[criterium=text] \stopsection \stoptext @Book{ goethe:2008, author = {{Johann Wolfgang von} Goethe}, title = {{Die Leiden des jungen Werthers}}, publisher = {Deutscher Taschenbuchverlag}, year = 2008, address = {München}, note = {Original von 1774}, } @Book{ hoelscher:2006, author = {Petra Hölscher and Eberhard Piepho and Jörg Roche}, title = {{Handlungsorientierter Unterricht mit Lernszenarien â Kernfragen zum Spracherwerb}}, publisher = {Finken}, year = 2006, address = {Oberursel}, } @Book{ martinez:1999, author = {Matias Martinez and Michael Scheffel}, title = {{Einführung in die Erzähltheorie}}, publisher = {Beck}, year = 1999, address = {München}, } @Book{ stedje:2007, author = {Astrid Stedje}, title = {{Deutsche Sprache gestern und heute}}, publisher = {Fink}, year = 2007, address = {München}, edition = {6.~neubearb.}, } @Book{ weinrich:2006, author = {Harald Weinrich}, title = {{Sprache, das heiÃt Sprachen}}, publisher = {Narr}, year = 2006, address = {Tübingen}, } @Book{ wrobel:2007, author = {Ulrike Wrobel}, title = {{Raum als kommunikative Ressource: eine handlungstheoretische Analyse visueller Sprachen}}, publisher = {Peter Lang}, year = 2007, volume = 47, series = {{Arbeiten zur Sprachanalyse}}, address = {Frankfurt am Main u.|~|a.}, } @InCollection{ sereno:1994, author = {Joan A. Sereno}, title = {{Phonosyntactics}}, booktitle = {{Sound Symbolism}}, publisher = {Cambridge University Press}, year = 1994, editor = {Leanne Hinton and Joanna Nichols and John Ohala}, pages = {263â275}, address = {New York}, } @InCollection{ baur:2001, author = {Rupprecht Baur}, title = {{Deutsch als Fremdsprache â Deutsch als Zweitsprache}}, booktitle = {{Deutsch als Fremdsprache}}, publisher = {de Gruyter}, year = 2001, editor = {Gerhard Helbig and Lutz Götze and Gert Henrici and Hans-Jürgen Krumm}, volume = {19.1}, series = {{HSK}}, pages = {617â628}, address = {Berlin}, } @Book{ hoffmann:2000, title = {{Sprachwissenschaft: Ein Reader}}, publisher = {Walter de Gruyter}, year = 2000, editor = {Ludger Hoffmann}, address = {Berlin, New York}, } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting copy-pastable ligatures?
On 05 Dec 2014, at 10:13, Gerben Wierda gerben.wie...@rna.nl wrote: On 04 Dec 2014, at 16:22, Hans Hagen pra...@wxs.nl wrote: On 12/4/2014 3:54 PM, Gerben Wierda wrote: On 30 Nov 2014, at 23:38, Hans Hagen pra...@wxs.nl wrote: On 11/30/2014 1:22 PM, Gerben Wierda wrote: I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups [font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold][Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] op zich zou het moeten werken (een tonunicode vector) als er een pdfr-*.mkii file is voor de encoding ... er is er eentje voor ec encoding Ik ben er niet zo in thuis, maar welke items in bij font setup moet ik dan wijzigen? texnansi - ec I changed some of the last font statements to \definetypeface[allsans][rm][serif][optima][default][encoding=ec] \definetypeface[allsans][ss][sans][optima][default][encoding=ec] but that does not help. Probably more is needed, but that requires a programmer-level knowledge of ConTeXt and not a user-level :-) I’m still interested in a solution that enables me to do a full copy-paste including ligatures. Another thing that would be OK if I can create a text/unicode output out of the ConTeXt project and copy/paste from that. G ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] checking the first word in a command
Hi Hans, Nice code Hans!… But somehow your replacer code gives always « el » even in front of « señora »… It seems that your lua code for replacer sees « señor » and does not check whether it is « señora » or not. If one modifies a little bit the code into the following, the issue is solved: (changing « señora » into « senora ») %%% \startluacode local replacer = lpeg.replacer { [senora] = la señora, [señor] = el señor, } function document.MaleOrFemale(str) context(lpeg.match(replacer,str)) end \stopluacode \unexpanded\def\MaleOrFemale#1% {\ctxlua{document.MaleOrFemale(#1)}} \starttext whatever \MaleOrFemale{señor Juan Martínez} and \MaleOrFemale{senora María Pérez} \stoptext %%% Is it possible to have your replacer check the entire first words? Best regards: OK On 26 Jan 2015, at 18:43, Hans Hagen pra...@wxs.nl wrote: On 1/26/2015 5:49 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \starttext \def\Persona{señor Juan Martínez} \def\Persona{señora María Pérez} El/La \Persona\ ha aprobado. \stoptext How can I replace El/La in text with a command that can assign the proper article? I could use the translate module, but the real case is more complex than the previous sample. What I need in the command is that it can check the first word in the command \Persona and assign el or la. Which is the right way to do this? \startluacode local replacer = lpeg.replacer { [señor] = el señor, [señora] = la señora, } function document.MaleOrFemale(str) context(lpeg.match(replacer,str)) end \stopluacode \unexpanded\def\MaleOrFemale#1% {\ctxlua{document.MaleOrFemale(#1)}} \starttext whatever \MaleOrFemale{señor Juan Martínez} and \MaleOrFemale{señora María Pérez} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] checking the first word in a command
On 1/26/2015 10:04 PM, Pablo Rodriguez wrote: On 01/26/2015 09:24 PM, Otared Kavian wrote: Hi Hans, Nice code Hans!… But somehow your replacer code gives always « el » even in front of « señora »… It seems that your lua code for replacer sees « señor » and does not check whether it is « señora » or not. If one modifies a little bit the code into the following, the issue is solved: (changing « señora » into « senora ») %%% \startluacode local replacer = lpeg.replacer { [senora] = la señora, [señor] = el señor, } Many thanks for your replies, Hans and Otared. Adding a blank space after “señor” and “señora” is also a workaround for this particular issue: local replacer = lpeg.replacer { [señora ] = la señora , [señor ] = el señor , } How can I specify that the replacer takes not only strings but complete words? local replacer = lpeg.replacer { { señora, la señora }, { señor, el señor }, } -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] checking the first word in a command
On 01/26/2015 09:24 PM, Otared Kavian wrote: Hi Hans, Nice code Hans!… But somehow your replacer code gives always « el » even in front of « señora »… It seems that your lua code for replacer sees « señor » and does not check whether it is « señora » or not. If one modifies a little bit the code into the following, the issue is solved: (changing « señora » into « senora ») %%% \startluacode local replacer = lpeg.replacer { [senora] = la señora, [señor] = el señor, } Many thanks for your replies, Hans and Otared. Adding a blank space after “señor” and “señora” is also a workaround for this particular issue: local replacer = lpeg.replacer { [señora ] = la señora , [señor ] = el señor , } How can I specify that the replacer takes not only strings but complete words? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bib module - urgent!
On 20 Jan 2015, at 10:16 , Idris Samawi Hamid ادريس سماوي حامد wrote I also set up an extensive bib environment (attached) to take care of all sorts of things. If this is broken, can it be fixed asap? Please don't make me have to convert bbl to bib; that will be beyond depressing. Also don't want to lose my environment commands. This is urgent because there is only a short time to finish this article, and I really want to spend more time writing the content than debugging Context! :-) :-) :-) Best wishes What happens if you do not load the bib-module, in other words, omit \usemodule[bib], and input only your existing .bbl-files and your bibliograhy setups? This is what I always do and it still works with the standalone that I installed on january 13 this year. Best regards, Robert Blackstone ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bib module - urgent!
Hi Robert, On Tue, 20 Jan 2015 03:20:10 -0700, Robert Blackstone blackstone.rob...@gmail.com wrote: On 20 Jan 2015, at 10:16 , Idris Samawi Hamid ادريس سماوي حامد wrote I also set up an extensive bib environment (attached) to take care of all sorts of things. If this is broken, can it be fixed asap? Please don't make me have to convert bbl to bib; that will be beyond depressing. Also don't want to lose my environment commands. This is urgent because there is only a short time to finish this article, and I really want to spend more time writing the content than debugging Context! :-) :-) :-) Best wishes What happens if you do not load the bib-module, in other words, omit \usemodule[bib], and input only your existing .bbl-files and your bibliograhy setups? This is what I always do and it still works with the standalone that I installed on january 13 this year. Best regards, Robert Blackstone I get the exact same lua error. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] two issues with new hyphenator
On 12/10/2014 10:58 PM, Hans Hagen wrote: On 12/10/2014 8:15 PM, Pablo Rodriguez wrote: On 12/09/2014 12:07 AM, Hans Hagen wrote: On 12/8/2014 5:47 PM, Pablo Rodriguez wrote: [..] And sorry for asking this again, but I need underscore hyphenation with the underscore character from the font and only for the \tex and \hyphenatedurl commands (not for the rest of the text). [...] just a variant of the addfunyhyphen: Many thanks for your sample, Hans. It really works great. Sorry for asking this again: would it be possible to add this feature also to \hyphenatedurl. I’m composing a book on A6 and it is really hard to add some urls. some code from an upcoming manual: Many thanks for the sample, Hans. For some strange reason, the line: [/] = before, [\\] = before, removes the backslashes in your sample. Setting \hsize to \zeropoint or other length seems to avoid the problem. What I had in mind is something different. Sorry for not having explained in a more accurate manner before. The current line breaking (without hyphenation) in \hyphenatedurl is fine for me. The issue is that there are some urls that contain long words inside. Here is one of them: http://www.nietzschesource.org/#eKGWB/GD-Sprueche-12. And only for those words underscore hyphenation is required. They should be hyphenated as any other word, only using the underscore hyphen. This would mean that urls would have two line breaks: one without hyphen (as it was before) and another extra with underscore. Many thanks for your help, Pablo \startluacode local specials = { [!] = before, [?] = before, [''] = before, ['] = before, [/] = before, [\\] = before, [#] = before, [$] = before, [%] = before, [] = before, [*] = before, [+] = before, [-] = before, [,] = before, [.] = before, [:] = before, [;] = before, [] = before, [] = before, [=] = before, [@] = before, [(] = before, [[] = before, [{] = before, [^] = before, [_] = before, [`] = before, [|] = before, [~] = before, -- [)] = after, []] = after, [}] = after, } languages.hyphenators.traditional.installmethod(url, function(dictionary,word,n) local t = { } for i=1,#word do local w = word[i] local s = specials[w] if s == after then s = { start = 1, length = 1, after = w, left = false, right = false, } specials[w] = s elseif s == before then s = { start = 1, length = 1, before = w, left = false, -- right = false, } specials[w] = s end t[i] = s or false end return t end ) \stopluacode \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte(_) local char = tfmdata.characters[underscore] tfmdata.characters[0xFE000] = { width= 0, height = 0, depth= 0, commands = { { right, -char.width }, { down, char.depth }, { slot, 1, underscore }, } } end utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen) \stopluacode \definehyphenationfeatures [url] [characters=all, righthyphenchar=FE000, alternative=url] \setuphyphenation[method=traditional] \unexpanded\def\hyphenatedurl#1% {\dontleavehmode \begingroup \tt \sethyphenationfeatures[url]% #1% \endgroup} \starttext \hsize5mm \hyphenatedurl{http://www.pragma-ade.nl} \stoptext -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] equivalent to \newcommand{...}{\ensuremath{...}}
On Mon, 8 Dec 2014, j. van den hoff wrote: new to `context' and my first question to the list: how can I achieve the following (`latex') behaviour: \newcommand{\km}{\ensuremath{K_m}} We can now use \km\ in the body text as well as in this \begin{equation} \km = 1 \end{equation} display equation. As a side remark, you should normally avoid using lowercase commands like \km (especially if they are small) as you may inadvertently overwrite an inbuilt TeX command (e.g., if you redefine \span or \omit, amongst others). Unlike LaTeX, ConTeXt does not halt at the redefinition of these commands; it simply spews a warning. Personally, I find that a safer alternative is to use uppercase or camelcase words to define your own commands: either \KM or \Km. This way you avoid conflict with inbuilt commands. If you are using macros for abbreviations, you can also use the following: \definesynonyms[mathnotation][mathnotations][\infull] \mathnotation [KM] {\mathematics{K_m}} {Viscosity of membrane} \starttext \placelistofmathnotations \section{Test} We can use \KM\ to denote \infull{KM}. \startformula \KM = 10 \stopformula \stoptext This way, you get a list of notation for free. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] equivalent to \newcommand{...}{\ensuremath{...}}
On Tue, 09 Dec 2014 16:12:08 +0100, Aditya Mahajan adit...@umich.edu wrote: On Mon, 8 Dec 2014, j. van den hoff wrote: new to `context' and my first question to the list: how can I achieve the following (`latex') behaviour: \newcommand{\km}{\ensuremath{K_m}} We can now use \km\ in the body text as well as in this \begin{equation} \km = 1 \end{equation} display equation. As a side remark, you should normally avoid using lowercase commands like \km (especially if they are small) as you may inadvertently overwrite an inbuilt TeX command (e.g., if you redefine \span or \omit, amongst others). Unlike LaTeX, ConTeXt does not halt at the redefinition of these commands; it simply spews a warning. Personally, I find that a is this behavior configurable (I think I'd rather prefer `latex' behavior here and still use lowercase abbreviations until I hit a real names clash) safer alternative is to use uppercase or camelcase words to define your own commands: either \KM or \Km. This way you avoid conflict with inbuilt commands. understood. If you are using macros for abbreviations, you can also use the following: \definesynonyms[mathnotation][mathnotations][\infull] \mathnotation [KM] {\mathematics{K_m}} {Viscosity of membrane} \starttext \placelistofmathnotations \section{Test} We can use \KM\ to denote \infull{KM}. \startformula \KM = 10 \stopformula \stoptext really thanks a lot for this tip. this seems to be the way to go for any serious document. (and `viscosity of membrane' is tight, but not right: it's a metabolic rate (which could be influenced by membrane permeability) in my context ;-)) joerg This way, you get a list of notation for free. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- Using Opera's revolutionary email client: http://www.opera.com/mail/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting copy-pastable ligatures?
On 04 Dec 2014, at 16:22, Hans Hagen pra...@wxs.nl wrote: On 12/4/2014 3:54 PM, Gerben Wierda wrote: On 30 Nov 2014, at 23:38, Hans Hagen pra...@wxs.nl wrote: On 11/30/2014 1:22 PM, Gerben Wierda wrote: I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups [font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold][Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] op zich zou het moeten werken (een tonunicode vector) als er een pdfr-*.mkii file is voor de encoding ... er is er eentje voor ec encoding Ik ben er niet zo in thuis, maar welke items in bij font setup moet ik dan wijzigen? texnansi - ec I changed some of the last font statements to \definetypeface[allsans][rm][serif][optima][default][encoding=ec] \definetypeface[allsans][ss][sans][optima][default][encoding=ec] but that does not help. Probably more is needed, but that requires a programmer-level knowledge of ConTeXt and not a user-level :-) G - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting copy-pastable ligatures?
On 30 Nov 2014, at 23:38, Hans Hagen pra...@wxs.nl wrote: On 11/30/2014 1:22 PM, Gerben Wierda wrote: I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups [font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold][Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] op zich zou het moeten werken (een tonunicode vector) als er een pdfr-*.mkii file is voor de encoding ... er is er eentje voor ec encoding Ik ben er niet zo in thuis, maar welke items in bij font setup moet ik dan wijzigen? G Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting copy-pastable ligatures?
On 12/4/2014 3:54 PM, Gerben Wierda wrote: On 30 Nov 2014, at 23:38, Hans Hagen pra...@wxs.nl wrote: On 11/30/2014 1:22 PM, Gerben Wierda wrote: I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups [font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold][Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] op zich zou het moeten werken (een tonunicode vector) als er een pdfr-*.mkii file is voor de encoding ... er is er eentje voor ec encoding Ik ben er niet zo in thuis, maar welke items in bij font setup moet ik dan wijzigen? texnansi - ec - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \Words and uppercase letters
Dear list, the following sample doesn’t work as expected: \starttext \Words A CCC \stoptext Is there no way to get all words in lowercase characters and the initial uppercase characters? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
Am 2014-12-03 um 22:52 schrieb Pablo Rodriguez oi...@gmx.es: the following sample doesn’t work as expected: \starttext \Words A CCC \stoptext Is there no way to get all words in lowercase characters and the initial uppercase characters? \Words{} uppercases the first character of the words in its brackets. What do you expect? See also http://wiki.contextgarden.net/Basic_Text_Formatting Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On 12/03/2014 06:09 PM, Henning Hraban Ramm wrote: Am 2014-12-03 um 22:52 schrieb Pablo Rodriguez: [...] Is there no way to get all words in lowercase characters and the initial uppercase characters? \Words{} uppercases the first character of the words in its brackets. What do you expect? Many thanks for your reply, Hraban. I expected that all other characters would be in lowercase. \word{AAA} does this for all characters, so I thought \Words{A} would do the same for the characters others than the first one in each word. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On 12/3/2014 5:52 PM, Pablo Rodriguez wrote: Dear list, the following sample doesn’t work as expected: \starttext \Words A CCC \stoptext use this grouped: \Words{} Is there no way to get all words in lowercase characters and the initial uppercase characters? I'll add \camel - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On Wed, Dec 03 2014, Pablo Rodriguez wrote: I thought \Words{A} would do the same for the characters others than the first one in each word. \def\myWords#1{\Words{\lowercase{#1}}} \starttext \myWords{A CCC} \stoptext -- Peter ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On Wed, 3 Dec 2014 19:05:22 +0100 Peter Münster pmli...@free.fr wrote: On Wed, Dec 03 2014, Pablo Rodriguez wrote: I thought \Words{A} would do the same for the characters others than the first one in each word. \def\myWords#1{\Words{\lowercase{#1}}} \starttext \myWords{A CCC} \stoptext This is because we want \Words{} to respect some upper case, for example, \Words{Acronyms, such as DNA, should remain capitalized}. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On 12/03/2014 07:01 PM, Hans Hagen wrote: On 12/3/2014 5:52 PM, Pablo Rodriguez wrote: [...] \Words A CCC use this grouped: \Words{} My fault. Is there no way to get all words in lowercase characters and the initial uppercase characters? I'll add \camel Many thanks for the implementation. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On 12/03/2014 07:05 PM, Peter Münster wrote: On Wed, Dec 03 2014, Pablo Rodriguez wrote: I thought \Words{A} would do the same for the characters others than the first one in each word. \def\myWords#1{\Words{\lowercase{#1}}} \starttext \myWords{A CCC} \stoptext Many thanks for your reply, Peter. This was exactly what I needed. I tried \Words{\words{AAA BBB CCC}}. Since it didn’t work, I was clueless about this. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \Words and uppercase letters
On 12/03/2014 07:16 PM, Alan BRASLAU wrote: On Wed, 3 Dec 2014 19:05:22 +0100 Peter Münster wrote: \def\myWords#1{\Words{\lowercase{#1}}} \starttext \myWords{A CCC} \stoptext This is because we want \Words{} to respect some upper case, for example, \Words{Acronyms, such as DNA, should remain capitalized}. Many thanks for the info, Alan. Everything is clear to me now. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Getting copy-pastable ligatures?
I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups[font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold] [Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting copy-pastable ligatures?
On 11/30/2014 1:22 PM, Gerben Wierda wrote: I’m using mkii. I’d like ot be able to copy-paste words form the resulting pdf. That works well, except for words that contain ligatures (e.g. fl fi etc.) Is there a way I can tell (Con)TeXt that the result must be copy-pastable. To make matters slightly more complex I’m using Optima, converted on a Mac: \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups [font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold][Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] op zich zou het moeten werken (een tonunicode vector) als er een pdfr-*.mkii file is voor de encoding ... er is er eentje voor ec encoding Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] small abstracts in table of contents?
On 25 Nov 2014, at 15:12, Otared Kavian ota...@gmail.com wrote: Hi Gerben, This shouldn’t be a problem, since you may give your own style to the list of chapters by saying for example \setuplist[chapter][style=\bf] or whatever style you wish. I tried \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] but what happens in the TOC is: - Chapter numbers and page numbers are \tfa - Chapter name seems \it - Chapter text is \itx In other words, the \itx command for chaptertext influences the style of chapter G Minimal example: \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 14:49, Gerben Wierda gerben.wie...@rna.nl wrote: This works, but not completely. I’ve added this to my environments file: \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] and the contents list is created by \title[h:toc]{Contents} \placelist[chapter,chaptertext] %\completecontent[level=chapter] The %-outcommented was the original list. In the chapter file, it now says \chapter[h:foo]{Foo} \writetolist[chaptertext]{}{\input tufte} The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size. G On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com wrote: Hi Gerben, As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list): \definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? G ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist
Re: [NTG-context] small abstracts in table of contents?
Hi Gerben, Sorry for not having been more cautious: what I sent you works fine with mkiv, but somehow in mkii giving a style for your list of « chaptertext » spills over to the list of « chapter »… The following seems to give your desired result in mkii: \definelist[chaptertext] \setuplist[chaptertext][pagecommand=\gobbleoneargument] \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}} \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \ChapterAbstract{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 17:01, Gerben Wierda gerben.wie...@rna.nl wrote: On 25 Nov 2014, at 15:12, Otared Kavian ota...@gmail.com mailto:ota...@gmail.com wrote: Hi Gerben, This shouldn’t be a problem, since you may give your own style to the list of chapters by saying for example \setuplist[chapter][style=\bf] or whatever style you wish. I tried \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] but what happens in the TOC is: - Chapter numbers and page numbers are \tfa - Chapter name seems \it - Chapter text is \itx In other words, the \itx command for chaptertext influences the style of chapter G Minimal example: \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] \setuplist[chapter][style=\tfa,before={\blank[big]}] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 14:49, Gerben Wierda gerben.wie...@rna.nl mailto:gerben.wie...@rna.nl wrote: This works, but not completely. I’ve added this to my environments file: \definelist[chaptertext] \setuplist[chaptertext][style=\itx,margin=3em,pagecommand=\gobbleoneargument] and the contents list is created by \title[h:toc]{Contents} \placelist[chapter,chaptertext] %\completecontent[level=chapter] The %-outcommented was the original list. In the chapter file, it now says \chapter[h:foo]{Foo} \writetolist[chaptertext]{}{\input tufte} The effect of this is that every chapter name in the list is typeset as \itx, not just the summary chaptertext. The chapter numbers are still in their original font and size. G On 25 Nov 2014, at 08:18, Otared Kavian ota...@gmail.com mailto:ota...@gmail.com wrote: Hi Gerben, As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list): \definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl mailto:gerben.wie...@rna.nl wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? G ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net 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 mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net http://contextgarden.net
Re: [NTG-context] Problem with PDF bookmarks (outline)
On 11/5/2014 3:36 PM, Michał Goliński wrote: I am nevertheless curious, how one could change the chapters in frontmatter/backmatter to parts without affecting the numbering of later parts (or correct the numbering, \decrementnumber[part] doesn't seem to work). the magic words is 'resetset' and you can search for it on the wiki and in the test suite .. you can control when gets reset at what level Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (again) bug in index sorting?
On Mon, 3 Nov 2014 13:22:28 +0100 Robert Blackstone blackstone.rob...@gmail.com wrote: On 3 Nov 2014, at 10:01 , Alan BRASLAU alan.bras...@cea.fr wrote On Sun, 2 Nov 2014 12:45:25 +0100 Robert Blackstone blackstone.rob...@gmail.com wrote: On 2 Nov 2014, at 12:00 , Pablo Rodriguez oi...@gmx.es wrote I Alphabetize letter by letter. When alphabetizing surnames, remember that “nothing precedes something”: Brown, J. R., precedes Browning, A. R., even though i precedes j in the alphabet. Singh, Y., precedes Singh Siddhu, N. López, M. E., precedes López de Molina, G. Ibn Abdulaziz, T., precedes Ibn Nidal, A. K. M. Girard, J.-B., precedes Girard-Perregaux, A. S. Villafuerte, S. A., precedes Villa-Lobos, J. Benjamin, A. S., precedes ben Yaakov, D. Hi Alan, This still puzzles me a bit. You write: “Brown, J. R., precedes Browning, A.R., even though i precedes j in the alphabet.” But isn’t that because “, precedes “i ? Likewise, when sorting these names (with TeX-Edit Plus), Singh Siddhu, N. comes out before Singh, Y., not the reverse, precisely because, as you say, “nothing precedes something”, or the space between Singh and Siddhu precedes the comma between Singh and Y. Same with López de Molina, G. and López, M. E. Or does ConTeXt, or TeX, have its own sorting order? Please do not forget the \startquotation\stopquotation. I am citing the APA rules, not stating anything on how ConTeXt (or TeX-Edit or anything else) sorts lists in general. Brown precedes Browning because APA sorts on last names. Singh precedes Singh Siddhu because nothing precedes something( Siddhu) López precedes López de Molina for precisely the same reason. Ibn Abdulaziz precedes Ibn Nidal because Ibn is not to be taken into account. Laue, M. von precedes Röntgen, W. C, as well as Van der Waals, J. D. but here things start to get tricky! My point is that sorting lists of course depends on what you are listing. Indexing author names, for example, needs to sort on last names, then first names. Indexing on several levels needs to sort first by the first level, then by the second level, ... When indexing items containing several words, the sorting should go word by word, thus tipografía digital before tipografías This amounts to making whitespace higher precedence than anything else, which I believe was not the case but now is fixed. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (again) bug in index sorting?
On 11/03/2014 02:50 PM, Alan BRASLAU wrote: [...] When indexing items containing several words, the sorting should go word by word, thus tipografía digital before tipografías This amounts to making whitespace higher precedence than anything else, which I believe was not the case but now is fixed. This was fixed in beta from yesterday. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] slightly-OT: Adobe records your every move!
Of course, Big Brother is watching us all. (and the NSA has long identified the present mailing list as carrying subversive information...) Yes, we (in Europe, perhaps elsewhere?) get to pay a tax for copying our own data on CDs/DVDs, just like most pay a tax to Bill when buying hardware, even if we intend on installing *powerful antivirus software* (rather than your favorite OS;-). I started this thread as ConTeXt is quite capable of producing e-book texts; We discussed this at the recent ConTeXt meeting and spoke some on the future of publishing. So we need to be aware of these issues and how e-books are being used and where they are going. (I am sure that Apple has recorded now what I have read on my iPad: mkiv-publications.epub!) Maybe the next step for Sanjoy to think about is recording what pages (or indeed what words) his students linger-over or re-read several times as another way of identifying difficult passages in a text. (One then will not even have to actively ask questions...) Alan P.S. I attended a presentation on computer security given at my company by a speaker from the French intelligence agency. Amongst other things, he demonstrated using a special little standard-looking USB key how one can easily scan EVERYTHING on your computer without you noticing anything: just plugging it into your computer was sufficient. He even showed that plugging in his cell-phone for a little bit just to recharge it did the job too. Just as plugging an audience member's cell phone into his little USB charger was also able to record all of its contents. Fast too! Quite interesting. Then there is also wifi... Furthermore, his message is that we now voluntarily reveal much more information about ourselves then even the police are allowed to obtain. In the wrong hands this information can eventually go a long way... On Fri, 17 Oct 2014 10:07:59 +0200 Hans Hagen pra...@wxs.nl wrote: On 10/16/2014 8:04 PM, Alan BRASLAU wrote: E-book specialists, beware: http://arstechnica.com/security/2014/10/adobes-e-book-reader-sends-your-reading-logs-back-to-adobe-in-plain-text/ I think that in the end self-publishing will take over most of the market. Of course we will then have a decaded of mess due to also licencing issues but in the end authors will figure out that getting rid of distribution pays off in revenues. (I just in the paper read about a band that made more of 20K self sold copies of a cd then 200K via a company). Anyway: * User ID: this is the user's Adobe ID or an anonymous ID for an unactivated version of DE. I assume one can change the anonymous ID with some help * Device ID: a unique identifier for the computer running DE, collected for digital right management (DRM) purposes since publishers typically restrict the number of devices an eBook or digital publication can be read on, Adobe's spokesperson said. So what if a machine breaks down (these devices are made to break down ... much faster than paper) * Certified App ID: a key that allows DE to open documents protected by DRM from being opened with unauthorized software. It's like enforcing a special kind of reading glasses. * Device IP address: for geo-location, since publishers have different pricing models in place depending on the location of the reader purchasing a given eBook or digital publication, Adobe's spokesperson said. Ha, so best not travel around i.e. the biggest argument for ebooks is that you can take them in the plane. So better not do that. * Duration for Which the Book was Read: This information is collected to facilitate limited or metered pricing models where publishers or distributors charge readers based on the duration a book is read, said Adobe's spokesperson. Pure crap ... how about disabilities? Reading speed? Next comes the demand for a camera so that they can see who's reading over your shoulder. * Percentage of the Book Read: Believe it or not, some publishers charge based on how much you read of a book—you may be only charged a percentage of the total if you don't finish it. Who believes this indeed. They should add if you didn't like it or didn't understand the content. Nothing about giving away such a book, a second hand market, etc ... It all sounds more like panic reactions than real concepts to me. Last week we got the yearly invoice for 'copying stuff' because we have a copier. The proudly announced new thing is that we now also can scan, email and look at files on our intranet ... funny because I never copy something except our own produced crap. (Like paying extra on blank dvd's that i only occasionally use to copy a free OS on for installing on some old machine.) The main question is: What do users expect? As we can produce (kind of) ebooks, do we need to adapt output to this? Of can we disguise it? Bah, Hans ___ If your
[NTG-context] Latest beta stops loading some ttc fonts
The following minimal example used to work fine: \starttypescript [serif] [zhfonts] \definefontsynonym [Serif] [name:nsimsun] \stoptypescript \starttypescript [zhfonts] \definetypeface [zhfonts] [rm] [serif] [zhfonts] \stoptypescript \usetypescript [zhfonts] \setupbodyfont [zhfonts, rm, 11pt] \starttext 测试 \stoptext but it's no longer the case. The font used here is 'simsun.ttc' which ships with Chinese edition Windows systems by default. When I require name:nsimsun as above, the TTFAddLangStr() function in the luatex code base will have the following information: fontname lang NSimSun 0 NSimSun 1033 新宋体 2052 That is when lang equals 0 or 1033, the fontname will be NSimSun, but when lang equals 2052, the fontname will be 新宋体, the Chinese words for NSimSun. Although the ValidatePostScriptFontName() complains about the Chinese name of this font, and set 'bad_ps_fontname' to true, luatex itself don't stop the font fromgetting the right fontname NSimSun, since it chooses ASCII names when there're multiple fontnames. But actions[check metadata](font-otf.lua, 1812),sets the metadata.fontname from the correct NSimSun to bad-fontname-simsun, and this change causes ff_get_ttc_index() to always return -1 as the index, which caused ConTeXt to complain about the following error message before bail out: (bad-fontname-simsun:-1)Invalid TTC index number mtx-context | fatal error: return code: 1 So, maybe font-otf.lua may need not change metadata.fontname and metadata.fullname if these two names are not nil? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Erratic error message
Hi all, When typesetting my project with interaction, sometimes the processing stops after a few runs with an error message that points at an empty line in one of the chapters that normally gives no trouble. For interaction this setup is used: \setupinteraction[state=start,focus=standard,style=,color=blue,contrastcolor=] \placebookmarks[prechapter,chapter,section][prechapter,chapter,section][number=no] When I comment out the first of these two lines, in other words, without interaction, the project is processed without any problem. Sometimes, unfortunately not always, when I immediately repeat the processing with interaction, all goes well. So what is my problem? Not understanding what might be wrong, and not being able to correct things gives me a feeling of insecurity, trusting Murphy’s law to make sure that processing will fail when my deadline is approaching fast. I use mkiv on Mac OSX 10.9.4. All my standalone versions from january up to today give the same behaviour. I mostly get the following error message: (occasionally something different happens: the processing gets into some endless loop and I have to abort it) +++ tex errorerror on line 2314 in file TD-Ch3.tex: ! Attempt to double-free dir node 54467, ignored \page_shipouts_normal ...box \shipoutscratchbox }} \else \page_shipouts_ignor... \page_boxes_shipout ... {\box \shipoutscratchbox } \fi \setnextrealpageno \th... \page_otr_construct_and_shipout ...cted_page #1#2} \page_otr_flush_pending_co... \page_sides_output_routine_nop ...de_float_output \global \d_page_sides_vsiz... \page_sides_output_routine ..._output_routine_nop \fi \page_otr_triggered_output_routine ...and_routine \fi ... l.2314 2304 {\externalfigure[LegrenIoViLasfa]}{} 2305 {\externalfigure[LegrenIoViLasfi**]}{}%LegrenIoViLasfi* voor verbeterde versie 2306 \stopcombination 2307 2308 2309 %{\externalfigure[LegrenIoViLastot]} 2310 %Ex. 3.70 Legrenzi\index[Legrenzi]{Legrenzi, Giovanni}, aria \quote{Io vi lascio} 2311 2312 2313 Of course the major 6th should also be played upon the {\em a} in b.~3. 2314 2315 2316A number of major 6ths occur in the first section of Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}'s \quote{Capriccio sopra La Sol Fa Mi Re Ut} %\footnote{Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}, {\em Il primo libro di capricci} (Rome, 1624), ME (Milan, 1984), 9.} 2317 (\in{Ex.}[fig:FrescCaprLaSolFaMiReUtfi]).\footnote{\dcite{Frescobaldi:1984blb}, 9.} All sharps are used above respectively the descending bass progressions {\em e'}$\xrightarrow[none]${\em d'}, with {\em \sharp c''}; {\em a}$\xrightarrow[none]${\em g}, with {\em \sharp f''}, %G\sharp, 2318 and {\em B}$\xrightarrow[none]${\em A} with {\em \sharp g'}. %G\sharp. 2319 2320 2321 \placeexample[force][fig:FrescCaprLaSolFaMiReUtfi]{Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}, \quote{Capriccio sopra La Sol Fa Mi Re Ut}, bb.~7-15} 2322 {\externalfigure[FrescCaprLaSolFaMiReUtfi*]}%* voor compr 2323 %Ex. 3.71 Frescobaldi\index[Frescobaldi]{Frescoba ++ Does anybody have any idea what is wrong here? (I should add that when I comment out or hide this passage the error moves to the next passage and so on.) Best regards, Robert Blackstone___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Erratic error message
On 9/17/2014 12:59 PM, Robert Blackstone wrote: Hi all, When typesetting my project with interaction, sometimes the processing stops after a few runs with an error message that points at an empty line in one of the chapters that normally gives no trouble. For interaction this setup is used: \setupinteraction[state=start,focus=standard,style=,color=blue,contrastcolor=] \placebookmarks[prechapter,chapter,section][prechapter,chapter,section][number=no] When I comment out the first of these two lines, in other words, without interaction, the project is processed without any problem. Sometimes, unfortunately not always, when I immediately repeat the processing with interaction, all goes well. So what is my problem? Not understanding what might be wrong, and not being able to correct things gives me a feeling of insecurity, trusting Murphy’s law to make sure that processing will fail when my deadline is approaching fast. I use mkiv on Mac OSX 10.9.4. All my standalone versions from january up to today give the same behaviour. I mostly get the followingerror message: (occasionally something different happens: the processing gets into some endless loop and I have to abort it) +++ tex error error on line 2314 in file TD-Ch3.tex: ! Attempt to double-free dir node 54467, ignored \page_shipouts_normal ...box \shipoutscratchbox }} \else \page_shipouts_ignor... \page_boxes_shipout ... {\box \shipoutscratchbox } \fi \setnextrealpageno \th... \page_otr_construct_and_shipout ...cted_page #1#2} \page_otr_flush_pending_co... \page_sides_output_routine_nop ...de_float_output \global \d_page_sides_vsiz... \page_sides_output_routine _output_routine_nop \fi \page_otr_triggered_output_routine ...and_routine \fi ... l.2314 2304 {\externalfigure[LegrenIoViLasfa]}{} 2305 {\externalfigure[LegrenIoViLasfi**]}{}%LegrenIoViLasfi* voor verbeterde versie 2306 \stopcombination 2307 2308 2309 %{\externalfigure[LegrenIoViLastot]} 2310 %Ex. 3.70 Legrenzi\index[Legrenzi]{Legrenzi, Giovanni}, aria \quote{Io vi lascio} 2311 2312 2313 Of course the major 6th should also be played upon the {\em a}in b.~3. 2314 2315 2316A number of major 6ths occur in the first section of Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}'s \quote{Capriccio sopra La Sol Fa Mi Re Ut} %\footnote{Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}, {\em Il primo libro di capricci} (Rome, 1624), ME (Milan, 1984), 9.} 2317 (\in{Ex.}[fig:FrescCaprLaSolFaMiReUtfi]).\footnote{\dcite{Frescobaldi:1984blb}, 9.} All sharps are used above respectively the descending bass progressions {\em e'}$\xrightarrow[none]${\em d'}, with {\em \sharp c''}; {\em a}$\xrightarrow[none]${\em g}, with {\em \sharp f''}, %G\sharp, 2318 and {\em B}$\xrightarrow[none]${\em A} with {\em \sharp g'}. %G\sharp. 2319 2320 2321 \placeexample[force][fig:FrescCaprLaSolFaMiReUtfi]{Frescobaldi\index[Frescobaldi]{Frescobaldi, Girolamo}, \quote{Capriccio sopra La Sol Fa Mi Re Ut}, bb.~7-15} 2322 {\externalfigure[FrescCaprLaSolFaMiReUtfi*]}%* voor compr 2323 %Ex. 3.71 Frescobaldi\index[Frescobaldi]{Frescoba ++ Does anybody have any idea what is wrong here? (I should add that when I comment out or hide this passage the error moves to the next passage and so on.) a minimal example is needed - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Remove left and right offset from nested frames?
Thanks Wolfgang, that worked well. Are there more reasons to use start stop over start{}? On August 31, 2014 9:32:31 PM PDT, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 01.09.2014 um 00:18 schrieb Mica Semrick m...@silentumbrella.com: Hello! Given: \starttext \framed[frame=on,width=local,offset=0in,loffset=0in,roffset=0in,frameoffset=0in]{ Add a % after the {. \framed [frame=on, location=middle, align={flushleft,nothyphenated,verytolerant}] % maybe also stretch {% {\tfd My Name Here} } \hfill \framed [frame=on, location=middle, align={flushright,nothyphenated,verytolerant}] % maybe also stretch {% 1234 Tree Ave. \#407, Beach City, CA 99876 \\ (123) 456-7890 \ \bullet \ \goto{m...@email.com}[url(mailto:m...@email.com)] } Add a % after the }. }\stoptext The two nested \framed commands are aligned as I'd like them, but I'd like to remove the small gaps so the text in the first nexted frame sits flush to the left of the text area and the second framed sits flush right to the text area. In other words, I'd like to remove the small gaps from the left and right of the frames. Is that possible? You forgot a few comment signs in your code which can be avoided when you \startframed … \stopframed instead of \framed{…}. \starttext \startframed[frame=on,width=local,offset=0pt] \startframed[frame=on,location=middle,align={flushleft,nothyphenated,verytolerant},foregroundstyle=\tfd] My Name Here \stopframed \hfill \startframed[frame=on,location=middle,align={flushright,nothyphenated,verytolerant}] 1234 Tree Ave. \#407, Beach City, CA 99876\\ (123) 456-7890 \hspace[medium] \symbol[bullet] \hspace[medium] \goto{m...@email.com}[url(mailto:m...@email.com)] \stopframed \stopframed \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 : http://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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Remove left and right offset from nested frames?
Hello! Given: \starttext \framed[frame=on,width=local,offset=0in,loffset=0in,roffset=0in,frameoffset=0in]{ \framed [frame=on, location=middle, align={flushleft,nothyphenated,verytolerant}] % maybe also stretch {% {\tfd My Name Here} } \hfill \framed [frame=on, location=middle, align={flushright,nothyphenated,verytolerant}] % maybe also stretch {% 1234 Tree Ave. \#407, Beach City, CA 99876 \\ (123) 456-7890 \ \bullet \ \goto{m...@email.com}[url(mailto:m...@email.com)] } }\stoptext The two nested \framed commands are aligned as I'd like them, but I'd like to remove the small gaps so the text in the first nexted frame sits flush to the left of the text area and the second framed sits flush right to the text area. In other words, I'd like to remove the small gaps from the left and right of the frames. Is that possible? Best, Mica ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___