Re: Elsevier's cas layouts
"Jürgen Spitzmüller" <[email protected]> Fri, 03 Jul 2026 17:03:59 +0200
| Newsgroups | gmane.editors.lyx.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch, dem 20.05.2026 um 16:15 +0200 schrieb Marco Morandini:
> 1) is required because otherwise the table caption is not aligned
> with the table.
> However, if one sets any option (e.g. table placement) by right-click
> onto the Table inset
> then the Argument trick does not work.
>
> Is there a better way to deal with this?
Yes:
InsetLayout Flex:Table_Options
LyXType custom
Decoration classic
LabelString "Table Options"
MenuString "Table Options|O"
PassThru 1
LatexType command
LatexName SetKeys[cas/tbl]
LabelFont
Family Roman
Color red
EndFont
ResetsFont 0
MultiPar 0
End
With this you can specify the options (outside the float) via
\SetKeys[cas/tbl]{<options>} (which is what the class internally does
as well, only with global effect)
I have (after a while, sorry for that) had a closer look at the layout
and only did a couple of polishments and minor fixes. See attachments.
I can include this in LyX (master) if you provide us with a license
agreement message to this list similar to this one:
https://marc.info/?l=lyx-devel&m=174757439207494
--
Jürgen
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel
cas-common.inc
(text/plain, 18.5 KB)
# cas-common.inc
# Shared layout definitions for Elsevier CAS templates (cas-sc / cas-dc).
# Do NOT use this file directly; it is Input'd by cas-sc.layout and cas-dc.layout.
#
# Covers all commands and environments from cas-common.sty v2.4 (2024/05/04):
# Titles (all modes), Authors (full key-value signature), Affiliations,
# Abstract, Keywords, Classifications (MSC/JEL/PACS), Date history,
# Highlights, Graphical Abstract, CRediT contributions, Biography, Bibliography.
Format 111
Input stdclass.inc
Provides hyperref 1
Provides graphicx 1
Provides xparse 1
Provides etoolbox 1
Provides booktabs 1
Provides makecell 1
Provides multirow 1
Provides colortbl 1
Provides dcolumn 1
Provides stfloats 1
Provides xspace 1
Provides xstring 1
Provides footmisc 1
Provides xcolor 1
NoStyle Chapter
NoCounter chapter
NoStyle Chapter*
# ======================================================================
# TITLE
# \title[mode=title|alt|sub|trans|transsub|ascii]{Title text}
# Can also pass: size, shape, weight, color, before, after, align.
# ======================================================================
Style Title
Margin Static
LatexType Command
LatexName title
Category FrontMatter
InTitle 1
ResetArgs 1
ParSkip 0.4
ItemSep 0
TopSep 0
BottomSep 1
ParSep 1
Align Left
LabelType No_Label
Argument 1
LabelString "Title options"
Tooltip "Key-value options, e.g. mode=title (default)|alt|sub|trans|transsub|ascii. Also accepts: size, shape, weight, color, before, after, align."
Mandatory 0
EndArgument
Font
Size Largest
EndFont
HTMLTitle true
DocBookTag title
DocBookTagType paragraph
DocBookInInfo maybe
End
# Alternate title — shortcut for \title[mode=alt]{...}
Style "Alt Title"
CopyStyle Title
LatexParam [mode=alt]
ResetArgs 1
Margin Dynamic
LabelType Static
#LabelSep xx
LabelString "Alt Title:"
ParSkip 0.4
Font
Size Larger
EndFont
LabelFont
Color textlabel2
Size small
Series Bold
EndFont
End
# Subtitle — shortcut for \title[mode=sub]{...}
Style "Sub Title"
CopyStyle "Alt Title"
LatexParam [mode=sub]
LabelString "Sub Title:"
Font
Size Larger
EndFont
LabelFont
Color textlabel2
Size small
Series Bold
EndFont
End
# Translated title — shortcut for \title[mode=trans]{...}
Style "Trans Title"
CopyStyle "Alt Title"
LatexParam [mode=trans]
LabelString "Trans Title:"
Font
Size Normal
EndFont
LabelFont
Color textlabel2
Size small
Series Bold
EndFont
End
# Translated subtitle — shortcut for \title[mode=transsub]{...}
Style "Trans Sub Title"
CopyStyle "Alt Title"
LatexParam [mode=transsub]
LabelString "Trans Sub Title:"
Font
Size Small
EndFont
LabelFont
Color textlabel2
Size small
Series Bold
EndFont
End
# ASCII title (metadata / submission systems) — \title[mode=ascii]{...}
Style "ASCII Title"
CopyStyle "Alt Title"
LatexParam [mode=ascii]
LabelString "ASCII Title:"
Font
Family Typewriter
Size Small
EndFont
LabelFont
Color textlabel2
Size small
Series Bold
EndFont
End
# Title note mark — inline inset inside the Title paragraph
# \tnotemark[t1,t2]
InsetLayout "Flex:Title Note Mark"
LyxType custom
LatexType command
#ForcePlain 1
LatexName tnotemark
Argument 1
LabelString "List of title note marks"
Tooltip "Comma-separed integers ids of Title Notes, e.g. 1,2"
Mandatory 1
LeftDelim "["
RightDelim "]"
AutoInsert 1
EndArgument
LabelString "Title Note Mark"
Font
Color foreground
Size Small
Family Roman
Shape Up
Series Medium
Misc No_Emph
Misc No_Noun
Misc No_Bar
EndFont
LabelFont
Color textlabel2
Size Small
EndFont
End
# Title footnote text — \tnotetext[label]{text}
Style "Title Note"
Margin Dynamic
LatexType Command
LatexName tnotetext
Category FrontMatter
InTitle 1
Argument 1
LabelString "Note Label"
Tooltip "Label key for this title footnote (e.g. t1, t2, t3), referenced via the Title Note Mark inset in the title"
Mandatory 0
EndArgument
ParSkip 0.4
BottomSep 0.5
Align Left
LabelSep xx
LabelType Static
LabelString "Title Note:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# ======================================================================
# AUTHORS
# \author[aff-ref-list]{Full Name}[key=value options]
#
# Affil. refs (Arg 1): comma-separated labels matching \address / \affiliation
# Author options (post-Arg 1): orcid, degree, role, prefix, suffix,
# style=chinese, deceased=true, collab=true, type=editor|collab|anon,
# twitter, facebook, linkedin, gplus
# ======================================================================
Style Author
Margin Static
LatexType Command
LatexName author
Category FrontMatter
InTitle 1
Argument 1
LabelString "Affil. ref(s)"
Tooltip "Comma-separated label(s) of affiliated address(es) as defined with \\address or \\affiliation (e.g. a1,a2)"
Mandatory 0
EndArgument
Argument post:1
LabelString "Author options"
Tooltip "Key-value options (comma-separated):\n orcid=0000-0000-0000-0000\n degree=PhD\n role=Lead Author\n prefix=Prof.\n suffix=Jr.\n style=chinese\n deceased=true\n collab=true\n type=editor|collab|anon\n twitter=handle\n facebook=id\n linkedin=id\n gplus=id"
Mandatory 0
EndArgument
ParSkip 0.4
TopSep 2.3
BottomSep 0.7
Align Left
LabelType No_Label
Font
Size Large
EndFont
DocBookTag personname
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperTagType block
DocBookInInfo always
End
# Standalone author footnote mark — must be its own paragraph after \author{}
# so LyX emits \fnmark[...] outside \author{...}.
Style "Author Note Mark"
Margin Dynamic
LatexType Command
LatexName fnmark
Category FrontMatter
InTitle 1
KeepEmpty 1
Argument 1
LabelString "Author note marks"
Tooltip "Integers ids of Author Notes, e.g. 1 or 1,2"
Mandatory 1
LeftDelim "["
RightDelim "]"
AutoInsert 1
EndArgument
ParSkip 0.2
Align Left
LabelSep xx
LabelType Static
LabelString "Author Note Mark:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# Standalone corresponding author mark — must be its own paragraph after
# \author{} so LyX emits \cormark[...] outside \author{...}.
Style "Corresponding Author Mark"
Margin Dynamic
LatexType Command
LatexName cormark
Category FrontMatter
InTitle 1
KeepEmpty 1
Argument 1
LabelString "Corresponding author mark"
Tooltip "Integer ids of Corresponding Author, e.g. 1"
Mandatory 1
LeftDelim "["
RightDelim "]"
AutoInsert 1
EndArgument
ParSkip 0.2
Align Left
LabelSep xx
LabelType Static
LabelString "Cor. Author Mark:"
LabelFont
Color textlabel1
Series Bold
EndFont
End
# Author footnote text — \fntext[label]{text}
Style "Author Note"
Margin Dynamic
LatexType Command
LatexName fntext
Category FrontMatter
InTitle 1
Argument 1
LabelString "Note Label"
Tooltip "Label key for this author footnote (e.g. fn1, fn2); reference it with the Author Note Mark inset inside \\author{}"
Mandatory 0
EndArgument
ParSkip 0.4
TopSep 2.3
BottomSep 0.5
Align Left
LabelSep xx
LabelType Static
LabelString "Author Note:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# Corresponding author text — \cortext[label]{Tel/email/address}
Style "Corresponding Author"
CopyStyle "Author Note"
LatexName cortext
LabelString "Corresponding Author:"
LabelFont
Color textlabel1
Series Bold
EndFont
End
# Non-numbered footnote (paper-level notes, e.g. dedicated/research notes)
# \nonumnote{text}
Style "Non-Numbered Note"
Margin Dynamic
LatexType Command
LatexName nonumnote
Category FrontMatter
InTitle 1
ParSkip 0.4
BottomSep 0.5
Align Left
LabelSep xx
LabelType Static
LabelString "Note:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# ======================================================================
# AFFILIATION / ADDRESS
# ======================================================================
# Plain text address — \address[label]{Full address text}[type options]
# Post-arg options: type=regular|alt|addl|custom, name=..., foot=true
Style Address
# Margin Static
Margin Dynamic
LatexType Command
LatexName address
Category FrontMatter
InTitle 1
Argument 1
LabelString "Address Label"
Tooltip "Label key for this address (must match the affil. refs given in \\author[...]{})"
Mandatory 0
EndArgument
Argument post:1
LabelString "Address options"
Tooltip "Options:\n type=regular (default)|alt|addl|custom\n name=Custom Type Name\n foot=true (place in page footnote instead of address block)"
Mandatory 0
EndArgument
ParSkip 0.4
Align Left
LabelType No_Label
Font
Shape Italic
Size Small
EndFont
DocBookTag address
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperTagType block
DocBookWrapperMergeWithPrevious true
DocBookInInfo always
End
# Structured affiliation (key-value form)
# \affiliation[label]{organization=X, addressline=Y, city=Z, postcode=W, state=V, country=U}[options]
# Short keys: o/or=organization, a/ad=addressline, c/ci=city, p/pc=postcode, s/st=state, cy/country=country
Style Affiliation
Margin Dynamic
LatexType Command
LatexName affiliation
LabelType Static
Category FrontMatter
InTitle 1
Argument 1
LabelString "Affiliation Label"
Tooltip "Label key for this affiliation (must match the affil. refs given in \\author[...]{})"
Mandatory 1
LeftDelim "["
RightDelim "]"
AutoInsert 1
EndArgument
Argument 2
LabelString "Affiliation options"
Tooltip "Key-value options (comma-separated):\n organization={World Scientific University}, addressline={Street 29}, postcode={1011 NX}, postcodesep={}, city={Amsterdam}, country={The Netherlands}"
Mandatory 1
AutoInsert 1
EndArgument
LabelSep xx
LabelString "Affiliation:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# Email address or URL
# \ead{[email protected]} or \ead[url]{https://...}
Style Email
CopyStyle Address
LatexName ead
LabelType Static
LabelSep xx
LabelString "Email:"
Argument 1
LabelString "Type"
Tooltip "Leave empty for an email address, or enter 'url' for a URL / homepage"
Mandatory 0
EndArgument
Font
Shape Up
EndFont
DocBookTag email
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperTagType block
DocBookWrapperMergeWithPrevious true
DocBookInInfo always
End
# Short authors for running headers — \shortauthors{A. Author et al.}
Style "Short Authors"
Margin Dynamic
LatexType Command
LatexName shortauthors
Category FrontMatter
InTitle 1
ParSkip 0.4
Align Left
LabelSep xx
LabelType Static
LabelString "Short Authors:"
LabelFont
Color textlabel2
Series Bold
EndFont
Font
Size Small
EndFont
End
# Short title for running headers — \shorttitle{Short version}
Style "Short Title"
CopyStyle "Short Authors"
LatexName shorttitle
LabelString "Short Title:"
End
# ======================================================================
# ABSTRACT AND KEYWORDS
# ======================================================================
Style Abstract
Margin Static
LatexType Environment
LatexName abstract
Category FrontMatter
InTitle 1
NextNoIndent 1
LeftMargin MMM
RightMargin MMM
ParIndent MM
ItemSep 0
TopSep 0.7
BottomSep 0.7
ParSep 0
Align Block
AlignPossible Block
LabelType Centered
LabelString "Abstract"
LabelBottomSep 0.5
Font
Size Small
EndFont
LabelFont
Series Bold
Size Large
EndFont
DocBookAbstract true
DocBookInInfo always
DocBookWrapperTag abstract
DocBookWrapperMergeWithPrevious true
DocBookTag para
End
# Keywords
# \begin{keywords}[Optional header override] kw1 \sep kw2 \sep kw3 \end{keywords}
# Note: separate keywords with \sep (or simply commas in the text)
Style Keywords
Margin Dynamic
LatexType Environment
LatexName keywords
Category FrontMatter
InTitle 1
NextNoIndent 1
BottomSep 0.5
ParSkip 0.4
Align Block
LabelSep xx
LabelType Static
LabelString "Keywords:"
Argument 1
LabelString "Keywords header"
Tooltip "Override the default 'Keywords' header text (default: Keywords)"
Mandatory 0
EndArgument
LabelFont
Color textlabel2
Series Bold
EndFont
DocBookTag keyword
DocBookTagType paragraph
DocBookWrapperTag keywordset
DocBookInInfo always
End
# MSC mathematical subject classification — \MSC[year]{codes}
Style "MSC Codes"
Margin Dynamic
LatexType Command
LatexName MSC
Category FrontMatter
InTitle 1
ParSkip 0.4
Align Left
LabelSep xx
LabelType Static
LabelString "MSC:"
Argument 1
LabelString "Year"
Tooltip "MSC year edition, e.g. 2010 or 2020"
Mandatory 0
EndArgument
LabelFont
Color textlabel2
Series Bold
EndFont
End
# JEL classification (economics) — \JEL{C10, D81}
Style "JEL Codes"
CopyStyle "MSC Codes"
LatexName JEL
LabelString "JEL:"
ResetArgs 1
End
# PACS classification (physics) — \PACS{XX.YY.Zz}
Style "PACS Codes"
CopyStyle "MSC Codes"
LatexName PACS
LabelString "PACS:"
ResetArgs 1
End
# ======================================================================
# DATE HISTORY
# \received{date} \revised{date} \accepted{date}
# ======================================================================
Style Received
Margin Dynamic
LatexType Command
LatexName received
Category FrontMatter
InTitle 1
ParSkip 0.4
Align Left
LabelSep xx
LabelType Static
LabelString "Received:"
LabelFont
Color textlabel2
Series Bold
EndFont
Font
Size Small
EndFont
End
Style Revised
CopyStyle Received
LatexName revised
LabelString "Revised:"
End
Style Accepted
CopyStyle Received
LatexName accepted
LabelString "Accepted:"
End
# ======================================================================
# PRE-PRINT MATTER (separate page before the article)
# ======================================================================
# Highlights — \begin{highlights}[Heading] followed by \\item entries
# NOTE: The highlights environment auto-wraps content in \begin{itemize},
# so use LyX's Itemize environment inside, or plain \item (via ERT).
Style Highlights
Margin Static
LatexType Item_Environment
LatexName highlights
Category FrontMatter
InTitle 1
ParagraphGroup 1
TopSep 0.7
BottomSep 0.5
Align Block
LabelType Centered
LabelString "Highlights"
LabelBottomSep 0.5
Argument 1
LabelString "Heading"
Tooltip "Override the default 'Highlights' heading"
Mandatory 0
EndArgument
LabelFont
Series Bold
Size Large
EndFont
End
# Graphical abstract — \begin{graphicalabstract}[Heading] image + caption \end{graphicalabstract}
Style "Graphical Abstract"
CopyStyle Highlights
LatexType Environment
LatexName graphicalabstract
LabelString "Graphical Abstract"
NextNoIndent 1
Argument 1
LabelString "Heading"
Tooltip "Override the default 'Graphical Abstract' heading"
Mandatory 0
EndArgument
End
# ======================================================================
# CRediT AUTHOR CONTRIBUTIONS
# ======================================================================
# Standalone credit role for an author
# \credit{Conceptualization, Methodology, Writing - original draft}
# Place in its own paragraph after the corresponding \author{} block.
Style "CRediT Role"
Margin Dynamic
LatexType Command
LatexName credit
Category FrontMatter
InTitle 1
ParSkip 0.2
Align Left
LabelSep xx
LabelType Static
LabelString "CRediT Role:"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# Print CRediT contributions section — \printcredits
# Outputs a "CRediT authorship contribution statement" section.
# Place at the end of the article body, before the bibliography.
Style "Print Credits"
Margin Dynamic
LatexType Command
LatexName printcredits
Category BackMatter
KeepEmpty 1
Align Left
LabelSep xx
LabelType Static
LabelString "Print CRediT Contributions"
LabelFont
Color textlabel2
Series Bold
EndFont
End
# ======================================================================
# BIOGRAPHY
# ======================================================================
# Author biography with optional photo
# \begin{biography}[photo.jpg]{Author Name} bio text \end{biography}
# For the wrapped-photo variant, use ERT with \bio[opts]{photo}...\endbio
Style Biography
Margin Static
LatexType Environment
LatexName biography
Category BackMatter
Argument 1
LabelString "Photo file"
Tooltip "Path to author photo image file (leave empty for text-only biography)"
Mandatory 0
EndArgument
Argument 2
LabelString "Author name"
Tooltip "Author name printed in bold before the biography text"
Mandatory 1
EndArgument
ParSkip 0.4
TopSep 0.7
Align Left
LabelType No_Label
Font
Size Small
EndFont
End
# ======================================================================
# BIBLIOGRAPHY
# ======================================================================
Style Bibliography
Margin First_Dynamic
LatexType Bib_Environment
LatexName thebibliography
Category BackMatter
NextNoIndent 1
ToggleIndent Never
LeftMargin MM
ParSkip 0.4
ItemSep 0
TopSep 0.7
BottomSep 0.7
ParSep 0.5
Align Block
AlignPossible Block, Left
LabelType Bibliography
LabelString "References"
LabelBottomSep 1.2
LabelFont
Series Bold
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
Argument listpreamble:1
LabelString "Bib preamble"
MenuString "Bibliography Preamble"
Tooltip "LaTeX code to be inserted before the first bibliography item"
PassThru 1
Font
Family typewriter
Color latex
EndFont
EndArgument
End
# ======================================================================
# TABLE OPTIONS
# ======================================================================
InsetLayout Flex:Table_Options
LyXType custom
Decoration classic
LabelString "Table Options"
MenuString "Table Options|O"
PassThru 1
Tooltip "Enter key-value pairs like width=.9\linewidth,cols=4,pos=h"
LatexType command
LatexName SetKeys[cas/tbl]
LabelFont
Family Roman
Color red
EndFont
ResetsFont 0
MultiPar 0
End
# ======================================================================
# ENUMERATE OPTIONS
# ======================================================================
ModifyStyle Enumerate
Argument 1
LabelString "Enumerate Options"
Tooltip "Optional arguments for this list (Elsevier's cas manual end examples)"
PassThru 1
EndArgument
End
cas-dc.layout
(text/plain, 1.3 KB)
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[cas-dc,natbib.sty]{Elsevier CAS (Double Column)}
# \DeclareCategory{Articles}
# LyX layout for the Elsevier CAS Double-Column class (cas-dc.cls v2.4).
# Based on cas-common.sty (2024/05/04) by STM / Elsevier.
#
# Installation: copy cas-sc.layout, cas-dc.layout and cas-common.inc to
# ~/.lyx/layouts/ (or the system layouts/ directory)
# then run Tools > Reconfigure in LyX.
#
# Class options exposed via Document > Settings > Document Class > Options:
# Font size : 10pt (default), 11pt, 12pt
# Layout : review (double-spaced referee copy)
# final (final camera-ready layout)
# Blind : singleblind | doubleblind
# Title box : longmktitle (use long title box spanning full page height)
#
# Note: the two-column typesetting is handled internally by the class via
# \twocolumn[...] inside \maketitle. LyX edits the document in single-column
# view; the output PDF will be double-column.
Format 111
Columns 1
Sides 1
SecNumDepth 3
TocDepth 3
DefaultStyle Standard
ClassOptions
FontSize 10|11|12
Other review|final|singleblind|doubleblind|longmktitle
end
# InTitle 1 styles are output as individual commands; \maketitle is called
# automatically after the last InTitle paragraph (LyX default behaviour).
Input cas-common.inc
cas-sc.layout
(text/plain, 1.1 KB)
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[cas-sc,natbib.sty]{Elsevier CAS (Single Column)}
# \DeclareCategory{Articles}
# LyX layout for the Elsevier CAS Single-Column class (cas-sc.cls v2.4).
# Based on cas-common.sty (2024/05/04) by STM / Elsevier.
#
# Installation: copy cas-sc.layout, cas-dc.layout and cas-common.inc to
# ~/.lyx/layouts/ (or the system layouts/ directory)
# then run Tools > Reconfigure in LyX.
#
# Class options exposed via Document > Settings > Document Class > Options:
# Font size : 10pt (default), 11pt, 12pt
# Layout : review (double-spaced referee copy)
# final (final camera-ready layout)
# Blind : singleblind | doubleblind
# Title box : longmktitle (use long title box spanning full page height)
Format 111
Columns 1
Sides 1
SecNumDepth 3
TocDepth 3
DefaultStyle Standard
ClassOptions
FontSize 10|11|12
Other review|final|singleblind|doubleblind|longmktitle
end
# InTitle 1 styles are output as individual commands; \maketitle is called
# automatically after the last InTitle paragraph (LyX default behaviour).
Input ./cas-common.inc