mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
DocBook: implement achemso.
This commit is contained in:
parent
2f8443afbe
commit
14887dda1c
@ -455,6 +455,9 @@ export/templates/Letters/DIN-Brief_docbook5
|
|||||||
# - AMS: order of elements is not compatible with DocBook (some parts must be in <info>, others cannot, while
|
# - AMS: order of elements is not compatible with DocBook (some parts must be in <info>, others cannot, while
|
||||||
# still being in the book's header).
|
# still being in the book's header).
|
||||||
export/examples/.*/American_Mathematical_Society_%28AMS%29_docbook5
|
export/examples/.*/American_Mathematical_Society_%28AMS%29_docbook5
|
||||||
|
# - ACS: comments in the middle of the author info can wreak havoc (fixable).
|
||||||
|
Some bibliography entries do not exist within the document. Floats are empty.
|
||||||
|
export/examples/Articles/American_Chemical_Society_%28ACS%29_docbook5
|
||||||
# - Branches may cause problems (especially when mixing with parts that must go in <info>).
|
# - Branches may cause problems (especially when mixing with parts that must go in <info>).
|
||||||
export/export/latex/languages/supported-languages_(|babel|babel_auto-legacy)_?docbook5
|
export/export/latex/languages/supported-languages_(|babel|babel_auto-legacy)_?docbook5
|
||||||
# - EmbeddedObjects: this document is too complex, with captions within tables, many LaTeX parameters when including
|
# - EmbeddedObjects: this document is too complex, with captions within tables, many LaTeX parameters when including
|
||||||
|
@ -38,6 +38,7 @@ Style Standard
|
|||||||
Align Block
|
Align Block
|
||||||
AlignPossible Block, Left, Right, Center
|
AlignPossible Block, Left, Right, Center
|
||||||
LabelType No_Label
|
LabelType No_Label
|
||||||
|
DocBookTag para
|
||||||
End
|
End
|
||||||
|
|
||||||
Input stdcounters.inc
|
Input stdcounters.inc
|
||||||
@ -75,6 +76,9 @@ Style Title
|
|||||||
Tooltip "Short title which will appear in the running header"
|
Tooltip "Short title which will appear in the running header"
|
||||||
InsertCotext 1
|
InsertCotext 1
|
||||||
EndArgument
|
EndArgument
|
||||||
|
DocBookTag title
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookInInfo maybe
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Author
|
Style Author
|
||||||
@ -88,6 +92,12 @@ Style Author
|
|||||||
Family Sans
|
Family Sans
|
||||||
Size Large
|
Size Large
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag personname
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperTagType block
|
||||||
|
# Don't merge with the previous, as the author name indicates a new author.
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Email
|
Style Email
|
||||||
@ -110,18 +120,38 @@ Style Affiliation
|
|||||||
Tooltip "Short name which appears in the footer of the title page"
|
Tooltip "Short name which appears in the footer of the title page"
|
||||||
InsertCotext 1
|
InsertCotext 1
|
||||||
EndArgument
|
EndArgument
|
||||||
|
DocBookTag affiliation
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookItemTag orgname
|
||||||
|
DocBookItemTagType paragraph
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Alt_Affiliation
|
Style Alt_Affiliation
|
||||||
CopyStyle Affiliation
|
CopyStyle Affiliation
|
||||||
LatexName altaffiliation
|
LatexName altaffiliation
|
||||||
TopSep 0.7
|
TopSep 0.7
|
||||||
|
DocBookTag affiliation
|
||||||
|
DocBookAttr role='alternate'
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookItemTag orgname
|
||||||
|
DocBookItemTagType paragraph
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Also_Affiliation
|
Style Also_Affiliation
|
||||||
CopyStyle Affiliation
|
CopyStyle Affiliation
|
||||||
LatexName alsoaffiliation
|
LatexName alsoaffiliation
|
||||||
TopSep 0.5
|
TopSep 0.5
|
||||||
|
DocBookTag affiliation
|
||||||
|
DocBookAttr role='also'
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookItemTag orgname
|
||||||
|
DocBookItemTagType paragraph
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Fax
|
Style Fax
|
||||||
@ -131,6 +161,13 @@ Style Fax
|
|||||||
LabelSep xx
|
LabelSep xx
|
||||||
LabelType Static
|
LabelType Static
|
||||||
LabelString "Fax:"
|
LabelString "Fax:"
|
||||||
|
DocBookTag address
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookItemTag phone
|
||||||
|
DocBookItemTagType paragraph
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Phone
|
Style Phone
|
||||||
@ -138,6 +175,13 @@ Style Phone
|
|||||||
LatexName phone
|
LatexName phone
|
||||||
LabelString "Phone:"
|
LabelString "Phone:"
|
||||||
TopSep 0.5
|
TopSep 0.5
|
||||||
|
DocBookTag address
|
||||||
|
DocBookTagType paragraph
|
||||||
|
DocBookWrapperTag author
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
|
DocBookItemTag fax
|
||||||
|
DocBookItemTagType paragraph
|
||||||
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
Style Abbreviations
|
Style Abbreviations
|
||||||
@ -251,12 +295,17 @@ Style Acknowledgement
|
|||||||
Series Bold
|
Series Bold
|
||||||
Size Large
|
Size Large
|
||||||
EndFont
|
EndFont
|
||||||
|
DocBookTag para
|
||||||
|
DocBookWrapperTag acknowledgements
|
||||||
End
|
End
|
||||||
|
|
||||||
Style SupplementalInfo
|
Style SupplementalInfo
|
||||||
CopyStyle Acknowledgement
|
CopyStyle Acknowledgement
|
||||||
LatexName suppinfo
|
LatexName suppinfo
|
||||||
LabelString "Supporting Information Available"
|
LabelString "Supporting Information Available"
|
||||||
|
DocBookTag para
|
||||||
|
DocBookWrapperTag sidebar
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
End
|
End
|
||||||
|
|
||||||
Style TOC_entry
|
Style TOC_entry
|
||||||
@ -264,6 +313,9 @@ Style TOC_entry
|
|||||||
LatexName tocentry
|
LatexName tocentry
|
||||||
ParSep 0.3
|
ParSep 0.3
|
||||||
LabelString "Graphical TOC Entry"
|
LabelString "Graphical TOC Entry"
|
||||||
|
DocBookTag para
|
||||||
|
DocBookWrapperTag sidebar
|
||||||
|
DocBookWrapperMergeWithPrevious true
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Bibnote
|
InsetLayout Flex:Bibnote
|
||||||
@ -300,6 +352,8 @@ InsetLayout Flex:Chemistry
|
|||||||
Color blue
|
Color blue
|
||||||
EndFont
|
EndFont
|
||||||
MultiPar false
|
MultiPar false
|
||||||
|
DocBookTag phrase
|
||||||
|
DocBookAttr role='chemistry'
|
||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Flex:Latin
|
InsetLayout Flex:Latin
|
||||||
|
@ -53,7 +53,7 @@ Style Author
|
|||||||
DocBookTag personname
|
DocBookTag personname
|
||||||
DocBookTagType paragraph
|
DocBookTagType paragraph
|
||||||
DocBookWrapperTag author
|
DocBookWrapperTag author
|
||||||
DocBookWrapperTagType inline
|
DocBookWrapperTagType block
|
||||||
DocBookInInfo always
|
DocBookInInfo always
|
||||||
End
|
End
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
#include "Floating.h"
|
#include "Floating.h"
|
||||||
|
|
||||||
@ -47,7 +48,8 @@ Floating::Floating(string const & type, string const & placement,
|
|||||||
std::string Floating::docbookFloatType() const
|
std::string Floating::docbookFloatType() const
|
||||||
{
|
{
|
||||||
// TODO: configure this in the layouts?
|
// TODO: configure this in the layouts?
|
||||||
if (floattype_ == "figure") {
|
if (floattype_ == "figure" || floattype_ == "graph" ||
|
||||||
|
floattype_ == "chart" || floattype_ == "scheme") {
|
||||||
return "figure";
|
return "figure";
|
||||||
} else if (floattype_ == "table" || floattype_ == "tableau") {
|
} else if (floattype_ == "table" || floattype_ == "tableau") {
|
||||||
return "table";
|
return "table";
|
||||||
@ -101,9 +103,13 @@ string Floating::defaultCSSClass() const
|
|||||||
|
|
||||||
string Floating::docbookAttr() const
|
string Floating::docbookAttr() const
|
||||||
{
|
{
|
||||||
|
std::set<std::string> achemso = { "chart", "graph", "scheme" };
|
||||||
// For algorithms, a type attribute must be mentioned, if not already present in docbook_attr_.
|
// For algorithms, a type attribute must be mentioned, if not already present in docbook_attr_.
|
||||||
if (docbookFloatType() == "algorithm" && docbook_attr_.find("type=") != std::string::npos)
|
if (docbookFloatType() == "algorithm" && docbook_attr_.find("type=") != std::string::npos)
|
||||||
return docbook_attr_ + " type='algorithm'";
|
return docbook_attr_ + " type='algorithm'";
|
||||||
|
// Specific floats for achemso.
|
||||||
|
else if (docbookFloatType() == "figure" && achemso.find(floattype_) != achemso.end())
|
||||||
|
return docbook_attr_ + " type='" + floattype_ + "'";
|
||||||
else
|
else
|
||||||
return docbook_attr_;
|
return docbook_attr_;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user