* Re: checking for an undefined constant
[not found] <mailman.2045.1277489811.4277.ntg-context@ntg.nl>
@ 2010-06-25 21:36 ` Vyatcheslav Yatskovsky
2010-06-27 14:17 ` two languages hyphenation Vyatcheslav Yatskovsky
1 sibling, 0 replies; 5+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-06-25 21:36 UTC (permalink / raw)
To: ntg-context
Thank you all for such a variety of solutions! Gonna look into it. ))
>> %D \macros
>> %D {doifundefined,doifdefined,
>> %D doifundefinedelse,doifdefinedelse,
>> %D doifalldefinedelse}
>> %D
>> %D The standard way of testing if a macro is defined is
>> %D comparing its meaning with another undefined one, usually
>> %D \type{\undefined}. To garantee correct working of the next
>> %D set of macros, \type{\undefined} may never be defined!
>> %D
>> %D \starttyping
>> %D \doifundefined {string} {...}
>> %D \doifdefined {string} {...}
>> %D \doifundefinedelse {string} {then ...} {else ...}
>> %D \doifdefinedelse {string} {then ...} {else ...}
>> %D \doifalldefinedelse {commalist} {then ...} {else ...}
>> %D \stoptyping
>> %D
>>
>> \doifdefined{Homeworks}{...}
>
>
> Low level (etex) solutions:
>
> \ifdefined\Homeworks ... \fi
>
> \unless\ifx\Homeworks\undefined ... \fi
--
Best Regards,
Vyatcheslav Yatskovsky
___________________________________________________________________________________
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] 5+ messages in thread
* Re: two languages hyphenation
[not found] <mailman.2045.1277489811.4277.ntg-context@ntg.nl>
2010-06-25 21:36 ` checking for an undefined constant Vyatcheslav Yatskovsky
@ 2010-06-27 14:17 ` Vyatcheslav Yatskovsky
1 sibling, 0 replies; 5+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-06-27 14:17 UTC (permalink / raw)
To: ntg-context, Hans Hagen
Hi Hans,
>> Since they are written in two different scripts you can theoretically
>> enable them simultaneously (but I'm not sure if this is supported by
>> default).
>
> interesting and quite trivial to support ... do you have a test file?
I suspect to use \mainlanguage[en,ua] command, if it's possible
This my test file:
\setupbodyfont[mscore,rm,24pt]
%\mainlanguage[en] %only English hyphens
%\mainlanguage[ua] %only Ukrainian hyphens
\mainlanguage[en,ua] %%only English hyphens, no Uk
\starttext
\dorecurse{4}{Для мене велика честь бути з вами сьогодні на випускному в
одному з найкращих університетів світу. Зізнаюся, я так і не закінчив
коледж - і ніколи не був ближче до випускного, ніж зараз. І я хочу
розповісти вам три історії зі свого життя. Три історії і все. }
\dorecurse{4}{I am honored to be with you today at your commencement
from one of the finest universities in the world. I never graduated from
college. Truth be told, this is the closest I've ever gotten to a
college graduation. Today I want to tell you three stories from my life.
That's it. No big deal. Just three stories.}
\stoptext
--
Best Regards,
Vyatcheslav Yatskovsky
___________________________________________________________________________________
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] 5+ messages in thread
* Re: checking for an undefined constant
2010-06-25 13:39 ` Aditya Mahajan
@ 2010-06-25 18:16 ` Wolfgang Schuster
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2010-06-25 18:16 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 25.06.10 15:39, schrieb Aditya Mahajan:
> On Fri, 25 Jun 2010, Vyatcheslav Yatskovsky wrote:
>
>> Hi,
>>
>> Now I check for an undefined constant like this:
>>
>> \ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi
>>
>> The useful part is in "else" clause. How to swap this check so that
>> "else" is not needed?
>>
>> From syst-gen.mkii
>
> %D \macros
> %D {doifundefined,doifdefined,
> %D doifundefinedelse,doifdefinedelse,
> %D doifalldefinedelse}
> %D
> %D The standard way of testing if a macro is defined is
> %D comparing its meaning with another undefined one, usually
> %D \type{\undefined}. To garantee correct working of the next
> %D set of macros, \type{\undefined} may never be defined!
> %D
> %D \starttyping
> %D \doifundefined {string} {...}
> %D \doifdefined {string} {...}
> %D \doifundefinedelse {string} {then ...} {else ...}
> %D \doifdefinedelse {string} {then ...} {else ...}
> %D \doifalldefinedelse {commalist} {then ...} {else ...}
> %D \stoptyping
> %D
>
> So
>
> \doifdefined{Homeworks}{...}
Low level (etex) solutions:
\ifdefined\Homeworks ... \fi
\unless\ifx\Homeworks\undefined ... \fi
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] 5+ messages in thread
* Re: checking for an undefined constant
2010-06-25 13:06 ` checking for an undefined constant Vyatcheslav Yatskovsky
@ 2010-06-25 13:39 ` Aditya Mahajan
2010-06-25 18:16 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2010-06-25 13:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, 25 Jun 2010, Vyatcheslav Yatskovsky wrote:
> Hi,
>
> Now I check for an undefined constant like this:
>
> \ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi
>
> The useful part is in "else" clause. How to swap this check so that "else"
> is not needed?
>
From syst-gen.mkii
%D \macros
%D {doifundefined,doifdefined,
%D doifundefinedelse,doifdefinedelse,
%D doifalldefinedelse}
%D
%D The standard way of testing if a macro is defined is
%D comparing its meaning with another undefined one, usually
%D \type{\undefined}. To garantee correct working of the next
%D set of macros, \type{\undefined} may never be defined!
%D
%D \starttyping
%D \doifundefined {string} {...}
%D \doifdefined {string} {...}
%D \doifundefinedelse {string} {then ...} {else ...}
%D \doifdefinedelse {string} {then ...} {else ...}
%D \doifalldefinedelse {commalist} {then ...} {else ...}
%D \stoptyping
%D
So
\doifdefined{Homeworks}{...}
Aditya
___________________________________________________________________________________
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] 5+ messages in thread
* checking for an undefined constant
[not found] <mailman.2040.1277469608.4277.ntg-context@ntg.nl>
@ 2010-06-25 13:06 ` Vyatcheslav Yatskovsky
2010-06-25 13:39 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-06-25 13:06 UTC (permalink / raw)
To: ntg-context
Hi,
Now I check for an undefined constant like this:
\ifx \Homeworks \undefined \else Home works -- {\Homeworks} \fi
The useful part is in "else" clause. How to swap this check so that
"else" is not needed?
Rgrds,
Vyatcheslav
___________________________________________________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2010-06-27 14:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mailman.2045.1277489811.4277.ntg-context@ntg.nl>
2010-06-25 21:36 ` checking for an undefined constant Vyatcheslav Yatskovsky
2010-06-27 14:17 ` two languages hyphenation Vyatcheslav Yatskovsky
[not found] <mailman.2040.1277469608.4277.ntg-context@ntg.nl>
2010-06-25 13:06 ` checking for an undefined constant Vyatcheslav Yatskovsky
2010-06-25 13:39 ` Aditya Mahajan
2010-06-25 18:16 ` Wolfgang Schuster
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).