X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;ds=sidebyside;f=Tex2fb2;h=9ed9dd93299d5c906fbac8ffe03bf9dbf4103947;hb=314820a5bfd62905a3ef504ce990c6143bbc05c3;hp=96279b391b0062e4b4afdb8b8e21ceddb3366ecd;hpb=f4568ed320606be2d4e0a0ed9db551a7f3e7a473;p=fiction%2FKate-the-Empress.git
diff --git a/Tex2fb2 b/Tex2fb2
index 96279b3..9ed9dd9 100755
--- a/Tex2fb2
+++ b/Tex2fb2
@@ -75,7 +75,7 @@ if ((/^$/ || $environ) && $buffer) {
}
next LINE if $environ;
# Section headings
-if (/\\(part|chapter|section|subsection|subsubsection)\*?{(.*)}/) {
+if (/\\(part|chapter|section|subsection|subsubsection)\*?\{(.*)\}/) {
if ($buffer) {
add_to_section(tag(flushbuffer($buffer),$poetry?"stanza":"p"));
$buffer="";
@@ -83,7 +83,7 @@ if (/\\(part|chapter|section|subsection|subsubsection)\*?{(.*)}/) {
pushsection($1,tag($2,"p"));
next LINE;
}
-if (/\\vspace{/) {
+if (/\\vspace\{/) {
add_to_section("");
next LINE;
}
@@ -101,7 +101,7 @@ s/([^\\])%.*$/$1/;
s/^%.*$//;
# strip \sloppy
s/\\sloppy\s+//g;
-s/\\sloppy{}//g;
+s/\\sloppy\{\}//g;
s/\\sloppy([^\w])/$1/g;
# strip extra space
s/^\s+//;
@@ -128,7 +128,7 @@ if ($poetry) {
$poetic_buffer=$_;
next LINE;
}
- s/\\footnote{(.*)}/push_footnote($1)/e;
+ s/\\footnote\{(.*)\}/push_footnote($1)/e;
s/\s*\\\\$//;
$buffer.=tag($_,'v')."\n";
} elsif ($verbatim) {
@@ -206,9 +206,9 @@ sub tag {
sub flushbuffer {
local $_ = shift;
- s/{\\(em|it|bf)(?:\s+|{})([^{}]+)}/$2<\/emphasis>/g;
- s/\\(emph|textit|textbf){([^{}]+)}/$2<\/emphasis>/g;
- s/\\footnote{(.*)}/push_footnote($1)/e;
+ s/\{\\(em|it|bf)(?:\s+|\{\})([^{}]+)\}/$2<\/emphasis>/g;
+ s/\\(emph|textit|textbf)\{([^{}]+)\}/$2<\/emphasis>/g;
+ s/\\footnote\{(.*)\}/push_footnote($1)/e;
s/[{}]//g;
return $_;
}