view 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
line wrap: on
line source

#!/usr/bin/env perl
use strict;
use warnings;

{
  open my $fh, '<', 'md2tex/first.tex';
  while (my $line = <$fh> ) {
    print "$line";
  }
  close $fh;
}

open my $fh, '<', 'anatofuz-sigos.md';
while (my $line = <$fh>) {
  if ($line =~/^#/) {
    $line =~ s/# (.*)/\\section{$1}/;
  }
  print $line;
}
close $fh;

print <<'EOF';

\nocite{*}
\bibliographystyle{ipsjunsrt}
\bibliography{anatofuz-bib}


\end{document}
EOF