Re: [NTG-context] Page breaks with \defineparagraphs possible?

2023-06-05 Thread Berend de Boer via ntg-context

Hi Wolfgang,


\definetabulate[bilingual][|pA{normal,verytolerant,stretch}|pA{normal,verytolerant,stretch}|]


One more on this actually: how can I influence the white space between
the columns? I tried to set distance, but that didn't do anything.

Setting p(4cm) or so, made the paragraphs smaller, but did not impact
the white space between the columns.

--
All the best,

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

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


Re: [NTG-context] Page breaks with \defineparagraphs possible?

2023-06-05 Thread Berend de Boer via ntg-context

Hi Wolfgang,


You can use the tabulate environment to create parallel paragraphs.


Just one thing for others, this solution as the same problem as
paragraphs: \placeinitial won't work.

I.e. this:

   \setupinitial[text=#1]\placeinitial

inside the tabulate or paragraphs doesn't work (but here I simply use
a \hbox{\vbox{}\hfil\vbox{}} solution which works well enough I think,
as I only need this for the opening paragraph.

--
All the best,

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

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


Re: [NTG-context] Page breaks with \defineparagraphs possible?

2023-06-05 Thread Berend de Boer via ntg-context

Hi Wolfgang,


You can use the tabulate environment to create parallel paragraphs.


Ah yes, that's working! Thank you so much!

One question on the pA{normal,verytolerant,stretch}: what does that do exactly?


From the manual I got that A only takes one key, what does specifying three 
keys mean?


--
All the best,

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

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


Re: [NTG-context] Page breaks with \defineparagraphs possible?

2023-06-04 Thread Wolfgang Schuster via ntg-context

Berend de Boer via ntg-context schrieb am 05.06.2023 um 00:02:

Dear all,

I've noticed that \defineparagraphs does not break across pages. That
would be a huge page saver in my case. Do I have any options for page
breaking across a set of parallel paragraphs?

Initially I just had a \hbox{\vtop{#1}\hfil\vtop{#2}} but obviously
that doesn't break, so went for more ConTeXt style, but couldn't see a
good mechanism.


You can use the tabulate environment to create parallel paragraphs.

\setuppapersize[A5]

\definetabulate[bilingual][|pA{normal,verytolerant,stretch}|pA{normal,verytolerant,stretch}|]

\starttext

\startbilingual
\NC \input tufte
\NC \input knuth
\NC\NR
\stopbilingual

\stoptext

Wolfgang

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

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


[NTG-context] Page breaks with \defineparagraphs possible?

2023-06-04 Thread Berend de Boer via ntg-context

Dear all,

I've noticed that \defineparagraphs does not break across pages. That
would be a huge page saver in my case. Do I have any options for page
breaking across a set of parallel paragraphs?

Initially I just had a \hbox{\vtop{#1}\hfil\vtop{#2}} but obviously
that doesn't break, so went for more ConTeXt style, but couldn't see a
good mechanism.


Example file where you can see the entire paragraphs thing is put on the next 
page.

==

\setuppapersize[A5]

\defineparagraphs[bilingual][n=2,tolerance=stretch,before=,after=,distance=\0.06\textwidth]
\setupparagraphs[bilingual][1][width=0.47\textwidth]
\setupparagraphs[bilingual][2][width=0.47\textwidth]

\starttext

\input tufte

\startbilingual
 \input tufte
 \nextbilingual
 \input knuth

\stopbilingual

\stoptext

==

--
All the best,

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

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


Re: [NTG-context] align=nothyphenated in \defineparagraphs

2022-07-30 Thread Henning Hraban Ramm via ntg-context

Am 30.07.22 um 16:36 schrieb Marcin Ciura via ntg-context:

Dear list,
I would like to typeset two columns with different widths and no hyphenation.
The columns in the output PDF overlap:
https://live.contextgarden.net/cgi-bin/result.cgi?id=JnPVEM
How to make the columns non-overlapping? My attempt is below.


align={nothyphenated,flushleft}

Hraban

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

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


[NTG-context] align=nothyphenated in \defineparagraphs

2022-07-30 Thread Marcin Ciura via ntg-context
Dear list,
I would like to typeset two columns with different widths and no hyphenation.
The columns in the output PDF overlap:
https://live.contextgarden.net/cgi-bin/result.cgi?id=JnPVEM
How to make the columns non-overlapping? My attempt is below.
I do not see a solution at
https://wiki.contextgarden.net/Command/setupparagraphs
Best regards,
Marcin Ciura

\mainlanguage[pl]
\defineparagraphs[proposition][n=2,align=nothyphenated]
\setupparagraphs[proposition][1][width=0.56\textwidth]
\setupparagraphs[proposition][2][width=0.41\textwidth]

\starttext
\startproposition

Jeśli w trójkącie $ABC$
pole kwadratu skonstruowanego na jednym boku
jest równe sumie pól kwadratów skonstruowanych
na dwóch innych bokach:
$BC^2 = AC^2 + AB^2$,
to kąt $BAC$
między tymi dwoma bokami jest prosty.

\proposition

Jeśli odcinek stykający się z innym odcinkiem
tworzy z~nim dwa równe kąty przyległe,
to oba kąty przyległe nazywamy {\bf kątami prostymi},
a~o~obu odcinkach mówimy, że są {\bf prostopadłe}.

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

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


Re: [NTG-context] \defineparagraphs

2016-07-09 Thread Wolfgang Schuster

John Kitzmiller 
9. Juli 2016 um 14:48


Thank you Wolfgang. I had to change .5\localhsize to .5\textwidth for 
it to work here (and scale down the cow to make it fit in the barn.)


I am looking into combinations to center the graphic in the second x 
box, and make a \setupcombination[mycombination] similar to 
\defineparagraph[Mypar] to reduce typing.

\definecombination[john][nx=2,ny=1,width=.5\textwidth]

\startcombination[john]
{...}{}
{...}{}
\stopcombination

\tbox is new to me. Is that a ConTeXt macro of TEX \vtop{\hbox}?
The command changes the vertical position of the content (by putting it 
into an \hbox and changing the height/depth values).


\setupblackrules[width=2cm,height=2cm]

\setuplayout[grid=yes]\showgrid

\starttext
XXX  {\blackrule}
XXX \tbox{\blackrule}
XXX \bbox{\blackrule}
XXX
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \defineparagraphs

2016-07-09 Thread John Kitzmiller

> On 8Jul, 2016, at 09:20, Wolfgang Schuster  
> wrote:
> 
>> The code below works with context2016.02.15, but fails with 
>> context2016.05.19.
>> 
>> Itemize within the defined paragraph (Mypar) no longer puts the thinrule in 
>> the margin (see the third question.) The \ansblank command seems to the 
>> second part of Mypar is 
>> the margin? Pdf of the success and fail attached.
>> 
>> Thanks! John
>> 
>> \startMypar
>> \item Third question refers to graphic at right. 
>> \Mypar
>> 
>> \stopMypar
> \item
> \startcombination[nx=2,ny=1]
> 
> {\framed[frame=off,align=flushleft,location=top,width=.5\localhsize]{Third 
> question refers to graphic at right.}}{}
> {\tbox{\externalfigure[cow]}}{}
> \stopcombination

Thank you Wolfgang. I had to change .5\localhsize to .5\textwidth for it to 
work here (and scale down the cow to make it fit in the barn.)

I am looking into combinations to center the graphic in the second x box, and 
make a \setupcombination[mycombination] similar to \defineparagraph[Mypar] to 
reduce typing.

\tbox is new to me. Is that a ConTeXt macro of TEX \vtop{\hbox}?

Thanks again, John___
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] \defineparagraphs

2016-07-08 Thread Wolfgang Schuster

k...@inradius.net 
8. Juli 2016 um 13:53
The code below works with context2016.02.15, but fails with 
context2016.05.19.


Itemize within the defined paragraph (Mypar) no longer puts the 
thinrule in the margin (see the third question.) The \ansblank command 
seems to the second part of Mypar is

the margin? Pdf of the success and fail attached.

Thanks! John

\startMypar
\item Third question refers to graphic at right.
\Mypar

\stopMypar

\item
\startcombination[nx=2,ny=1]

{\framed[frame=off,align=flushleft,location=top,width=.5\localhsize]{Third 
question refers to graphic at right.}}{}

{\tbox{\externalfigure[cow]}}{}
\stopcombination

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \defineparagraphs

2016-07-08 Thread kitz
The code below works with context2016.02.15, but fails with context2016.05.19.

Itemize within the defined paragraph (Mypar) no longer puts the thinrule in the 
margin (see the third question.) The \ansblank command seems to the second part 
of Mypar is 
the margin?  Pdf of the success and fail attached.

Thanks! John


\defineparagraphs[Mypar][n=2]
 \setupparagraphs[Mypar][1][width=0.5\textwidth] 

% label subquestions (a, b, c, etc) with answerblanks
\defineconversionset[myitemize][n,a][n]

% define the answerblank in right margin
\define\ansblank
  
{\inright{\simplealignedbox{2em}{flushleft}{\convertedcounter[itemgroup:itemize][numberconversionset=myitemize,numberstopper=.]}\thinrule}\ignorespaces}

% \define\noblank
\define\noblank
  {\inright{~}}

% put them together to toggle printing of the answerblank
\define\blankon{\setupitemgroup [itemize] [style=bold,command=\ansblank]}
\define\blankoff{\setupitemgroup [itemize] [style=bold,command=\noblank]}

\starttext
\showframe
\startitemize[n]
\blankon
\item First question.
\blankoff
\item Second question has two parts.
  \startitemize[a]
  \blankon
  \item subquestion a
  \item subquestion b
  \stopitemize
\blankon
\startMypar
\item Third question refers to graphic at right. 
\Mypar

\stopMypar
\item Final question.
\stopitemize
\stoptext







mwe2016.02.15.pdf
Description: Binary data


mwe2016.05.19.pdf
Description: Binary data
___
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] \defineparagraphs, \setupparagraphs newbie question

2006-03-09 Thread Taco Hoekwater


frantisek holop wrote:
 it is not clear to me after reading the manual what are
 before, after, inner, or that if these could be used 
 for something like this.

To replace the \startlines ... \stoplines you mean? no.
To see what the options do, simply run something like this:

   \defineparagraphs
  [poem][n=2,before=b,after=a,inner=i]

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \defineparagraphs, \setupparagraphs newbie question

2006-03-09 Thread frantisek holop
hmm, on Thu, Mar 09, 2006 at 09:46:28AM +0100, Taco Hoekwater said that
 frantisek holop wrote:
  it is not clear to me after reading the manual what are
  before, after, inner, or that if these could be used 
  for something like this.
 
 To replace the \startlines ... \stoplines you mean? no.

yes, i should have been clearer :)

as the style is always the same and i am lazy, i want to save myself
the typing of \startlines and \stoplines for the second column :)

so there is no way i could set up the 2nd paragraph like that?
maybe a macro or something?


 To see what the options do, simply run something like this:
 
\defineparagraphs
   [poem][n=2,before=b,after=a,inner=i]

that's a good idea, will play with it :)

-f
-- 
if i die, i forgive you, if i recover, we shall see.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \defineparagraphs, \setupparagraphs newbie question

2006-03-09 Thread Taco Hoekwater


frantisek holop wrote:
 
 as the style is always the same and i am lazy, i want to save myself
 the typing of \startlines and \stoplines for the second column :)


Understandable ;-)

Some extra magic is needed (newlines are rather special). The
following bit of code seems to work on a simple case,
but i give no guarantees:

%
\defineparagraphs
   [Poem][n=2]
\setupparagraphs
   [Poem][1][width=.4\textwidth]

\def\startpoem#1\poem
   {\def\poemtitle{#1}\begingroup\obeylines\domypoem}

\def\domypoem#1\stoppoem
   {\endgroup\startPoem\poemtitle\Poem\startlines #1\stoplines\stopPoem}

\starttext

\startpoem
poemtitle
\poem
...
...
\stoppoem

\stoptext
% EOF

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \defineparagraphs, \setupparagraphs newbie question

2006-03-08 Thread frantisek holop
hi there,

i am trying to step a 2 column paragraph

\defineparagraphs
  [poem][n=2]
\setupparagraphs
  [poem][1][width=.4\textwidth]

\startpoem
poemtitle
\poem
\startlines
...
...
\stoplines
\stoppoem



the second column is always in \startlines .. \stoplines

it is not clear to me after reading the manual what are
before, after, inner, or that if these could be used 
for something like this.

-f
-- 
smile, its the second best thing you can do with your lips.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context