Dear LyXers,

the following patch makes the aastex example and template compilable with an
up-to-date TeXLive.

This is a partiall fix for #10027 and should suffice for 2.2.

TODO:
- support for new commands  (see 
http://journals.aas.org/authors/aastex/revisionhistory.html)
- aastex6.cls loads hyperref (with pre-set options) and url
  -> option clash if "Use Hyerref" is ticket in Document>Settings

OK to commit?


Günter




>From 59e182292b0a0a3f9350274888719ce8ec01ac1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Milde?= <mi...@lyx.org>
Date: Thu, 31 Mar 2016 12:55:48 +0200
Subject: [PATCH] Partial fix for #10027: Stub layout file aastex6.layout

The new layout file inputs loads aastex.layout but provides a new 
document class AASTeX (v. 6) loading aastex6.cls.

Updated template and example to use the new class. 
Added notes about the document class versions.
Updated comment in autotest categorization file.

TODO:
- support for new commands  (see 
http://journals.aas.org/authors/aastex/revisionhistory.html)
- aastex6.cls loads hyperref (with pre-set options) and url
  -> option clash if "Use Hyerref" is ticket in Document>Settings
---
 development/autotests/unreliableTests |   9 +--
 lib/examples/aas_sample.lyx           |  93 ++++++++++++++++++++++++++++-
 lib/layouts/aastex.layout             |   8 ++-
 lib/layouts/aastex6.layout            |  52 +++++++++++++++++
 lib/templates/aastex.lyx              | 106 +++++++++++++++++++++++++++++++++-
 5 files changed, 259 insertions(+), 9 deletions(-)
 create mode 100644 lib/layouts/aastex6.layout

diff --git a/development/autotests/unreliableTests 
b/development/autotests/unreliableTests
index dc361ce..589be91 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)
+# document class aastex.cls replaced by aastex6.cls (v.1 2016/02/16)
+# in CTAN and TeXLive in march 2016
 # New layout required, see #10027
-export/templates/aastex.*
-export/examples/aas_sample.*
+# works with the new version after adding/using aastex6.layout:
+export/templates/aastex_(dvi|pdf).*
+export/examples/aas_sample_(dvi|pdf).*
 
 
 Sublabel: wrong_output
diff --git a/lib/examples/aas_sample.lyx b/lib/examples/aas_sample.lyx
index 24535ce..fe04e51 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
diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index 83f3cd3..243717d 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 59
 Columns                        1
diff --git a/lib/layouts/aastex6.layout b/lib/layouts/aastex6.layout
new file mode 100644
index 0000000..0d4d774
--- /dev/null
+++ b/lib/layouts/aastex6.layout
@@ -0,0 +1,52 @@
+#% 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 http://journals.aas.org/authors/aastex/revisionhistory.html)
+#       - aastex6.cls loads hyperref (with pre-set options) and url
+#         -> option clash if "Use Hyerref" is ticket in Document>Settings
+
+Format 59
+
+Input aastex.layout
diff --git a/lib/templates/aastex.lyx b/lib/templates/aastex.lyx
index 8c9055e..c7987cb 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
@@ -270,7 +372,7 @@ key "ref1"
 
 Author, A., 
 \begin_inset ERT
-status collapsed
+status open
 
 \begin_layout Plain Layout
 
-- 
2.7.0


Reply via email to