Skip to article content

Abstract

This article demonstrates MyST Markdown integration with Elsevier’s CAS templates, showcasing typography, math, cross-references, admonitions, proofs, tables, figures, and code blocks.

Key Points

MyST Markdown enables reproducible scientific writing

Seamless export to multiple journal formats

Rich mathematical and scientific notation support

Keywords:MyST MarkdownElsevierLaTeXCAS TemplateScientific PublishingReproducible Research

Introduction

This document demonstrates the full integration of MyST Markdown Cockett et al., 2024 with Elsevier’s CAS templates. MyST provides a powerful authoring experience while maintaining compatibility with traditional LaTeX journal requirements Lamport, 1994.

Background

Scientific publishing has traditionally relied on LaTeX for high-quality typesetting Krewinkel & Winkler, 2017. However, the learning curve and complexity of LaTeX can be a barrier for many researchers. MyST Markdown bridges this gap by providing:

  1. A familiar Markdown syntax based on CommonMark Gruber, 2004

  2. Rich scientific features (equations, citations, cross-references)

  3. Export to multiple formats including PDF via LaTeX

Reproducible research workflows have become increasingly important, with tools like Jupyter Notebooks Kluyver et al., 2016 enabling literate programming approaches.

Typography Features

This section demonstrates MyST Markdown typography features and how they render in the PDF output.

Inline Formatting

Standard inline formatting includes bold text, italic text, and inline code. You can also use strikethrough text and underlined text for special emphasis.

For chemical formulas, use subscripts: H2O, CO2, C6H12O6. For ordinals and exponents, use superscripts: the 4th of July, 1st place, x2 + y2 = r2.

Line Breaks

The world’s shortest poem demonstrates line breaks:
Fleas
Adam
Had 'em.

—Strickland Gillilan

Quotations

Block quotes are useful for highlighting important passages:

We know what we are, but know not what we may be.

William Shakespeare, Hamlet

The important thing is not to stop questioning. Curiosity has its own reason for existing.

In the middle of difficulty lies opportunity.

Albert Einstein

Definition Lists

MyST supports definition lists for glossaries or term explanations:

MyST
Markedly Structured Text, a markdown flavor for scientific writing
LaTeX
A document preparation system for high-quality typesetting
jtex
A Jinja-based templating system for LaTeX documents
CAS
Content Acquisition System, Elsevier’s journal template system

Footnotes

MyST supports footnotes[1] which are automatically numbered and placed at the end of the document. You can have multiple footnotes[2] throughout your text.

Task Lists

Task lists can track progress (rendered as bullet points in LaTeX):

Mathematical Content

The templates support full LaTeX math with custom macros defined in frontmatter.

Inline Mathematics

Inline math like E=mc2E = mc^2 or E[X]=μ\E[X] = \mu works seamlessly. Using our custom macros: for xRx \in \R, we have Var(X)=E[X2](E[X])2\Var(X) = \E[X^2] - (\E[X])^2.

Display Equations

The quadratic formula:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Maxwell’s equations in differential form:

E=ρε0B=0×E=Bt×B=μ0J+μ0ε0Et\begin{aligned} \nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \\ \nabla \cdot \mathbf{B} &= 0 \\ \nabla \times \mathbf{E} &= -\frac{\partial \mathbf{B}}{\partial t} \\ \nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t} \end{aligned}

The Bellman equation for dynamic programming:

V(s)=maxa{R(s,a)+γsP(ss,a)V(s)}V(s) = \max_a \left\{ R(s, a) + \gamma \sum_{s'} P(s' | s, a) V(s') \right\}

Equations can be cross-referenced: see (1) for the quadratic formula and (2) for Maxwell’s equations.

Proofs and Theorems

MyST supports formal mathematical environments using proof directives. These are essential for mathematical and theoretical papers.

Definitions

Theorems

Proofs

Lemmas and Corollaries

Remarks and Examples

Admonitions

Admonitions (callouts) are useful for highlighting important information. MyST supports many types:

Code Blocks

Code blocks with syntax highlighting are supported:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import numpy as np
from typing import Tuple

def quadratic_formula(a: float, b: float, c: float) -> Tuple[float, float]:
    """Solve ax^2 + bx + c = 0 using the quadratic formula."""
    discriminant = b**2 - 4*a*c
    if discriminant < 0:
        raise ValueError("No real solutions")
    x1 = (-b + np.sqrt(discriminant)) / (2*a)
    x2 = (-b - np.sqrt(discriminant)) / (2*a)
    return x1, x2

# Example usage
roots = quadratic_formula(1, -5, 6)
print(f"Roots: {roots}")  # Output: (3.0, 2.0)

Program 1:Example Python implementation of the quadratic formula

As shown in Program 1, code can be captioned, numbered, and cross-referenced.

Multiple languages are supported:

function quadratic_formula(a, b, c)
    discriminant = b^2 - 4*a*c
    x1 = (-b + sqrt(discriminant)) / (2*a)
    x2 = (-b - sqrt(discriminant)) / (2*a)
    return x1, x2
end

Program 2:Julia implementation

Algorithms

For algorithm pseudocode, use raw LaTeX blocks with the algorithm and algorithmic environments:

The algorithm environment provides a float with caption and label for cross-referencing.

Tables

Markdown Tables

MyST tables convert cleanly to LaTeX:

Table 1:Comparison of numerical methods

MethodAccuracySpeedMemory
Baseline85.2%FastLow
Proposed92.1%MediumMedium
Ensemble94.3%SlowHigh
Oracle98.5%N/AN/A

Results are summarized in Table 1.

List Tables

List tables provide an alternative syntax useful for complex content:

Table 2:Dataset characteristics

Dataset

Training Samples

Test Samples

Features

Classes

MNIST

60,000

10,000

784

10

CIFAR-10

50,000

10,000

3,072

10

ImageNet

1,281,167

50,000

150,528

1,000

CSV Tables

Table 3:Experimental results

ModelAccuracyPrecisionRecallF1-Score
Logistic Regression0.820.810.830.82
Random Forest0.890.880.900.89
Neural Network0.940.930.950.94
Transformer0.970.960.970.97

Raw LaTeX Tables

For complex tables requiring advanced features, use raw LaTeX blocks. The CAS templates include booktabs, multirow, makecell, array, and dcolumn packages:

Table 4:Comprehensive table showcasing CAS template features

CategoryMeasurements
TypeDescription
(details)
StatusValueCount
Group AItem 1Yes12.34100
Item 2Yes5.67250
Item 3-89.0150
Group BItem 4Yes23.45175
Item 5-6.78320

Features: booktabs rules, multirow row spanning, makecell line breaks, dcolumn decimal alignment, array column formatting.

Figures and Images

A sample figure demonstrating image support in the template. This figure shows a placeholder image that would typically contain research results or visualizations. Figures are automatically numbered and can be cross-referenced.

Figure 1:A sample figure demonstrating image support in the template. This figure shows a placeholder image that would typically contain research results or visualizations. Figures are automatically numbered and can be cross-referenced.

As shown in Figure 1, the template properly handles figure placement and captions.

Cross-References Summary

This document demonstrates various cross-reference capabilities:

Discussion

This approach enables researchers to write in MyST Markdown while producing publication-ready documents that meet Elsevier’s submission requirements.

Advantages

  1. Reproducibility: Source files are plain text and version-controllable

  2. Flexibility: Single source exports to HTML, PDF, and other formats

  3. Modern tooling: Integration with Jupyter, VS Code, and other tools

  4. Rich features: Full LaTeX math, cross-references, and citations

Limitations

Conclusion

The Elsevier CAS MyST template provides a modern workflow for scientific writing while maintaining compatibility with traditional journal submission systems. This document has demonstrated:

For questions or contributions, please visit the template repository.

Footnotes
  1. This is a footnote demonstrating the feature. Footnotes can contain formatted text and even code.

  2. Another footnote with additional information. Footnotes are essential for academic writing.

References
  1. Cockett, R., Purves, S., Koch, F., & Morrison, M. (2024). Continuous Tools for Scientific Publishing: Using MyST Markdown and Curvenote to Encourage Continuous Science Practices. Proceedings of the 23rd Python in Science Conference, 121–136. 10.25080/nkvc9349
  2. Lamport, L. (1994). LaTeX: A Document Preparation System (2nd ed.). Addison-Wesley.
  3. Krewinkel, A., & Winkler, R. (2017). Formatting Open Science: Agilely Creating Multiple Document Formats for Academic Manuscripts with Pandoc Scholar. PeerJ Computer Science, 3, e112. 10.7717/peerj-cs.112
  4. Gruber, J. (2004). Markdown. https://daringfireball.net/projects/markdown/
  5. Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B., Bussonnier, M., Frederic, J., Kelley, K., Hamrick, J., Grout, J., Corlay, S., Ivanov, P., Avila, D., Abdalla, S., Willing, C., & Jupyter Development Team. (2016). Jupyter Notebooks: A Publishing Format for Reproducible Computational Workflows. Positioning and Power in Academic Publishing: Players, Agents and Agendas, 87–90. 10.3233/978-1-61499-649-1-87