mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
achemso.layout: add a flex inset
- this one is in achemso since version 3.8 - fileformat change
This commit is contained in:
parent
c0b815bf62
commit
62a69584e6
@ -11,6 +11,12 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
|||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
2015-11-04 Uwe Stöhr <uwestoehr@web.de>
|
||||||
|
* Format incremented to 500
|
||||||
|
No new parameters.
|
||||||
|
achemso layout improvement:
|
||||||
|
- new flex inset Latin
|
||||||
|
|
||||||
2015-10-27 Uwe Stöhr <uwestoehr@web.de>
|
2015-10-27 Uwe Stöhr <uwestoehr@web.de>
|
||||||
* Format incremented to 499
|
* Format incremented to 499
|
||||||
No new parameters.
|
No new parameters.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#LyX 2.1 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 474
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
|
\origin /systemlyxdir/examples/
|
||||||
\textclass achemso
|
\textclass achemso
|
||||||
\begin_preamble
|
\begin_preamble
|
||||||
% If issues arise when submitting your manuscript, you may want to
|
% If issues arise when submitting your manuscript, you may want to
|
||||||
@ -84,8 +85,9 @@ theorems-ams
|
|||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
This is an example LyX file for articles to be submitted to journals of
|
This is an example \SpecialChar LyX
|
||||||
the American Chemistry Society (ACS).
|
file for articles to be submitted to journals of the
|
||||||
|
American Chemistry Society (ACS).
|
||||||
For general infos see
|
For general infos see
|
||||||
\begin_inset Flex URL
|
\begin_inset Flex URL
|
||||||
status open
|
status open
|
||||||
@ -124,7 +126,8 @@ Note:
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Title
|
\begin_layout Title
|
||||||
A demonstration of the achemso LaTeX class
|
A demonstration of the achemso \SpecialChar LaTeX
|
||||||
|
class
|
||||||
\begin_inset Argument 1
|
\begin_inset Argument 1
|
||||||
status open
|
status open
|
||||||
|
|
||||||
@ -257,7 +260,8 @@ IR,NMR,UV
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Keywords
|
\begin_layout Keywords
|
||||||
American Chemical Society, LaTeX
|
American Chemical Society, \SpecialChar LaTeX
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Abstract
|
\begin_layout Abstract
|
||||||
@ -363,6 +367,25 @@ key "Pople2003"
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
.
|
.
|
||||||
|
Notice that
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\begin_inset Flex Latin
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
et al.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
is auto-formatted.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
@ -392,7 +415,7 @@ status open
|
|||||||
This is a bibnote; its text will be moved the the references section.
|
This is a bibnote; its text will be moved the the references section.
|
||||||
Bibnotes are inserted with the menu
|
Bibnotes are inserted with the menu
|
||||||
\family sans
|
\family sans
|
||||||
Insert\SpecialChar \menuseparator
|
Insert\SpecialChar menuseparator
|
||||||
Custom Insets
|
Custom Insets
|
||||||
\family default
|
\family default
|
||||||
.
|
.
|
||||||
@ -422,7 +445,8 @@ Some Infos
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Besides the standard figure and table floats, the achemso LaTeX-class provides
|
Besides the standard figure and table floats, the achemso \SpecialChar LaTeX
|
||||||
|
-class provides
|
||||||
scheme, chart, and graph floats.
|
scheme, chart, and graph floats.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#% Do not delete the line below; configure depends on this
|
#% Do not delete the line below; configure depends on this
|
||||||
# \DeclareLaTeXClass[achemso,caption.sty,courier.sty,cleveref.sty,float.sty,helvet.sty,mathptmx.sty,mciteplus.sty,natbib.sty,natmove.sty,setspace.sty,xkeyval.sty]{American Chemical Society (ACS)}
|
# \DeclareLaTeXClass[achemso,caption.sty,courier.sty,cleveref.sty,float.sty,helvet.sty,mathptmx.sty,mciteplus.sty,natbib.sty,natmove.sty,setspace.sty,xkeyval.sty]{American Chemical Society (ACS)}
|
||||||
# \DeclareCategory{Articles}
|
# \DeclareCategory{Articles}
|
||||||
# textclass definition file for achemso 3.7c
|
# textclass definition file for achemso 3.8 and 3.9
|
||||||
# Author: Uwe Stöhr (uwestoehr@web.de)
|
# Author: Uwe Stöhr (uwestoehr@web.de)
|
||||||
|
|
||||||
Format 54
|
Format 54
|
||||||
@ -295,3 +295,10 @@ InsetLayout Flex:Chemistry
|
|||||||
EndFont
|
EndFont
|
||||||
MultiPar false
|
MultiPar false
|
||||||
End
|
End
|
||||||
|
|
||||||
|
InsetLayout Flex:Latin
|
||||||
|
CopyStyle Flex:Bibnote
|
||||||
|
LatexName latin
|
||||||
|
LabelString "Latin"
|
||||||
|
MultiPar false
|
||||||
|
End
|
||||||
|
@ -85,7 +85,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
|
|||||||
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
|
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
|
||||||
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
|
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
|
||||||
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
|
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
|
||||||
("2_2", list(range(475,500)), minor_versions("2.2" , 0))
|
("2_2", list(range(475,501)), minor_versions("2.2" , 0))
|
||||||
]
|
]
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
|
@ -1992,6 +1992,30 @@ def convert_moderncv(document):
|
|||||||
i1 += 1
|
i1 += 1
|
||||||
i2 += 1
|
i2 += 1
|
||||||
|
|
||||||
|
|
||||||
|
def revert_achemso(document):
|
||||||
|
" Reverts the flex inset Latin to TeX code "
|
||||||
|
i = 0
|
||||||
|
j = 0
|
||||||
|
while True:
|
||||||
|
i = find_token(document.body, "\\begin_inset Flex Latin", i)
|
||||||
|
if i != -1:
|
||||||
|
j = find_end_of_inset(document.body, i)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
if j != -1:
|
||||||
|
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", i)
|
||||||
|
endPlain = find_end_of_layout(document.body, beginPlain)
|
||||||
|
content = lyx2latex(document, document.body[beginPlain : endPlain])
|
||||||
|
#content = lyx2latex(document, document.body[i : j + 1])
|
||||||
|
document.body[i:j + 1] = put_cmd_in_ert("\\latin{" + content + "}")
|
||||||
|
#del document.body[i : j + 1]
|
||||||
|
else:
|
||||||
|
document.warning("Malformed LyX document: Can't find end of flex inset Latin")
|
||||||
|
return
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Conversion hub
|
# Conversion hub
|
||||||
#
|
#
|
||||||
@ -2025,10 +2049,12 @@ convert = [
|
|||||||
[496, [convert_nounzip]],
|
[496, [convert_nounzip]],
|
||||||
[497, [convert_external_bbox]],
|
[497, [convert_external_bbox]],
|
||||||
[498, []],
|
[498, []],
|
||||||
[499, [convert_moderncv]]
|
[499, [convert_moderncv]],
|
||||||
|
[500, []]
|
||||||
]
|
]
|
||||||
|
|
||||||
revert = [
|
revert = [
|
||||||
|
[499, [revert_achemso]],
|
||||||
[498, [revert_moderncv_1, revert_moderncv_2]],
|
[498, [revert_moderncv_1, revert_moderncv_2]],
|
||||||
[497, [revert_tcolorbox_1, revert_tcolorbox_2,
|
[497, [revert_tcolorbox_1, revert_tcolorbox_2,
|
||||||
revert_tcolorbox_3, revert_tcolorbox_4, revert_tcolorbox_5,
|
revert_tcolorbox_3, revert_tcolorbox_4, revert_tcolorbox_5,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX file created by tex2lyx 2.2
|
#LyX file created by tex2lyx 2.2
|
||||||
\lyxformat 499
|
\lyxformat 500
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin roundtrip
|
\origin roundtrip
|
||||||
|
@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
|
|||||||
|
|
||||||
// Do not remove the comment below, so we get merge conflict in
|
// Do not remove the comment below, so we get merge conflict in
|
||||||
// independent branches. Instead add your own.
|
// independent branches. Instead add your own.
|
||||||
#define LYX_FORMAT_LYX 499 // uwestoehr: moderncv module improvements
|
#define LYX_FORMAT_LYX 500 // uwestoehr: achemso layout improvement
|
||||||
#define LYX_FORMAT_TEX2LYX 499
|
#define LYX_FORMAT_TEX2LYX 500
|
||||||
|
|
||||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Loading…
Reference in New Issue
Block a user