The branch, master, has been updated. - Log -----------------------------------------------------------------
commit 13d8aee6099579f3090b827def471aaeffa492ba Author: Uwe Stöhr <uwesto...@lyx.org> Date: Mon Nov 26 05:19:47 2012 +0100 IJMPC/D: update layout and template files - add a mandatory argument - remove an optional argument that compiles, but would break the layout of the output completely (is also not documented nor explicitly defined) - also add a safe guard for the lyx2lyx conversion routines diff --git a/lib/layouts/ijmpc.layout b/lib/layouts/ijmpc.layout index 92d5ec9..7f2daea 100644 --- a/lib/layouts/ijmpc.layout +++ b/lib/layouts/ijmpc.layout @@ -67,6 +67,11 @@ Style MarkBoth Category FrontMatter InTitle 1 Align Center + Argument 1 + Mandatory 1 + LabelString "Author Names" + Tooltip "Author names that will appear in the header line" + EndArgument Font Size Small EndFont @@ -121,10 +126,6 @@ Style Author LatexType Command Category FrontMatter InTitle 1 - Argument 1 - LabelString "Author Option" - Tooltip "Optional argument for author" - EndArgument LatexName author LabelSep xxx ParSkip 0.4 @@ -298,8 +299,8 @@ Style RomanList LatexType Item_Environment LatexName romanlist Argument 1 - LabelString "RomanList Option" - Tooltip "Optional argument for RomanList" + LabelString "Numbering Scheme" + Tooltip "Use the largest item number in your list, e.g. '(iv)' for 4 Roman numbered items" EndArgument NextNoIndent 1 LeftMargin MMN diff --git a/lib/layouts/ijmpd.layout b/lib/layouts/ijmpd.layout index 7d089ed..b715a58 100644 --- a/lib/layouts/ijmpd.layout +++ b/lib/layouts/ijmpd.layout @@ -72,6 +72,11 @@ Style MarkBoth Category FrontMatter InTitle 1 Align Center + Argument 1 + Mandatory 1 + LabelString "Author Names" + Tooltip "Author names that will appear in the header line" + EndArgument Font Size Small EndFont @@ -126,10 +131,6 @@ Style Author LatexType Command Category FrontMatter InTitle 1 - Argument 1 - LabelString "Author Option" - Tooltip "Optional argument for author" - EndArgument LatexName author LabelSep xxx ParSkip 0.4 @@ -301,8 +302,8 @@ Style RomanList LatexType Item_Environment LatexName romanlist Argument 1 - LabelString "RomanList Option" - Tooltip "Optional argument for RomanList" + LabelString "Numbering Scheme" + Tooltip "Use the largest item number in your list, e.g. '(iv)' for 4 Roman numbered items" EndArgument NextNoIndent 1 LeftMargin MMN diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 15e176e..26e2131 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -1193,13 +1193,14 @@ def revert_Argument_to_TeX_brace(document, line, n, nmax, environment): def revert_IEEEtran(document): - ''' - Reverts InsetArgument of - Page headings - Biography - Biography without photo - to TeX-code - ''' + ''' + Reverts InsetArgument of + Page headings + Biography + Biography without photo + to TeX-code + ''' + if document.textclass == "IEEEtran": i = 0 j = 0 k = 0 @@ -1276,13 +1277,14 @@ def convert_Argument_to_TeX_brace(document, line, n, nmax, environment): def convert_IEEEtran(document): - ''' - Converts ERT of - Page headings - Biography - Biography without photo - to InsetArgument - ''' + ''' + Converts ERT of + Page headings + Biography + Biography without photo + to InsetArgument + ''' + if document.textclass == "IEEEtran": i = 0 j = 0 k = 0 @@ -1313,7 +1315,8 @@ def convert_IEEEtran(document): def revert_AASTeX(document): - " Reverts InsetArgument of Altaffilation to TeX-code " + " Reverts InsetArgument of Altaffilation to TeX-code " + if document.textclass == "aastex": i = 0 while True: if i != -1: @@ -1326,7 +1329,8 @@ def revert_AASTeX(document): def convert_AASTeX(document): - " Converts ERT of Altaffilation to InsetArgument " + " Converts ERT of Altaffilation to InsetArgument " + if document.textclass == "aastex": i = 0 while True: if i != -1: @@ -1339,7 +1343,8 @@ def convert_AASTeX(document): def revert_AGUTeX(document): - " Reverts InsetArgument of Author affiliation to TeX-code " + " Reverts InsetArgument of Author affiliation to TeX-code " + if document.textclass == "agutex": i = 0 while True: if i != -1: @@ -1352,7 +1357,8 @@ def revert_AGUTeX(document): def convert_AGUTeX(document): - " Converts ERT of Author affiliation to InsetArgument " + " Converts ERT of Author affiliation to InsetArgument " + if document.textclass == "agutex": i = 0 while True: if i != -1: @@ -1364,6 +1370,34 @@ def convert_AGUTeX(document): return +def revert_IJMP(document): + " Reverts InsetArgument of MarkBoth to TeX-code " + if document.textclass == "ijmpc" or document.textclass == "ijmpd": + i = 0 + while True: + if i != -1: + i = find_token(document.body, "\\begin_layout MarkBoth", i) + if i != -1: + revert_Argument_to_TeX_brace(document, i, 1, 1, False) + i = i + 1 + if i == -1: + return + + +def convert_IJMP(document): + " Converts ERT of MarkBoth to InsetArgument " + if document.textclass == "ijmpc" or document.textclass == "ijmpd": + i = 0 + while True: + if i != -1: + i = find_token(document.body, "\\begin_layout MarkBoth", i) + if i != -1: + convert_Argument_to_TeX_brace(document, i, 1, 1, False) + i = i + 1 + if i == -1: + return + + ## # Conversion hub # @@ -1403,11 +1437,11 @@ convert = [ [444, []], [445, []], [446, [convert_latexargs]], - [447, [convert_IEEEtran, convert_AASTeX, convert_AGUTeX]] + [447, [convert_IEEEtran, convert_AASTeX, convert_AGUTeX, convert_IJMP]] ] revert = [ - [446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX]], + [446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX, revert_IJMP]], [445, [revert_latexargs]], [444, [revert_uop]], [443, [revert_biolinum]], diff --git a/lib/templates/IJMPC.lyx b/lib/templates/IJMPC.lyx index f10b081..522fc91 100644 --- a/lib/templates/IJMPC.lyx +++ b/lib/templates/IJMPC.lyx @@ -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 447 \begin_document \begin_header \textclass ijmpc @@ -12,13 +12,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 @@ -30,15 +30,21 @@ \use_hyperref false \papersize default \use_geometry false -\use_amsmath 0 -\use_esint 0 -\use_mhchem 1 -\use_mathdots 1 +\use_package amsmath 0 +\use_package amssymb 0 +\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 @@ -128,13 +134,11 @@ Default \end_layout \begin_layout MarkBoth -Authors' Names -\begin_inset ERT -status collapsed +\begin_inset Argument 1 +status open \begin_layout Plain Layout - -}{ +Authors' Names \end_layout \end_inset @@ -333,8 +337,6 @@ Capitalize the first letter of the first word only. \end_layout \begin_layout Subsection - -\backslash Lists of items \end_layout @@ -355,7 +357,7 @@ Items may also be numbered in lowercase roman numerals: \end_layout \begin_layout RomanList -\begin_inset Argument +\begin_inset Argument 1 status open \begin_layout Plain Layout @@ -373,7 +375,7 @@ item two \begin_deeper \begin_layout RomanList -\begin_inset Argument +\begin_inset Argument 1 status open \begin_layout Plain Layout @@ -674,7 +676,7 @@ status collapsed \begin_inset Tabular <lyxtabular version="3" rows="4" columns="3"> -<features tabularvalignment="middle"> +<features rotate="0" tabularvalignment="middle"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> diff --git a/lib/templates/IJMPD.lyx b/lib/templates/IJMPD.lyx index 499c581..3874b12 100644 --- a/lib/templates/IJMPD.lyx +++ b/lib/templates/IJMPD.lyx @@ -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 447 \begin_document \begin_header \textclass ijmpd @@ -12,13 +12,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 @@ -30,15 +30,21 @@ \use_hyperref false \papersize default \use_geometry false -\use_amsmath 0 -\use_esint 0 -\use_mhchem 1 -\use_mathdots 1 +\use_package amsmath 0 +\use_package amssymb 0 +\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 @@ -128,13 +134,11 @@ Default \end_layout \begin_layout MarkBoth -Authors' Names -\begin_inset ERT -status collapsed +\begin_inset Argument 1 +status open \begin_layout Plain Layout - -}{ +Authors' Names \end_layout \end_inset @@ -359,7 +363,7 @@ Items may also be numbered in lowercase roman numerals: \end_layout \begin_layout RomanList -\begin_inset Argument +\begin_inset Argument 1 status open \begin_layout Plain Layout @@ -377,7 +381,7 @@ item two \begin_deeper \begin_layout RomanList -\begin_inset Argument +\begin_inset Argument 1 status open \begin_layout Plain Layout @@ -674,7 +678,7 @@ status collapsed \begin_inset Tabular <lyxtabular version="3" rows="4" columns="3"> -<features tabularvalignment="middle"> +<features rotate="0" tabularvalignment="middle"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> <column alignment="center" valignment="top" width="0"> ----------------------------------------------------------------------- Summary of changes: lib/layouts/ijmpc.layout | 13 ++++---- lib/layouts/ijmpd.layout | 13 ++++---- lib/lyx2lyx/lyx_2_1.py | 74 +++++++++++++++++++++++++++++++++------------ lib/templates/IJMPC.lyx | 36 ++++++++++++---------- lib/templates/IJMPD.lyx | 34 ++++++++++++--------- 5 files changed, 106 insertions(+), 64 deletions(-) hooks/post-receive -- The LyX Source Repository