move latex header and styling into separate files

This commit is contained in:
Damien Elmes 2020-04-14 11:05:30 +10:00
parent a17ddfdccd
commit da29d0fcae
4 changed files with 18 additions and 20 deletions

View file

@ -0,0 +1,7 @@
\documentclass[12pt]{article}
\special{papersize=3in,5in}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsmath}
\pagestyle{empty}
\setlength{\parindent}{0in}
\begin{document}

View file

@ -27,26 +27,9 @@ use unicase::UniCase;
define_newtype!(NoteTypeID, i64); define_newtype!(NoteTypeID, i64);
pub(crate) const DEFAULT_CSS: &str = "\ pub(crate) const DEFAULT_CSS: &str = include_str!("styling.css");
.card { pub(crate) const DEFAULT_LATEX_HEADER: &str = include_str!("header.tex");
font-family: arial; pub(crate) const DEFAULT_LATEX_FOOTER: &str = r"\end{document}";
font-size: 20px;
text-align: center;
color: black;
background-color: white;
}
";
pub(crate) const DEFAULT_LATEX_HEADER: &str = r#"\documentclass[12pt]{article}
\special{papersize=3in,5in}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsmath}
\pagestyle{empty}
\setlength{\parindent}{0in}
\begin{document}
"#;
pub(crate) const DEFAULT_LATEX_FOOTER: &str = r#"\end{document}"#;
pub struct NoteType { pub struct NoteType {
pub id: NoteTypeID, pub id: NoteTypeID,

View file

@ -1,5 +1,6 @@
// Copyright: Ankitects Pty Ltd and contributors // Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use crate::{ use crate::{
decks::DeckID, decks::DeckID,
notetype::{ notetype::{

View file

@ -0,0 +1,7 @@
.card {
font-family: arial;
font-size: 20px;
text-align: center;
color: black;
background-color: white;
}