Re: [NTG-context] [bug?] no space before \cite[data][] and after \abbreviation

2014-05-25 Thread Pol Stra
Le jeudi 22 mai 2014, 16:15:22 Wolfgang Schuster a écrit :
 Am 22.05.2014 um 14:35 schrieb pol stra r...@hotmail.fr:
  Hello,
  
  I used see \cite[data] in a document and I obtained seeAuthor without
  space between see and Author. I think it is a bug.
  
  I also had troubles with abbreviations (although it might be a bad use
  from myself): setting \abbreviation{AB}{Abbreviation}
  
  an \AB some text will give an ABsome text = missing space after
  abbreviation an {\AB} some text will give an AB some text = OK
  an \infull{AB} some text will give an  some text = missing expanded
  abbreviation
 Spaces after commands (e.g. \TeX) are ignored, to keep the space you have to
 add “\ ” or “{} ” after the command.
 
 \abbreviation{AB}{Abbreviation}
 
 \starttext
 text \AB\ text \AB{} \infull{AB} text
 \stoptext
 
 
 There is also a automatic way for this where you don’t have add any thing
 after the command but there are a few exceptions where this doesn’t work.
 
 \abbreviation{AB}{Abbreviation}
 
 \setupsynonyms
   [abbreviation]
   [next=\autoinsertnextspace]
 
 \starttext
 text \AB text
 \stoptext
 
 Wolfgang

Thank you Wolfgang,
It is good to be aware about this behaviour.

What about the cite command and the space _before_?

Best regards 
___
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] Experience with DITA XML or XSL/FO

2014-05-25 Thread Mica Semrick

Hi Jan,


What is your real use case? A typical XML based workflow involves XSL-FO -
PDF route using FO processor (Antenna House, XEP, FOP etc).


I'm looking to use DITA to publish a literary journal. The journal will contain contributions from multiple authors. I also want to publish works by single authors. I won't make enough (or any) money to justify the very expensive license for Antenna House or XEP, thus they are not really an option. I find FOP to be really sub par. 


My basic work flow would have to be DITA XML  DITA OpenToolkit (build process)  ??? 
 ConTeXt  PDF, where ??? could be some Toolkit XML output, XHTML, HTML5, FO.


Anyway, there are several ways. If you are not locked to DITA yet, I would
strongly recommend switching to DocBook instead :-) 


The DocBook vocabulary does not fit my needs. TEI is much closer to what I want, but I'm already familiar with DITA. 


This XSLT way is most natural for XML processing, but I understand that
writing XSLT transformation is discouraging for many people.


Yes, I'm generally OK with working with XSLT. DITA has a build system, called 
the DITA OpenToolkit that is build with Ant, a bit of java, and XSLT. You can 
see the toolkit here: http://dita-ot.github.io/

The Toolkit already supports PDF output via FOP, but as I said, FOP leaves quite a bit to be desired. 


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
___


Re: [NTG-context] Ctx goes into infinite loop?

2014-05-25 Thread Lukáš Procházka

Hello,

I solved the problem.

I was requiring a Lua .dll at some place in Ctx \s...luacode, namely 
LuaXml_Lib.dll.

I didn't realize that Ctx found the lib, but that have been compiled for Lua 
5.1.

So, with my ancient Ctx version (5/2012, which I've been using often so far), 
all worked well as LuaXml_Lib was compatible with that version of Ctx.

Once I tried the latest Ctx beta, there was a failure;
and it appeared like cannot locate file ...  error.

I built a Lua 5.2 version of LuaXml_Lib and all works well now with the latest 
Ctx.

- If some interested why I'm using LuaXml_Lib with Ctx, when Ctx provides its 
own XML API,
the reason is that I often save Excel tables as Excel XML table to allow Lua scripts 
access them, especially I'm using Excel named regions/variables which are later 
transformed into Lua tables.
I need an independent XML tool for this; LuaXML_Lib 
(http://viremo.eludi.net/LuaXML) does the job.

And also I need to do similar things with Ctx;
thus I need LuaXML_Lib to be accessible from within Ctx.

- Question: when is Ctx supposed to adopt Lua 5.3?

Best regards,

Lukas



On Fri, 23 May 2014 16:18:33 +0200, Peter Rolf indi...@gmx.net wrote:


Am 23.05.2014 13:50, schrieb Hans Hagen:

On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,


\input \HOME/Common/_Defs_.ctx


at least put { } around the input name


--
\startluacode
   local home = (os.getenv(HOME.ORG) or os.getenv(HOME) or
?):gsub(\\, /)

   context.setvalue(HOME, home)
\stopluacode

\input{\HOME/Common/_Defs_.ctx}

\starttext
   Test
\stoptext




--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038


___
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] Ctx goes into infinite loop?

2014-05-25 Thread Hans Hagen

On 5/25/2014 1:33 PM, Lukáš Procházka wrote:


- Question: when is Ctx supposed to adopt Lua 5.3?


It will take a while as

- 5.3 it's not yet official
- then 5.3 needs to become stable
- we need to test implications of the new number system
- tests have shows it's a slightly slower

Maybe there's nothing to gain from a move to 5.3, apart from keeping up 
with general Lua. If we make the switch it will first be tested quite a 
while in production before it leaves beta.


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 \framed align and orientation on landscape pages

2014-05-25 Thread Rik Kabel

On 2014-05-25 00:12, Aditya Mahajan wrote:



On May 24, 2014, at 1:12 PM, Rik Kabel cont...@rik.users.panix.com 
mailto:cont...@rik.users.panix.com wrote:



On 2014-05-24 06:26, Hans Hagen wrote:

On 5/24/2014 4:11 AM, Rik Kabel wrote:

For the /\framed/ command, any value for the key /align /other than a
null value pushes the frame beyond the bottom margin on a landscape 
page

for many values of /orientation/. The following MWE demonstrates this:

\setuppapersize [A4,landscape]
\starttext
\framed[orientation=90,align=no]{\externalfigure[dummy]}
\stoptext

It also seems that the default value of /align/// is not /no/ as the
wiki suggests, since there is a very different result when no align 
key
is provided and when it is provided as above with /no/, if by a 
default

value one means that, when a given key is not explicitly provided,
processing will occur as if it had been provided with that particular
value.


\setuppapersize [A4,landscape]

\starttext

\framed[orientation=90,width=\textheight,align=no]{\externalfigure[dummy]} 


\stoptext

Thank you, Hans. That pointed me in the right direction, although it 
is not the solution in my case.


The problem was with align=no. It does not, as I surmised, lead to 
the same result as having no align key at all. The following shows 
the differences clearly. What I am after is the fifth page. I would 
think that the wiki is incorrect in stating that the default value 
for the align key is no, but I do not know what is the proper 
description of the default.


\setuppapersize [A5,landscape][A4]
\definebodyfontenvironment [default][d=6]
\showframe
\starttext
\framed[align=no]{\tfd 1}
\page
\framed[]{\tfd 2}
\page
\framed[orientation=90,align=no,width=\textheight]{\tfd 3}
\page
\framed[orientation=90,align=no]{\tfd 4}
\page
\framed[orientation=90]{\tfd 5}
\stoptext




Without any align key, \framed is a \hbox; with align it is a \vbox. 
That might explain the difference that you see. Try adding 
\dontleavehmode in front of \framed


Aditya


Alas, Aditya, \dontleavehmode does not appear to make a difference.

I think that we might expect frames 1 and 4 above to produce similar 
results, as do frames 2 and 5. They do not, and I am trying to 
understand why that is.


The fact that it is landscape just exacerbates the problem, pushing some 
of the text off the page. Remove that and the differences are still 
there; the text is still on the page although not where I expect it. 
Hans's resetting of the width does make the landscape result the same as 
the portrait result, with the frame pushed just to the lower edge of the 
text area, but it does not address the different treatment with and 
without align.


--
Rik Kabel
___
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] \starttextbackground and \startbackground equivalent options

2014-05-25 Thread Xan
Hi folks,

Just a question:

I have this textbackground environment:

\definestartstop
  [teoria]
  [  before={\startbackground[background=color, backgroundcolor=mteoria, 
frame=on, width=broad, after={\bigskip}, before={\blank[big]\testpage[2]}, 
backgroundcorner=round, backgroundradius=5ex, backgroundoffset=5pt, 
framecorner=round, radius=5ex, frameoffset=5pt]},
  after=\stopbackground
   ]

and I want an equivalent one with starttextbackground.

I try this:

\definetextbackground[provateoria]
[background=color, backgroundcolor=mteoria, location=paragraph, 
frame=on, width=broad, after={\bigskip}, before={\blank[big]\testpage[2]}, 
backgroundcorner=round, backgroundradius=5ex, backgroundoffset=5pt, 
framecorner=round, radius=5ex, frameoffset=5pt
 ]

\definestartstop
  [teoria]
  [  before={\starttextbackground[provateoria]},
  after=\stoptextbackground
   ]


But I get:
  * The corners are not rounded
  * Can I achieve to unbackground footnotes inside \startteoria \stopteoria?


Thanks in advance,
Xan
___
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] startbackground with footnotes cause problems

2014-05-25 Thread Xan
Hi,

I observe that if startbackground stopbackground has footnotes inside, then 
page breaks are placed before and after footnotes with blank pages...

Anyone does know anything about that?

Thanks
___
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] Experience with DITA XML or XSL/FO

2014-05-25 Thread Jan Tosovsky
Hi Mica,

 I won't make enough (or any) money to justify the very 
 expensive license for Antenna House or XEP, thus they are not
 really an option. I find FOP to be really sub par.

I fully understand. I was exactly in the same situation few months ago and
also found ConTeXt as the only option for my needs. Welcome to the club :-)

 My basic work flow would have to be DITA XML  DITA OpenToolkit (build
 process)  ???  ConTeXt  PDF, where ??? could be some Toolkit XML
 output, XHTML, HTML5, FO.

In your case I would fork 'dbcontext' stylesheets and adapt them to the DITA
vocabulary (reasonable subset). If the Tooolkit is really 'Open', it
shouldn't be so hard to integrate this new stuff into it. The build process
would simply generate the ConTeXt source file. 

Even forking of something already done means lot of work so I suggested
switching to DocBook instead to reduce this effort significantly.

Regards, Jan


___
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 \framed align and orientation on landscape pages

2014-05-25 Thread Hans Hagen

On 5/25/2014 7:06 PM, Rik Kabel wrote:

On 2014-05-25 00:12, Aditya Mahajan wrote:



On May 24, 2014, at 1:12 PM, Rik Kabel cont...@rik.users.panix.com
mailto:cont...@rik.users.panix.com wrote:


On 2014-05-24 06:26, Hans Hagen wrote:

On 5/24/2014 4:11 AM, Rik Kabel wrote:

For the /\framed/ command, any value for the key /align /other than a
null value pushes the frame beyond the bottom margin on a landscape
page
for many values of /orientation/. The following MWE demonstrates this:

\setuppapersize [A4,landscape]
\starttext
\framed[orientation=90,align=no]{\externalfigure[dummy]}
\stoptext

It also seems that the default value of /align/// is not /no/ as the
wiki suggests, since there is a very different result when no align
key
is provided and when it is provided as above with /no/, if by a
default
value one means that, when a given key is not explicitly provided,
processing will occur as if it had been provided with that particular
value.


\setuppapersize [A4,landscape]

\starttext

\framed[orientation=90,width=\textheight,align=no]{\externalfigure[dummy]}

\stoptext


Thank you, Hans. That pointed me in the right direction, although it
is not the solution in my case.

The problem was with align=no. It does not, as I surmised, lead to
the same result as having no align key at all. The following shows
the differences clearly. What I am after is the fifth page. I would
think that the wiki is incorrect in stating that the default value
for the align key is no, but I do not know what is the proper
description of the default.

\setuppapersize [A5,landscape][A4]
\definebodyfontenvironment [default][d=6]
\showframe
\starttext
\framed[align=no]{\tfd 1}
\page
\framed[]{\tfd 2}
\page
\framed[orientation=90,align=no,width=\textheight]{\tfd 3}
\page
\framed[orientation=90,align=no]{\tfd 4}
\page
\framed[orientation=90]{\tfd 5}
\stoptext




Without any align key, \framed is a \hbox; with align it is a \vbox.
That might explain the difference that you see. Try adding
\dontleavehmode in front of \framed

Aditya


Alas, Aditya, \dontleavehmode does not appear to make a difference.

I think that we might expect frames 1 and 4 above to produce similar
results, as do frames 2 and 5. They do not, and I am trying to
understand why that is.

The fact that it is landscape just exacerbates the problem, pushing some
of the text off the page. Remove that and the differences are still
there; the text is still on the page although not where I expect it.
Hans's resetting of the width does make the landscape result the same as
the portrait result, with the frame pushed just to the lower edge of the
text area, but it does not address the different treatment with and
without align.


it's a different issue

one of the 'features' of framed is that (in mkii as well as mkiv) it can 
determine the minimum width of a paragraph and orientation doesn't work 
well with that


in the source you will find a comment:

\pack_framed_stop_orientation % hm, wrong place ! should rotate the 
result (after reshape)


if you move that line to after

   \edef\p_framed_empty{\framedparameter\c!empty}%
   \ifx\p_framed_empty\v!yes
 \pack_framed_fake_box
   \fi
\pack_framed_stop_orientation % here

you get what you expected ... but ... such a change can only happen when 
we're sure it work out okay always


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] Testing TeX Live 2014: last call

2014-05-25 Thread Pablo Rodriguez
On 05/23/2014 07:19 AM, Mojca Miklavec wrote:
 Dear Pablo,
 
 On Fri, May 23, 2014 at 7:00 AM, Pablo Rodriguez wrote:

 Only a question. When Luigi announced luajittex-0.78.2
 (http://www.ntg.nl/pipermail/ntg-context/2014/076633.html), he commented
 the possibility of having only luajittex in the future.

 What happened to that merging?
 
 You probably misunderstood the message. Luigi kept developing
 LuaJITTeX separately from LuaTeX until recently, at
 https://foundry.supelec.fr/projects/luajittex, so the two projects
 (luatex and luajittex) contained almost the same source code with only
 minor differences and we had to compile them separately. Both projects
 now coexist at https://foundry.supelec.fr/projects/luatex in the same
 subversion repository and both binaries are built from the same
 sources.

Dear Mojca,

many thanks for your explanation.

I now see that I misread the message.

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
___


[NTG-context] bug in latest beta?

2014-05-25 Thread Pablo Rodriguez
Dear list,

I’m afraid there is a bug (I think it was) introduced in beta from
2014.05.21 22:04:

\showframe
\setuppapersize[A6]
\starttext
\dorecurse{23}{This is only a random sentence. }

\section{Section}

\input zapf
\stoptext

Page break is wrong if \section is enabled (or I am missing something
extremely basic).

I guess it might be worth fixing it also for ConTeXt in TeX Live 2014.

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
___