comparison paper/md2tex.pl @ 37:9e40a7a00a02

fix
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 06 May 2020 07:50:03 +0900
parents 5dbe39f52406
children
comparison
equal deleted inserted replaced
36:a039a55d97ae 37:9e40a7a00a02
38 38
39 if ($line =~/^#/) { 39 if ($line =~/^#/) {
40 $line =~ s/# (.*)/\\section{$1}/; 40 $line =~ s/# (.*)/\\section{$1}/;
41 } 41 }
42 42
43 while ($line =~ /`([\s\w_\-\\]+)`/g) { 43 while ($line =~ /`([[:ascii:]]+?)`/g) {
44 my $inlineCodeBlock = $1; 44 my $inlineCodeBlock = $1;
45 $inlineCodeBlock =~ s/_/\\_/g; 45 $inlineCodeBlock =~ s/_/\\_/g;
46 $line =~ s/`([\s\w_\-\\]+)`/\\texttt{$inlineCodeBlock}/; 46 $line =~ s/`([[:ascii:]]+)`/\\texttt{$inlineCodeBlock}/;
47 } 47 }
48 48
49 if ($line =~ /!\[lab:(.*),\s*cap:(.*)\]\((.*)\)/) { 49 if ($line =~ /!\[lab:(.*),\s*cap:(.*)\]\((.*)\)/) {
50 $line = <<"EOF"; 50 $line = <<"EOF";
51 \\begin{figure}[tb] 51 \\begin{figure}[tb]