docs: export website as LaTeX document

git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@251 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
bevilj 2018-11-18 19:42:26 +00:00
parent 5270dfef3a
commit 32aea7cbe7
3 changed files with 4288 additions and 5 deletions

View File

@ -16,7 +16,7 @@ import java.util.*
class HtmlParser(private val singlePage: Boolean) {
private val content = StringBuilder()
private var outName = "${SimpleDateFormat("yyyy-MM-dd_hh:mm").format(Date())}.html"
private var outName = "${SimpleDateFormat("yyyy-MM-dd_hh-mm").format(Date())}.html"
/**
* Parse a jekyll html file to a LaTex Document

View File

@ -5,6 +5,8 @@ package ch.usi.inf.atelier.group1.jekyll
import org.jsoup.Jsoup
import org.jsoup.parser.Parser
import java.text.SimpleDateFormat
import java.util.*
import java.util.regex.Pattern
class HtmlToLatexWriter(private var content: String, private val singlePage: Boolean) {
@ -306,11 +308,12 @@ class HtmlToLatexWriter(private var content: String, private val singlePage: Boo
private const val TITLE = "\\title{%1\$s}"
private const val LINK = "\\underline{\\href{%1\$s}{%2\$s}}"
private const val HEADER =
private val HEADER = "% File autogenerated using the Bonus 2 program at " +
"${SimpleDateFormat("yyyy-MM-dd hh:mm").format(Date())}\n" +
"\\documentclass[hidelinks,12pt,a4paper,numbers=enddot]{scrartcl}\n\n" +
"\\usepackage[margin=2cm]{geometry}\n" +
"\\usepackage{hyperref}\n" +
"\\usepackage[utf8]{inputenc}"
"\\usepackage[margin=2cm]{geometry}\n" +
"\\usepackage{hyperref}\n" +
"\\usepackage[utf8]{inputenc}"
private val SPECIAL_CHARS_HTML =
arrayOf("&", "<", ">", "'",

File diff suppressed because it is too large Load Diff