script conversione

This commit is contained in:
Francesco Mecca 2020-02-24 14:37:50 +01:00
parent ae930205b7
commit c4b55778b7
3 changed files with 9 additions and 12 deletions

View file

@ -35,10 +35,7 @@ def convert(ch, mathmode):
return symbols[ch] if ch in symbols else ch
# convert symbols except the one requiring math mode modifiers
# all passes produces a list of words that must be joined by ' '.join( )
firstpass = ''.join([convert(*c) for c in read_by_char(argv[1])]).split(' ')
# secondpass = insert_math(''.join(firstpass).split(' '))
# thirdpass = escape_outside_mathmode(firstpass)
firstpass = [convert(*c) for c in read_by_char(argv[1])]
newfile = ''.join(firstpass)
with open(argv[2], 'w') as f:

Binary file not shown.

View file

@ -1,4 +1,4 @@
% Created 2020-02-24 Mon 14:35
% Created 2020-02-24 Mon 14:37
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
@ -36,7 +36,7 @@
\maketitle
\section{{\bfseries\sffamily TODO} Scaletta [1/2]}
\label{sec:orgd539212}
\label{sec:org8ebbc9e}
\begin{itemize}
\item[{$\boxtimes$}] Abstract
\item[{$\boxminus$}] Background [20\%]
@ -92,10 +92,10 @@ blackboxes that are not evaluated in the context of the verification.
\end{abstract}
\section{Background}
\label{sec:org06597c8}
\label{sec:org73f49d4}
\subsection{OCaml}
\label{sec:org8d0180f}
\label{sec:orga0f2160}
Objective Caml (OCaml) is a dialect of the ML (Meta-Language) family of programming
languages.
OCaml shares many features with other dialects of ML, such as SML and Caml Light,
@ -143,7 +143,7 @@ statically and can be reificated through functors.
\begin{enumerate}
\item {\bfseries\sffamily TODO} Pattern matching [37\%]
\label{sec:orgd3cffc0}
\label{sec:org8bcefd9}
\begin{itemize}
\item[{$\square$}] capisci come mettere gli esempi uno accanto all'altro
\end{itemize}
@ -234,7 +234,7 @@ It can be described more formally through a BNF grammar.
\end{itemize}
\item {\bfseries\sffamily TODO} 1.2.1 Pattern matching compilation to lambda code
\label{sec:orgc04d093}
\label{sec:orgd51f0ff}
\begin{itemize}
\item[{$\square$}] Da tabella a matrice
@ -322,7 +322,7 @@ are the same
\end{enumerate}
\subsection{1.2.1.1 Initial state of the compilation}
\label{sec:orgc758fe3}
\label{sec:org333d6ea}
Given a source of the following form: