mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
Support for optional arguments for environments. No material format change.
* src/buffer.C (BufferList bufferlist;): bump version * src/output_latex.C TexEnvironment: add optarg for environments * lib/lyx2lyx/lyx_1_5.py: add converters * development/FORMAT: document git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15315 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1384e32430
commit
21316375fe
@ -1,5 +1,13 @@
|
||||
LyX file-format changes
|
||||
-----------------------
|
||||
-----------------------§
|
||||
2006-10-12 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* Format incremented to 250: allow optional arg to environments
|
||||
|
||||
No material format change. Now optargs for environments are allowed
|
||||
to be specified in layout files and will be handled properly. When
|
||||
converted back to older formats, they will be ignored in LaTeX
|
||||
output.
|
||||
|
||||
2006-08-14 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
|
@ -239,9 +239,11 @@ supported_versions = ["1.5.0","1.5"]
|
||||
convert = [[246, []],
|
||||
[247, [convert_font_settings]],
|
||||
[248, []],
|
||||
[249, [convert_utf8]]]
|
||||
[249, [convert_utf8]],
|
||||
[250, []]
|
||||
|
||||
revert = [[248, [revert_utf8]],
|
||||
revert = [[249, []],
|
||||
[248, [revert_utf8]],
|
||||
[247, [revert_booktabs]],
|
||||
[246, [revert_font_settings]],
|
||||
[245, [revert_framed]]]
|
||||
|
@ -144,7 +144,7 @@ using std::string;
|
||||
|
||||
namespace {
|
||||
|
||||
int const LYX_FORMAT = 249;
|
||||
int const LYX_FORMAT = 250;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -81,6 +81,10 @@ TeXDeeper(Buffer const & buf,
|
||||
}
|
||||
|
||||
|
||||
int latexOptArgInsets(Buffer const & buf, Paragraph const & par,
|
||||
ostream & os, OutputParams const & runparams, int number);
|
||||
|
||||
|
||||
ParagraphList::const_iterator
|
||||
TeXEnvironment(Buffer const & buf,
|
||||
ParagraphList const & paragraphs,
|
||||
@ -129,6 +133,14 @@ TeXEnvironment(Buffer const & buf,
|
||||
|
||||
if (style->isEnvironment()) {
|
||||
os << "\\begin{" << style->latexname() << '}';
|
||||
if (style->optionalargs > 0) {
|
||||
int ret = latexOptArgInsets(buf, *pit, os, runparams,
|
||||
style->optionalargs);
|
||||
while (ret > 0) {
|
||||
texrow.newline();
|
||||
--ret;
|
||||
}
|
||||
}
|
||||
if (style->latextype == LATEX_LIST_ENVIRONMENT) {
|
||||
os << "{" << pit->params().labelWidthString() << "}\n";
|
||||
} else if (style->labeltype == LABEL_BIBLIO) {
|
||||
|
Loading…
Reference in New Issue
Block a user