#% Do not delete the line below; configure depends on this
#\DeclareLaTeXClass[aastex631,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American Astronomical Society (AASTeX v. 6.3.1)}
#  \DeclareCategory{Articles}
#
# LyX support for the AAS TeX package http://www.ctan.org/pkg/aastex
#
# Author: Mike Ressler <mike.ressler@alum.mit.edu>
# Author: Uwe Stöhr <uwestoehr@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)
#
# Version 6.2   14/08/18 - Stub for AASTeX 6.2:
#                          new layout file aastex62.layout, because
#                          aastex6.cls was renamed to aastex62.cls (2017/10/16)
#
# Version 6.3   04/03/24 - Stub for AASTeX 6.31:
#                          new layout file aastex631.layout, because
#                          aastex62.cls was renamed to aastex631.cls (2021/09/16)
#                        - Change Acknowledgments style to environment. See
#                          https://journals.aas.org/aastexguide/#acknowledgments
##
# TODO: - support for new commands (see below)
#       - aastex6.cls loads hyperref (with pre-set options) and url
#         -> option clash if "Use Hyperref" is selected in Document>Settings
# support for new commands in aastex 6.3 and aastex 6.31 versions
# string freeze for lyx-2.4.0, must be done for lyx-2.4.1
#       - in DocBook, the appendix is not output (not a standard LyX appendix
#         separator (needs a layout update)
#       - in DocBook, the "Software" part should really be a section on its own,
#         but that would require a way to provide the section title within the
#         layout (needs a layout update)
#       - in DocBook, the table notes are not supported at all (move the remarks
#         into the table cells instead of outputting tablenotemark in the cells?)

Format 104

Provides hyperref 1

Preamble
	\newcommand{\vdag}{(v)^\dagger}
	\newcommand\aastex{AAS\TeX}
EndPreamble

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
	DocBookTag      remark
	DocBookAttr     role='software'
	# Override what's taken from Keywords, but not really wanted.
	DocBookWrapperTag   NONE
	DocBookInInfo       never
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

# Added for aastex62

Style Corresponding_Author
	Category        FrontMatter
	LatexType       Command
	LatexName       correspondingauthor
	LabelType       Static
	Margin          Dynamic
	LabelString     "Corresponding author:"
	LabelSep        "x"
End

Style Keywords
	LabelString     "Keywords:"
End

Style Email
	Align           Left
	Font
		Shape           Up
		Color           textlabel1
		Size            Small
	EndFont
End

Style Author
	LabelType       Static
	LabelString     "Author:"
	LabelFont
		Shape           Italic
		Color           textlabel2
	EndFont
	Argument 1
		LabelString     ORCID
		ToolTip         "Enter the 16 digit ORCID as xxxx-xxxx-xxxx-xxxx"
		# TODO: In DocBook, this cannot be in the <personname>, it must be directly within <author>.
	EndArgument
	Align           Center
	Margin          Dynamic
	DocBookTag            personname
	DocBookTagType        paragraph
	DocBookWrapperTag     author
	DocBookWrapperTagType inline
	DocBookInInfo         always
End

Style Affiliation
	LabelType       Static
	Margin          Dynamic
	LabelString     "Affiliation:"
	LatexName       affiliation
	LabelSep        "x"
	LabelFont
		Shape           Italic
		Color           textlabel2
	EndFont
	Align           Center
End

Style Collaboration
	Category        FrontMatter
	LatexType       Command
	LatexName       collaboration
	
	LabelType       Static
	Margin          Dynamic
	LabelString     "Collaboration:"
	LabelSep        "x"
	LabelFont
		Shape           Italic
		Color           textlabel2
	EndFont
	Align           Center
End

Style Nocollaboration
	Category        FrontMatter
	LatexType       Command
	LatexName       nocollaboration
	LabelType       Static
	Align           Center
	Margin          Dynamic
	LabelString     "No collaboration"
	KeepEmpty       1
	LabelSep        "x"
	LabelFont
		Shape           Italic
		Color           textlabel2
	EndFont
End

Style Altaffilation
	LatexName       altaffiliation
	ResetArgs       1
	Align           Center
End

Style Acknowledgments
	LatexType        Environment
	Font
		Shape           Up
	EndFont
	LabelType           Above
	Margin              Static
	LabelFont
		Color           textlabel2
	EndFont
	DocBookTag          para
	DocBookWrapperTag   acknowledgements
	DocBookSection      true
End

Counter appendix
	GuiName Appendix
	Within          "none"
End

Style Section_Appendix
	CopyStyle       Section
	Category        Appendix
	LabelCounter    appendix
	LabelString     "\Alph{appendix}."
	Font
		Series          Medium
		Shape           Up
	EndFont
End

Counter subappendix
	GuiName Subappendix
	Within          "appendix"
End

Style Subsection_Appendix
	CopyStyle       Subsection
	Category        Appendix
	LabelCounter    subappendix
	LabelString     "\Alph{appendix}\arabic{subappendix}."
	Font
		Series          Medium
		Shape           Italic
	EndFont
End

Counter subsubappendix
	GuiName Subsubappendix
	Within          subappendix
End

Style Subsubsection_Appendix
	CopyStyle       Subsubsection
	Category        Appendix
	LabelCounter    subsubappendix
	LabelString     "\Alph{appendix}\arabic{subappendix}.\arabic{subsubappendix}."
	Font
		Series          Medium
	EndFont
End

NoStyle         And
NoInsetLayout   Flex:altaffilmark
