Hi,

my wife is a PhD student of linguistics. She is currently writing all her
stuff in LyX <http://www.lyx.org>, but I am slightly thinking whether it
would be possible to convert both of us to OOo (it will have to wait until
Bibliographic project <http://bibliographic.openoffice.org> produces at
least some code, but that's other question). There are two weird constructs
which linguists use and which make things complicated:

a) trees (some example as ASCII-art are here:
http://en.wikipedia.org/wiki/X-bar_syntax), which hopefully could be
provided by OODraw, and anything else is probably so complicated, that it
wouldn't be possible to do anything better about that. But I can hopefully
do something about
b) glosses. One very simple gloss can look like this:

    Neboť        tak  Bůh      miloval svět
    Because that so   [the]God loved   [the]world
    For God so loved the world

The point is that an example from a weird language (actually, this is
beginning of John 3.16 in my native Czech :-)) is represented in the
word-by-word translation into English and then good English translation is
provided. Obviously most natural way how to represent this in OOo (or
M$-Word for this matter) is table for the first two lines of the text and
the third line aligned with this table.

I would love to create macro for my wife, which would translate freely
written plain text like this

Neboť tak Bůh miloval svět
Because that [the]God loved [the]world
For God so loved the world

into the above shown table. There is a macro which does this (and too much
more IMHO) in VBA available on
<http://www.linguistics.ucsb.edu/faculty/cumming/LingWord/LingWord.dot>.
Algorithm is explained on
<http://www.linguistics.ucsb.edu/faculty/cumming/WordForLinguists/Interlinear.htm>.

This can be summarized into this:

1) Type the example and the gloss, separating the words with spaces, and
   using an extra space for any item that doesn't correspond to a word in
   the other line.
2) Select first two lines of the example.
3) Convert selected lines into table via StarBasic equivalent of
   Table/Convert/Text to table/ (space as a divider between fields).
4) Eliminate all grids around the table, and set width of columns to the
   widest word in each column (would it be possible to set width of column
   to automatically adjust with changes in the table?).

The biggest problem I have is how to convert text into table in Writer with
SBasic. I tried to record macro, but I've got ugly dispatcher-based macro.
Is there any OOo API function which would do it for me instead? Does
anybody heard about this kind of macro already done?

Thanks a lot,

Matej

-- 
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
 
Reality is merely an illusion, albeit a very persistent one.
      -- Albert Einstein


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to