On 2016-04-07, Scott Kostyshak wrote:
> On Thu, Apr 07, 2016 at 08:19:59AM +0000, Guenter Milde wrote:
>> On 2016-04-07, Scott Kostyshak wrote:

>> Still, the noncontroversial patch for aastex was put on hold.     

> Please commit that. Thanks for the patch.

Here is the complete patch. OK so?

Günter



>From 2871361a8bf2cd1506781043a5add9975443828f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Milde?= <mi...@lyx.org>
Date: Fri, 8 Apr 2016 13:36:46 +0200
Subject: [PATCH] New layout for aastex6.cls. Fixes #10027.

Some more work for new and improved styles optional.
---
 development/autotests/unreliableTests |  11 ++-
 lib/Makefile.am                       |   1 +
 lib/doc/LaTeXConfig.lyx               |  47 +++++++--
 lib/examples/aas_sample.lyx           | 179 ++++++++++++++++++++--------------
 lib/layouts/aastex.layout             |   8 +-
 lib/layouts/aastex6.layout            | 111 +++++++++++++++++++++
 lib/templates/aastex.lyx              | 104 +++++++++++++++++++-
 7 files changed, 374 insertions(+), 87 deletions(-)
 create mode 100644 lib/layouts/aastex6.layout

diff --git a/development/autotests/unreliableTests 
b/development/autotests/unreliableTests
index dc361ce..ee18fe1 100644
--- a/development/autotests/unreliableTests
+++ b/development/autotests/unreliableTests
@@ -60,11 +60,12 @@ Sublabel: varying_versions
 # ========================
 # Test depending on TeX distribution, package versions or OS
 
-# document class aastex.cls replaced by aastex6.cls
-# (in CTAN and TL 2015-update around march 2016)
-# New layout required, see #10027
-export/templates/aastex.*
-export/examples/aas_sample.*
+# document class aastex.cls replaced by aastex6.cls (v.1 2016/02/16)
+# in CTAN and TeXLive in march 2016
+# Template and sample use the new version via aastex6.layout (cf. #10027)
+# -> fail if aastex6.cls is missing (TeXLive15 original)
+export/templates/aastex_(dvi|pdf).*
+export/examples/aas_sample_(dvi|pdf).*
 
 
 Sublabel: wrong_output
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 80463f4..cdad5cd 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1966,6 +1966,7 @@ dist_layouts_DATA =\
        layouts/aapaper.inc \
        layouts/aapaper.layout \
        layouts/aastex.layout \
+       layouts/aastex6.layout \
        layouts/achemso.layout \
        layouts/acm-sigs.layout \
        layouts/acm-sigs-alt.layout \
diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx
index 5aacab1..3c55b99 100644
--- a/lib/doc/LaTeXConfig.lyx
+++ b/lib/doc/LaTeXConfig.lyx
@@ -2291,21 +2291,39 @@ arg   "aastex"
 \end_layout
 
 \begin_layout Description
-CTAN: N/A (available from the American Astronomical Society's ftp site 
-\family typewriter
-ftp.aas.
-\family default
-org in directory 
+CTAN: N/A 
+\end_layout
+
+\begin_layout Description
+Notes: Obsoleted by aastex6.
+\end_layout
+
+\begin_layout Subsection
+aastex6
+\end_layout
+
+\begin_layout Description
+Found: 
+\begin_inset Info
+type  "textclass"
+arg   "aastex"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN: 
 \family typewriter
-/pub
+/macros/latex/contrib/aastex
 \family default
-s)
+ 
 \end_layout
 
 \begin_layout Description
 Notes: The document class 
 \family sans
-aastex
+aastex6
 \family default
  can be used to write articles for submission to the American journals 
 \emph on
@@ -2316,6 +2334,19 @@ Astrophysical Journal, Astronomical Journal
 Publications of the Astronomical Society of the Pacific
 \emph default
 .
+ Package and documentation are also available from the American Astronomical
+ Society 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+http://journals.aas.org/authors/aastex/aastex.html
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Subsection
diff --git a/lib/examples/aas_sample.lyx b/lib/examples/aas_sample.lyx
index 3d2aa78..9cca717 100644
--- a/lib/examples/aas_sample.lyx
+++ b/lib/examples/aas_sample.lyx
@@ -4,7 +4,7 @@
 \begin_header
 \save_transient_properties true
 \origin /systemlyxdir/examples/
-\textclass aastex
+\textclass aastex6
 \begin_preamble
 \newcommand{\vdag}{(v)^\dagger}
 \newcommand{\myemail}{skywal...@galaxy.far.far.away}
@@ -70,14 +70,103 @@
 \papersides 1
 \paperpagestyle default
 \tracking_changes false
+\output_changes false
 \html_math_output 0
 \html_css_as_file 0
-\output_changes false
 \html_be_strict false
 \end_header
 
 \begin_body
 
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align left
+Sample document for contributions to journals of the American Astronomical
+ Society (AAS).
+ Please consult the 
+\begin_inset CommandInset href
+LatexCommand href
+name "AASTeX user guide"
+target "http://journals.aas.org/authors/aastex/aasguide.html";
+
+\end_inset
+
+ for details on how to use AASTeX.
+ 
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align left
+An up-to-date sample LaTeX article using AASTeX is available under 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+http://journals.aas.org/authors/aastex/aastex.html#_download
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align left
+The AASTeX document class uses a different name since version 6.0 (2016/02/16).
+ Depending on the version installed on your system, set the document class
+ to American Astronomical Society (AASTeX v.
+ 6) or American Astronomical Society (AASTeX v.
+ 5).
+ 
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align left
+New features (cf.
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://journals.aas.org/authors/aastex/revisionhistory.html
+\end_layout
+
+\end_inset
+
+) are only partially supported by LyX (see 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://www.lyx.org/trac/ticket/10027
+\end_layout
+
+\end_inset
+
+).
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Title
 Collapsed Cores in Globular Clusters,  Gauge-Boson Couplings, and 
AAS\SpecialChar TeX
  Examples
@@ -794,6 +883,12 @@ status collapsed
 \end_inset
 
 .
+ 
+\end_layout
+
+\begin_layout Software
+IRAF, AIPS, Astropy, ...
+ 
 \end_layout
 
 \begin_layout Appendix
@@ -2368,57 +2463,13 @@ tablerefs to append a list of references.
 \end_layout
 
 \begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-% LyX can load deluxetable files verbatim.
- To see this in action, uncomment the following
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-% line (delete the 
-\end_layout
-
-\end_inset
-
-
-\begin_inset Quotes eld
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-%
-\end_layout
-
-\end_inset
-
-
-\begin_inset Quotes erd
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
+\begin_inset Note Note
+status open
 
 \begin_layout Plain Layout
-
-) and copy the file table.tex from the AASTeX 5.0 distribution into
+LyX can load deluxetable files verbatim.
+ To see this in action, dissolve the following Note and copy the file table.tex
+ from the AASTeX 5.0 distribution into the same directory as this file.
 \end_layout
 
 \end_inset
@@ -2427,35 +2478,19 @@ status collapsed
 \end_layout
 
 \begin_layout Standard
-\begin_inset ERT
-status collapsed
+\begin_inset Note Note
+status open
 
 \begin_layout Plain Layout
-
-% the same directory as this file.
-\end_layout
+\begin_inset CommandInset include
+LatexCommand input
+filename "table"
 
 \end_inset
 
 
 \end_layout
 
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-%
-\end_layout
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "table"
-
 \end_inset
 
 
diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index b67c6ac..f72ded3 100644
--- a/lib/layouts/aastex.layout
+++ b/lib/layouts/aastex.layout
@@ -1,7 +1,9 @@
 #% Do not delete the line below; configure depends on this
-#  
\DeclareLaTeXClass[aastex,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American
 Astronomical Society (AASTeX)}
+#  
\DeclareLaTeXClass[aastex,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American
 Astronomical Society (AASTeX v. 5)}
 #  \DeclareCategory{Articles}
 #
+# LyX support for the AAS TeX package http://www.ctan.org/pkg/aastex
+#
 # Author: Mike Ressler <mike.ress...@alum.mit.edu>
 # Author: Uwe Stöhr <uwesto...@web.de>
 #
@@ -35,6 +37,10 @@
 # Version 1.5   26/11/12 - added mandatory argument for \altaffiltext
 # Version 1.6   23/01/15 - fix for the optional argument of \figcaption
 
+# Note: aastex.cls was replaced by aastex6.cls (v.1 2016/02/16)
+#      in the CTAN and TeXLive "aastex" package in march 2016.
+#      The new "aastex6.layout" depends on aastex6.cls but inputs this
+#       file for the definitions (cf. LyX ticket #10027)
 
 Format 60
 Columns                        1
diff --git a/lib/layouts/aastex6.layout b/lib/layouts/aastex6.layout
new file mode 100644
index 0000000..e2038df
--- /dev/null
+++ b/lib/layouts/aastex6.layout
@@ -0,0 +1,111 @@
+#% Do not delete the line below; configure depends on this
+#\DeclareLaTeXClass[aastex6,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American
 Astronomical Society (AASTeX v. 6)}
+#  \DeclareCategory{Articles}
+#
+# LyX support for the AAS TeX package http://www.ctan.org/pkg/aastex
+#
+# Author: Mike Ressler <mike.ress...@alum.mit.edu>
+# Author: Uwe Stöhr <uwesto...@web.de>
+#
+# Disclaimer: Though I am an astronomer at the Jet Propulsion Laboratory, this
+# package was prepared on my own time on my own machine. Neither the United
+# States government, the National Aeronautics and Space Administration, the
+# California Institute of Technology, the American Astronomical Society, nor
+# the Jet Propulsion Laboratory endorse this package - indeed, they probably
+# don't even know of it's existence. Use of this package is covered by the LyX
+# license which is found in the file COPYING in the root directory of the LyX
+# distribution.
+#
+# Version 0.0   5/27/99  - Initial submission, basic LaTeX equivalents
+# Version 0.1   6/04/99  - Most everything in sections 2.1-2.11 of AASTeX guide
+#                          works. References work with some ERT. Regular tables
+#                          (2.14) okay, deluxetable will never be supported.
+#                          Figures (2.13) not even attempted yet. Misc (2.15)
+#                          partially supported, but much will remain ERT.
+#                          Style options (section 3) can be typed into Extra
+#                          Document options.
+#                          Much cleaning of this file needs to be done.
+# Version 1.0   6/09/99  - Implemented remaining commands as well as possible.
+#                          There is little more I can do unless LyX source code
+#                          is changed. (Not by me!) Documentation, template, 
and
+#                          example files are available.
+# Version 1.1   7/25/99  - Changed \url to take advantage of new layout option.
+# Version 1.2   4/18/02  - Updated for natbib in 1.2.0
+# Version 1.3   5/7/04   - Updated for AASTeX 5.2
+# Version 1.4   26/10/08 - new custom insets for \altaffilmark, \tablenotemark
+#                        - new environments for \altaffiltext and 
\tablenotetext
+# Version 1.5   26/11/12 - added mandatory argument for \altaffiltext
+# Version 1.6   23/01/15 - fix for the optional argument of \figcaption
+#
+# Version 6.0   31/03/16 - Stub for AASTeX 6.0:
+#                         new layout file aastex6.layout, because
+#                         aastex.cls was renamed to aastex6.cls (2016/02/16)
+#                         (cf. LyX ticket #10027)
+#
+# TODO: - support for new commands (see below)
+#       - aastex6.cls loads hyperref (with pre-set options) and url
+#         -> option clash if "Use Hyerref" is selected in Document>Settings
+
+Format 60
+
+Input aastex.layout
+
+
+# For new and updated commands, see
+# http://journals.aas.org/authors/aastex/revisionhistory.html
+
+## New commands:
+
+Style Software
+       CopyStyle       Keywords
+       LatexName       software
+       Margin          Static
+       LeftMargin      M
+       TopSep          0.7
+       LabelType       Above
+       LabelString     "Software:"
+       LabelFont
+         Shape         Italic
+       EndFont
+
+End
+
+# other new commands are mainly for the user preamble
+
+## Updated commands:
+
+# TODO: dataset should become an inset similar to hyperref:
+#
+#   Use the \dataset command to link to data sets hosted externally
+#   such as the DOI issuing Zenodo repository.
+#
+#      \dataset[text]{url}
+#
+#   Where url is the URL link to the data. The bracketed argument is optional.
+#   When present the given text is used as the displayed hyperlink otherwise
+#   [DATASET] is printed.
+
+
+# Fixes for aastex.layout
+
+# TODO: first/second arg for tablenotetext to replace ERT "}{"
+#       Show "figcaption" label instead of "Senseless!!!"
+
+# match label to output
+Style Appendix
+       Margin          Static
+#      LeftMargin      ""
+       LabelType       Centered
+       LabelString     "APPENDIX"
+End
+
+Style TableRefs
+       LabelString     "References—"
+       LabelFont
+         Series        Bold
+       EndFont
+End
+
+Style TableComments
+       LabelString     "Note—"
+End
diff --git a/lib/templates/aastex.lyx b/lib/templates/aastex.lyx
index b5c5998..eea5564 100644
--- a/lib/templates/aastex.lyx
+++ b/lib/templates/aastex.lyx
@@ -4,7 +4,7 @@
 \begin_header
 \save_transient_properties true
 \origin /systemlyxdir/templates/
-\textclass aastex
+\textclass aastex6
 \begin_preamble
 \slugcomment{}
 \shorttitle{}
@@ -76,6 +76,108 @@
 
 \begin_body
 
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align left
+Template for contributions to journals of the American Astronomical Society
+ (AAS).
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align left
+Please consult the 
+\begin_inset CommandInset href
+LatexCommand href
+name "AASTeX user guide"
+target "http://journals.aas.org/authors/aastex/aasguide.html";
+
+\end_inset
+
+ for details on how to use AASTeX.
+ 
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align left
+A LyX sample document is available under 
+\family sans
+File>Open>Examples>aas_sample.lyx
+\family default
+.
+ An up-to-date sample LaTeX article using AASTeX is available under 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+http://journals.aas.org/authors/aastex/aastex.html#_download
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align left
+The AASTeX document class uses a different name since version 6.0 (2016/02/16).
+ Depending on the version installed on your system, set the document class
+ to American Astronomical Society (AASTeX v.
+ 6) or American Astronomical Society (AASTeX v.
+ 5).
+ 
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align left
+New features (cf.
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://journals.aas.org/authors/aastex/revisionhistory.html
+\end_layout
+
+\end_inset
+
+) are only partially supported by LyX (see 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://www.lyx.org/trac/ticket/10027
+\end_layout
+
+\end_inset
+
+).
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Title
 <Paper Title>
 \end_layout
-- 
2.7.0


Reply via email to