moving LatexParam functionality into .layout files

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8290 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2003-12-31 08:44:42 +00:00
parent 9129d3b1bb
commit 6c176e40e3
6 changed files with 31 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2003-12-31 Martin Vermeer <martin.vermeer@hut.fi>
* layouts/agu_stdclass.inc:
* layouts/agu_std sections.inc:
* layouts/agu_stdtitle.inc: moving LatexParam functionality into
.layout files
2003-12-22 Michael Schmitt <michael.schmitt@teststep.org>
* layouts/g-brief2-en.layout: fix spelling,

View File

@ -27,7 +27,7 @@ Style Standard
Align Block
AlignPossible Block
LabelType No_Label
LatexParam "para#"
LatexParam "id=&quot;para#&quot;"
End

View File

@ -32,7 +32,7 @@ Style Section
InnerTag head
LabelTag label
CommandDepth 2
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End
@ -42,7 +42,7 @@ Style Subsection
InnerTag head
LabelTag label
CommandDepth 3
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End
@ -52,7 +52,7 @@ Style Subsubsection
InnerTag head
LabelTag label
CommandDepth 4
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End
@ -62,7 +62,7 @@ Style Paragraph
InnerTag head
LabelTag label
CommandDepth 5
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End
@ -72,7 +72,7 @@ Style Subparagraph
InnerTag head
LabelTag label
CommandDepth 6
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End
Style Subsubparagraph
@ -81,6 +81,6 @@ Style Subsubparagraph
InnerTag head
LabelTag label
CommandDepth 7
LatexParam "s#"
LatexParam "id = &quot;s#&quot;"
End

View File

@ -44,6 +44,7 @@ End
Style AGU-journal
CopyStyle Special-section
LatexParam "journal-code=&quot;$1&quot; electronic-only=&quot;yes&quot;"
LatexName AGU-journal
LabelString "AGU-journal: "
CommandDepth 3

View File

@ -1,3 +1,8 @@
2003-12-31 Martin Vermeer <martin.vermeer@hut.fi>
* output_docbook.C: moving LatexParam functionality into
.layout files
2003-12-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* buffer.C: increment format to 229.

View File

@ -16,6 +16,7 @@
#include "buffer.h"
#include "bufferparams.h"
#include "counters.h"
#include "debug.h"
#include "lyxtext.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
@ -100,7 +101,7 @@ void docbookParagraphs(Buffer const & buf,
if (!style->latexparam().empty()) {
counters.step("para");
int i = counters.value("para");
ls = "id=\"" + subst(style->latexparam(), "#", tostr(i)) + '"';
ls = subst(style->latexparam(), "#", tostr(i));
}
sgml::openTag(os, depth + command_depth,
false, style->latexname(), ls);
@ -140,7 +141,7 @@ void docbookParagraphs(Buffer const & buf,
command_stack.push_back(string());
command_stack[command_depth] = command_name;
if (!style->latexparam().empty()) {
if (style->latexparam().find('#') != string::npos) {
counters.step(style->counter);
}
// treat label as a special case for
@ -156,11 +157,14 @@ void docbookParagraphs(Buffer const & buf,
command_name += '"';
labelid = true;
}
} else {
if (!style->latexparam().empty()) {
ls = expandLabel(buf.params().getLyXTextClass(), style, false);
ls = "id=\"" + subst(style->latexparam(), "#", ls) + '"';
}
}
if (!labelid && !style->latexparam().empty()) {
ls = style->latexparam();
if (ls.find('#') != string::npos) {
string el = expandLabel(buf.params().getLyXTextClass(),
style, false);
ls = subst(ls, "#", el);
}
}
sgml::openTag(os, depth + command_depth, false, command_name, ls);