[texhax] enviroment/ifthen
Uwe Lück
uwe.lueck at web.de
Tue Feb 24 11:52:11 CET 2009
Wawan, is it true that you look at postings only, not on your ingoing e-mail?
And that you don't post answers ("reply to all")!? ...
At 23:12 12.02.09, wawan wrote:
>On Fri, Feb 13, 2009 at 2:54 AM, Uwe Lück
><<mailto:uwe.lueck at web.de>uwe.lueck at web.de> wrote:
>>At 14:13 12.02.09, wawan wrote:
>> >I already make parsing from text document to "signed/tagged" text document
>> >using perl. Now I need converted those tagged document using my own
>> >metafont symbol.
>>
>>1. If you work with Perl anyway, then I don't understand why you want to
>>use LaTeX for replacements instead of Perl.
>Yes, I believethis my fault, I have lack of knowledge about Latex so I
>just implemented algorithm with perl first and I'll learn latex then
Have you *reasoned* why you want do the replacing with LaTeX, not with Perl?
>> >I hope Latex can "read" my signed text using ifthen package or others and
>> >make it one new package.
>> >
>>2. To the best of my knowledge, the ifthen package would be of almost no
>>use here. You would need some string handling macros, I pointed to some
>>packages offering such macros. ifthen only can decide whether two given
>>strings are the same.
>Hmmm... how about this algorithm If some characters (ex: X,Y,Z) followed
>by (U,A,O) the replace with symbols else with others.
Besides an algorithm, you need an implementation -- that actually operates
on strings. You need macros referring to strings und substrings. This has
(almost) nothing to do with implementing "if" and "then" as ifthen does it.
Indeed, the first argument of \ifthenelse needs a *test* referring to
certain things. The ifthen package implements tests of equality of strings,
on oddness of numbers and of <, =, > of lenghts only (besides calculating
boolean values).
The xifthen package adds tests for substrings, but it doesn't implement any
*operations* on strings, i.e., generate a certain output string from some
input strings.
>> >But I'm still confuse how to make a .sty, there was litle documentatation
>> >on that
>>3. I have offered a probable solution, what are you missing for a ".sty" now?
>I mean, I need bulid own .sty, how to do that ? there was very limited doc. :(
There is a guide for class and package writers at
http://www.ctan.org/macros/latex/doc/clsguide.pdf
and a section on the same matter in the LaTeX Companion. And finally CTAN
is full of examples.
All the best,
Uwe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20090224/cfb08bca/attachment-0001.html
More information about the texhax
mailing list