ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in \typo_paragraphs_setup_three.
@ 2012-07-08 17:27 Willi Egger
  2012-07-08 18:15 ` Wolfgang Schuster
  2012-07-08 18:18 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Willi Egger @ 2012-07-08 17:27 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

Hello!

I wanted to write a letter… Then it appeared that there is something wrong in  \typo_paragraphs_setup_three. The problem is present in todays beta (as was in the previous version).
Please try the attached minimal example.

Thank you and kind regards

Willi

[-- Attachment #2: test-paragraphs.tex --]
[-- Type: application/octet-stream, Size: 540 bytes --]

% Context file
% Filename: test-paragraphs.tex
% 
% 08-07-2012
% Copyright (c) 2012 BOEDE. All rights reserved.
%
% \nopdfcompression
% \enabletrackers[context.trace]
% \enabletrackers[system.jobfiles]


\setuppagenumbering[location=]
\setuplayout
	[topspace=2.5cm,
	backspace=1.5cm,
	header=0pt,
	footer=0pt,
	height=middle,
	width=middle]
\mainlanguage[nl]

%\showframe
\defineparagraphs[Attachment][n=2]
\setupparagraphs[Attachment][1][width=2.0cm]

\starttext
\startAttachment
  Bijlage:
\Attachment: Een foto.
\stopAttachment
\stoptext

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \typo_paragraphs_setup_three.
  2012-07-08 17:27 Bug in \typo_paragraphs_setup_three Willi Egger
@ 2012-07-08 18:15 ` Wolfgang Schuster
  2012-07-08 18:20   ` Hans Hagen
  2012-07-08 18:18 ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2012-07-08 18:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 08.07.2012 um 19:27 schrieb Willi Egger:

> Hello!
> 
> I wanted to write a letter… Then it appeared that there is something wrong in  \typo_paragraphs_setup_three. The problem is present in todays beta (as was in the previous version).
> Please try the attached minimal example.



tabl-mis.mkiv

\def\typo_paragraphs_setup[#1][#2][#3]% we are downward compatible with [each] and [1,3]
  {\ifthirdargument
-    \def\typo_paragraphs_setup_three[#1][#2][#3]%
-      {\doifelse{#2}\v!each
-         {\typo_paragraphs_setup_saved[#1][#3]}
-         {\def\typo_paragraphs_setup_step##1{\typo_paragraphs_setup_saved[#1:##1][#3]}%
-          \processcommalist[#2]\typo_paragraphs_setup_step}}
+    \doifelse{#2}\v!each
+      {\dorecurse{\namedparagraphsparameter{#1}\c!n}{\typo_paragraphs_setup_saved[#1:\recurselevel][#3]}}
+      {\def\typo_paragraphs_setup_step##1{\typo_paragraphs_setup_saved[#1:##1][#3]}%
+       \processcommalist[#2]\typo_paragraphs_setup_step}%
   \else\ifsecondargument
      \typo_paragraphs_setup_saved[#1][#2]%
   \else\iffirstargument
      \typo_paragraphs_setup_saved[#1]%
   \fi\fi\fi}

\appendtoks
    \letvalue  {\e!next \currentparagraphs}\nextparagraphs
    \setuevalue{\e!start\currentparagraphs}{\startparagraphs[\currentparagraphs]}%
    \letvalue  {\e!stop \currentparagraphs}\stopparagraphs
    %setuevalue{\e!setup\currentparagraph\e!endsetup}{\typo_paragraphs_setup_saved[\currentparagraphs]}%
-   \dorecurse{\paragraphsparameter\c!n}
-     {\normalexpanded{\typo_paragraphs_setup_saved[\currentparagraphs:\recurselevel][\c!width=,\s!parent=\??paragraphs\currentparagraphs]}}%
-   \typo_paragraphs_setup_saved[\currentparagraphs][\c!distance=\zeropoint]%
+   \dorecurse{\paragraphsparameter\c!n}
+     {\normalexpanded{\typo_paragraphs_setup_saved[\currentparagraphs:\recurselevel][\c!width=,\c!distance=\zeropoint,\s!parent=\??paragraphs\currentparagraphs]}}%
\to \everydefineparagraphs


BTW 1: Change the \Attachment command to \nextAttachment.

BTW 2: For something like your example tabulate would be simpler because you don’t have to define anything-

\starttext
\starttabulate
\NC Bijlage \EQ Een foto. \NC\NR
\stoptabulate
\stoptext

BTW 3: Hans added a few new commands to paragraphs to make a more table (natural table and xtable) like.

%D \defineparagraphs[sample][n=2,rule=on]
%D
%D \startsample
%D     first  \nextsample
%D     second \nextsample
%D     third
%D \stopsample
%D
%D \startsample
%D     \input tufte \nextsample
%D     \input ward  \nextsample
%D     \input davis \nextsample
%D     \input zapf
%D \stopsample
%D
%D \startparagraphs[sample]
%D     first  \nextsample
%D     second \nextsample
%D     third
%D \stopparagraphs
%D
%D \startparagraphs[sample]
%D     \startparagraphscell
%D         first
%D     \stopparagraphscell
%D     \startparagraphscell
%D         second
%D     \stopparagraphscell
%D     \startparagraphscell
%D         third
%D     \stopparagraphscell
%D \stopparagraphs

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \typo_paragraphs_setup_three.
  2012-07-08 17:27 Bug in \typo_paragraphs_setup_three Willi Egger
  2012-07-08 18:15 ` Wolfgang Schuster
@ 2012-07-08 18:18 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2012-07-08 18:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

On 8-7-2012 19:27, Willi Egger wrote:
> Hello!
>
> I wanted to write a letter… Then it appeared that there is something wrong in  \typo_paragraphs_setup_three. The problem is present in todays beta (as was in the previous version).
> Please try the attached minimal example.

fixed
-----------------------------------------------------------------
                                           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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \typo_paragraphs_setup_three.
  2012-07-08 18:15 ` Wolfgang Schuster
@ 2012-07-08 18:20   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2012-07-08 18:20 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 8-7-2012 20:15, Wolfgang Schuster wrote:

> \appendtoks
>      \letvalue  {\e!next \currentparagraphs}\nextparagraphs
>      \setuevalue{\e!start\currentparagraphs}{\startparagraphs[\currentparagraphs]}%
>      \letvalue  {\e!stop \currentparagraphs}\stopparagraphs
>      %setuevalue{\e!setup\currentparagraph\e!endsetup}{\typo_paragraphs_setup_saved[\currentparagraphs]}%
> -   \dorecurse{\paragraphsparameter\c!n}
> -     {\normalexpanded{\typo_paragraphs_setup_saved[\currentparagraphs:\recurselevel][\c!width=,\s!parent=\??paragraphs\currentparagraphs]}}%
> -   \typo_paragraphs_setup_saved[\currentparagraphs][\c!distance=\zeropoint]%
> +   \dorecurse{\paragraphsparameter\c!n}
> +     {\normalexpanded{\typo_paragraphs_setup_saved[\currentparagraphs:\recurselevel][\c!width=,\c!distance=\zeropoint,\s!parent=\??paragraphs\currentparagraphs]}}%
> \to \everydefineparagraphs

actually the lack of a parent chain one was a side effect of defining 
\s!parent more efficiently (=>) which interferes with assignments so I 
reverted that

(I'll make a dedicated chain command.)

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-08 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08 17:27 Bug in \typo_paragraphs_setup_three Willi Egger
2012-07-08 18:15 ` Wolfgang Schuster
2012-07-08 18:20   ` Hans Hagen
2012-07-08 18:18 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).