Re: [NTG-context] two issues with new hyphenator

2014-12-10 Thread Pablo Rodriguez
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

Re: [NTG-context] Problems with repeating layers

2014-12-10 Thread Pablo Rodriguez
On 12/09/2014 04:08 PM, Reza Housseini wrote: Thanks Pablo I already used this solution. For me it looks like a bug that the state argument does not change anything because the manual clearly states the expected behaviour of state. But anyhow I'll use the other solution. Hi Reza, I

Re: [NTG-context] issue with t-scancsv.lua

2014-12-10 Thread Pablo Rodriguez
On 12/09/2014 12:45 AM, Jaroslav Hajtmar wrote: Hi Pablo. I am glad that my library for you to use ... I noticed that you have in your CSV file header with column names (ie. head of CSV document). I do not know if you noticed the option put this information into scancsv.lua library. This is

Re: [NTG-context] bug in latest beta?

2014-12-10 Thread Pablo Rodriguez
On 12/10/2014 08:14 PM, Hans Hagen wrote: On 12/10/2014 7:51 PM, Pablo Rodriguez wrote: Hans, after updating to latest beta I get an error when compiling the sample bellow with beta from 2014.12.09 13:03: \setupitaliccorrection[global,always] \definefontfamily[mainface][serif][TeX

[NTG-context] underscore hyphenation

2014-12-10 Thread Pablo Rodriguez
Hans, the sample below hyphenates right what comes before \TexC in the paragraph. Also the contents of \TexC are hyphenated right. But hyphen is removed from standard text after the last \TexC command in the paragraph. I have just accidentally discovered it. Many thanks for your help, Pablo

Re: [NTG-context] underscore hyphenation

2014-12-11 Thread Pablo Rodriguez
On 12/10/2014 10:58 PM, Hans Hagen wrote: On 12/10/2014 9:03 PM, Pablo Rodriguez wrote: Hans, the sample below hyphenates right what comes before \TexC in the paragraph. Also the contents of \TexC are hyphenated right. But hyphen is removed from standard text after the last \TexC command

Re: [NTG-context] two issues with new hyphenator

2014-12-11 Thread Pablo Rodriguez
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

[NTG-context] bug in \setupitemize?

2014-12-11 Thread Pablo Rodriguez
Dear list, I have the following sample: \showframe\showgrid \setuppapersize[A6] \setupitemize[inbetween={\blank[preference,big]}] \starttext \dorecurse{3}{\dorecurse{3}{Sometimes is really hard to place list items. Am I missing something? }\par} \startitemize

[NTG-context] [location=text] breaks setups in \setupnotes

2014-12-11 Thread Pablo Rodriguez
Dear list, I have the following sample: \setuppapersize[A6] \startsetups[setups:footnote] \setupinterlinespace[line=5ex] \stopsetups \setupnote[footnote][way=bytext, location=text, setups=setups:footnote, style=\itxx] \starttext Hi\footnote{\input

Re: [NTG-context] [location=text] breaks setups in \setupnotes

2014-12-11 Thread Pablo Rodriguez
On 12/11/2014 08:02 PM, Wolfgang Schuster wrote: Am 11.12.2014 um 19:14 schrieb Pablo Rodriguez: [...] For some strange reason, when location=text is set \setupnote, the setups option isn’t honored? Could anyone confirm the bug? It’s not a bug, the setups key is only used when notes

Re: [NTG-context] [location=text] breaks setups in \setupnotes

2014-12-11 Thread Pablo Rodriguez
On 12/11/2014 08:38 PM, Wolfgang Schuster wrote: Am 11.12.2014 um 20:31 schrieb Pablo Rodriguez: On 12/11/2014 08:02 PM, Wolfgang Schuster wrote: [...] It’s not a bug, the setups key is only used when notes are placed at the bottom of the page but not when you flush them with the \placenotes

Re: [NTG-context] bug in \setupitemize?

2014-12-12 Thread Pablo Rodriguez
On 12/12/2014 09:36 AM, Hans Hagen wrote: On 12/11/2014 7:04 PM, Pablo Rodriguez wrote: [...] Although I ask ConTeXt to try to insert a page break between list items (which for some strange reason is avoided), the whole first list item is moved to the next page, leaving a huge blank space

Re: [NTG-context] bug in \setupitemize?

2014-12-12 Thread Pablo Rodriguez
On 12/12/2014 06:53 PM, Wolfgang Schuster wrote: Am 12.12.2014 um 16:32 schrieb Pablo Rodriguez: On 12/12/2014 09:36 AM, Hans Hagen wrote: [...] maybe \startitemize[loose] Many thanks for your reply, Hans What would be the way to add it in a setup command? [...] \setupitemize[each

[NTG-context] help with command definition

2014-12-14 Thread Pablo Rodriguez
Dear list, I have the following sample: \setuppapersize[A7,landscape] \def\slide#1{\startstandardmakeup#1\stopstandardmakeup} \def\codeslide#1{\startstandardmakeup \starttyping#1\stoptyping\stopstandardmakeup} \starttext \startstandardmakeup \ConTeXt

[NTG-context] problem with \processaction

2014-12-16 Thread Pablo Rodriguez
Dear list, I have the following sample: \def\SystemUser{whoami} \def\CheckUser{\processaction[\SystemUser][whoami=whm]} \starttext \doifelse{\CheckUser}{whm}{This is the right user.} {This is the wrong user.} \doifelse{\SystemUser}{whoami}{This is the right user.}

[NTG-context] command to get the text value?

2014-12-16 Thread Pablo Rodriguez
Dear list, sorry for writing again on the same topic. The issue is important and I don’t know how to solve it. I have a different sample: \def\firstcommand{AAA} \def\secondcommand{aaa} \starttext \doifelse{\word{\firstcommand}} {\secondcommand}{Equal}{Not equal}.

Re: [NTG-context] problem with \processaction

2014-12-16 Thread Pablo Rodriguez
On 12/16/2014 09:50 PM, Hans Hagen wrote: On 12/16/2014 6:51 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \def\SystemUser{whoami} \def\CheckUser{\processaction[\SystemUser][whoami=whm]} \starttext \doifelse{\CheckUser}{whm}{This is the right

Re: [NTG-context] problem with \processaction

2014-12-17 Thread Pablo Rodriguez
On 12/17/2014 01:18 AM, Hans Hagen wrote: On 12/16/2014 10:24 PM, Pablo Rodriguez wrote: [...] Is there no other way to get the text value (so that it could be compared with \doif) from a command that assigns values using \processaction? \setvalue{SomeName:foo}{one} \setvalue{SomeName:bar

[NTG-context] expand date from CSV file

2014-12-17 Thread Pablo Rodriguez
Dear list, I have the following sample: \usemodule[scancsv] \unexpanded\def\lineaction{ \Name\ arrived on \Date\\ } \setheader \setsep{;} \setfiletoscan{mail.csv} \starttext \filelineaction \stoptext that reads data from mail.csv: Name;Date

Re: [NTG-context] expand date from CSV file

2014-12-18 Thread Pablo Rodriguez
17.12.2014 22:20, Pablo Rodriguez napsal(a): Dear list, I have the following sample: \usemodule[scancsv] \unexpanded\def\lineaction{ \Name\ arrived on \Date\\ } \setheader \setsep{;} \setfiletoscan{mail.csv} \starttext \filelineaction

Re: [NTG-context] expand date from CSV file

2014-12-18 Thread Pablo Rodriguez
On 12/18/2014 01:37 PM, Peter Münster wrote: On Thu, Dec 18 2014, Jaroslav Hajtmar wrote: if (year2000) then year=year+2000 end; Hi, What about Test;11/11/1999 ... ;-) Hi Peter, all dates start from this year :-). Pablo -- http://www.ousia.tk

Re: [NTG-context] access to system fonts under MacOSX

2014-12-20 Thread Pablo Rodriguez
On 12/20/2014 07:31 PM, j. van den hoff wrote: newbie question: how can I get access to fonts installed outside the TeX tree under MacOSX (10.9 to be precise)? mtxrun --script font --list --name --pattern=* shows lots of fonts (so they are recognized by context, I'd guess) but the

Re: [NTG-context] vertical alignment of table of contents in makeup

2014-12-20 Thread Pablo Rodriguez
On 12/20/2014 03:13 AM, Mark Szepieniec wrote: There is a trick mentioned on the wiki for top-aligning the contents of a makeup page, namely adding top=,, which cancels the default value of \vss, which is infinitely strechable space. However, that doesn't seem to work when the first element

Re: [NTG-context] setting margins in makeup

2014-12-20 Thread Pablo Rodriguez
On 12/19/2014 03:33 PM, Mark Szepieniec wrote: Also, the manual says I can use the command \showframe to display frames to help in debugging, but that doesn't seem to do anything for me? Hi Mark, I removed the most part of the message, because I think you solved it (as you posted in a reply to

Re: [NTG-context] setting margins in makeup

2014-12-20 Thread Pablo Rodriguez
On 12/19/2014 04:38 PM, Mark Szepieniec wrote: [...] Incidentally, what threw me off was the phrasing in the manual: 4.19 Makeup A document may have a titlepage, a colofon and some pages that are not directly related to the main part of the document. Mostly these pages are not numbered

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/21/2014 11:51 AM, j. van den hoff wrote: On Sat, 20 Dec 2014 23:26:29 +0100, Pablo Rodriguez wrote: You don’t need to define a typescript. \definefontfamily is the command you need. Typeface should be defined only once ([rm] and [serif] are redundant). essentially, I copied/pasted

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/21/2014 02:31 PM, j. van den hoff wrote: On Sat, 20 Dec 2014 23:26:29 +0100, Pablo Rodriguez oi...@gmx.es wrote: Hi Jörg, I don’t have a Mac, but this works in ConTeXt: \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \definefontfamily [mainface] [sans] [Helvetica

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/21/2014 06:37 PM, j. van den hoff wrote: On Sun, 21 Dec 2014 17:20:33 +0100, Pablo Rodriguez wrote: On 12/21/2014 02:31 PM, j. van den hoff wrote: [...] as I wrote in the last mail, only the `courier new' fonts are represented by actual font-files it seems (don't know what the *afm

Re: [NTG-context] vertical alignment of table of contents in makeup

2014-12-21 Thread Pablo Rodriguez
:41 PM, Pablo Rodriguez wrote: On 12/20/2014 03:13 AM, Mark Szepieniec wrote: There is a trick mentioned on the wiki for top-aligning the contents of a makeup page, namely adding top=,, which cancels the default value of \vss, which is infinitely strechable space

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/21/2014 09:24 PM, j. van den hoff wrote: On Sun, 21 Dec 2014 19:22:22 +0100, Pablo Rodriguez wrote: [...] BTW, this should work (if I’m not completely wrong [it doesn’t work on my system, because the courier fonts aren’t listed]): \definefontfamily [mainface] [tt] [courier

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/21/2014 10:45 PM, j. van den hoff wrote: [...] do you have any idea whether this already is 'too old'? if it is: is it recommendable to actually install standalone context beside/instead of the version included in texlive? (I mean, if the actual goal is to write some documents rather

Re: [NTG-context] access to system fonts under MacOSX

2014-12-21 Thread Pablo Rodriguez
On 12/22/2014 12:12 AM, j. van den hoff wrote: OK, I've just installed the standalone version and adjusted my search path. now the very same document does no longer compile. I get the error: 8--- ! Undefined control sequence recently read \doctitle l.106

Re: [NTG-context] system fonts access under macosx (again)

2014-12-23 Thread Pablo Rodriguez
On 12/23/2014 05:42 PM, j. van den hoff wrote: [...] so I seem back to square one in this respect :-(. I can only assume that this has been caused by the `--reload' run (see item 1. above: intitially `optima' italics worked) and/or maybe still fragile support of these `ttc' (true type

Re: [NTG-context] fluctuating baseline of header text

2014-12-27 Thread Pablo Rodriguez
On 12/26/2014 11:32 PM, j. van den hoff wrote: [...] in this example (and with this font) the problem is only occuring when toggling between pages 6/7 or 7/8 (at sufficient zoom it's easy to see), i.e.the header is shifted downward on page 7. in other docs with different fonts it happens

[NTG-context] handling HTML notes in ConTeXt

2014-12-28 Thread Pablo Rodriguez
Dear list, I would like to be able to parse HTML output from pandoc with ConTeXt XML parser (or whichever the right name is). The only issue I cannot solve are footnotes. From markdown: Text^[A footnote.] pandoc parses into HTML as: pTexta href=#fn1 class=footnoteRef

Re: [NTG-context] handling HTML notes in ConTeXt

2014-12-28 Thread Pablo Rodriguez
Hans, many thanks for your sample. It is really amazing. Pablo On 12/28/2014 06:53 PM, Hans Hagen wrote: \startbuffer[demo] doc pText a href=#fn1 class=footnoteRef id=fnref1sup1/sup/a and a href=#fn2 class=footnoteRef id=fnref2sup2/sup/a /p div

[NTG-context] bug in beta from 2014.12.29 10:01

2014-12-29 Thread Pablo Rodriguez
Hans, I have just updated ConTeXt Standalone to beta from 2014.12.29 10:01 and I get the following error: $ contextjit --version mtxrun | unknown script 'context.lua' or 'mtx-context.lua' I’m afraid this seems to be a bug. Many thanks for your help, Pablo -- http://www.ousia.tk

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2014-12-30 Thread Pablo Rodriguez
On 12/29/2014 10:33 PM, Pablo Rodriguez wrote: Hans, I have just updated ConTeXt Standalone to beta from 2014.12.29 10:01 and I get the following error: $ contextjit --version mtxrun | unknown script 'context.lua' or 'mtx-context.lua' I’m afraid this seems to be a bug. I’m

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2014-12-30 Thread Pablo Rodriguez
On 12/30/2014 09:08 PM, Philipp Gesang wrote: ···date: 2014-12-30, Tuesday···from: Pablo Rodriguez··· [...] I’m still experiencing this with beta from 2014.12.30 09:48. Could anyone confirm this? (I’m on Fedora 20, using the 32bit version of the ConTeXt Suite.) Nope, doesn’t happen

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2015-01-02 Thread Pablo Rodriguez
On 12/31/2014 09:10 AM, Akira Kakuto wrote: $ contextjit --version mtxrun | unknown script 'context.lua' or 'mtx-context.lua' I have reproduced it, after some trials, by removing files in trees in cache. So try mtxrun --generate Akira many thanks for your reply and a Happy

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2015-01-02 Thread Pablo Rodriguez
On 12/31/2014 12:14 PM, Philipp Gesang wrote: ···date: 2014-12-31, Wednesday···from: Pablo Rodriguez··· [...] I’m afraid I only get two blank lines from mtxrunjit --find-file mtx-context.lua. The same happens with mtxrun. No result means mtxrun can’t find it. What do you get when you run

Re: [NTG-context] ConTeXt logo in XML

2015-01-26 Thread Pablo Rodriguez
On 01/26/2015 04:33 PM, Wolfgang Schuster wrote: [...] To replace text in your input you can try to use the translate module. \usemodule[translate] \translateinput[ConTeXt][\CONTEXT] \starttext This document was produced with ConTeXt. \enableinputtranslation This document was

Re: [NTG-context] ConTeXt logo in XML

2015-01-26 Thread Pablo Rodriguez
On 01/26/2015 02:40 PM, Wolfgang Schuster wrote: [...] Hans uses for the documentation of the Lua code logo label=context/ to print the ConTeXt logo, to do so the following setup is used (copied from x-ldx.mkiv): \startxmlsetups ldx:logo

[NTG-context] ConTeXt logo in XML

2015-01-26 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] doc pThis context is not ConTeXt./p /doc \stopbuffer \starttext \startxmlsetups xml:initialize \xmlsetsetup{#1}{p|doc}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1}

[NTG-context] checking the first word in a command

2015-01-26 Thread Pablo Rodriguez
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

Re: [NTG-context] checking the first word in a command

2015-01-26 Thread Pablo Rodriguez
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

Re: [NTG-context] bug in current beta?

2015-02-03 Thread Pablo Rodriguez
On 02/03/2015 09:40 PM, Otared Kavian wrote: 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… Hi Otared, sorry for being

Re: [NTG-context] bug in current beta?

2015-02-03 Thread Pablo Rodriguez
On 02/03/2015 09:31 PM, Hans Hagen wrote: [...] more a side effect of a speedup in language switching (assuming no change in patterns after enabling a language) [...] actually, a \mainlanguage after \setuplanguage would work in your case Many thanks for your reply and the fix, Hans. Pablo

Re: [NTG-context] Strange bug in interactive table of content...

2015-01-30 Thread Pablo Rodriguez
On 01/30/2015 04:02 PM, Rob Heusdens wrote: [...] I am using a recent version. [...] So, I should upgrade to the newest beta? Using a beta from 2014.11.26 21:43 shows the bug you described. Upgrading to latest beta makes sense in this case. If you allow me an opinion, I try to keep ConTeXt

[NTG-context] bug in current beta?

2015-02-03 Thread Pablo Rodriguez
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]

Re: [NTG-context] Center two frames

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 06:50 PM, Fabrice wrote: Dear Pablo, Following a post to which you had already answered, I have been able to do using a XTABLE. But I wanted to know if it was possible to do otherwise. But apparently not, so I'll hold your solution. Hi Fabrice, I guess that placing an

Re: [NTG-context] context - docx ??

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 06:55 PM, Alan BRASLAU wrote: Using ConTeXt (not emacs, markdown, or other such things...) you can indeed export to xml, xhtml, and create epub files. [...] The xhtml file can be read in a browser. (some tools seem to have problem with the hyphen=yes option) I don’t know

Re: [NTG-context] context - docx ??

2015-01-14 Thread Pablo Rodriguez
On 01/13/2015 08:59 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, I'm currently writing a paper with very basic typographical needs: blockquotes, emphasis, bibliography, perhaps a graphic or two. The publisher wants the thing in Word, naturally. The last time I did

Re: [NTG-context] adapt fontsize to given width

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 07:59 PM, Wolfgang Schuster wrote: [...] Another solution is to use the \scale command: \starttext \scale[width=\textwidth]{My Title} \stoptext Many thanks for the new rely, Wolfgang. I think this is easier to remember. And replying to my previous question \dontleavehmode

Re: [NTG-context] adapt fontsize to given width

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 07:05 PM, Alan BRASLAU wrote: [...] There is a MP solution: \starttext \startMPcode draw textext(My Title) xsized TextWidth ; \stopMPcode \stoptext Many thanks for your reply, Alan. It’s good to know that MP fits perfectly here. Many thanks for your help, Pablo --

Re: [NTG-context] adapt fontsize to given width

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 06:58 PM, Wolfgang Schuster wrote: [...] Is there a way to make ConTeXt automatically calculate the size of the \setupbodyfont, so that the passage fits exactly to text width? \starttext \WidthSpanningText{My Title}{\textwidth}{Serif} \WidthSpanningText{My

Re: [NTG-context] context - docx ??

2015-01-14 Thread Pablo Rodriguez
On 01/14/2015 09:29 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: [...] I was just about to ask about how pandoc handles xhtml. Some questions for you: Hi Idris, Context produces three relevant files: darwin-xml-div.xhtml darwin-xml-tag.xhtml darwin-xml-raw.xml 1. Which one of

Re: [NTG-context] context - docx ??

2015-01-20 Thread Pablo Rodriguez
On 01/17/2015 10:06 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: On Sat, 17 Jan 2015 13:32:07 -0700, Pablo Rodriguez wrote: [...] Sorry, what was wrong in the conversion to ePub? Just getting a simple copyright page prior to the TOC page was a pain. I ended up having to patch the xml

Re: [NTG-context] context - docx ??

2015-01-17 Thread Pablo Rodriguez
On 01/17/2015 03:45 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: Hi Pablo, Thanks for your detailed reply: Somehow I missed it till just now. Comments: Hi Idris, On Wed, 14 Jan 2015 12:58:11 -0700, Pablo Rodriguez wrote: [...] I have written a small book from a markdown source

[NTG-context] adapt fontsize to given width

2015-01-14 Thread Pablo Rodriguez
Dear list, I have the following sample: \showframe \starttext {\setupbodyfont[120pt]My Title} \stoptext Is there a way to make ConTeXt automatically calculate the size of the \setupbodyfont, so that the passage fits exactly to text width? Many thanks for your help, Pablo --

Re: [NTG-context] counting characters when dealing with XML

2015-01-22 Thread Pablo Rodriguez
On 01/21/2015 12:36 AM, Hans Hagen wrote: On 1/20/2015 8:50 PM, Pablo Rodriguez wrote: Dear list, I have a question when dealing with XML. Is there any way to write a conditional based on the number of characters in a given field? [...] let tex do the work .. counting is not accurate

[NTG-context] bug when dealing with XML classes?

2015-01-22 Thread Pablo Rodriguez
Hans, I have the following sample: \setupbodyfont[30pt] \startbuffer[demo] doc h1This is my title/h1 div class=section class=level1 class=hidden h1This title is hidden/h1 /div div class=section level1 hidden h1This title is not hidden/h1 pText/p

[NTG-context] layers for odd and even pages

2015-01-20 Thread Pablo Rodriguez
Dear list, I have the following sample: \setuppapersize[A5] \setuppagenumbering[alternative=doublesided,location=] \definelayer[testodd][state=start] \setlayer[testodd]{Odd page} \definelayer[testeven][state=continue] \setlayer[testeven]{Even page} \setupbackgrounds[page][background={testodd,

[NTG-context] counting characters when dealing with XML

2015-01-20 Thread Pablo Rodriguez
Dear list, I have a question when dealing with XML. Is there any way to write a conditional based on the number of characters in a given field? I mean, the following field: \xmltext{#1}{h1[@class='subtitle']} If subtitle 60 chars, then fontsize = 10pt. If subtitle 50 chars, then

Re: [NTG-context] bug when dealing with XML classes?

2015-01-22 Thread Pablo Rodriguez
On 01/22/2015 07:57 PM, Hans Hagen wrote: On 1/22/2015 7:42 PM, Pablo Rodriguez wrote: [...] ConTeXt MkIV is not able to understand class=section level1 hidden as class=section class=level1 class=hidden It has nothing to do with understanding: successive attributes

Re: [NTG-context] layers for odd and even pages

2015-01-22 Thread Pablo Rodriguez
On 01/20/2015 11:39 PM, Wolfgang Schuster wrote: Am 20.01.2015 um 20:14 schrieb Pablo Rodriguez: [...] I need different layers in even and odd pages and that they are hidden on empty pages. Which is the way to do it? Not sure if this is the best way but it works. Many thanks for your

Re: [NTG-context] Page Breaks after Headings

2015-01-22 Thread Pablo Rodriguez
On 01/20/2015 11:41 PM, Malte Stien wrote: Hi all, Is there a way I can avoid page breaks after “headings”, i.e. \section, \subsection, \subject, \subsubject, etc? Hi Malte, since I experienced this before and Wolfgang kindly explained to me, the workaround is:

Re: [NTG-context] \executesystemcommand dont work?

2015-02-16 Thread Pablo Rodriguez
On 02/16/2015 12:41 PM, Jaroslav Hajtmar wrote: Hi ConTeXist. After a long time I tried to recompile ConTeXt file that contained the \executesystemcommand. It seems to me that this command stopped working. Can anyone confirm or refute this my perception? Hi Jaroslav, the sample you sent

Re: [NTG-context] Bug with macro tightfunction (Metafun)

2015-02-16 Thread Pablo Rodriguez
On 02/16/2015 06:00 PM, Fabrice Couvreur wrote: Hi, This code generates an error while it was working fine a month ago. Hi Fabrice, MP is too much fun for me ;-)). I mean, this is all Greek to me. I can only report that I get an empty page with both the latest beta from 2015.02.03 23:55 and

Re: [NTG-context] on the t-ruby module

2015-02-18 Thread Pablo Rodriguez
On 02/18/2015 08:36 PM, Wolfgang Schuster wrote: Am 18.02.2015 um 20:25 schrieb Wolfgang Schuster: Am 18.02.2015 um 20:04 schrieb Pablo Rodriguez: I have just discovered your t-ruby module. Many thanks for this module, which is extremely useful for interlinear translations

[NTG-context] on the t-ruby module

2015-02-18 Thread Pablo Rodriguez
Hi Wolfgang, I have just discovered your t-ruby module. Many thanks for this module, which is extremely useful for interlinear translations. Here you have the sample: \usemodule[ruby] \defineruby[trans][textstyle=\it] \starttext \startTEXpage[offset=1em] \trans{The}{Der}

[NTG-context] removing layers in empty pages

2015-02-18 Thread Pablo Rodriguez
Dear list, I come with a different approach to the issue I had yesterday. I have a sample: \setuppapersize[A6] \setuppagenumbering[alternative=doublesided, location=] \setupexternalfigures[location=default] \starttext \dorecurse{5}{ \definelayer[spider][state=start]

[NTG-context] setup different layouts in merged documents

2015-02-17 Thread Pablo Rodriguez
Dear list, I have the following sample: \setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm,height=fit] \showframe \definelayout[first][margin=20mm, width=fit, topspace=110mm, bottomspace=20mm, height=fit] \usemodule[scancsv] \starttext \startbuffer[text-content]

Re: [NTG-context] setup different layouts in merged documents

2015-02-17 Thread Pablo Rodriguez
On 02/17/2015 08:59 PM, Wolfgang Schuster wrote: Am 17.02.2015 um 20:49 schrieb Pablo Rodriguez: [...] \setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm,height=fit] \showframe \definelayout[first][margin=20mm, width=fit, topspace=110mm, bottomspace=20mm, height=fit

Re: [NTG-context] \executesystemcommand dont work?

2015-02-16 Thread Pablo Rodriguez
On 02/16/2015 10:20 PM, Jaroslav Hajtmar wrote: Thanks to Pablo for testing of functionality. Does anyone know whether it could be related to the random last comprehensive update of Win7? I read that Microsoft corrected with problem of big security hole. It is strange that a few days ago

[NTG-context] head stopper and hang

2015-02-19 Thread Pablo Rodriguez
Dear list, I have the following sample: \setuplabeltext[subsection=Activity~] \setuphead[subsection][sectionsegments=subsection] \setuplist[subsection][width=fit, stopper={: }] \setuplabeltext[section=Area~] \setuphead[section][hang=broad, stopper={· }] \starttext \completecontent

Re: [NTG-context] removing layers in empty pages

2015-02-19 Thread Pablo Rodriguez
On 02/19/2015 06:28 AM, Wolfgang Schuster wrote: Am 18.02.2015 um 22:32 schrieb Pablo Rodriguez: [...] How can I remove layers from empty pages? I know there is a state=stop, but I don’t know how to link this to empty pages. Use \page[yes,blank,right] to move to a new right page

Re: [NTG-context] checking the first word in a command

2015-01-27 Thread Pablo Rodriguez
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

[NTG-context] \translate and PDF bookmarks

2015-01-29 Thread Pablo Rodriguez
Dear list, I have the following sample: \setupinteraction[state=start] \placebookmarks[section][criterium=all] \def\FootnotesHeading{\translate[en=English Notes, es=Notas en español]} \def\mimo{\section{\FootnotesHeading}} \starttext \es\mimo \en\mimo \stoptext Headings except in PDF bookmarks

Re: [NTG-context] \translate and PDF bookmarks

2015-01-29 Thread Pablo Rodriguez
On 01/29/2015 08:39 PM, Wolfgang Schuster wrote: Am 29.01.2015 um 20:28 schrieb Pablo Rodriguez: [...] How can I get titles in PDF bookmarks? You can’t use the \translate command to set different texts for bookmarks because it is unexpandable. What you can do is to use language dependent

Re: [NTG-context] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 01:36 PM, Hans Hagen wrote: On 1/31/2015 1:12 PM, Pablo Rodriguez wrote: [...] It doesn’t show what you meant, the link destination is not on the heading itself, but on the next paragraph. \enabletrackers[*references*] \enabletrackers[*destinations*] Hi Hans, many thanks

Re: [NTG-context] font search path and subfolders

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 01:40 PM, Jörg Weger wrote: In my Linux home folder I have the usual “~/.fonts/” folder in which I have put subfolders “~/.fonts/opentype/” and “~/.fonts/truetype/”. Inside those subfolders I would like font families to have their own subfolders. [...] What am I missing?

[NTG-context] interactive footnote links

2015-01-31 Thread Pablo Rodriguez
Hans, I have a proposal for interactive footnote links. First, the sample: \setupinteraction[state=start] \starttext a\footnote{b} \stoptext In the PDF file, the two links are defined: /Subtype /Link /Dest [13 0 R /Fit] /F 4 /Rect [76.725 698.345 80.957 712.772]

Re: [NTG-context] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 05:42 PM, Rob Heusdens wrote: [...] The code looks likes this, but this examples does not exhibit the same faulty off-by-1-page interactive page jump behaviour. In the chapters in the body matter, always directly after a new chapter a section begins (in this example omitted).

Re: [NTG-context] font search path and subfolders

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 05:35 PM, Jörg Weger wrote: I still get (while using subfolders in ~/.fonts/opentype/) !LuaTeX error: cannot find OpenType font file for reading () == Fatal error occurred, no output PDF file produced! mtx-context | fatal error: return code: 1 after

Re: [NTG-context] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 07:28 PM, Rob Heusdens wrote: [...] If I have time I will use the \enabletrackers to see if that can direct me to where the problem may be located. Hi Rob, \enabletrackers[*destinations*] will visually display (adding a grey background to) the destination where the link points

Re: [NTG-context] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 08:11 PM, Rob Heusdens wrote: [...] Hello Pablo, I am sorry, I had not yet tried the \enabletrackers... Hi Rob, don’t worry, \enabletrackers don’t work here. Anyway, the problem resides in the settings for \setupinteraction which I use to set the page in the viewer to fit

Re: [NTG-context] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Pablo Rodriguez
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

Re: [NTG-context] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 09:37 PM, Rob Heusdens wrote: When using \setuphead[section][alternative=text] I noticed two things: 1. There is an extra space (horizontally) directly after the section heading. I can't get a grip on how to get rid of it. Hi Rob, distance=1ex (or similar) should do the job.

Re: [NTG-context] special features in simplefonts.

2015-01-25 Thread Pablo Rodriguez
On 01/24/2015 10:46 PM, John Culleton wrote: In regular Context font usage I have this statement that works: \def\Fontsize{13} \font \rm = file:MinionPro-Regular.otf:+liga;expansion=default;protrusion=quality at \Fontsize bp Hi John, well, I don’t know how to use the definition above.

Re: [NTG-context] Simple tocs

2015-01-26 Thread Pablo Rodriguez
On 01/25/2015 11:52 PM, John Culleton wrote: In this country, and perhaps elsewhere, the front matter in a technical book will have two tables of contents, one listing just major titles (e.g., just chapters and titles or just parts, chapters and titles) followed by another one that lists

Re: [NTG-context] contextual alternates

2015-01-26 Thread Pablo Rodriguez
On 01/26/2015 10:04 AM, Hans Hagen wrote: On 1/25/2015 7:30 PM, Pablo Rodriguez wrote: [...] I’m afraid that the following doesn’t work: \definefontfeature[default][default][script=latn,language=eng, calt=yes] because it's dflt (default) and not latn Many thanks for your reply, Hans. I

Re: [NTG-context] contextual alternates

2015-01-25 Thread Pablo Rodriguez
On 01/25/2015 05:20 PM, Hans Hagen wrote: On 1/25/2015 3:52 PM, Jan Tosovsky wrote: On 2015-01-25 Hans Hagen wrote: On 1/24/2015 2:12 PM, Pablo Rodriguez wrote: [...] The Pecita font is licensed under the Open Font License and it can be downloaded at http://pecita.eu/b/Pecita.otf. For some

Re: [NTG-context] contextual alternates

2015-01-26 Thread Pablo Rodriguez
On 01/26/2015 10:59 AM, Hans Hagen wrote: On 1/26/2015 10:18 AM, Pablo Rodriguez wrote: [...] I tested both options (script=latn and script=dflt) and neither worked. what happens when you enable all the features that the font provides \definefontfeature[default][default][aalt=yes] works

[NTG-context] contextual alternates

2015-01-24 Thread Pablo Rodriguez
Dear list, I have the following sample: \definefontfeature[default][default][script=latn, calt=yes] \definefontfamily[mainface][serif][Pecita] \setupbodyfont[mainface] \starttext \input zapf \stoptext The Pecita font is licensed under the Open Font License and it can be

Re: [NTG-context] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-01-31 Thread Pablo Rodriguez
On 01/31/2015 11:10 PM, Rob Heusdens wrote: [...] If you define summary as a duplicate of section, the former will inherit properties from the latter. All you have to do is refine the unwanted features in summary. A very stupid example: \definehead[summary][section]

Re: [NTG-context] More headache with \setuphead

2015-02-01 Thread Pablo Rodriguez
On 02/01/2015 12:26 AM, Rob Heusdens wrote: Related post: section with \sethupead[section][alternative=text]; other type of section misbehaves.. [...] Can anyone advise? Hi Rob, how about providing a sample that can be copied, pasted and compiled and a brief description of what you get and

Re: [NTG-context] How to place text to the right of a brace

2015-02-01 Thread Pablo Rodriguez
On 02/01/2015 01:39 PM, Fabrice Couvreur wrote: Hi, Wolfgang wrote, there was some time already, a nice macro to draw a brace. In the code below, how to have the arrow and the text to the right of the brace? Hi Fabrice, this does what you asked (vertical centering might be achieved with a

Re: [NTG-context] Font switching on title page

2015-02-01 Thread Pablo Rodriguez
On 02/01/2015 11:37 AM, Jörg Weger wrote: I have started to design a title page for a paper. First comes an information block at bodyfont size \tf (all in sans serif), followed by the title of the paper in \bfd, then the author (=me) in \bfa. The information block that follows then should

Re: [NTG-context] Font switching on title page

2015-02-01 Thread Pablo Rodriguez
On 02/01/2015 01:00 PM, Jörg Weger wrote: Thank you very much Pablo, indeed it helps :) Meanwhile I had found a solution by putting as well title and subtitle (author name) into groups \begingroup ... \endgroup but your braces solution is less typing and less distraction from the text.

<    1   2   3   4   5   6   7   8   9   10   >