Re: [NTG-context] Invoking ConTeXt from inside php web appliction

2016-07-11 Thread massifr
> That is what I suspect as well. How do I find out which cache path is > being used? > I'm using Debian+ConTeXt+Apache+PHP. I've struggled a bit to make it work, but now it works. It works even inside a docker container. In my PHP code I've put this:

[NTG-context] passing the \starttabulate format in XML typesetting

2016-06-16 Thread massifr
Hello list, I'm trying to map HTML with tabs to \starttabulate in ConTeXt. A div of class "tabulate" is mapped to a \starttabulate ... \stoptabulate section, p elements are rows and span elements of class "tab" produce \NCs in ConTeXt. That div element has a "format" attribute that must be passed

Re: [NTG-context] reading the value of a counter (footnote counter, i.e.) from lua

2016-06-15 Thread massifr
> > how can I read the numeric value of a counter in Lua? > > > \starttext > > x \footnote{x} x \footnote{x} x \footnote{x} x > > \cldcontext{structures.counters.currentvalue("footnote",1)} > > \stoptext Thank you, Hans. I searched for "currentvalue" in the source and now I'm looking at

[NTG-context] reading the value of a counter (footnote counter, i.e.) from lua

2016-06-15 Thread massifr
Hello list, how can I read the numeric value of a counter in Lua? local c_value = ... Something like \rawcountervalue in ConTeXt, but in Lua. Thanks in advance, Massi ___ If your question is of interest to others as

[NTG-context] space between equations in mathalignment

2016-06-13 Thread massifr
Hello list, is there a way to modify the space between equations in mathalignment? Something like \TB in tabulate would be great. In tabulate, \TB[-3mm] i.e. lets you shrink the vertical space between two rows. Aditya spoke about that here:

[NTG-context] writebetweenlist bug?

2016-05-19 Thread massifr
Hello list, I'm experimenting with the table of contents and I found a strange behaviour of writebetweenlist. Try this: \setuphead[chapter][number=no] \starttext \placecontent \chapter{chapter 1} \chapter{chapter 2} \writebetweenlist[chapter]{\blank Why am I not between chapter 2 and chapter

[NTG-context] Garamond Premier Pro font goodies file

2016-04-28 Thread massifr
Hello list, I'm using the Adobe Garamond Premier Pro font. It has 4 optical sizes: Caption, Normal, Subhead, Display. I tried to modify ebgaramond.lfg to adapt it to Garamond Premier Pro. You find it as an attachment. I don't know how to use that goodies file to see the different optical sizes in

Re: [NTG-context] language setting scope

2016-04-21 Thread massifr
My problem was not related to \language or \mainlanguage. It was the side-effect of a different mistake: \startnotmode that was not closed by a \stopnotmode. ... \startmode[Info] ... % things to do when mode Info is active \stopmode \startnotmode[Info] ... % things to do when mode Info is not

Re: [NTG-context] language setting scope

2016-04-20 Thread massifr
I apologize for the noise. \mainlanguage[it] before \starttext solves the problem. > Hello list, > I'm typesetting XHTML italian text with Context (version 4/4/16). > > I've put a \language[it] just after \starttext, but I get words > with a wrong hyphenation. > > As a patch, I just put

[NTG-context] language setting scope

2016-04-20 Thread massifr
Hello list, I'm typesetting XHTML italian text with Context (version 4/4/16). I've put a \language[it] just after \starttext, but I get words with a wrong hyphenation. As a patch, I just put \language[it] at the beginning of the xmlsetup that processes the tag, and now words are hyphenated

[NTG-context] parallel texts, setuptabulate and widows-orphans control

2016-04-19 Thread massifr
Hello list, I've found that \start ... \stoptabulate can be used to format parallel texts, with paragraphs that are synchronized and split well on different pages. I also found that they don't play well with widow-orphan penalties. Try this: \setuptabulate[split=yes] \starttext

Re: [NTG-context] automatically "smashing" È in xml typesetting

2016-04-12 Thread massifr
Thank you Hans for your example: > > so I'm looking for an automatic way to replace every "È" in the text with > > "\smash{È}". > > \definefontfeature[default][default][dimensions={0,1.9,0}] > It took a while to understand how it works but it was worthy. I try to summarize because others may

[NTG-context] automatically "smashing" È in xml typesetting

2016-04-11 Thread massifr
Hello list, I'm typesetting italian text that contains "E" letters with a grave accent, like this: "È". In my "body font environment" the interline space is narrow and those "È" make their lines taller, making every following line move downwards. The problem is easily solvable putting "\smash"

Re: [NTG-context] late reset of counter with way=bypage

2016-02-22 Thread massifr
Solved with a workaround > - > \setupnotation[footnote][way=bypage] > > \definecounter[authornote][way=bypage] > > % taken and adapted from > https://www.mail-archive.com/ntg-context@ntg.nl/msg56637.html > \define[1]\authorNote{\bgroup% >\savecounter[footnote]%

[NTG-context] late reset of counter with way=bypage

2016-02-18 Thread massifr
Hello list, this is an example of footnotes with two different markers (and counters): numbers for editor's footnotes, stars for author's footnotes. The footnotes are typeset together, in the order they appear in the text, so number and star markers are interspersed. The two counters are reset

Re: [NTG-context] Sanitize in XML/XHTML documents

2016-02-02 Thread massifr
> Pandoc produces some text. In TeX I would usually use > \quotation{some text} to have proper, language dependent quotes. Are you sure that Pandoc can produce only? Have you tried the --html-q-tags option? Greetings, Massi

Re: [NTG-context] fontname

2016-01-14 Thread massifr
> I want to display the name of the current (body)font. > \fontname{#1} should do the trick but what parameter to use? > \currentfont > \bodyfont > \currentbodyfont > are all wrong. > Try \fontname\font \purefontname\font should show only its name, not the size, but this does not work for me

Re: [NTG-context] font style query

2016-01-14 Thread massifr
> Some fonts as for example Lucida have a calligraphic style called up with \cg. > If it is not present a default is taken. > However, I would like to take other action in that case, for example > switching to another font. > > Thus, how to test on the presence of that calligraphic style in the

Re: [NTG-context] simplefonts question

2016-01-14 Thread massifr
> \definefontfamily [mainface] [rm] [Lucida Bright OT] > \definefontfamily [mainface] [ss] [Lucida Sans OT] > \definefontfamily [mainface] [tt] [Lucida Sans Typewriter OT] > \definefontfamily [mainface] [mm] [Lucida Bright Math OT] > \definefontfamily [mainface] [hw] [Lucida Handwriting OT] >

[NTG-context] font scaling does not work in footnotes

2016-01-12 Thread massifr
Hello list, I have a problem with font scaling (see "sc=SansCaps sa 1.5" below). I'm using MyriadPro as sans font, but it lacks small caps. So I decided to provide them using AlegreyaSansSC, because it's similar to MyriadPro and it's made of small caps only. When I use \ss and \sc I get

[NTG-context] place figure at the top left corner of the header

2015-11-26 Thread massifr
Hello list, I need to place a figure with its topleft corner on the topleft corner of the header. The figure would be large as the textframe and covering all the header and part of the textframe, leaving the text flow below the figure. In other words, a normal figure \textwidth large, but

[NTG-context] flushing the last hbox of a paragraph to the right

2015-11-16 Thread massifr
Hello list, I'm typesetting end notes with the pages where they get called (don't think about \endnote since I'm not using it; they are simple \item paragraphs). Here's an example: 4 Text of the end note blah blah blah blah blah, end of para. p. 3, 45, 96 which means that the end note

Re: [NTG-context] flushing the last hbox of a paragraph to the right

2015-11-16 Thread massifr
Sorry, there was a typo in my previous email. The last example should look like this: 5 Text of the fifth endnote blah blah blah a little longer to fill the text width. p. 4, 12 > Hello list, > I'm typesetting end notes with the pages where they get called > (don't think about \endnote

Re: [NTG-context] only page number in the header of the chapter title page

2015-11-10 Thread massifr
Thanks a lot, Wolfgang just now I was posting a solution of mine, but yours is more elegant and concise. Best regards, Massi PS: here's my solution (but I'll use yours): \definemarking[headertitle] \setupheadertexts[] \setupheadertexts[\setups{oddpages}][][][\setups{evenpages}]

Re: [NTG-context] only page number in the header of the chapter title page

2015-11-10 Thread massifr
I mean something like this: On the top of a chapter title page: +--- | 34 | On the top of a page without chapter title: +--- | 36 - Chapter title | Or (odd page): --+ Chapter

[NTG-context] only page number in the header of the chapter title page

2015-11-09 Thread massifr
Hello list, how can I keep the page number but not the header text in the page of a chapter title? \setuphead[chapter][header=empty] makes all the header disappear. Is there an option to keep the page number? Thanks, Massi

[NTG-context] accented capital in XML, how to smash it?

2015-11-02 Thread massifr
Hello list, I have problems with accented capitals like "È" adding some vertical space to their lines. Is there a way to \smash them automatically? That's because I'm typesetting XML and not directly using ConTeXt. I tried an automatic translation with \usemodule[translate]

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-20 Thread massifr
Here's the (complete) code: \startbuffer[test] Dear list, this paragraph should not be indented, because it follows the “incipit” of the letter. This one and the following ones should be indented. You may question whether “Dear list,” should be a paragraph of his own, but my text is

Re: [NTG-context] ntg-context Digest, Vol 136, Issue 30

2015-10-19 Thread massifr
Here's the (complete) code: \startbuffer[test] Dear list, this paragraph should not be indented, because it follows the “incipit” of the letter. This one and the following ones should be indented. You may question whether “Dear list,” should be a paragraph of his own, but my text is

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-14 Thread massifr
I've found a better solution: \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class}}{incipit}{\noindent}% \xmlflush{#1}\par \stopxmlsetups Still I did not manage to put that rule in a xmlsetsetup. Tried this: \xmlsetsetup{#1}{p[reverse-sibling::p[1]/attribute('class')

[NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-12 Thread massifr
Hello list, I need a lpath expression to intercept the first p (HTML paragraph) after a p of class "incipit". Here's a (not) working example: \startbuffer[test] Dear list, this paragraph should not be indented, because it follows the “incipit” of the letter. This one and the following

[NTG-context] reading attribute from ancestor element in XML

2015-10-06 Thread massifr
Hello list, I have an XML fragment like this: 12 blah blah... In the typeset text I want to substitute the text of the sup element ("12") with the id ("myid") in its div grandfather. The xmlsetup associated to the sup element looks like this: \startxmlsetups xml:sup

[NTG-context] Ampersand followed by semicolon in XML: possible bug?

2015-09-29 Thread massifr
Hello list, I've found what it looks like a bug in XML handling in ConTeXt. Try this: \startbuffer[test] Me my friends; you your friends. Me my friends. You your friends. Me my friends; you your friends. \stopbuffer \startxmlsetups xml:somesetups

Re: [NTG-context] Ampersand followed by semicolon in XML: possible bug?

2015-09-29 Thread massifr
I've seen that the ampersand gets interpreted as HTML on the mailing list. I'm sending the example as an attachment. Here's a modified version to be seen on the mailing list site: \startbuffer[test] Me amp; my friends; you amp; your friends. Me amp; my friends. You amp; your friends.

Re: [NTG-context] XML expression to read HTML classes

2015-08-26 Thread massifr
A working example to clarify my request: \startluacode -- splits the attribute class using spaces as classes' separator -- returns an array of strings function xml.functions.classes(classAttr) local classes = {} if classAttr then for c in string.gmatch(classAttr, %S+) do

[NTG-context] XML expression to read HTML classes

2015-08-25 Thread massifr
Hello list, I'm working on HTML typesetting with ConTeXt. I wrote a custom expression to test whether an element has a class: function xml.functions.classes(classAttr) local classes = {} if classAttr then for c in string.gmatch(classAttr, %S+) do if (string.len(c) 0) then

Re: [NTG-context] line break between number and footnote text in paragraph footnotes

2015-04-01 Thread massifr
On 4/1/2015 12:15 AM, mf wrote: Hello, I have a problem with paragraph footnotes. I don't know how to prevent a line break occurring between the footnote number and the footnote text. Sometimes a thing like this happens: ... [main text] ... -- 1. text of the first

Re: [NTG-context] paragraph footnotes line height

2015-03-09 Thread massifr
On 03/07/2015 10:59 AM, Wolfgang Schuster wrote: Am 07.03.2015 um 00:08 schrieb mf: I'd like to know how I can set the line height of paragraph footnotes. [...] \startsetups[footnote:interlinespace] \setupinterlinespace[line=10pt] \stopsetups

[NTG-context] inline footnotes

2015-01-30 Thread massifr
Hello, I'd like to know how to get inline footnotes with ConTeXt. There are some packages in LaTeX (option para in footmisc, manyfoot, bigfoot) providing that feature. How can I do that in ConTeXt? Thanks, Massi ___