Re: [NTG-context] \startitemize[columns] and footnote

2017-12-05 Thread Christoph Reller
On Fri, 1 Dec 2017 12:49:33 +0100 luigi scarso 
wrote:

> On Fri, Dec 1, 2017 at 10:14 AM, Christoph Reller
>  wrote:
> > \starttext
> > Text \footnote{Bla}
> > \startitemize[columns]
> > \item Item
> > \stopitemize
> > \stoptext
> >
> > In the rendered output, the footnote is drawn on top of the item (see
> > attached output.png). I am afraid this looks like a bug. Please consider
> > fixing this or tell me how to make footnotes render in the footnote area.
>
> dunno if it's a bug,
> but I usually do
>
> \starttext
> Text \footnote{Bla}
> \startcolumns
> \startitemize
> \item \input knuth\relax
> \item \input knuth\relax
> \stopitemize
> \stopcolumns
> \stoptext


Thank you for your answer Luigi!

(And sorry for my slow response - spam filter was doing crazy things.)

Your solution indeed makes the footnote appear at the right place. But the
layout is not the same as with \startitemize[columns]. Consider:

Text \footnote{Bla}
\startcolumns
\startitemize
\dorecurse{8}{\item Item}
\stopitemize
\stopcolumns

This results in 5 "Item"s in the left column and 3 "Item"s in the right
column. On the other hand

Text \footnote{Bla}
\startitemize[columns]
\dorecurse{8}{\item Item}
\stopitemize

results in 4 "Item"s in both columns, which IMHO is more correct.

Don't you agree that \startitmize[columns] is buggy with respect to
footnotes? Or is the [columns] parameter not supported anymore?

Cheers,
Christoph
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Wim Neimeijer
The thing here is, I am not an ConText expert just an user. I am working on
a manual (200+ pages) where including code snippets
is just a small part of the document and not something isolated. Not sure
what to do next as the wiki explains a lot
but not this.




On Tue, Dec 5, 2017 at 11:53 PM, Hans Hagen  wrote:

> On 12/5/2017 11:10 PM, Wim Neimeijer wrote:
>
>> I wish it is that simple, but alas, I need to
>> to inform \typefile of the font as well,
>> possibly via setuptyping ?
>>
> if you mix scripts you need to either use font that has the glyphs or you
> have to create a bodyfint with a combination of fonts ... i'm pretty sure
> that the wiki explains this somewhere (fallbacks and such)
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Nethe
> 
> rlands
>tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] WYSIWYM editor on top of ConTeXt / Lout

2017-12-05 Thread Jan Tosovsky
On 2017-12-02 Jonas Baggett wrote:
> 
> This is a blog post I recently published:
> https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-
> context-lout.
> It is about some ideas I have for a WYSIWYM editor like LyX, but it
> would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
> and to give a much better user experience.

Visual editing of complex structures is hard to implement. For XML based 
publishing there is just single serious tool!
https://www.oxygenxml.com/xml_author/docbook_editor_structured_editing.html

Desktop is IMHO declining so I'd personally prefer a web app, which could be 
then packed even for desktop via https://electronjs.org/

While web frontend development was very fragmented in past, most developers 
nowadays prefer https://reactjs.org/ framework.

For visual editing an advanced rich text editor is a must. This one is really 
promising https://github.com/ianstormtaylor/slate as it can read/write custom 
scheme. Btw, it is used in https://github.com/GitbookIO/gitbook project. 
Mentioning Gitbook, it could also be a source of inspiration.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Hans Hagen

On 12/5/2017 11:10 PM, Wim Neimeijer wrote:

I wish it is that simple, but alas, I need to
to inform \typefile of the font as well,
possibly via setuptyping ?
if you mix scripts you need to either use font that has the glyphs or 
you have to create a bodyfint with a combination of fonts ... i'm pretty 
sure that the wiki explains this somewhere (fallbacks and such)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] LuaTeX: Weird GC behaviour

2017-12-05 Thread Hans Hagen

On 12/5/2017 10:47 PM, Henri wrote:

Dear devs,

This was asked on TeX.SX: https://tex.stackexchange.com/questions/404617
The example below runs perfectly fine in the normal Lua interpreter, but 
crashes in texlua because
the maximum number of open file handles is exceeded.  This seems to be a 
peculiarity of io.lines in
texlua.  Is there anything special to the implementation of it in LuaTeX?

yes: it's wrapped in code that does some checking wrr to what is permitted

no: lua should collect the open handles but in your example there has 
not been a reason for collecting (hardly a memory demand)


i'll see if i can hack a solution

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Wim Neimeijer
I wish it is that simple, but alas, I need to
to inform \typefile of the font as well,
possibly via setuptyping ?

The following works with texlive 2017 (pdflatex), meaning I have the fonts
installed.
I also ran
$ mtxrun --script font --reload

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{CJKutf8}
\usepackage[english]{babel}

\begin{document}
\begin{CJK}{UTF8}{mj}
  이 FAQ 은 자주 반복되는 질문과 그에 대한 대답을 간단명료한 양식으로
  모아 엮어졌습니다.
\end{CJK}
\end{document}





On Tue, Dec 5, 2017 at 9:43 PM, luigi scarso  wrote:

> On Tue, Dec 5, 2017 at 9:32 PM, Wim Neimeijer 
> wrote:
> > I am writing a manual where I include code snippets with typefile. Some
> of
> > the code snippets contain text in Japanese
> > but don't appear in the PDF document as typefile seems to skip the
> Japanese
> > characters
> >
> > MWE
> >
> > file cjk.asy
> > 
> > Label L;
> > L = Label("\\begin{CJK}{UTF8}{gbsn}{\\CJKfamily{gbsn}여보세요  \\end{CJK}");
> > label(L);
> > shipout();
> >
> > main file
> > ===
> > \starttext
> > \typefile[C][]{cjk.asy}
> > \stoptext
>
> Assuming a font with the glyphs needed, this should work:
> \starttext
> \typefile{cjk.asy}
> \stoptext
>
>
> --
> luigi
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] LuaTeX: Weird GC behaviour

2017-12-05 Thread Henri
Dear devs,

This was asked on TeX.SX: https://tex.stackexchange.com/questions/404617
The example below runs perfectly fine in the normal Lua interpreter, but 
crashes in texlua because
the maximum number of open file handles is exceeded.  This seems to be a 
peculiarity of io.lines in
texlua.  Is there anything special to the implementation of it in LuaTeX?

Cheers, Henri



-- Create the file (once)
local filename = 'luatexfilelimit.txt'
local file = io.open(filename, "w")
file:write("hello world\n")
file:close()

-- Print its contents (many times)
for i = 1, 300 do
   print(string.format('Attempt %d', i))
   for line in io.lines(filename) do
  print(line)
   end
end

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread luigi scarso
On Tue, Dec 5, 2017 at 9:32 PM, Wim Neimeijer  wrote:
> I am writing a manual where I include code snippets with typefile. Some of
> the code snippets contain text in Japanese
> but don't appear in the PDF document as typefile seems to skip the Japanese
> characters
>
> MWE
>
> file cjk.asy
> 
> Label L;
> L = Label("\\begin{CJK}{UTF8}{gbsn}{\\CJKfamily{gbsn}여보세요  \\end{CJK}");
> label(L);
> shipout();
>
> main file
> ===
> \starttext
> \typefile[C][]{cjk.asy}
> \stoptext

Assuming a font with the glyphs needed, this should work:
\starttext
\typefile{cjk.asy}
\stoptext


-- 
luigi
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Wim Neimeijer
I am writing a manual where I include code snippets with typefile. Some of
the code snippets contain text in Japanese
but don't appear in the PDF document as typefile seems to skip the Japanese
characters

MWE

file cjk.asy

Label L;
L = Label("\\begin{CJK}{UTF8}{gbsn}{\\CJKfamily{gbsn}여보세요  \\end{CJK}");
label(L);
shipout();

main file
===
\starttext
\typefile[C][]{cjk.asy}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] \cite not working with notes in xtables

2017-12-05 Thread Alan Braslau
Hans,

Including the second \caption (note) leads to:

publications> no entry 'tufte' found in dataset 'bib'
publications> no entry 'tufte' found in dataset 'bib'

Strange...

Alan

On Tue, 5 Dec 2017 21:06:59 +0100
Michael Eidenbenz  wrote:

> Hello List,
> 
> I have this MWE that reflects my current layout where I have images
> in an xtable with captions defined as note. Both, footnotes and
> captions are set in the margin. The Example compiles correct with
> just one caption in a xcell. If there are two (as in the MWE) the
> \cite command doesnt work.
> 
> Could this be a conflict on the lua side of xtables/publication
> framework?
> 
> The second problem of course are the footnotes that are not placed on
> the correct side. I thought \automigrateinserts would help here. But
> it doesnt.
> 
> Any hints how to solve this?
> 
> Thanks Michael
> 
> 
> ---
> \useMPlibrary[dum]
> 
> \startbuffer[bib]
> @article{tufte, author = {Edward Tufte} }
> \stopbuffer
> \definebtxdataset[bib]
> \usebtxdataset [bib][bib.buffer]
> \definebtxrendering[bib][dataset=bib]
> 
> \setuplayout[backspace=80mm,width=120mm]
> 
> \setupnote[footnote]
>   [location={none}]
> 
> \definenote   [caption]
>   [location={none}]
> 
> \automigrateinserts
> 
> \setuptexttexts
>   [margin]
>   [{{\vbox to\textheight%
> {\placenotes[caption]%
>  \null\vfilll%
>  \placenotes[footnote]}}}]
>   []
> 
> \starttext
> 
> \input tufte
>   \footnote{\cite[bib::tufte]}
>   \par
> 
>   \startembeddedxtable[distance=10mm]
> \startxrow
>   \startxcell[width=55mm]
> \externalfigure[dummy][factor=fit]
> \caption[dummy]{caption}
>   \stopxcell
>   \startxcell[width=55mm]
> \externalfigure[dummy][factor=fit]
> % \caption[dummy]{caption} %without this note the \cite
> command compiles \stopxcell
> \stopxrow
>   \stopembeddedxtable
> 
> \input tufte
>   \footnote{\cite[bib::tufte]}
>   \par
> 
> \placebtxrendering [bib]
> 
> \stoptext
> 
> ---
> 
> ___
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
> http://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] \cite not working with notes in xtables

2017-12-05 Thread Michael Eidenbenz
Hello List,

I have this MWE that reflects my current layout where I have images in an 
xtable with captions defined as note. Both, footnotes and captions are set in 
the margin.
The Example compiles correct with just one caption in a xcell. If there are two 
(as in the MWE) the \cite command doesnt work.

Could this be a conflict on the lua side of xtables/publication framework?

The second problem of course are the footnotes that are not placed on the 
correct side. 
I thought \automigrateinserts would help here. But it doesnt.

Any hints how to solve this?

Thanks Michael


---
\useMPlibrary[dum]

\startbuffer[bib]
@article{tufte, author = {Edward Tufte} }
\stopbuffer
\definebtxdataset[bib]
\usebtxdataset [bib][bib.buffer]
\definebtxrendering[bib][dataset=bib]

\setuplayout[backspace=80mm,width=120mm]

\setupnote  [footnote]
[location={none}]

\definenote [caption]
[location={none}]

\automigrateinserts

\setuptexttexts
  [margin]
  [{{\vbox to\textheight%
{\placenotes[caption]%
 \null\vfilll%
 \placenotes[footnote]}}}]
  []

\starttext

\input tufte
  \footnote{\cite[bib::tufte]}
  \par

  \startembeddedxtable[distance=10mm]
\startxrow
  \startxcell[width=55mm]
\externalfigure[dummy][factor=fit]
\caption[dummy]{caption}
  \stopxcell
  \startxcell[width=55mm]
\externalfigure[dummy][factor=fit]
% \caption[dummy]{caption} %without this note the \cite command compiles
  \stopxcell
\stopxrow
  \stopembeddedxtable

\input tufte
  \footnote{\cite[bib::tufte]}
  \par

\placebtxrendering [bib]

\stoptext

---

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] German letter style

2017-12-05 Thread Henning Hraban Ramm
Am 2017-12-05 um 17:28 schrieb Floris van Manen :
> lua error   > lua error on line 30 in file 
> /Applications/ConTeXt/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.mkvi:
> 
> ...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: bad argument 
> #1 to 'gmatch' (string expected, got nil)
> stack traceback:
>   [C]: in function 'gmatch'
>   ...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: in 
> function 'registercode'
>   [ctxlua]:1: in main chunk
> 
> 20 %C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> 21 %C GNU General Public License for more details.
> 22 %C
> 23 %C You should have received a copy of the GNU General Public License
> 24 %C along with this program.  If not, see 
> .
> 25 
> 26 \unprotect
> 27 
> 28 % Lua functions for the core and also for the frontend modules
> 29 
> 30 >>  \ctxloadluafile{s-cor-00}


This is a bug (that I urge to fix for a while) and has nothing to do with 
letters, it’s just also triggered by the letter module.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Modifying an existing letter style

2017-12-05 Thread Michael Guravage
I am typesetting a letter using Wolfgang's letter module. I have a
requirement that is not satisfied by any of the existing styles, namely
that the to-address, i.e. the address, and the from-address, i.e., the
header, need to start at the same height and be positioned next to one
another. I am using the modified style and am trying to adjust the layout
via he \setupletterstyle command without success.

I have look at the sources and have seen how the elements of the various
styles are stacked.  All styles use the default style, which
defines lefthead and righthead elements, but only the din styles and those
styles derived from them seem to use these elements.

Is there any way to acheive the required side-by-side layout short of
cobbling together my own style? Any helpful advice would be greatly
appreciated.
-- 
With kind regards,

Michael Guravage


letter.tex
Description: TeX 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] about \inframed[] in \defineenumeration

2017-12-05 Thread Jeong Dal
Dear Hans,

Thank you for the solution which works well.
After adding a line “ text={\translate[en=Example, kr=예제]},” for Korean text, 
it works fine too.
I understand the meaning of headcommand, numbercommand, and titlecommnad from 
your code more clearly.

Thanks again for a quick solution.

Best regards,

Dalyoung


> you need "numbercommand":
> 
> \defineenumeration
>[Example]
>[headcommand={\framed[background=color,backgroundcolor=red]},
> 
> numbercommand={\inframed[height=2ex,background=color,backgroundcolor=green]},
> 
> titlecommand={\inframed[height=2ex,background=color,backgroundcolor=blue]},
> title=yes,
> alternative=left,
> before={\blank[big]},
> after=\blank]
> 
> \starttext
> \chapter{first}
> \startExample{foo}
> This is a test for enumeration.
> \stopExample
> \startExample
> This is a test for enumeration.
> \stopExample
> \stoptext
> 
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> 
> 
> --
> 
> Subject: Digest Footer
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 
> --
> 
> End of ntg-context Digest, Vol 162, Issue 8
> ***

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Module for Markdown: any volunteer to make a ConTeXt interface?

2017-12-05 Thread Gour
On Sun, 7 May 2017 23:33:30 +0200
r.erm...@hccnet.nl wrote:

> I recently finished a book project in multimarkdown, which I
> converted to LaTeX (I could not use ConTeXt because of its limited
> bibliographical functions in comparison to BibLatex).

Just wonder, since I plan to embrace ConTeXt for a larger educational-based
project with the need to use bibliographical functions, what did you prevent
you to use it?

Let me say that I'm fully familiar with neither BibLatex's capabilities nor
with the similar things in MkIV... 

Sincerely,
Gour

-- 
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] WYSIWYM editor on top of ConTeXt / Lout

2017-12-05 Thread Jonas Baggett


Le 03.12.17 à 18:00, Aditya Mahajan a écrit :
This is a blog post I recently published: 
https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-context-lout. 
It is about some ideas I have for a WYSIWYM editor like LyX, but it 
would be designed for using more than 1 backend (e.g. ConTeXt, Lout), 
and to give a much better user experience.


I am curious if you have looked into if it is possible to add a 
ConTeXt backend to LyX. AFAIU, LyX saves the document in a "Lyx 
format" and then transforms it into LaTeX. It might be simplest to 
write a translator from the internal lyx format to ConTeXt and Lout.


Aditya


--

Hi Aditya,

From what I have seen, the LyX format is a LaTeX file with a thin layer 
on top of it. So basically I would need to write a LaTeX to ConTeXt/Lout 
converter ;-). Looks like to me that this editor that I would like to 
design cannot be implemented as an incremental improvement to LyX, as it 
would be a too radical change.


In regards to the translator, I have thought about implementing rules of 
translations in a text file for each supported backend. Advantage would 
be that it will be easy for any user to add a new backend or extend an 
existing one to cover new features or to fix incompatibility issues.


Here is +/- how could look like rules of translations, with the left 
expression, something described in the document format and the right 
expression, the same thing described in the backend format:


[ = ,  = ]{}  =>  
@( -> ,  -> ){}


At this point if we have in document:

start_section[title = Introduction, back_ground_color = green]

it will be translated to @startSection(title -> Introduction, 
back_ground_color -> green)


but if it has instead to be translated to @startHeader(1, Introduction, 
bgColor -> green), we will add the following in the translation file:


start_section[title = , back_ground_color = ] => 
@startHeader(1, , bgColor -> )


Idea is that it starts with very general translation rules and then it 
gets more and more detailled for every cases that don't follow the more 
general rules.


Cheers,
Jonas
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Tweaking an existing letter style

2017-12-05 Thread Michael Guravage
I am typesetting a letter using Wolfgang's letter module. I have a
requirement that deviates from any of the existing styles, namely that the
recipient, i.e. the address, and the sender, i.e., the header, need to
start left and right respectively and at the same height. I am using the
modified style and am trying to adjust the layout via he \setupletterstyle
command without success.

I have look at the sources and have seen how the elements of the various
styles are stacked, but I cannot discern how to achieve the side-by-side
arrangement I require.

If anyone can advise me how I can move these various layers about, I would
be very grateful.

Cheers,

Michael
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] German letter style

2017-12-05 Thread Floris van Manen

> On 5 Dec 2017, at 16:41, Jan U. Hasecke  wrote:
> 
> contextgarden is full of letter examples. But even the first simple
> example here http://wiki.contextgarden.net/Letter#Example does not
> compile.

same here:


mtx-context | run 1: luatex 
--fmt="/Applications/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
 --jobname="test" 
--lua="/Applications/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
 --no-parse-first-line --c:currentrun=1 
--c:fulljobname="/Users/vm/Desktop/tex/test.tex" 
--c:input="/Users/vm/Desktop/tex/test.tex" --c:kindofrun=1 --c:maxnofruns=9 
"cont-yes.mkiv"
This is LuaTeX, Version 1.05.0 (TeX Live 2017)
 system commands enabled.
open source > level 1, order 1, name 
'/Applications/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2017.11.01 15:58 MKIV beta  fmt: 2017.11.8  
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/Applications/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
close source> level 2, order 2, name 
'/Applications/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input '/Users/vm/Desktop/tex/test', 
result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/Users/vm/Desktop/tex/test.tex'
modules > 'letter' is loaded
open source > level 3, order 4, name 
'/Applications/ConTeXt/tex/texmf-modules/tex/context/third/letter/base/s-cor-01.mkvi'
modules > 'cor-00' is loaded
open source > level 4, order 5, name 
'/Applications/ConTeXt/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.mkvi'

lua error   > lua error on line 30 in file 
/Applications/ConTeXt/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.mkvi:

...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: bad argument #1 
to 'gmatch' (string expected, got nil)
stack traceback:
[C]: in function 'gmatch'
...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: in 
function 'registercode'
[ctxlua]:1: in main chunk

20 %C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 %C GNU General Public License for more details.
22 %C
23 %C You should have received a copy of the GNU General Public License
24 %C along with this program.  If not, see .
25
26 \unprotect
27
28 % Lua functions for the core and also for the frontend modules
29
30 >>  \ctxloadluafile{s-cor-00}
31
32 % Constants and variables
33
34 \startinterface all
35   \setinterfaceconstant {whitespace}  {whitespace}
36   \setinterfaceconstant {backgroundimage} {backgroundimage}
37   \setinterfaceconstant {fromname}{fromname}
38   \setinterfaceconstant {fromaddress} {fromaddress}
39   \setinterfaceconstant {attention}   {attention}
40   \setinterfaceconstant {subject} {subject}


?

lua error   > lua error on line 30 in file 
/Applications/ConTeXt/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.mkvi:

...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: bad argument #1 
to 'gmatch' (string expected, got nil)
stack traceback:
[C]: in function 'gmatch'
...eXt/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:47: in 
function 'registercode'
[ctxlua]:1: in main chunk

20 %C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 %C GNU General Public License for more details.
22 %C
23 %C You should have received a copy of the GNU General Public License
24 %C along with this program.  If not, see .
25
26 \unprotect
27
28 % Lua functions for the core and also for the frontend modules
29
30 >>  \ctxloadluafile{s-cor-00}
31
32 % Constants and variables
33
34 \startinterface all
35   \setinterfaceconstant {whitespace}  {whitespace}
36   \setinterfaceconstant {backgroundimage} {backgroundimage}
37   \setinterfaceconstant {fromname}{fromname}
38   \setinterfaceconstant {fromaddress} {fromaddress}
39   \setinterfaceconstant {attention}   {attention}
40   \setinterfaceconstant {subject} {subject}



mtx-context | fatal error: return code: 1



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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://context.aanhet.net
archive  : 

[NTG-context] German letter style

2017-12-05 Thread Jan U. Hasecke
Hi all,

contextgarden is full of letter examples. But even the first simple
example here http://wiki.contextgarden.net/Letter#Example does not
compile.

mtx-context | current version: 2017.12.04 16:37

So I want to ask: What is the current approach for writing German style
din letters?

Ciao!
juh
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] about \inframed[] in \defineenumeration

2017-12-05 Thread Hans Hagen

On 12/4/2017 11:51 PM, Jeong Dal wrote:

Hi,

I run the old code which was fine  3 years ago, but now, it doesn’t work as 
before.
At that time, I had “Example 1.1” inside the frame . Now I got text “Example 
1.1” only without frame at all.

Would you please tell me what should I change?

Thank you for reading.

Best regards,

Dalyoung

%%% minimal example %%%
\setupcolors[state=start]
\definecolor[dGreen] [r=0,g=.375,b=.0]

  \defineenumeration[Example]
[command={\inframed[corner=round, background=color, 
backgroundcolor=darkgreen,height=1.3em]},
 text=Example,
 prefix=yes,
 prefixsegments=chapter,
 way=bychapter,
 number=yes,
 alternative=left,
 before={\blank[big]},
 after=\blank]

\starttext
\chapter{first}
\startExample
This is a test for enumeration.
\stopExample
\startExample
This is a test for enumeration.
\stopExample
\stoptext

you need "numbercommand":

\defineenumeration
   [Example]
   [headcommand={\framed[background=color,backgroundcolor=red]},

numbercommand={\inframed[height=2ex,background=color,backgroundcolor=green]},

titlecommand={\inframed[height=2ex,background=color,backgroundcolor=blue]},
title=yes,
alternative=left,
before={\blank[big]},
after=\blank]

\starttext
\chapter{first}
\startExample{foo}
This is a test for enumeration.
\stopExample
\startExample
This is a test for enumeration.
\stopExample
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___