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);
|
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,
|
||||||
|
|
|
@ -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::{
|
||||||
|
|
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