-----------------------
+2010-08-31 Uwe Stöhr <uwestoehr@web.de>
+ * Format incremented to 399: support for the LaTeX-package
+ mathdots;
+ new parameter \use_mathdots
+
2010-07-17 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 398: support \mathscr;
no new parameter but the mathrsfs package will be loaded
# -*- coding: utf-8 -*-
# This file is part of lyx2lyx
# -*- coding: utf-8 -*-
-# Copyright (C) 2008 José Matos <jamatos@lyx.org>
+# Copyright (C) 2010 The LyX team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
i += 1
+def revert_mathdots(document):
+ " Load mathdots if used in the document "
+ while True:
+ i = find_token(document.header, "\\use_mathdots" , 0)
+ if i != -1:
+ add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
+ add_to_preamble(document, ["\\usepackage{mathdots}"])
+ del document.header[i]
+ break
+
+
##
# Conversion hub
#
[395, []],
[396, []],
[397, [remove_Nameref]],
- [398, []]
+ [398, []],
+ [399, []]
]
-revert = [[397, [revert_mathrsfs]],
+revert = [[398, [revert_mathdots]],
+ [397, [revert_mathrsfs]],
[396, []],
[395, [revert_nameref]],
[394, [revert_DIN_C_pagesizes]],
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-int const LYX_FORMAT = 398; // uwestoehr: support for \mathscr
+int const LYX_FORMAT = 399; // uwestoehr: support for package mathdots
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
use_amsmath = package_auto;
use_esint = package_auto;
use_mhchem = package_auto;
+ use_mathdots = false;
cite_engine_ = ENGINE_BASIC;
use_bibtopic = false;
use_indices = false;
int usemhchem;
lex >> usemhchem;
use_mhchem = packagetranslator().find(usemhchem);
+ } else if (token == "\\use_mathdots") {
+ lex >> use_mathdots;
} else if (token == "\\cite_engine") {
string engine;
lex >> engine;
<< "\n\\use_amsmath " << use_amsmath
<< "\n\\use_esint " << use_esint
<< "\n\\use_mhchem " << use_mhchem
+ << "\n\\use_mathdots " << convert<string>(use_mathdots)
<< "\n\\cite_engine " << citeenginetranslator().find(cite_engine_)
<< "\n\\use_bibtopic " << convert<string>(use_bibtopic)
<< "\n\\use_indices " << convert<string>(use_indices)
features.require("esint");
if (use_mhchem == package_on)
features.require("mhchem");
+ if (use_mathdots)
+ features.require("mathdots");
// Document-level line spacing
if (spacing().getSpace() != Spacing::Single && !spacing().isDefault())
Package use_esint;
/// Whether and how to load mhchem
Package use_mhchem;
+ /// Whether to load mathdots
+ bool use_mathdots;
/// Split bibliography?
bool use_bibtopic;
/// Split the index?
this, SLOT(change_adaptor()));
connect(mathsModule->mhchemautoCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
+ connect(mathsModule->mathdotsCB, SIGNAL(clicked()),
+ this, SLOT(change_adaptor()));
// latex class
modulesToParams(bp_);
// Math
- if (mathsModule->amsautoCB->isChecked()) {
+ if (mathsModule->amsautoCB->isChecked())
bp_.use_amsmath = BufferParams::package_auto;
- } else {
+ else {
if (mathsModule->amsCB->isChecked())
bp_.use_amsmath = BufferParams::package_on;
else
else
bp_.use_mhchem = BufferParams::package_off;
}
+ if (mathsModule->mathdotsCB->isChecked())
+ bp_.use_mathdots = true;
+ else
+ bp_.use_mathdots = false;
// Page Layout
if (pageLayoutModule->pagestyleCO->currentIndex() == 0)
mathsModule->mhchemautoCB->setChecked(
bp_.use_mhchem == BufferParams::package_auto);
+ mathsModule->mathdotsCB->setChecked(bp_.use_mathdots);
+
switch (bp_.spacing().getSpace()) {
case Spacing::Other: nitem = 3; break;
case Spacing::Double: nitem = 2; break;
<x>0</x>
<y>0</y>
<width>351</width>
- <height>233</height>
+ <height>201</height>
</rect>
</property>
<property name="windowTitle">
</widget>
</item>
<item row="6" column="0">
+ <widget class="QCheckBox" name="mathdotsCB">
+ <property name="toolTip">
+ <string>The LaTeX package mathdots is used</string>
+ </property>
+ <property name="text">
+ <string>Use math&dots package</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>