mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove the support for a4.sty, a4wide.sty and a4widemargins from lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10273 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d55d5d1fb0
commit
9745fb8187
@ -1,3 +1,7 @@
|
||||
2005-07-18 José Matos <jamatos@lyx.org>
|
||||
|
||||
* FORMAT: document changed to 243.
|
||||
|
||||
2005-07-16 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* tools/README.bin.example: remove reLyX stuff
|
||||
|
@ -1,6 +1,13 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
|
||||
2005-07-18 José Matos <jamatos@lyx.org>
|
||||
|
||||
* format incremented to 243.
|
||||
|
||||
* this change only affects the preamble, the paperpackage
|
||||
option was removed and papersize is changed to default.
|
||||
|
||||
2005-06-21 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* format incremented to 242. There is no file format per
|
||||
|
@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0.10.7","0.10"]),
|
||||
("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]),
|
||||
("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]),
|
||||
("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]),
|
||||
("1_4", range(223,243), ["1.4.0cvs","1.4"])]
|
||||
("1_4", range(223,244), ["1.4.0cvs","1.4"])]
|
||||
|
||||
|
||||
def formats_list():
|
||||
|
@ -1858,6 +1858,33 @@ def convert_french(file):
|
||||
file.header[i] = "\\language french"
|
||||
|
||||
|
||||
def remove_paperpackage(file):
|
||||
i = find_token(file.header, '\\paperpackage', 0)
|
||||
|
||||
if i == -1:
|
||||
return
|
||||
|
||||
paperpackage = split(file.header[i])[1]
|
||||
|
||||
if paperpackage in ("a4", "a4wide", "widemarginsa4"):
|
||||
j = find_token(file.header, '\\begin_preamble', 0)
|
||||
conv = {"a4":"\\usepackage{a4}","a4wide": "\\usepackage{a4wide}",
|
||||
"widemarginsa4": "\\usepackage[widemargins]{a4}"}
|
||||
if j == -1:
|
||||
# Add preamble
|
||||
j = len(file.header) - 2
|
||||
file.header[j:j]=["\\begin_preamble",
|
||||
conv[paperpackage],"\\end_preamble"]
|
||||
else:
|
||||
file.header[j+1:j+1] = conv[paperpackage]
|
||||
|
||||
del file.header[i]
|
||||
|
||||
i = find_token(file.header, '\\papersize', 0)
|
||||
if i != -1:
|
||||
file.header[i] = "\\papersize default"
|
||||
|
||||
|
||||
##
|
||||
# Convertion hub
|
||||
#
|
||||
@ -1884,9 +1911,11 @@ convert = [[223, [insert_tracking_changes, add_end_header, remove_color_default,
|
||||
[239, [normalize_paragraph_params]],
|
||||
[240, [convert_output_changes]],
|
||||
[241, [convert_ert_paragraphs]],
|
||||
[242, [convert_french]]]
|
||||
[242, [convert_french]],
|
||||
[243, [remove_paperpackage]]]
|
||||
|
||||
revert = [[241, []],
|
||||
revert = [[242, []],
|
||||
[241, []],
|
||||
[240, [revert_ert_paragraphs]],
|
||||
[239, [revert_output_changes]],
|
||||
[238, []],
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-07-18 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* buffer.C:
|
||||
* bufferparams.[Ch]:
|
||||
* tex-strings.[Ch]: new file format, remove support for a4.sty,
|
||||
a4wide.sty and a4widemargins.
|
||||
|
||||
2005-07-17 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* text2.C (cursorLeft): fix one of error
|
||||
|
@ -143,7 +143,7 @@ extern BufferList bufferlist;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 242;
|
||||
int const LYX_FORMAT = 243;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -152,27 +152,6 @@ PaperSizeTranslator const & papersizetranslator()
|
||||
}
|
||||
|
||||
|
||||
// Paper packages
|
||||
typedef Translator<string, PAPER_PACKAGES> PaperPackagesTranslator;
|
||||
|
||||
|
||||
PaperPackagesTranslator const init_paperpackagestranslator()
|
||||
{
|
||||
PaperPackagesTranslator translator(string_paperpackages[0], PACKAGE_NONE);
|
||||
translator.addPair(string_paperpackages[1], PACKAGE_A4);
|
||||
translator.addPair(string_paperpackages[2], PACKAGE_A4WIDE);
|
||||
translator.addPair(string_paperpackages[3], PACKAGE_WIDEMARGINSA4);
|
||||
return translator;
|
||||
}
|
||||
|
||||
|
||||
PaperPackagesTranslator const & paperpackagestranslator()
|
||||
{
|
||||
static PaperPackagesTranslator translator = init_paperpackagestranslator();
|
||||
return translator;
|
||||
}
|
||||
|
||||
|
||||
// Paper orientation
|
||||
typedef Translator<string, PAPER_ORIENTATION> PaperOrientationTranslator;
|
||||
|
||||
@ -333,7 +312,6 @@ BufferParams::BufferParams()
|
||||
|
||||
/* PaperLayout */
|
||||
papersize = PAPER_DEFAULT;
|
||||
paperpackage = PACKAGE_NONE;
|
||||
orientation = ORIENTATION_PORTRAIT;
|
||||
use_geometry = false;
|
||||
use_amsmath = AMS_AUTO;
|
||||
@ -490,10 +468,6 @@ string const BufferParams::readToken(LyXLex & lex, string const & token)
|
||||
string ppsize;
|
||||
lex >> ppsize;
|
||||
papersize = papersizetranslator().find(ppsize);
|
||||
} else if (token == "\\paperpackage") {
|
||||
string ppackage;
|
||||
lex >> ppackage;
|
||||
paperpackage = paperpackagestranslator().find(ppackage);
|
||||
} else if (token == "\\use_geometry") {
|
||||
lex >> use_geometry;
|
||||
} else if (token == "\\use_amsmath") {
|
||||
@ -639,7 +613,6 @@ void BufferParams::writeFile(ostream & os) const
|
||||
spacing().writeFile(os);
|
||||
|
||||
os << "\\papersize " << string_papersize[papersize]
|
||||
<< "\n\\paperpackage " << string_paperpackages[paperpackage]
|
||||
<< "\n\\use_geometry " << convert<string>(use_geometry)
|
||||
<< "\n\\use_amsmath " << use_amsmath
|
||||
<< "\n\\cite_engine " << citeenginetranslator().find(cite_engine)
|
||||
@ -746,7 +719,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
|
||||
(papersize == PAPER_A3) ||
|
||||
(papersize == PAPER_CUSTOM);
|
||||
|
||||
if (!use_geometry && (paperpackage == PACKAGE_NONE)) {
|
||||
if (!use_geometry) {
|
||||
switch (papersize) {
|
||||
case PAPER_A4:
|
||||
clsoptions << "a4paper,";
|
||||
@ -867,26 +840,6 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
// At the very beginning the text parameters.
|
||||
if (paperpackage != PACKAGE_NONE) {
|
||||
switch (paperpackage) {
|
||||
case PACKAGE_NONE:
|
||||
break;
|
||||
case PACKAGE_A4:
|
||||
os << "\\usepackage{a4}\n";
|
||||
texrow.newline();
|
||||
break;
|
||||
case PACKAGE_A4WIDE:
|
||||
os << "\\usepackage{a4wide}\n";
|
||||
texrow.newline();
|
||||
break;
|
||||
case PACKAGE_WIDEMARGINSA4:
|
||||
os << "\\usepackage[widemargins]{a4}\n";
|
||||
texrow.newline();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (use_geometry || nonstandard_papersize) {
|
||||
os << "\\usepackage{geometry}\n";
|
||||
texrow.newline();
|
||||
|
@ -118,8 +118,6 @@ public:
|
||||
/* this are for the PaperLayout */
|
||||
/// the papersize
|
||||
PAPER_SIZE papersize;
|
||||
/// a special paperpackage .sty-file
|
||||
PAPER_PACKAGES paperpackage;
|
||||
///
|
||||
PAPER_ORIENTATION orientation;
|
||||
/// use custom margins
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-07-18 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* GDocument.C: new file format, remove support for a4.sty,
|
||||
a4wide.sty and a4widemargins.
|
||||
|
||||
2005-07-16 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* ghelpers.C:
|
||||
|
@ -347,14 +347,7 @@ void GDocument::update()
|
||||
comboBoxTextSet(pagestylecombo_, params.pagestyle);
|
||||
// *** End "Page" Page ***
|
||||
|
||||
// *** Begin "Margins" Page ***
|
||||
int item = params.paperpackage;
|
||||
if (params.use_geometry) {
|
||||
item = 1;
|
||||
} else if (item > 0) {
|
||||
item = item + 1;
|
||||
}
|
||||
marginscombo_.set_active(item);
|
||||
marginscombo_.set_active(0);
|
||||
|
||||
setWidgetsFromLength(
|
||||
*(mtopspin_->get_adjustment()),
|
||||
@ -514,7 +507,6 @@ void GDocument::apply()
|
||||
if (margin > 0) {
|
||||
margin = margin - 1;
|
||||
}
|
||||
params.paperpackage = PAPER_PACKAGES(margin);
|
||||
|
||||
params.topmargin = getLengthFromWidgets(
|
||||
*(mtopspin_->get_adjustment()),
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-07-18 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* QDocument.C: new file format, remove support for a4.sty,
|
||||
a4wide.sty and a4widemargins.
|
||||
|
||||
2005-07-16 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* QDocumentDialog.C:
|
||||
|
@ -394,8 +394,6 @@ void QDocument::apply()
|
||||
if (margin > 0) {
|
||||
margin = margin - 1;
|
||||
}
|
||||
params.paperpackage = PAPER_PACKAGES(margin);
|
||||
|
||||
MarginsModuleBase const * m(dialog_->marginsModule);
|
||||
|
||||
params.leftmargin = widgetsToLength(m->innerLE, m->innerUnit);
|
||||
@ -653,14 +651,8 @@ void QDocument::update_contents()
|
||||
|
||||
MarginsModuleBase * m = dialog_->marginsModule;
|
||||
|
||||
int item = params.paperpackage;
|
||||
if (params.use_geometry) {
|
||||
item = 1;
|
||||
} else if (item > 0) {
|
||||
item = item + 1;
|
||||
}
|
||||
m->marginCO->setCurrentItem(item);
|
||||
dialog_->setCustomMargins(item);
|
||||
m->marginCO->setCurrentItem(0);
|
||||
dialog_->setCustomMargins(0);
|
||||
|
||||
lengthToWidgets(m->topLE, m->topUnit,
|
||||
params.topmargin, defaultUnit);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-07-18 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* FormDocument.C: new file format, remove support for a4.sty,
|
||||
a4wide.sty and a4widemargins.
|
||||
|
||||
2005-07-16 José Matos <jamatos@fc.up.pt>
|
||||
|
||||
* FormParagraphs.C:
|
||||
|
@ -919,9 +919,6 @@ void FormDocument::paper_apply(BufferParams & params)
|
||||
{
|
||||
params.papersize = PAPER_SIZE(fl_get_choice(paper_->choice_papersize) - 1);
|
||||
|
||||
params.paperpackage =
|
||||
PAPER_PACKAGES(fl_get_choice(paper_->choice_paperpackage) - 1);
|
||||
|
||||
params.use_geometry = fl_get_button(paper_->check_use_geometry);
|
||||
|
||||
if (fl_get_button(paper_->radio_landscape))
|
||||
@ -1231,7 +1228,6 @@ void FormDocument::paper_update(BufferParams const & params)
|
||||
return;
|
||||
|
||||
fl_set_choice(paper_->choice_papersize, params.papersize + 1);
|
||||
fl_set_choice(paper_->choice_paperpackage, params.paperpackage + 1);
|
||||
fl_set_button(paper_->check_use_geometry, params.use_geometry);
|
||||
|
||||
int const paperchoice = fl_get_choice(paper_->choice_papersize);
|
||||
|
@ -32,11 +32,6 @@ char const * const string_papersize[] = {
|
||||
};
|
||||
|
||||
|
||||
char const * const string_paperpackages[] = {
|
||||
"none", "a4", "a4wide", "widemarginsa4", ""
|
||||
};
|
||||
|
||||
|
||||
char const * const string_orientation[] = {
|
||||
"portrait", "landscape", ""
|
||||
};
|
||||
|
@ -22,8 +22,6 @@ extern char const * const string_quotes_language[];
|
||||
///
|
||||
extern char const * const string_papersize[];
|
||||
///
|
||||
extern char const * const string_paperpackages[];
|
||||
///
|
||||
extern char const * const string_orientation[];
|
||||
///
|
||||
extern char const * const string_footnotekinds[];
|
||||
|
Loading…
Reference in New Issue
Block a user