mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 19:14:51 +00:00
IEEEtran.layout: support command \IEEEPARstart
This commit is contained in:
parent
2f9ef2b98a
commit
7c98a16fbb
@ -33,7 +33,7 @@ EndFont
|
|||||||
|
|
||||||
|
|
||||||
Style Standard
|
Style Standard
|
||||||
Category MainText
|
Category MainText
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Paragraph
|
LatexType Paragraph
|
||||||
LatexName dummy
|
LatexName dummy
|
||||||
@ -225,6 +225,23 @@ Style Keywords
|
|||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
InsetLayout Flex:Paragraph_Start
|
||||||
|
LyxType custom
|
||||||
|
LatexType command
|
||||||
|
LaTeXName IEEEPARstart
|
||||||
|
LabelString "Paragraph Start"
|
||||||
|
Argument 1
|
||||||
|
Mandatory 1
|
||||||
|
AutoInsert 1
|
||||||
|
LabelString "First Char"
|
||||||
|
Tooltip "First character of first word"
|
||||||
|
EndArgument
|
||||||
|
Font
|
||||||
|
Size Small
|
||||||
|
EndFont
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
Style Appendices
|
Style Appendices
|
||||||
Margin Dynamic
|
Margin Dynamic
|
||||||
LatexType Command
|
LatexType Command
|
||||||
|
@ -1578,6 +1578,7 @@ def revert_IEEEtran(document):
|
|||||||
'''
|
'''
|
||||||
if document.textclass == "IEEEtran":
|
if document.textclass == "IEEEtran":
|
||||||
i = 0
|
i = 0
|
||||||
|
i2 = 0
|
||||||
j = 0
|
j = 0
|
||||||
k = 0
|
k = 0
|
||||||
while True:
|
while True:
|
||||||
@ -1586,6 +1587,11 @@ def revert_IEEEtran(document):
|
|||||||
if i != -1:
|
if i != -1:
|
||||||
revert_Argument_to_TeX_brace(document, i, 1, 1, False)
|
revert_Argument_to_TeX_brace(document, i, 1, 1, False)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
if i2 != -1:
|
||||||
|
i2 = find_token(document.body, "\\begin_inset Flex Paragraph Start", i2)
|
||||||
|
if i2 != -1:
|
||||||
|
revert_Argument_to_TeX_brace(document, i2, 1, 1, False)
|
||||||
|
i2 = i2 + 1
|
||||||
if j != -1:
|
if j != -1:
|
||||||
j = find_token(document.body, "\\begin_layout Biography without photo", j)
|
j = find_token(document.body, "\\begin_layout Biography without photo", j)
|
||||||
if j != -1:
|
if j != -1:
|
||||||
@ -1601,7 +1607,25 @@ def revert_IEEEtran(document):
|
|||||||
# start with the second argument, therefore 2
|
# start with the second argument, therefore 2
|
||||||
revert_Argument_to_TeX_brace(document, k, 2, 2, True)
|
revert_Argument_to_TeX_brace(document, k, 2, 2, True)
|
||||||
k = k + 1
|
k = k + 1
|
||||||
if i == -1 and j == -1 and k == -1:
|
if i == -1 and i2 == -1 and j == -1 and k == -1:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
def revert_IEEEtran_2(document):
|
||||||
|
'''
|
||||||
|
Reverts Flex Paragraph Start to TeX-code
|
||||||
|
'''
|
||||||
|
if document.textclass == "IEEEtran":
|
||||||
|
begin = 0
|
||||||
|
while True:
|
||||||
|
if begin != -1:
|
||||||
|
begin = find_token(document.body, "\\begin_inset Flex Paragraph Start", begin)
|
||||||
|
if begin != -1:
|
||||||
|
end1 = find_end_of_inset(document.body, begin)
|
||||||
|
document.body[end1 - 2 : end1 + 1] = put_cmd_in_ert("}")
|
||||||
|
document.body[begin : begin + 4] = put_cmd_in_ert("\\IEEEPARstart{")
|
||||||
|
begin = begin + 5
|
||||||
|
if begin == -1:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@ -3537,7 +3561,7 @@ revert = [
|
|||||||
[449, [revert_garamondx, revert_garamondx_newtxmath]],
|
[449, [revert_garamondx, revert_garamondx_newtxmath]],
|
||||||
[448, [revert_itemargs]],
|
[448, [revert_itemargs]],
|
||||||
[447, [revert_literate]],
|
[447, [revert_literate]],
|
||||||
[446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX, revert_IJMP, revert_SIGPLAN, revert_SIGGRAPH, revert_EuropeCV, revert_Initials, revert_ModernCV]],
|
[446, [revert_IEEEtran, revert_IEEEtran_2, revert_AASTeX, revert_AGUTeX, revert_IJMP, revert_SIGPLAN, revert_SIGGRAPH, revert_EuropeCV, revert_Initials, revert_ModernCV]],
|
||||||
[445, [revert_latexargs]],
|
[445, [revert_latexargs]],
|
||||||
[444, [revert_uop]],
|
[444, [revert_uop]],
|
||||||
[443, [revert_biolinum]],
|
[443, [revert_biolinum]],
|
||||||
|
@ -96,7 +96,7 @@ status open
|
|||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
This is a template LyX file for articles to be submitted to journals of
|
This is a template LyX file for articles to be submitted to journals of
|
||||||
the Institute of Electrical and Electronics Engineers (IEEE).
|
the Institute of Electrical and Electronics Engineers (IEEE).
|
||||||
For general infos see
|
For general info see
|
||||||
\begin_inset Flex URL
|
\begin_inset Flex URL
|
||||||
status open
|
status open
|
||||||
|
|
||||||
@ -120,9 +120,11 @@ http://wiki.lyx.org/Examples/IEEE
|
|||||||
status open
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
You find the IEEEtran document class documentation here:
|
It is important that you use the correct document class options for your
|
||||||
|
document..
|
||||||
|
These are explained in the IEEEtran document:
|
||||||
\begin_inset Flex URL
|
\begin_inset Flex URL
|
||||||
status collapsed
|
status open
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
@ -334,20 +336,6 @@ et al.
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
: Your Title
|
: Your Title
|
||||||
\begin_inset Note Note
|
|
||||||
status open
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
left side
|
|
||||||
\series bold
|
|
||||||
}{
|
|
||||||
\series default
|
|
||||||
right side
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Publication ID
|
\begin_layout Publication ID
|
||||||
@ -398,6 +386,25 @@ Introduction
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
|
\begin_inset Flex Paragraph Start
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
\begin_inset Argument 1
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
H
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
ere
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\begin_inset Note Note
|
\begin_inset Note Note
|
||||||
status collapsed
|
status collapsed
|
||||||
|
|
||||||
@ -408,42 +415,7 @@ The
|
|||||||
\backslash
|
\backslash
|
||||||
IEEEPARstart
|
IEEEPARstart
|
||||||
\series default
|
\series default
|
||||||
command is needed in the first paragraph fo the document.
|
command is needed in the first paragraph of the document.
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
|
|
||||||
\begin_inset ERT
|
|
||||||
status collapsed
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
|
|
||||||
|
|
||||||
\backslash
|
|
||||||
IEEEPARstart{
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
H
|
|
||||||
\begin_inset ERT
|
|
||||||
status collapsed
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
|
|
||||||
}{
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
ere
|
|
||||||
\begin_inset ERT
|
|
||||||
status collapsed
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
|
|
||||||
}
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
Loading…
Reference in New Issue
Block a user