From 4a0976ceeb82083200945d858a9ea4436d3431ec Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 2 Jul 2014 13:48:01 +0200 Subject: [PATCH] Add support for the sectionbox and tcolorbox packages. They will be used by the conference poster classes that will be supported in a minute. --- lib/Makefile.am | 2 + lib/chkconfig.ltx | 2 + lib/doc/LaTeXConfig.lyx | 98 ++++++++++++++++++++++++++++++ lib/layouts/sectionbox.module | 50 ++++++++++++++++ lib/layouts/tcolorbox.module | 110 ++++++++++++++++++++++++++++++++++ src/LaTeXFeatures.cpp | 4 +- 6 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 lib/layouts/sectionbox.module create mode 100644 lib/layouts/tcolorbox.module diff --git a/lib/Makefile.am b/lib/Makefile.am index 18bf1c5c84..66701c17ea 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2025,6 +2025,7 @@ dist_layouts_DATA =\ layouts/scrlettr.layout \ layouts/scrlttr2.layout \ layouts/scrreprt.layout \ + layouts/sectionbox.module \ layouts/seminar.layout \ layouts/shapepar.module \ layouts/siamltex.layout \ @@ -2061,6 +2062,7 @@ dist_layouts_DATA =\ layouts/tabs-within-sections.module \ layouts/tarticle.layout \ layouts/tbook.layout \ + layouts/tcolorbox.module \ layouts/theorems-ams.inc \ layouts/theorems-ams.module \ layouts/theorems-ams-bytype.inc \ diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 25478bef34..eaa8bd1f58 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -343,6 +343,7 @@ \TestPackage{refstyle} \TestPackage{rotating} \TestPackage{rotfloat} +\TestPackage{sectionbox} \TestPackage[serbianc.ldf]{serbianc} \TestPackage{setspace} \TestPackage{slashed} @@ -353,6 +354,7 @@ \TestPackage{subfig} \TestPackage{subscript} \TestPackage{Sweave} +\TestPackage{tcolorbox} \TestPackage{textcomp} \TestPackage{thswitch} \TestPackage[turkmen.ldf]{turkmen} diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx index f1df9ce3ea..91bf677349 100644 --- a/lib/doc/LaTeXConfig.lyx +++ b/lib/doc/LaTeXConfig.lyx @@ -5881,6 +5881,104 @@ rsphrase risk and safety statements \color none . +\change_inserted -712698321 1404300887 + +\end_layout + +\begin_layout Subsection + +\change_inserted -712698321 1404300977 +Sectionbox module +\end_layout + +\begin_layout Subsubsection + +\change_inserted -712698321 1404300982 +sectionbox +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404300973 +Found: +\begin_inset Info +type "package" +arg "sectionbox" +\end_inset + + +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404301042 +CTAN: +\family typewriter +macros/latex/contrib/sectionbox/ +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404301055 +Notes: The package +\family sans +sectionbox +\family default +\color none + is a LaTeX package for putting fancy colored boxes around sections, subsections +, and subsubsections, especially for use in posters, etc. + It was designed with the +\family sans +\color inherit +sciposter +\family default +\color none + class in mind, and certainly works with that class and with derived classes. +\end_layout + +\begin_layout Subsection + +\change_inserted -712698321 1404300913 +TColorbox module +\end_layout + +\begin_layout Subsubsection + +\change_inserted -712698321 1404300919 +tcolorbox +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404300887 +Found: +\begin_inset Info +type "package" +arg "tcolorbox" +\end_inset + + +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404300936 +CTAN: +\family typewriter +macros/latex/contrib/tcolorbox/ +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1404300960 +Notes: The package +\family sans +tcolorbox +\family default +\color none + is used to produce fancy boxes. +\change_unchanged + \end_layout \begin_layout Section diff --git a/lib/layouts/sectionbox.module b/lib/layouts/sectionbox.module new file mode 100644 index 0000000000..c1d2895785 --- /dev/null +++ b/lib/layouts/sectionbox.module @@ -0,0 +1,50 @@ +#\DeclareLyXModule[sectionbox.sty]{Section Boxes} +#DescriptionBegin +#Defines Boxes with section header. Mainly intended for +#the SciPoster class. +#DescriptionEnd + +# Author: Jürgen Spitzmüller + +Format 45 + +InsetLayout Flex:SectionBox + LyXType custom + LabelString "Section Box" + LatexType environment + LatexName sectionbox + Decoration classic + MultiPar true + CustomPars true + Requires sectionbox + Argument 1 + LabelString "Width" + MenuString "Section Box Width|S" + Tooltip "Width of the section Box" + EndArgument + Argument 2 + LabelString "Heading" + MenuString "Section Box Heading" + Mandatory 1 + Decoration conglomerate + AutoInsert 1 + Tooltip "Insert the section box header here" + Font + Size Large + Series Bold + EndFont + EndArgument +End + +InsetLayout Flex:SubsectionBox + CopyStyle Flex:SectionBox + LabelString "Subsection Box" + LatexName subsectionbox +End + +InsetLayout Flex:SubsubsectionBox + CopyStyle Flex:SectionBox + LabelString "Subsubsection Box" + LatexName subsubsectionbox +End + diff --git a/lib/layouts/tcolorbox.module b/lib/layouts/tcolorbox.module new file mode 100644 index 0000000000..b6ef7b9dc8 --- /dev/null +++ b/lib/layouts/tcolorbox.module @@ -0,0 +1,110 @@ +#\DeclareLyXModule[tcolorbox.sty]{Fancy Colored Boxes} +#DescriptionBegin +#Adds custom insets that support colored boxes via the tcolorbox package. +#See the tcolorbox documentation for details. +#DescriptionEnd +#Authors: Jürgen Spitzmüller + +Format 48 + +InsetLayout Flex:Color_Box + LyXType custom + Decoration classic + LabelString "Color Box" + LatexType environment + LatexName tcolorbox + Requires tcolorbox + Argument 1 + LabelString "Color Box Options" + Tooltip "Insert the color box options here (see tcolorbox manual)" + EndArgument +End + +InsetLayout Flex:Dynamic_Color_Box + LyXType custom + Decoration classic + LabelString "Color Box (Dynamic)" + LatexType command + LatexName tcbox + Requires tcolorbox + Argument 1 + LabelString "Color Box Options" + Tooltip "Insert the color box options here (see tcolorbox manual)" + EndArgument +End + +InsetLayout Flex:Fit_Color_Box + LyXType custom + Decoration classic + LabelString "Color Box (Fit Contents)" + LatexType command + LatexName tcboxfit + Requires tcolorbox + Argument 1 + LabelString "Color Box Options" + Tooltip "Insert the color box options here (see tcolorbox manual)" + EndArgument +End + +Style Color_Box_Separator + Category "Color Boxes" + LatexType command + LatexName tcblower + ParIndent MM + ParSkip 0.4 + Align Left + AlignPossible Block, Left, Right, Center + Margin First_Dynamic + TopSep 0 + BottomSep 0 + ParSep 0 + LabelType Static + LabelBottomSep 0 + LabelString "-----" + KeepEmpty 1 + LabelFont + Series medium + Size normal + Color latex + Series bold + EndFont + Requires tcolorbox +End + +Style Color_Box_Line + CopyStyle Color_Box_Separator + LatexName tcbline + LabelFont + Color blue + EndFont + Requires tcolorbox +End + +Style Color_Box_Setup + Category "Color Boxes" + LatexName tcbset + LatexType command + PassThru 1 + Margin Dynamic + LabelSep xx + ParSkip 0.0 + ItemSep 0.2 + TopSep 0.7 + BottomSep 0.7 + ParSep 0.3 + Align Block + AlignPossible Block + LabelType Static + LabelString "Color Box Setup" + Font + Color latex + Family typewriter + EndFont + LabelFont + Color green + Family roman + EndFont + Requires tcolorbox + Spellcheck 0 +End + diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index e20617f1c8..2c9c64ca17 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -742,7 +742,9 @@ char const * simplefeatures[] = { "tfrupee", "shapepar", "rsphrase", - "algorithm2e" + "algorithm2e", + "sectionbox", + "tcolorbox" }; char const * bibliofeatures[] = { -- 2.39.2