diff options
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r-- | ekdosis.dtx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index b3f6d33..cbd6637 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -1708,11 +1708,12 @@ local function relocate_notes(str) | |||
1708 | end | 1708 | end |
1709 | 1709 | ||
1710 | local function linestotei(str) | 1710 | local function linestotei(str) |
1711 | str = "\n<l>"..str | 1711 | -- str = "\n<l>"..str |
1712 | str = string.gsub(str, "^%s?(.-)%s?$", "\n<l>%1</l>\n") | ||
1712 | -- str = gsub(str, endpoem, "</l>\n") | 1713 | -- str = gsub(str, endpoem, "</l>\n") |
1713 | str = gsub(str, poemline * lpeg.P(">"), "\n<lb/>") | 1714 | str = gsub(str, poemline * spcenc^-1 * lpeg.P(">"), "\n<lb/>") |
1714 | str = gsub(str, poemline, "</l>\n<l>") | 1715 | str = gsub(str, poemline * spcenc^-1, "</l>\n<l>") |
1715 | str = str.."</l>\n" | 1716 | -- str = str.."</l>\n" |
1716 | return str | 1717 | return str |
1717 | end | 1718 | end |
1718 | 1719 | ||
@@ -1852,13 +1853,14 @@ local function cmdtotei(str) | |||
1852 | end | 1853 | end |
1853 | 1854 | ||
1854 | local function partotei(str) | 1855 | local function partotei(str) |
1855 | str = string.gsub(str, "\\par%s-", "<p>", 1) | 1856 | str = gsub(str, lpeg.P(lpeg.P("\\par") * spcenc^1)^1, "\\par ") |
1856 | str = string.gsub(str, "\\par%s-", "</p><p>") | 1857 | str = string.gsub(str, "%s?\\par%s?", "<p>", 1) |
1857 | str = string.gsub(str, "<p>%s-</p>", "") | 1858 | str = string.gsub(str, "%s?\\par%s?", "</p><p>") |
1858 | str = string.gsub(str, "(%<p%>)%s-(%</div%>)$", "%2") | 1859 | str = string.gsub(str, "<p>%s?</p>", "") |
1859 | str = string.gsub(str, "(%<p%>)%s-$", "") | 1860 | str = string.gsub(str, "(%<p%>)%s?(%</div%>)$", "%2") |
1860 | str = string.gsub(str, "(<p>)%s-(<div.->)", "%2%1") | 1861 | str = string.gsub(str, "(%<p%>)%s?$", "") |
1861 | str = string.gsub(str, "(%<p%>)%s-(<head>.-</head>)", "%2%1") | 1862 | str = string.gsub(str, "(<p>)%s?(<div.->)", "%2%1") |
1863 | str = string.gsub(str, "(%<p%>)%s?(<head>.-</head>)", "%2%1") | ||
1862 | return str | 1864 | return str |
1863 | end | 1865 | end |
1864 | 1866 | ||