Mercurial > hg > Papers > 2020 > anatofuz-sigos
annotate paper/md2tex.pl @ 7:8f1d03a81516
add md2tex
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 30 Apr 2020 13:10:39 +0900 |
parents | |
children | d43b107ad199 |
rev | line source |
---|---|
7 | 1 #!/usr/bin/env perl |
2 use strict; | |
3 use warnings; | |
4 | |
5 { | |
6 open my $fh, '<', 'md2tex/first.tex'; | |
7 while (my $line = <$fh> ) { | |
8 print "$line"; | |
9 } | |
10 close $fh; | |
11 } | |
12 | |
13 open my $fh, '<', 'anatofuz-sigos.md'; | |
14 while (my $line = <$fh>) { | |
15 if ($line =~/^#/) { | |
16 $line =~ s/# (.*)/\\section{$1}/; | |
17 } | |
18 print $line; | |
19 } | |
20 close $fh; | |
21 | |
22 print <<'EOF'; | |
23 | |
24 \nocite{*} | |
25 \bibliographystyle{ipsjunsrt} | |
26 \bibliography{anatofuz-bib} | |
27 | |
28 | |
29 \end{document} | |
30 EOF |