-----------------------
+2019-03-22 Jürgen Spitzmüller <spitz@lyx.org>
+ * format incremented to 568: Support for the soul module:
+ \so, \hl, \st, \ul, \caps
+
2019-02-21 Joice Joseph <josukutty@outlook.com>
- * Format incremented to 567: Support for Malayalam:
+ * Format incremented to 567: Support for Malayalam:
\lang malayalam
2018-10-29 Guy Rutenberg <guyrutenberg@gmail.com>
layouts/singlecol.layout \
layouts/singlecol-new.layout \
layouts/slides.layout \
+ layouts/soul.module \
layouts/spie.layout \
layouts/stdciteformats.inc \
layouts/stdclass.inc \
--- /dev/null
+#\DeclareLyXModule[soul.sty]{Soul Text Markup}
+#DescriptionBegin
+#Defines text styles to highlight, space-out, strike-through
+#underline and capitalize text by means of the soul package.
+#DescriptionEnd
+#Requires
+#Excludes
+
+#Author: Stephen [original implementation],
+# Juergen Spitzmueller <spitz@lyx.org> [fixes]
+
+Format 71
+
+InsetLayout Flex:Spaceletters
+ LyxType charstyle
+ LabelString spaced
+ Decoration conglomerate
+ LatexType command
+ LatexName so
+ LabelFont
+ Size Small
+ EndFont
+ NeedMBoxProtect true
+ MultiPar true
+ Requires soul
+End
+
+InsetLayout Flex:Strikethrough
+ CopyStyle Flex:Spaceletters
+ LabelString strike
+ LatexName st
+ Font
+ Misc strikeout
+ EndFont
+End
+
+InsetLayout Flex:Underline
+ CopyStyle Flex:Spaceletters
+ LabelString ul
+ LatexName ul
+ Font
+ Misc underbar
+ EndFont
+End
+
+InsetLayout Flex:Highlight
+ CopyStyle Flex:Spaceletters
+ LabelString hl
+ LatexName hl
+ BgColor yellow
+ Requires soul,color
+End
+
+InsetLayout Flex:Capitalize
+ CopyStyle Flex:Spaceletters
+ LabelString caps
+ LatexName caps
+ Font
+ Shape smallcaps
+ EndFont
+End
+
+
+# Obsolete older forms used on wiki.lyx.org
+
+InsetLayout Flex:spaceletters
+ ObsoletedBy Flex:Spaceletters
+End
+
+InsetLayout Flex:strikethrough
+ ObsoletedBy Flex:Strikethrough
+End
+
+InsetLayout Flex:underline
+ ObsoletedBy Flex:Underline
+End
+
+InsetLayout Flex:highlight
+ ObsoletedBy Flex:Highlight
+End
+
+InsetLayout Flex:capitalise
+ ObsoletedBy Flex:Capitalize
+End
+
+InsetLayout Flex:Capitalise
+ ObsoletedBy Flex:Capitalize
+End
# is_in_inset, set_bool_value
# find_tokens, find_token_exact, check_token
-from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble, revert_language)
+from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble, revert_language, revert_flex_inset)
# revert_font_attrs, insert_to_preamble, latex_length
# get_ert, lyx2latex, lyx2verbatim, length_in_bp, convert_info_insets
# revert_flex_inset, hex2ratio, str2bool
revert_language(document, "malayalam", "", "malayalam")
+def revert_soul(document):
+ " Revert soul module flex insets to ERT "
+
+ flexes = ["Spaceletters", "Strikethrough", "Underline", "Highlight", "Capitalize"]
+
+ for flex in flexes:
+ i = find_token(document.body, "\\begin_inset Flex %s" % flex, 0)
+ if i != -1:
+ add_to_preamble(document, ["\\usepackage{soul}"])
+ break
+ i = find_token(document.body, "\\begin_inset Flex Highlight", 0)
+ if i != -1:
+ add_to_preamble(document, ["\\usepackage{color}"])
+
+ revert_flex_inset(document.body, "Spaceletters", "\\so")
+ revert_flex_inset(document.body, "Strikethrough", "\\st")
+ revert_flex_inset(document.body, "Underline", "\\ul")
+ revert_flex_inset(document.body, "Highlight", "\\hl")
+ revert_flex_inset(document.body, "Capitalize", "\\caps")
+
+
+
##
# Conversion hub
#
[565, [convert_AdobeFonts]], # Handle adobe fonts in GUI
[566, [convert_hebrew_parentheses]],
[567, []],
+ [568, []]
]
revert = [
+ [567, [revert_soul]],
[566, [revert_malayalam]],
[565, [revert_hebrew_parentheses]],
[564, [revert_AdobeFonts]],
443 unicode-math.sty InsetMath*
453 automatic stmaryrd loading \use_package stmaryrd
457 automatic stackrel loading \use_package stackrel
-563 InsetArgument listpreamble:1 All content between \begin{env} and first \item of a list
+563 InsetArgument listpreamble:1 All content between \begin{env} and first \item of a list
+568 Soul package soul.module
+ \caps{...} \begin_inset Flex Capitalize
+ \hl{...} \begin_inset Flex Highlight
+ \so{...} \begin_inset Flex Spaceletters
+ \st{...} \begin_inset Flex Strikethrough
+ \ul{...} \begin_inset Flex Underline
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 567 // Joice : Added support for malayalam.
-#define LYX_FORMAT_TEX2LYX 567
+#define LYX_FORMAT_LYX 568 // spitz :soul.module
+#define LYX_FORMAT_TEX2LYX 568
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER