Re: [NTG-context] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Jorge Manuel

Dear Pablo,

Changing scancsv to handlecsv is enough in my all documents (at least the ones 
I tested).  Now, all works fine. Thanks again.

 Jorge


> No dia 17/09/2018, às 19:34, Pablo Rodriguez  escreveu:
> 
> 
> On 9/17/18 7:50 PM, Jorge Manuel wrote:
>>> [...]
>>> My guess is that you need to enclose text strings in quotes, so that
>>> your conditionals read:
>>> 
>>>  \doloopif{\Flag}{~=}{"anl"}{\lineaction}
>>>  \doloopif{\Flag}{==}{"anl"}{\lineaction}
>> 
>> Thanks for your reply. This code don’t work.  I would try your
>> handlecsv module. I need to adapt my old .tex files.
> I was wrong. Quotes aren’t required.
> 
> See minimal example (which works both with handlecsv and scancsv):
> 
>\usemodule[handlecsv]% scancsv works too
>\opencsvfile{cities.csv}
>\starttext
>\startbuffer
>This is located in Germany: \cA\par
>\stopbuffer
>\section{Cities in Germany}
>\doloopif{\cB}{==}{Germany}{\getbuffer}
>\section{Cities not in Germany}
>\doloopif{\cB}{~=}{Germany}{\getbuffer}
>\stoptext
> 
> Contents from "cities.csv" read:
> 
>"Berlin";"Germany"
>"Paris";"France"
>"London";"UK"
>"New York";"USA"
>"Munich";"Germany"
>"Lisbon";"Portugal"
>"Dublin";"Ireland"
>"Warsaw";"Poland"
>"Vienna";"Austria"
>"Barcelona";"Spain"
> 
> Just in case it helps,
> 
> 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
> ___

___
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] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Pablo Rodriguez

On 9/17/18 7:50 PM, Jorge Manuel wrote:
>> [...]
>> My guess is that you need to enclose text strings in quotes, so that
>> your conditionals read:
>>
>>   \doloopif{\Flag}{~=}{"anl"}{\lineaction}
>>   \doloopif{\Flag}{==}{"anl"}{\lineaction}
> 
> Thanks for your reply. This code don’t work.  I would try your
> handlecsv module. I need to adapt my old .tex files.
I was wrong. Quotes aren’t required.

See minimal example (which works both with handlecsv and scancsv):

\usemodule[handlecsv]% scancsv works too
\opencsvfile{cities.csv}
\starttext
\startbuffer
This is located in Germany: \cA\par
\stopbuffer
\section{Cities in Germany}
\doloopif{\cB}{==}{Germany}{\getbuffer}
\section{Cities not in Germany}
\doloopif{\cB}{~=}{Germany}{\getbuffer}
\stoptext

Contents from "cities.csv" read:

"Berlin";"Germany"
"Paris";"France"
"London";"UK"
"New York";"USA"
"Munich";"Germany"
"Lisbon";"Portugal"
"Dublin";"Ireland"
"Warsaw";"Poland"
"Vienna";"Austria"
"Barcelona";"Spain"

Just in case it helps,

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] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Jorge Manuel


> No dia 17/09/2018, às 17:07, Pablo Rodriguez  escreveu:
> 
> On 9/17/18 3:05 PM, Jorge Manuel wrote:
>> Dear Sirs
>> 
>> I'm trying to run an old code that imports the t-scancsv module.
> 
> Dear Jorge Manuel,
> 
> I’m afraid that the scancsv module has been deprecated.
> 
> handlecsv is the new csv module (that replaces scancsv).
> 
> Could you use the handlecsv module instead? (At least, if my suggestion
> below doesn’t work, try handlecsv.)
> 
>> However, I encountered an error message that did not happen before. The
>> same error can be reproduced in the module package when I run "context
>> list.tex". The error is on the line: 
> 
> Unless you provide a minimal sample that reproduces the issue, it is
> impossible to know what when wrong.
> 
>> \doloopif{\Flag}{~=}{anl}{\lineaction} doesn’t work anymore, the
>> same for \doloopif{\Flag}{==}{anl}{\lineaction}
> 
> My guess is that you need to enclose text strings in quotes, so that
> your conditionals read:
> 
>   \doloopif{\Flag}{~=}{"anl"}{\lineaction}
>   \doloopif{\Flag}{==}{"anl"}{\lineaction}


Thanks for your reply. This code don’t work.  I would try your handlecsv 
module. I need to adapt my old .tex files. 
 Many thanks for that.

Jorge



> 
>> but \doloopif{1}{==}{1}{\lineaction} is ok.
> 
> Numbers must not be enclosed in quotes to be handled as such (that is,
> to avoid being treated as text strings).
> 
> I hope it helps,
> 
> 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
> ___

___
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] t-scancsv_ConTeXT_module can't filter anymore

2018-09-17 Thread Pablo Rodriguez
On 9/17/18 3:05 PM, Jorge Manuel wrote:
> Dear Sirs
> 
> I'm trying to run an old code that imports the t-scancsv module.

Dear Jorge Manuel,

I’m afraid that the scancsv module has been deprecated.

handlecsv is the new csv module (that replaces scancsv).

Could you use the handlecsv module instead? (At least, if my suggestion
below doesn’t work, try handlecsv.)

> However, I encountered an error message that did not happen before. The
> same error can be reproduced in the module package when I run "context
> list.tex". The error is on the line: 

Unless you provide a minimal sample that reproduces the issue, it is
impossible to know what when wrong.

> \doloopif{\Flag}{~=}{anl}{\lineaction} doesn’t work anymore, the
> same for \doloopif{\Flag}{==}{anl}{\lineaction}

My guess is that you need to enclose text strings in quotes, so that
your conditionals read:

   \doloopif{\Flag}{~=}{"anl"}{\lineaction}
   \doloopif{\Flag}{==}{"anl"}{\lineaction}

> but \doloopif{1}{==}{1}{\lineaction} is ok.

Numbers must not be enclosed in quotes to be handled as such (that is,
to avoid being treated as text strings).

I hope it helps,

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
___