Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: A better way to show interlinears

From:Benct Philip Jonsson <conlang@...>
Date:Wednesday, February 21, 2007, 15:22
Larry Sulky skrev:
 > Hmmm... more details, please, on how you would want the
 > semicolon-delimited source file to be set up. Would each
 > line represent a separate-function line in the
 > interlinear, or the different functional presentations
 > of a single lexeme (corresponding directly to the
 > <div>s)? --larry
 >
 >
 >

The latter, with blank lines in the source file representing
functional lines in the interlinear. That way you can slurp
the source file, then split it into functional lines on
/\n{2,}/, then each line into lexemes on /\n/ and finally
each lexeme into <div>s on /(?<!\\);/ -- note the backslash
escape for semicolons that aren't delimiters!

I would take precaution for blank lines containing
whitespace by first running an s/^\s+$//gm; on the
source, since I was bitten by that the other day when I
split on /\n{2,}/!

WRT the hidden separator at the end of each <div> in the
output as per my last post it should be a different
character for the <div> at the end of each functional line,
say &nbsp;&mdash&nbsp; within each line and semicolon at the
end. They could of course be set with GetOpt::Long
options...

Gotta cram now...

--

/BP  mailto:melrochX@melroch.se (delete X!)
--
As Max Weinreich said (in Yiddish), a language is
a dialect with an army and a navy.  Which means that
Afrikaans is now a dialect of Xhosa.--John Cowan