+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,
InnerTag head
LabelTag label
CommandDepth 2
- LatexParam "s#"
+ LatexParam "id = "s#""
End
InnerTag head
LabelTag label
CommandDepth 3
- LatexParam "s#"
+ LatexParam "id = "s#""
End
InnerTag head
LabelTag label
CommandDepth 4
- LatexParam "s#"
+ LatexParam "id = "s#""
End
InnerTag head
LabelTag label
CommandDepth 5
- LatexParam "s#"
+ LatexParam "id = "s#""
End
InnerTag head
LabelTag label
CommandDepth 6
- LatexParam "s#"
+ LatexParam "id = "s#""
End
Style Subsubparagraph
InnerTag head
LabelTag label
CommandDepth 7
- LatexParam "s#"
+ LatexParam "id = "s#""
End
#include "buffer.h"
#include "bufferparams.h"
#include "counters.h"
+#include "debug.h"
#include "lyxtext.h"
#include "paragraph.h"
#include "paragraph_funcs.h"
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);
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
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);