From 062db8b67960a544687179188a861ad8de5defa3 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 5 Jun 2009 17:51:03 +0000 Subject: [PATCH] Initial HTML information for layouts. Much of this is prelimiary, some of it is really only for testing purposes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29953 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/logicalmkup.module | 10 ++++++++++ lib/layouts/paper.layout | 2 +- lib/layouts/stdclass.inc | 1 + lib/layouts/stdinsets.inc | 8 ++++++++ lib/layouts/stdlayouts.inc | 9 +++++++++ lib/layouts/stdlists.inc | 21 +++++++++++++++++++++ lib/layouts/stdsections.inc | 17 +++++++++++++++++ lib/layouts/stdtitle.inc | 6 ++++++ 8 files changed, 73 insertions(+), 1 deletion(-) diff --git a/lib/layouts/logicalmkup.module b/lib/layouts/logicalmkup.module index d31acfecdb..fa8032c802 100644 --- a/lib/layouts/logicalmkup.module +++ b/lib/layouts/logicalmkup.module @@ -17,6 +17,13 @@ InsetLayout CharStyle:Noun EndFont Requires noun InToc true + HTMLTag span + HTMLAttr class='noun' + HTMLStyle + span.noun { + font-family: sans-serif; + } + EndHTMLStyle End @@ -29,6 +36,7 @@ InsetLayout CharStyle:Emph Shape Italic EndFont InToc true + HTMLTag em End @@ -44,6 +52,7 @@ InsetLayout CharStyle:Strong \newcommand{\strong}[1]{\textbf{#1}} EndPreamble InToc true + HTMLTag strong End @@ -59,4 +68,5 @@ InsetLayout CharStyle:Code \newcommand{\code}[1]{\texttt{#1}} EndPreamble InToc true + HTMLTag code End diff --git a/lib/layouts/paper.layout b/lib/layouts/paper.layout index 244fd4c61f..cd3203c10a 100644 --- a/lib/layouts/paper.layout +++ b/lib/layouts/paper.layout @@ -10,7 +10,6 @@ Sides 1 SecNumDepth 3 TocDepth 3 - Style Standard Margin Static LatexType Paragraph @@ -20,6 +19,7 @@ Style Standard Align Block AlignPossible Block, Left, Right, Center LabelType No_Label + HTMLTag p End Input stdtitle.inc diff --git a/lib/layouts/stdclass.inc b/lib/layouts/stdclass.inc index 8494b028cf..afd863f98a 100644 --- a/lib/layouts/stdclass.inc +++ b/lib/layouts/stdclass.inc @@ -35,6 +35,7 @@ Style Standard Align Block AlignPossible Block, Left, Right, Center LabelType No_Label + HTMLTag p End #Input stdcharstyles.inc diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 075a49af61..d916a326a9 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -97,6 +97,8 @@ InsetLayout Foot Size Small EndFont MultiPar true + HTMLTag span + HTMLAttr class='footnote' End InsetLayout Note:Comment @@ -322,3 +324,9 @@ InsetLayout Info:shortcuts Family sans EndFont End + +InsetLayout Box + HTMLStyle + span.Frameless { font-family: sans-serif; } + EndHTMLStyle +End diff --git a/lib/layouts/stdlayouts.inc b/lib/layouts/stdlayouts.inc index 381102129d..d4b099c526 100644 --- a/lib/layouts/stdlayouts.inc +++ b/lib/layouts/stdlayouts.inc @@ -24,6 +24,9 @@ Style Quotation ParSep 0 Align Block AlignPossible Block, Left, Right, Center + HTMLTag blockquote + HTMLAttr class='quotation' + HTMLItem p End @@ -41,6 +44,9 @@ Style Quote Align Block AlignPossible Block, Left, Right, Center LabelType No_Label + HTMLTag blockquote + HTMLAttr class='quote' + HTMLItem p End @@ -61,6 +67,9 @@ Style Verse Align Block AlignPossible Block, Left LabelType No_Label + HTMLTag blockquote + HTMLAttr class='verse' + HTMLItem p End diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index 5d467b3d65..d4beb4ae9f 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -24,6 +24,8 @@ Style Itemize AlignPossible Block, Left LabelType Itemize LabelString "*" + HTMLTag ul + HTMLItem li End @@ -44,6 +46,8 @@ Style Enumerate AlignPossible Block, Left LabelType Enumerate LabelCounter "enum" + HTMLTag ol + HTMLItem li End Style Description @@ -66,6 +70,9 @@ Style Description LabelFont Series Bold EndFont + HTMLTag dl + HTMLItem dd + HTMLLabel dt End @@ -84,6 +91,11 @@ Style List AlignPossible Block, Left LabelType Manual LabelString "00.00.0000" + HTMLTag ol + HTMLAttr class='lyxlist' + HTMLItem li + HTMLLabel span + HTMLLabelAttr class='lyxlist' #define the environment lyxlist Preamble @@ -95,4 +107,13 @@ Style List \renewcommand{\makelabel}[1]{##1\hfil}}} {\end{list}} EndPreamble + + HTMLStyle + ol.lyxlist { + list-style-type: none; + } + span.lyxlist { + margin-right: 3em; + } + EndHTMLStyle End diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc index ad70dcfc80..f3cbc605f1 100644 --- a/lib/layouts/stdsections.inc +++ b/lib/layouts/stdsections.inc @@ -30,6 +30,8 @@ Style Part Series Bold Size Huge EndFont + HTMLTag h1 + HTMLAttr class='part' End @@ -55,6 +57,8 @@ Style Chapter Series Bold Size Huge EndFont + HTMLTag h1 + HTMLAttr class='chapter' End @@ -79,6 +83,11 @@ Style Section Series Bold Size Larger EndFont + HTMLTag h2 + HTMLAttr class='section' + HTMLStyle + h2.section { font-family: sans-serif; } + EndHTMLStyle End @@ -94,6 +103,8 @@ Style Subsection Series Bold Size Large EndFont + HTMLTag h3 + HTMLAttr class='subsection' End @@ -108,6 +119,8 @@ Style Subsubsection Series Bold Size Normal EndFont + HTMLTag h4 + HTMLAttr class='subsubsection' End @@ -118,6 +131,8 @@ Style Paragraph LatexName paragraph TopSep 0.4 BottomSep 0 + HTMLTag span + HTMLAttr class='paragraph' End @@ -128,6 +143,8 @@ Style Subparagraph LatexName subparagraph NextNoIndent 0 LeftMargin MM + HTMLTag span + HTMLAttr class='subparagraph' End Input numarticle.inc diff --git a/lib/layouts/stdtitle.inc b/lib/layouts/stdtitle.inc index ee92a41978..6b7b65f288 100644 --- a/lib/layouts/stdtitle.inc +++ b/lib/layouts/stdtitle.inc @@ -25,6 +25,8 @@ Style Title Font Size Largest EndFont + HTMLTag h1 + HTMLAttr class='title' End @@ -44,6 +46,8 @@ Style Author Font Size Large EndFont + HTMLTag h2 + HTMLAttr class='author' End @@ -63,4 +67,6 @@ Style Date Font Size Large EndFont + HTMLTag h2 + HTMLAttr class='date' End