mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
move latex header and styling into separate files
This commit is contained in:
parent
a17ddfdccd
commit
da29d0fcae
4 changed files with 18 additions and 20 deletions
7
rslib/src/notetype/header.tex
Normal file
7
rslib/src/notetype/header.tex
Normal 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}
|
|
@ -27,26 +27,9 @@ use unicase::UniCase;
|
|||
|
||||
define_newtype!(NoteTypeID, i64);
|
||||
|
||||
pub(crate) const DEFAULT_CSS: &str = "\
|
||||
.card {
|
||||
font-family: arial;
|
||||
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(crate) const DEFAULT_CSS: &str = include_str!("styling.css");
|
||||
pub(crate) const DEFAULT_LATEX_HEADER: &str = include_str!("header.tex");
|
||||
pub(crate) const DEFAULT_LATEX_FOOTER: &str = r"\end{document}";
|
||||
|
||||
pub struct NoteType {
|
||||
pub id: NoteTypeID,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// Copyright: Ankitects Pty Ltd and contributors
|
||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
use crate::{
|
||||
decks::DeckID,
|
||||
notetype::{
|
||||
|
|
7
rslib/src/notetype/styling.css
Normal file
7
rslib/src/notetype/styling.css
Normal file
|
@ -0,0 +1,7 @@
|
|||
.card {
|
||||
font-family: arial;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
color: black;
|
||||
background-color: white;
|
||||
}
|
Loading…
Reference in a new issue