mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
tex2lyx/preamble.cpp: support for the document class options twocolumn and twoside, fixes bug 4867
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24789 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e5b6e5c58b
commit
2546bde017
@ -548,6 +548,7 @@ void parse_preamble(Parser & p, ostream & os,
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (t.cs() == "documentclass") {
|
else if (t.cs() == "documentclass") {
|
||||||
|
vector<string>::iterator it;
|
||||||
vector<string> opts = split_options(p.getArg('[', ']'));
|
vector<string> opts = split_options(p.getArg('[', ']'));
|
||||||
handle_opt(opts, known_fontsizes, h_paperfontsize);
|
handle_opt(opts, known_fontsizes, h_paperfontsize);
|
||||||
delete_opt(opts, known_fontsizes);
|
delete_opt(opts, known_fontsizes);
|
||||||
@ -570,6 +571,16 @@ void parse_preamble(Parser & p, ostream & os,
|
|||||||
else if (is_known(h_language, known_ukrainian_languages))
|
else if (is_known(h_language, known_ukrainian_languages))
|
||||||
h_language = "ukrainian";
|
h_language = "ukrainian";
|
||||||
h_quotes_language = h_language;
|
h_quotes_language = h_language;
|
||||||
|
// paper sides
|
||||||
|
if ((it = find(opts.begin(), opts.end(), "twoside")) != opts.end()) {
|
||||||
|
h_papersides = "2";
|
||||||
|
opts.erase(it);
|
||||||
|
}
|
||||||
|
// paper columns
|
||||||
|
if ((it = find(opts.begin(), opts.end(), "twocolumn")) != opts.end()) {
|
||||||
|
h_papercolumns = "2";
|
||||||
|
opts.erase(it);
|
||||||
|
}
|
||||||
h_options = join(opts, ",");
|
h_options = join(opts, ",");
|
||||||
h_textclass = p.getArg('{', '}');
|
h_textclass = p.getArg('{', '}');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user