Hi Olivier, Thanks for your reaction. My original proposal was: \startitemize \beginblockA \item Apple \endblockA \beginblockB \item Pomme \endBlockB \beginblockA \item Pear \endblockA \beginblockB \item Poire \endBlockB \stopitemize This does not work. The advantage of this setup is that in a bilingual document, printed separatedly, I have both languages underneath and thus more control than when I use separate itemize environments, such as proposed by Taco, and what I had thought of earlier: \beginblockA \startitemize .... \stopitemize \endblockA \beginblockB \startitemize .... \stopitemize \endblockB Nevertheless, if my proposal does not work, I guess I'll have to try it this way. Kind regards, Rob
Hi,
I might be wrong, but I think blocks are intended as buffered text. This way it is not good to use \item {block A}{bloc B} and it is not good as well to use {\item block A} {\item block B}
I think the only good way to use block is {\startitemize \item block A \stoptitemize} {\startitemize \item block B \stoptitemize} were good means a natural utilisation of blocks.
However, I certainly understand that the third solution is not practical for your intended usage.
Maybe a newif is more appropriate to your situation: \newif\ifenlang and \ifenlang \else \fi switches, or maybe even cases if you have more than one language.
Just some thought hoping it helps, Olivier
At 04:58 AM 8/22/2005, you wrote:
Thanks for your reaction. My original proposal was:
\startitemize \beginblockA \item Apple \endblockA \beginblockB \item Pomme \endBlockB \beginblockA \item Pear \endblockA \beginblockB \item Poire \endBlockB \stopitemize
This does not work.
I don't know anything about how blocks work, so this may be completely off-base, but if they do any sort of grouping, that would be quite sufficient to cause problems in a situation like that. Does this work? \startitemize \item \beginblockA Apple \endblockA \item \beginblockB Pomme \endBlockB \item \beginblockA Pear \endblockA \item \beginblockB Poire \endBlockB \stopitemize - Brooks
Thanks Brooks and Olivier, I'm afraid the problem has not entirely been solved. Brooks' solution works in the sense that I can hide BlockA or B (\hideblocks[BlockA]), but the \items remain, and empty items are generated. Olivier's suggestion is processed, the result is only one language. Now now I wonder how to hide either one of the languages. The document I want to produce is monolingual, either Dutch or English. Thanks again! Kind regards, Robert Brooks Moses wrote:
At 04:58 AM 8/22/2005, you wrote:
Thanks for your reaction. My original proposal was:
\startitemize \beginblockA \item Apple \endblockA \beginblockB \item Pomme \endBlockB \beginblockA \item Pear \endblockA \beginblockB \item Poire \endBlockB \stopitemize
This does not work.
I don't know anything about how blocks work, so this may be completely off-base, but if they do any sort of grouping, that would be quite sufficient to cause problems in a situation like that. Does this work?
\startitemize \item \beginblockA Apple \endblockA \item \beginblockB Pomme \endBlockB \item \beginblockA Pear \endblockA \item \beginblockB Poire \endBlockB \stopitemize
- Brooks
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hi, If I make sure there is enough space, i.e. more than one space, between the \begin... and the text, it works! However in the pdf the item drops a line down, like this: * Ik vraag me af ... Does anyone have a workaround? Kind regards, Robert \defineblock[Nederlandsblok, Engelsblok] \starttext \startitemize \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \stopitemize \stoptext Rob Ermers wrote:
Thanks Brooks and Olivier, I'm afraid the problem has not entirely been solved.
Brooks' solution works in the sense that I can hide BlockA or B (\hideblocks[BlockA]), but the \items remain, and empty items are generated.
Olivier's suggestion is processed, the result is only one language. Now now I wonder how to hide either one of the languages. The document I want to produce is monolingual, either Dutch or English.
Thanks again!
Kind regards,
Robert
Brooks Moses wrote:
At 04:58 AM 8/22/2005, you wrote:
Thanks for your reaction. My original proposal was:
\startitemize \beginblockA \item Apple \endblockA \beginblockB \item Pomme \endBlockB \beginblockA \item Pear \endblockA \beginblockB \item Poire \endBlockB \stopitemize
This does not work.
I don't know anything about how blocks work, so this may be completely off-base, but if they do any sort of grouping, that would be quite sufficient to cause problems in a situation like that. Does this work?
\startitemize \item \beginblockA Apple \endblockA \item \beginblockB Pomme \endBlockB \item \beginblockA Pear \endblockA \item \beginblockB Poire \endBlockB \stopitemize
- Brooks
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Rob Ermers wrote:
Hi,
If I make sure there is enough space, i.e. more than one space, between the \begin... and the text, it works! However in the pdf the item drops a line down, like this:
See \def\dodefineblock in core-buf.tex. Does \setupblock[Nederlandsblok][before=,after=] \setupblock[Engelsblok][before=,after=] solve your problem? Besides that, I would prefer to define something like \def\NlEn#1#2{% \beginNederlandsblok% {#1}% \endNederlandsblok% \beginEngelsblok% {#2}% \endEngelsblok} in your case, but you should ask someone else why this doesn't work (I guess it's some strange expansion problem again - I never understood that topic). Another extremely lightweight TeX solution: \newif\ifenglish \englishtrue % \englishfalse \def\NlEn#1#2{\ifenglish{#2}\else{#1}\fi} \starttext \NlEn{Dutch}{English} \stoptext However, if you want to have more complex stuff in it, you probably have to use a more complex definition (send an exaple that fails). Mojca
\defineblock[Nederlandsblok, Engelsblok]
\starttext \startitemize \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \stopitemize \stoptext
Hi everybody, The solution below works. Thanks a lot! Using Mojca's solution plus a newline after the command apparently does the trick. After that, I didn't try the other solution, which resembles Olivier's. Kind regards, Robert \defineblock[Nederlandsblok] \defineblock[Engelsblok] \setupblock[Nederlandsblok][before=,after=] \setupblock[Engelsblok][before=,after=] \hideblocks[Nederlandsblok] %\hideblocks[Engelsblok] \starttext there \beginNederlandsblok Ik vraag me af of ze ook appels verkopen 1 \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples 1 \endEngelsblok there there \startitemize \item \beginNederlandsblok% Ik vraag me af of ze ook appels verkopen 2 \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples 2 \endEngelsblok \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen 3 \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples 3 \endEngelsblok \stopitemize \stoptext Mojca Miklavec wrote:
Rob Ermers wrote:
Hi,
If I make sure there is enough space, i.e. more than one space, between the \begin... and the text, it works! However in the pdf the item drops a line down, like this:
See \def\dodefineblock in core-buf.tex.
Does \setupblock[Nederlandsblok][before=,after=] \setupblock[Engelsblok][before=,after=] solve your problem?
Besides that, I would prefer to define something like \def\NlEn#1#2{% \beginNederlandsblok% {#1}% \endNederlandsblok% \beginEngelsblok% {#2}% \endEngelsblok}
in your case, but you should ask someone else why this doesn't work (I guess it's some strange expansion problem again - I never understood that topic).
Another extremely lightweight TeX solution:
\newif\ifenglish \englishtrue % \englishfalse
\def\NlEn#1#2{\ifenglish{#2}\else{#1}\fi} \starttext \NlEn{Dutch}{English} \stoptext
However, if you want to have more complex stuff in it, you probably have to use a more complex definition (send an exaple that fails).
Mojca
\defineblock[Nederlandsblok, Engelsblok]
\starttext \startitemize \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \item \beginNederlandsblok Ik vraag me af of ze ook appels verkopen \endNederlandsblok \beginEngelsblok I really wonder if they do sell apples \endEngelsblok \stopitemize \stoptext
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Mojca Miklavec wrote:
Besides that, I would prefer to define something like \def\NlEn#1#2{% \beginNederlandsblok% {#1}% \endNederlandsblok% \beginEngelsblok% {#2}% \endEngelsblok}
in your case, but you should ask someone else why this doesn't work (I guess it's some strange expansion problem again - I never understood that topic).
because there is parsing involved (how else to determine the end condition you may try: \usememorybuffers Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Brooks Moses
-
Hans Hagen Outside
-
Mojca Miklavec
-
r.ermers@hccnet.nl
-
Rob Ermers