Re: [NTG-context] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Tue, 03 Jul 2018 15:30:18 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň 
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned  
streams setup - by Wolfgang.


Ok, needed a break from work, so for fun and for learning something new:

==
\setuppapersize[A4][A4]
\defineparagraphs[TwoLang][n=2]
\setuptabulate[split=yes]
\setupalign[verytolerant,stretch]

\starttext
\showframe

\startoutputstream[one]
   \setupalign[flushleft]
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input lorem }
   \hfill
   \par
\stopoutputstream

\startoutputstream[two]
   \setupalign[flushright]
   \hfill
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input davis }
   \par
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
   {\raise2\strutdp\outputstreambox[one]}
   {\raise0\strutdp\outputstreambox[two]}
\stopoverlay
\startTwoLang
\input lorem
\nextTwoLang
\input davis
\stopTwoLang

\starttabulate[|p|p|]
\NC\input lorem
\NC\input davis
\NC\NR
\stoptabulate

\bTABLE[frame=off,align=yes,split=yes]
\bTR
\bTD[roffset=2mm]\input lorem\eTD
\bTD[loffset=2mm]\input davis\eTD
\eTR
\eTABLE

\startcolumns[n=2]
\input lorem
\column
\input davis
\stopcolumns

\stoptext
==

The \raise2\strutdp etc. feels like a hack, Wolfgang knows better why it's  
needed, as as how and why the value for one stream affects the other..


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.pdf
Description: Adobe PDF document


scratch.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] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň 
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned streams  
setup - by Wolfgang.


Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] mtxrun fails to install fonts

2018-07-03 Thread Stanislav Sokolenko

Dear list,

I have what seems to be an OS- or ConTeXt version-specific issue with 
mtxrun installing fonts.


I've been trying to add new truetype fonts (specifically Archivo ttf 
files) on Arch Linux using the following command:


export OSFONTDIR=~/.fonts//; mtxrun --script font --reload

And I've been using the following to check the installation:

mtxrun --script font --list --all --pattern=*archi*

It seems like a relatively new version of ConTeXt on Arch Linux 
(2018.04.04 00:51) recognizes but does not install the ttf files located 
in ~/.fonts/. The (shortened) output is:


fonts   | names | identifying system font files with suffix 'ttf'
fonts   | names | globbing path '/home/stanislav/.fonts/**.ttf'
fonts   | names | identifying system font files with suffix 'TTF'
fonts   | names | globbing path '/home/stanislav/.fonts/**.TTF'
fonts   | names | 8 system files identified, 0 skipped, 0 
duplicates, 8 hash entries added, runtime 0.006 seconds


But when I check the installation, no Archivo files are found.

Strangely, an older installation on Linux Mint (2015.05.18 12:26) has no 
problems with the same ttf files:


fonts   | names | globbing path '/home/stanislav/.fonts/**.ttf'
fonts   | names | identifying system font files with suffix 'TTF'
fonts   | names | globbing path '/home/stanislav/.fonts/**.TTF'
fonts   | names | 8 system files identified, 0 skipped, 0 
duplicates, 8 hash entries added, runtime 0.000 seconds


And the check:

mtxrun --script font --list --all --pattern=*archi*

archivo archivomedium 
/home/stanislav/.fonts/typecatcher/Archivo_500.ttf
archivobold archivobold 
/home/stanislav/.fonts/typecatcher/Archivo_700.ttf
archivobolditalic   archivobolditalic 
/home/stanislav/.fonts/typecatcher/Archivo_700italic.ttf
archivodemi archivosemibold 
/home/stanislav/.fonts/typecatcher/Archivo_600.ttf
archivoitalic   archivoitalic 
/home/stanislav/.fonts/typecatcher/Archivo_italic.ttf
archivomedium   archivomedium 
/home/stanislav/.fonts/typecatcher/Archivo_500.ttf
archivomediumitalic archivomediumitalic 
/home/stanislav/.fonts/typecatcher/Archivo_500italic.ttf
archivonormal   archivoitalic 
/home/stanislav/.fonts/typecatcher/Archivo_italic.ttf
archivoregular  archivoregular 
/home/stanislav/.fonts/typecatcher/Archivo_regular.ttf
archivosemibold archivosemibold 
/home/stanislav/.fonts/typecatcher/Archivo_600.ttf
archivosemibolditalic   archivosemibolditalic 
/home/stanislav/.fonts/typecatcher/Archivo_600italic.ttf


I've been searching for a couple of days and I'm at a loss. Is there a 
way to check why the identified system files aren't being installed?


Thanks,

Stan

___
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] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .

Hello Wolfgang,

On Tue, 03 Jul 2018 09:07:23 +0200, Wolfgang Schuster 
 wrote:


Hi Lukas,

when you create the buffer with the grabbufferdata-command you already set
the delimiter for the environment with the third argument, in the
example below
this is the \stopcontentexport command.

To have different start/stop-commands for your environment means you have
to change all names in the implementation of the contentxport-environment.

%%
\unexpanded\def\bH{}

\def\dobH[#1]%
{...
 \grabbufferdata[...][bH][eH]}

\def\eH
   {}
%%


thank you for the explanation! - Much clearer for me how buffers work!

Best regards,

Lukas



Wolfgang

Procházka Lukáš Ing. 
3. Juli 2018 um 08:52
Hello,

I tried to \let shortcuts for \startcontentexport and
\stopcontentexport, but Ctx run fails.

I guess this is a basic misunderstanding, but - why?


\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]
}

\let\bX=\startcontentexport % < Use of these two "shortcuts" is
not possible,
\let\eX=\stopcontentexport  % < I'm getting : ! TeX capacity
exceeded, sorry [input stack size=1]

\starttext

  A

  \startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
  \stopcontentexport

  B

  \bX[t2~.out.mkiv]
Ahoj
  \eX

\stoptext


HSo how to define "shortcuts" properly?

Best regards,

Lukas



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

Mob.: +420 702 033 396

___
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] Parallel output of source data

2018-07-03 Thread Hans Hagen

On 7/3/2018 8:52 AM, Procházka Lukáš Ing. wrote:

Hello,

I tried to \let shortcuts for \startcontentexport and 
\stopcontentexport, but Ctx run fails.


I guess this is a basic misunderstanding, but - why?


\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]
}

\let\bX=\startcontentexport % < Use of these two "shortcuts" is not 
possible,
\let\eX=\stopcontentexport  % < I'm getting : ! TeX capacity 
exceeded, sorry [input stack size=1]


\starttext

   A

   \startcontentexport[t~.out.mkiv]
     Hello!
     \startitemize
     \item Item
     \stopitemize
   \stopcontentexport

   B

   \bX[t2~.out.mkiv]
     Ahoj
   \eX

\stoptext


HSo how to define "shortcuts" properly?

impossible ... just define an extra grabbuffer


what has this to do with parallel texts

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] Parallel output of source data

2018-07-03 Thread Wolfgang Schuster

Hi Lukas,

when you create the buffer with the grabbufferdata-command you already set
the delimiter for the environment with the third argument, in the 
example below

this is the \stopcontentexport command.

To have different start/stop-commands for your environment means you have
to change all names in the implementation of the contentxport-environment.

%%
\unexpanded\def\bH{}

\def\dobH[#1]%
   {...
\grabbufferdata[...][bH][eH]}

\def\eH
  {}
%%

Wolfgang

Procházka Lukáš Ing. 
3. Juli 2018 um 08:52
Hello,

I tried to \let shortcuts for \startcontentexport and 
\stopcontentexport, but Ctx run fails.


I guess this is a basic misunderstanding, but - why?


\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]
}

\let\bX=\startcontentexport % < Use of these two "shortcuts" is 
not possible,
\let\eX=\stopcontentexport  % < I'm getting : ! TeX capacity 
exceeded, sorry [input stack size=1]


\starttext

  A

  \startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
  \stopcontentexport

  B

  \bX[t2~.out.mkiv]
Ahoj
  \eX

\stoptext


HSo how to define "shortcuts" properly?

Best regards,

Lukas


___
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
___