mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
sigplanconf: complete revision of layout and templates/ACM-sigplan.lyx
- additionally some fixes for the generic insetArgument lyx2lyx routines
This commit is contained in:
parent
1500e44cba
commit
5c5e8817e3
@ -74,6 +74,11 @@ Style Conference
|
||||
ParSkip 0.4
|
||||
BottomSep 0.5
|
||||
Align Left
|
||||
Argument 1
|
||||
Mandatory 1
|
||||
LabelString "Name"
|
||||
Tooltip "Name of the conference"
|
||||
EndArgument
|
||||
LabelSep xx
|
||||
LabelType Static
|
||||
LabelString "Conference:"
|
||||
@ -86,28 +91,37 @@ End
|
||||
|
||||
Style CopyrightYear
|
||||
CopyStyle Conference
|
||||
ResetArgs 1
|
||||
LatexName CopyrightYear
|
||||
LabelString "Copyright year:"
|
||||
End
|
||||
|
||||
|
||||
Style Copyrightdata
|
||||
CopyStyle Conference
|
||||
CopyStyle CopyrightYear
|
||||
LatexName copyrightdata
|
||||
LabelString "Copyright data:"
|
||||
End
|
||||
|
||||
|
||||
Style TitleBanner
|
||||
CopyStyle CopyrightYear
|
||||
LatexName titlebanner
|
||||
LabelString "Title banner:"
|
||||
End
|
||||
|
||||
|
||||
Style PreprintFooter
|
||||
CopyStyle CopyrightYear
|
||||
LatexName preprintfooter
|
||||
LabelString "Preprint footer:"
|
||||
End
|
||||
|
||||
|
||||
Input stdtitle.inc
|
||||
Input stdstruct.inc
|
||||
|
||||
|
||||
Style Title
|
||||
CopyStyle Title
|
||||
AlignPossible Block
|
||||
End
|
||||
|
||||
|
||||
Style Subtitle
|
||||
CopyStyle Title
|
||||
LatexName subtitle
|
||||
@ -130,15 +144,29 @@ Style Author
|
||||
BottomSep 0.7
|
||||
ParSep 0.7
|
||||
Align Center
|
||||
LabelType No_Label
|
||||
Argument 1
|
||||
Mandatory 1
|
||||
LabelString "Name"
|
||||
Tooltip "Name of the author"
|
||||
Font
|
||||
Size Large
|
||||
EndFont
|
||||
EndArgument
|
||||
Argument 2
|
||||
Mandatory 1
|
||||
LabelString "Affiliation"
|
||||
Tooltip "Affiliation and/or address of the author"
|
||||
EndArgument
|
||||
LabelType No_Label
|
||||
Font
|
||||
Family Sans
|
||||
Size Normal
|
||||
EndFont
|
||||
End
|
||||
|
||||
|
||||
Style Terms
|
||||
CopyStyle Conference
|
||||
CopyStyle CopyrightYear
|
||||
LatexName terms
|
||||
InTitle 0
|
||||
LabelString "Terms:"
|
||||
@ -146,7 +174,7 @@ End
|
||||
|
||||
|
||||
Style Keywords
|
||||
CopyStyle Terms
|
||||
CopyStyle CopyrightYear
|
||||
LatexName keywords
|
||||
LabelString "Keywords:"
|
||||
End
|
||||
@ -182,9 +210,9 @@ End
|
||||
|
||||
Style Acknowledgments
|
||||
CopyStyle Abstract
|
||||
LatexType Command
|
||||
LatexName acks
|
||||
Category BackMatter
|
||||
InTitle 0
|
||||
LabelBottomsep 0
|
||||
LabelType Top_Environment
|
||||
LabelString "Acknowledgments"
|
||||
|
@ -1181,13 +1181,21 @@ def revert_Argument_to_TeX_brace(document, line, n, nmax, environment):
|
||||
lineArg = find_token(document.body, "\\begin_inset Argument " + str(n), line)
|
||||
if lineArg != -1:
|
||||
beginPlain = find_token(document.body, "\\begin_layout Plain Layout", lineArg)
|
||||
endLayout = find_token(document.body, "\\end_layout", beginPlain)
|
||||
endInset = find_token(document.body, "\\end_inset", endLayout)
|
||||
# we have to assure that no other inset is in the Argument
|
||||
beginInset = find_token(document.body, "\\begin_inset", beginPlain)
|
||||
endInset = find_token(document.body, "\\end_inset", beginPlain)
|
||||
k = beginPlain + 1
|
||||
l = k
|
||||
while beginInset < endInset and beginInset != -1:
|
||||
beginInset = find_token(document.body, "\\begin_inset", k)
|
||||
endInset = find_token(document.body, "\\end_inset", l)
|
||||
k = beginInset + 1
|
||||
l = endInset + 1
|
||||
if environment == False:
|
||||
document.body[endLayout : endInset + 1] = put_cmd_in_ert("}{")
|
||||
document.body[endInset - 2 : endInset + 1] = put_cmd_in_ert("}{")
|
||||
del(document.body[lineArg : beginPlain + 1])
|
||||
else:
|
||||
document.body[endLayout : endInset + 1] = put_cmd_in_ert("}")
|
||||
document.body[endInset - 2 : endInset + 1] = put_cmd_in_ert("}")
|
||||
document.body[lineArg : beginPlain + 1] = put_cmd_in_ert("{")
|
||||
n = n + 1
|
||||
|
||||
@ -1257,8 +1265,12 @@ def convert_Argument_to_TeX_brace(document, line, n, nmax, environment):
|
||||
if bracePair == lineArg + 5 or bracePair == lineArg + 4:
|
||||
end = find_token(document.body, "\\end_inset", bracePair)
|
||||
document.body[lineArg : end + 1] = ["\\end_layout", "", "\\end_inset"]
|
||||
if n == 1:
|
||||
document.body[line + 1 : line + 1] = ["\\begin_inset Argument " + str(n), "status open", "", "\\begin_layout Plain Layout"]
|
||||
else:
|
||||
document.body[endn + 1 : endn + 1] = ["\\begin_inset Argument " + str(n), "status open", "", "\\begin_layout Plain Layout"]
|
||||
n = n + 1
|
||||
endn = end
|
||||
else:
|
||||
lineArg = lineArg + 1
|
||||
if environment == True and lineArg != -1:
|
||||
@ -1397,6 +1409,47 @@ def convert_IJMP(document):
|
||||
if i == -1:
|
||||
return
|
||||
|
||||
|
||||
def revert_SIGPLAN(document):
|
||||
" Reverts InsetArgument of MarkBoth to TeX-code "
|
||||
if document.textclass == "sigplanconf":
|
||||
i = 0
|
||||
j = 0
|
||||
while True:
|
||||
if i != -1:
|
||||
i = find_token(document.body, "\\begin_layout Conference", i)
|
||||
if i != -1:
|
||||
revert_Argument_to_TeX_brace(document, i, 1, 1, False)
|
||||
i = i + 1
|
||||
if j != -1:
|
||||
j = find_token(document.body, "\\begin_layout Author", j)
|
||||
if j != -1:
|
||||
revert_Argument_to_TeX_brace(document, j, 1, 2, False)
|
||||
j = j + 1
|
||||
if i == -1 and j == -1:
|
||||
return
|
||||
|
||||
|
||||
def convert_SIGPLAN(document):
|
||||
" Converts ERT of MarkBoth to InsetArgument "
|
||||
if document.textclass == "sigplanconf":
|
||||
i = 0
|
||||
j = 0
|
||||
while True:
|
||||
if i != -1:
|
||||
i = find_token(document.body, "\\begin_layout Conference", i)
|
||||
if i != -1:
|
||||
convert_Argument_to_TeX_brace(document, i, 1, 1, False)
|
||||
i = i + 1
|
||||
if j != -1:
|
||||
j = find_token(document.body, "\\begin_layout Author", j)
|
||||
if j != -1:
|
||||
convert_Argument_to_TeX_brace(document, j, 1, 2, False)
|
||||
j = j + 1
|
||||
if i == -1 and j == -1:
|
||||
return
|
||||
|
||||
|
||||
def revert_literate(document):
|
||||
" Revert Literate document to old format "
|
||||
if del_token(document.header, "noweb", 0):
|
||||
@ -1409,6 +1462,7 @@ def revert_literate(document):
|
||||
document.body[i] = "\\begin_layout Scrap"
|
||||
i = i + 1
|
||||
|
||||
|
||||
def convert_literate(document):
|
||||
" Convert Literate document to new format"
|
||||
i = find_token(document.header, "\\textclass", 0)
|
||||
@ -1429,6 +1483,7 @@ def convert_literate(document):
|
||||
document.body[i] = "\\begin_layout Chunk"
|
||||
i = i + 1
|
||||
|
||||
|
||||
def revert_itemargs(document):
|
||||
" Reverts \\item arguments to TeX-code "
|
||||
while True:
|
||||
@ -1446,6 +1501,7 @@ def revert_itemargs(document):
|
||||
document.body[lastlay + 1:lastlay + 1] = subst
|
||||
i = i + 1
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -1485,7 +1541,7 @@ convert = [
|
||||
[444, []],
|
||||
[445, []],
|
||||
[446, [convert_latexargs]],
|
||||
[447, [convert_IEEEtran, convert_AASTeX, convert_AGUTeX, convert_IJMP]],
|
||||
[447, [convert_IEEEtran, convert_AASTeX, convert_AGUTeX, convert_IJMP, convert_SIGPLAN]],
|
||||
[448, [convert_literate]],
|
||||
[449, []]
|
||||
]
|
||||
@ -1493,7 +1549,7 @@ convert = [
|
||||
revert = [
|
||||
[448, [revert_itemargs]],
|
||||
[447, [revert_literate]],
|
||||
[446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX, revert_IJMP]],
|
||||
[446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX, revert_IJMP, revert_SIGPLAN]],
|
||||
[445, [revert_latexargs]],
|
||||
[444, [revert_uop]],
|
||||
[443, [revert_biolinum]],
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX 2.0 created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 413
|
||||
#LyX 2.1 created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 449
|
||||
\begin_document
|
||||
\begin_header
|
||||
\textclass sigplanconf
|
||||
@ -13,13 +13,13 @@
|
||||
\font_roman default
|
||||
\font_sans default
|
||||
\font_typewriter default
|
||||
\font_math auto
|
||||
\font_default_family default
|
||||
\use_non_tex_fonts false
|
||||
\font_sc false
|
||||
\font_osf false
|
||||
\font_sf_scale 100
|
||||
\font_tt_scale 100
|
||||
|
||||
\graphics default
|
||||
\default_output_format default
|
||||
\output_sync 0
|
||||
@ -31,15 +31,21 @@
|
||||
\use_hyperref false
|
||||
\papersize default
|
||||
\use_geometry false
|
||||
\use_amsmath 1
|
||||
\use_esint 0
|
||||
\use_mhchem 1
|
||||
\use_mathdots 1
|
||||
\use_package amsmath 1
|
||||
\use_package amssymb 1
|
||||
\use_package esint 0
|
||||
\use_package mathdots 1
|
||||
\use_package mathtools 0
|
||||
\use_package mhchem 1
|
||||
\use_package undertilde 0
|
||||
\cite_engine basic
|
||||
\cite_engine_type numerical
|
||||
\biblio_style plain
|
||||
\use_bibtopic false
|
||||
\use_indices false
|
||||
\paperorientation portrait
|
||||
\suppress_date false
|
||||
\justification true
|
||||
\use_refstyle 0
|
||||
\index Index
|
||||
\shortcut idx
|
||||
@ -62,7 +68,7 @@
|
||||
|
||||
\begin_body
|
||||
|
||||
\begin_layout Title
|
||||
\begin_layout Standard
|
||||
\begin_inset Note Note
|
||||
status open
|
||||
|
||||
@ -90,40 +96,16 @@ http://wiki.lyx.org/Examples/AcmSigplan
|
||||
\end_layout
|
||||
|
||||
\begin_layout Conference
|
||||
PLDI ’05
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}{
|
||||
PLDI ’05
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
June 12--15, 2005, Chicago, Illinois, USA.
|
||||
\begin_inset Note Note
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
The Conference expects 2 infos that are separated by
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
|
||||
\series bold
|
||||
}{
|
||||
\series default
|
||||
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
in TeX code.
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout CopyrightYear
|
||||
@ -134,6 +116,34 @@ The Conference expects 2 infos that are separated by
|
||||
1-59593-057-4/05/0004
|
||||
\end_layout
|
||||
|
||||
\begin_layout TitleBanner
|
||||
Banner above paper title
|
||||
\begin_inset Note Note
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
is ignored unless document class option 'preprint' is used
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout PreprintFooter
|
||||
Short description of paper
|
||||
\begin_inset Note Note
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
is ignored unless document class option 'preprint' is used
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Title
|
||||
Example ACM Paper
|
||||
\begin_inset Foot
|
||||
@ -150,9 +160,23 @@ This work was supported by ...
|
||||
|
||||
\begin_layout Subtitle
|
||||
Subtitle
|
||||
\begin_inset Note Note
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
optional
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Author
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Suzi Smith
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
@ -168,23 +192,16 @@ and
|
||||
|
||||
Paul C.
|
||||
Anagnostopoulos
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Princeton University
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_inset Argument 2
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}{
|
||||
Princeton University
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
@ -199,19 +216,6 @@ status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
At least one autor is required.
|
||||
The Author field expects 3 infos that are separated by
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
|
||||
\series bold
|
||||
}{
|
||||
\series default
|
||||
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
in TeX code.
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
@ -220,17 +224,20 @@ At least one autor is required.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Author
|
||||
Fred Flymuffin
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}{
|
||||
Fred Flymuffin
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Argument 2
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Washington University in St.
|
||||
Louis
|
||||
\begin_inset Newline newline
|
||||
@ -246,12 +253,6 @@ Department of Electrical and Computer Engineering
|
||||
|
||||
St.
|
||||
Louis, XX 60616, USA
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
}{
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
@ -287,6 +288,9 @@ ed into hardware]
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Note Note
|
||||
status open
|
||||
|
||||
@ -350,7 +354,7 @@ Bla, bla
|
||||
\end_layout
|
||||
|
||||
\begin_layout Acknowledgments
|
||||
We would like to thank ...
|
||||
Acknowledgments, if needed.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
|
Loading…
Reference in New Issue
Block a user