mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add latex header/footer config
This commit is contained in:
parent
25a61dcebc
commit
d3214ee56c
2 changed files with 43 additions and 0 deletions
|
@ -46,6 +46,9 @@ class DeckProperties(QDialog):
|
||||||
self.dialog.highPriority.setText(self.d.highPriority)
|
self.dialog.highPriority.setText(self.d.highPriority)
|
||||||
self.dialog.medPriority.setText(self.d.medPriority)
|
self.dialog.medPriority.setText(self.d.medPriority)
|
||||||
self.dialog.lowPriority.setText(self.d.lowPriority)
|
self.dialog.lowPriority.setText(self.d.lowPriority)
|
||||||
|
# latex
|
||||||
|
self.dialog.latexHeader.setText(self.d.getVar("latexPre"))
|
||||||
|
self.dialog.latexFooter.setText(self.d.getVar("latexPost"))
|
||||||
# scheduling
|
# scheduling
|
||||||
for type in ("hard", "mid", "easy"):
|
for type in ("hard", "mid", "easy"):
|
||||||
v = getattr(self.d, type + "IntervalMin")
|
v = getattr(self.d, type + "IntervalMin")
|
||||||
|
@ -179,6 +182,9 @@ class DeckProperties(QDialog):
|
||||||
old = self.d.getVar("mediaURL") or ""
|
old = self.d.getVar("mediaURL") or ""
|
||||||
if old != url:
|
if old != url:
|
||||||
self.d.setVar("mediaURL", url)
|
self.d.setVar("mediaURL", url)
|
||||||
|
# latex
|
||||||
|
self.d.setVar('latexPre', unicode(self.dialog.latexHeader.toPlainText()))
|
||||||
|
self.d.setVar('latexPost', unicode(self.dialog.latexFooter.toPlainText()))
|
||||||
# scheduling
|
# scheduling
|
||||||
minmax = ("Min", "Max")
|
minmax = ("Min", "Max")
|
||||||
for type in ("hard", "mid", "easy"):
|
for type in ("hard", "mid", "easy"):
|
||||||
|
|
|
@ -206,6 +206,41 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>LaTeX</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Header</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="latexHeader">
|
||||||
|
<property name="tabChangesFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Footer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="latexFooter">
|
||||||
|
<property name="tabChangesFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Advanced</string>
|
<string>Advanced</string>
|
||||||
|
@ -746,6 +781,8 @@
|
||||||
<tabstop>medPriority</tabstop>
|
<tabstop>medPriority</tabstop>
|
||||||
<tabstop>lowPriority</tabstop>
|
<tabstop>lowPriority</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
|
<tabstop>latexHeader</tabstop>
|
||||||
|
<tabstop>latexFooter</tabstop>
|
||||||
<tabstop>delay0</tabstop>
|
<tabstop>delay0</tabstop>
|
||||||
<tabstop>delay2</tabstop>
|
<tabstop>delay2</tabstop>
|
||||||
<tabstop>delay1</tabstop>
|
<tabstop>delay1</tabstop>
|
||||||
|
|
Loading…
Reference in a new issue