diff options
author | Peter von Kaehne <refdoc@gmx.net> | 2010-07-12 05:21:09 +0000 |
---|---|---|
committer | Peter von Kaehne <refdoc@gmx.net> | 2010-07-12 05:21:09 +0000 |
commit | 00fbecea6219e53d54ddaa85c7afb48dd0983087 (patch) | |
tree | dc2753c1b31760e396e1098fc9407122774fe71a /modules/perlconverters | |
parent | 3ae4c9c2245432535d4ed4dc49562169befb29c5 (diff) | |
download | sword-tools-00fbecea6219e53d54ddaa85c7afb48dd0983087.tar.gz |
added imq and iq#
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@286 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/perlconverters')
-rw-r--r-- | modules/perlconverters/usfm2osis.pl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/perlconverters/usfm2osis.pl b/modules/perlconverters/usfm2osis.pl index a6eb7e0..9ef2be1 100644 --- a/modules/perlconverters/usfm2osis.pl +++ b/modules/perlconverters/usfm2osis.pl @@ -376,6 +376,44 @@ foreach $file (@files) { $line = "<p>$1<\/p>"; } + # \im introduction quotation (implemented as ordinary quotation) + if ($line =~ /^\\imq\b\s*(.*)/) { + $line = "<q>$1<\/q>"; + } + + + # \iq line (including \iq#), adapted from \q (see below), needs more clean-up + if ($line =~ /^\\iq/) { + if ($l != 1) { + push (@outdata, "<lg>\n"); + $l = 1; + } + if ($line =~ /\\iq(\d*)$/) { + if ($1 eq "") { + $line = "<l>\n"; + } + else { + $line = "<l level=\"$1\">\n"; + } + @filedata[$i+1] .= "<\/l>"; + if (@filedata[$i+2] !~ /\\iq(?!t)/) { + @filedata[$i+1] .= "\n<\/lg>"; + $l = 0; + } + } + else { + $line =~ s/\\iq\b\s*(.+)/<l>$1<\/l>/; + $line =~ s/\\iq(\d+)\b\s*(.+)/<l level=\"$1\">$2<\/l>/; + if (@filedata[$i+1] !~ /\\iq(?![ta])/) { + $line .= "\n<\/lg>"; + $l = 0; + } + } + } + + + + # \ie introduction end (discard) if ($line =~ /^\\ie\b/) { $line = ""; |