Re: [NTG-context] Parallel output of source data

2016-12-02 Thread Wolfgang Schuster

Procházka Lukáš Ing. 
2. Dezember 2016 um 08:10
Hello,

is there a way to let ConTeXt to flush the input stream in parallel 
into an output buffer, like:



\starttext

A

\startoutput{Test.mkiv}
  Hello!
  \startitemize
\item Item
  \stopitemize
\stopoutput

B

\stoptext


which would produce:

 Test.mkiv
  Hello!
  \startitemize
\item Item
  \stopitemize


You can use a buffer to store content and save it in a external file.

\unexpanded\def\startcontentexport
  {\dosingleempty\dostartcontentexport}

\def\dostartcontentexport[#1]%
  {\iffirstargument
 \edef\contentexportfile{#1}%
   \else
 \let\contentexportfile\empty
   \fi
   \grabbufferdata[contentexport][startcontentexport][stopcontentexport]}

\def\stopcontentexport
  
{\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%

   \getbufferdata[contentexport]}

\starttext

A

\startcontentexport[Test.mkiv]
  Hello!
  \startitemize
\item Item
  \stopitemize
\stopcontentexport

B

\stoptext

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

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

Re: [NTG-context] Gidole font problem

2016-12-02 Thread Pablo Rodriguez
On 12/02/2016 07:36 PM, Mikoláš Štrajt wrote:
> Hi,
> I am triying to use custom font in my Context documents.
> However, it doesnt work without any obvious trace.

Hi Mikoláš,

try this:

\definefontfamily
[mainface]
[rm]
[Gidole]
[tf=file:Gidole-Regular.ttf]
\setupbodyfont[mainface]
\starttext
\input knuth
\stoptext

If this works, comment the fourth argument in \definefontfamily.


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

Re: [NTG-context] Gidole font problem

2016-12-02 Thread Thomas A. Schmitz

On 02.12.2016 19:36, Mikoláš Štrajt wrote:

Hi,


I am triying to use custom font in my Context documents.


However, it doesnt work without any obvious trace.



Your ConTeXt is WAYY too old. You'll have to install a more current version.

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

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

[NTG-context] Gidole font problem

2016-12-02 Thread Mikoláš Štrajt
Hi,


I am triying to use custom font in my Context documents.


However, it doesnt work without any obvious trace.


Output is completely blank page.


When I comment out definefontfamily and setupbodyfont commands, it works but 
output is in Latin Modern font.


See 
https://gist.github.com/severak/e4c072d508a87e80d52d19123543e982#file-gidole-tex
 for full log and source code.


Best regards


-- 
Mikoláš Štrajt / Severák / http://severak.neocities.org/


___
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] grid snapping problem

2016-12-02 Thread Csikos Bela
Dear context users:

I would like to use grid snapping in my document: main text lines
should be aligned to grid lines but figure caption text should not.

I have this code:

\setuplayout[grid=yes]
\showgrid

\setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]

\starttext
\subsection{Subsection title}
\input dawkins
\input dawkins

%startlinecorrection
\startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
\placefigure[][]{\input zapf }{\framed[width=0.6\textwidth,height=10ex]{figure}}
\stopbaselinecorrection
%stoplinecorrection

\subsection{Subsection title}
\input dawkins
\subsection{Subsection title}
\input dawkins
\input dawkins
\stoptext

You can see that the caption is typeset as I wanted: smaller line height
and it is not aligned to grid lines. But the main text after the figure is not
aligned to the grid on the same page. How can I correct this?
On the next page the main text is snapped to the grid again.

Thank you in advance,

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

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

Re: [NTG-context] (another) bug with embeddedxtables

2016-12-02 Thread Wolfgang Schuster

Michael Eidenbenz 
2. Dezember 2016 um 12:40
Settings made to \startembeddedxtable or \startxrow they will only 
work in the first call of the macro.

In every further call the settings are ignored.

On the other hand, settings made to \startxcell work for every call of 
the macro.


I assume this is a bug.

tabl-xtb.mkvi:

\unexpanded\def\tabl_x_embedded_start[#settings]#content\stopembeddedxtable
- {\tabl_x_prepare{#settings}%
-  
\clf_assignbuffer{embedded_x_table}{\detokenize{#content}}\catcodetable\relax
+ 
{\clf_assignbuffer{embedded_x_table}{\detokenize{#content}}\catcodetable\relax

   \bgroup
+  \tabl_x_prepare{#settings}%
   \let\tabl_x_start_table\tabl_x_process_buffer
   \edef\tabl_x_current_buffer{embedded_x_table}%
   \tabl_x_process}

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

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

[NTG-context] (another) bug with embeddedxtables

2016-12-02 Thread Michael Eidenbenz
Settings made to \startembeddedxtable or \startxrow they will only work in the 
first call of the macro.
In every further call the settings are ignored.

On the other hand, settings made to \startxcell work for every call of the 
macro.

I assume this is a bug.

Regards Michael


\unexpanded\def\Table#1{%
  \startembeddedxtable[height=5cm]
  \startxrow
\startxcell #1 \stopxcell
  \stopxrow
\stopembeddedxtable
}

\unexpanded\def\TableCell#1{%
  \startembeddedxtable
  \startxrow
\startxcell[height=5cm] #1 \stopxcell
  \stopxrow
\stopembeddedxtable
}

\starttext
\Table{height is 5cm}
\Table{height should be 5cm}
\TableCell{height is 5cm}
\TableCell{height is 5cm}
\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
___