Re: Using Japanese and English strings, encodings
- From: Peter Seibel <peter@xxxxxxxxxxxxxxx>
- Date: Fri, 14 Apr 2006 15:11:24 GMT
"drrobot" <drrobot@xxxxxxxxx> writes:
Wow! I never expected that the guy who wrote one of my favorite books
on lisp would also be the one answering my questions! Many thanks on
the book; I refer to it often.
Glad you like it!
As a bit of background may clarify why I wanted to do this. I'm an
american grad student in Japan right now, and I often find myself
writing documents twice, once in english, and once in japanese, over
and over again, and getting annoyed at the constant back-and-forth
revisions required to both documents.
I found it a useful time-saver to write all my research reports as
Lisp source file, and use some scripts I wrote a while ago to
transform the lisp source file into something else (either LaTeX
document or HTML/XML) using some very, very simple macros and some
perl scripts from before I came to Japan.
Ah, so if it was me, I'd solve that probem with my Markup library[1].
Then you could write something like this:
\en{This is an English sentence.}\pl{Isthay isway anway Igpay
Atinlay entencesay.}
Or you might choose to alternate at the paragraph level. Anyway, you
can think of Markup as a sort of alternative sexp syntax optimized for
stuff that is mostly text. You can then use Common Lisp to manipulate
the resulting sexps however you want though there are already backends
for generating HTML and PDF. (I believe I have a patch from someone
that provides a LaTeX backend but I haven't had a chance to look at it
yet.)
-Peter
[1] <http://www.gigamonkeys.com/lisp/markup/>
--
Peter Seibel * peter@xxxxxxxxxxxxxxx
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
.
- References:
- Using Japanese and English strings, encodings
- From: drrobot
- Re: Using Japanese and English strings, encodings
- From: Peter Seibel
- Re: Using Japanese and English strings, encodings
- From: drrobot
- Using Japanese and English strings, encodings
- Prev by Date: Re: Using Japanese and English strings, encodings
- Next by Date: Re: Using Japanese and English strings, encodings
- Previous by thread: Re: Using Japanese and English strings, encodings
- Next by thread: Re: Using Japanese and English strings, encodings
- Index(es):
Relevant Pages
|