Mercurial > hg > Papers > 2012 > aplas
changeset 34:7294b17518c6
fix o2tex
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 16 Jun 2012 00:17:53 +0900 |
parents | bbbda7a58067 |
children | f9e7052a380e |
files | paper/o2tex |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/paper/o2tex Fri Jun 15 22:04:31 2012 +0900 +++ b/paper/o2tex Sat Jun 16 00:17:53 2012 +0900 @@ -279,7 +279,7 @@ for ($depth = 1; substr($_, $depth, 1) eq '-'; $depth++) { ; } - if ($depth == 3) { + if ($depth == 2) { $file = sprintf('%d', $section) . '.tex'; &Pick('>>', $file) && (print $fh "\\section{", substr($_, $depth, @@ -295,7 +295,7 @@ $section++; # print STDOUT "$section "; } - elsif ($depth == 4) { + elsif ($depth == 3) { $file = sprintf('%d', $section - 1) . '.tex'; &Pick('>>', $file) && (print $fh "\\subsection{", substr($_, $depth, @@ -306,7 +306,7 @@ length($_) - $depth + 1) . '}'); (print $fh "\\end{bwslide}\n\n"); } - elsif ($depth == 5) { + elsif ($depth == 4) { $file = sprintf('%d', $section - 1) . '.tex'; &Pick('>>', $file) && (print $fh "\\subsubsection{", substr($_, $depth, @@ -409,7 +409,7 @@ &Pick('>>', $file) && (print $fh $_); } - if (/\\cite\{/) { $cite = ""; } # } + if (/\\cite\{/) { $cite = ""; } } } @@ -475,7 +475,7 @@ } sub Pick { - local($mode,$name,$pipe) = @_; + my ($mode,$name,$pipe) = @_; $fh = $opened{$name}; if (!$fh) { $fh = $opened{$name} = 'fh_' . ($nextfh++ + 0);