Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Formatting your Google Doc

The Stacks reads two kinds of formatting from your Google Doc:

To see these features in published work, see Things to try.

Before you import

Share every Drive file you reference, such as images and videos, the same way as your doc (see Importing from Google Docs). If even one file is private, the import fails.

Accept or reject all suggested edits, because suggestions and comments aren’t imported.

What carries over

Semantic formatting is kept: headings, bold, italic, superscript, subscript, links, lists, tables, and paragraph alignment. Use Google Docs’ built-in paragraph styles for headings.

Visual styling is dropped: highlight, font color, fonts and sizes, underline, strikethrough, line spacing, and page breaks. Footnotes, text boxes, and drawings are dropped too, so export drawings as images and add them as media.

How directives work

A directive is a fenced block you type as plain text in your doc:

:::directive-name
:attribute: value
:another-attribute: value
Free-form content, like a caption.
:::

Styling directive text in a monospace font with a grey background makes it easier to spot, and doesn’t affect the import.

Document structure

A publication is laid out as title, subtitle, abstract, body sections, and then acknowledgments.

:::subtitle
One sentence on the impact of this work.
:::

:::abstract
First paragraph of the abstract.

Second paragraph of the abstract.
:::

Acknowledgments and competing interests each go in a bordered block. The heading inside must be Heading 4.

:::bordered
:internal: acknowledgments
#### Acknowledgments
Thank collaborators, funders, and contributors here.
:::

:::bordered
:internal: competing interests
#### Competing interests
Declare any conflicts of interest here.
:::

Figures and other media

The :::media directive handles images, videos, audio, embeds, and file downloads. The :type: attribute picks which one.

:::media
:type: image
:id: growth-curves
:src: https://drive.google.com/file/d/1AbcDefGhiJklMnoPqr/view?usp=sharing
:width: 100%
:align: center
:alt: Nine growth curves arranged in a grid, one per temperature.
**Growth rate varies with temperature across all 84 isolates.**
Each panel shows OD600 over time for one temperature condition.
:::

Attributes

AttributeUsed byNotes
:type:allimage, video, audio, iframe, or file
:src:allA public URL. Placeholder text or an empty value fails the import.
:id:all but fileUnique, case-sensitive, and no underscores. Use descriptive kebab-case like growth-curves, not figure-2.
:alt:all but fileOne or two sentences describing the content, for accessibility.
:align:all but filecenter, left, or right, lowercase.
:width:image, video, iframeMust include a unit, like 100% or 400px. Prefer %.
:unnumbered:image, videotrue to skip “Figure N” numbering, for example on a decorative image.
:autoplay:, :loop:videotrue to enable.
:aspect-ratio:iframeWidth/height ratio, like 4/3.
:height:iframeA fixed pixel height, like 550px, instead of an aspect ratio.
:filename:fileThe file name readers see. File blocks take no caption.

Store figures at their best resolution.

Supported formats:

Captions and numbering

Alignment

left and right float the figure and wrap text around it. Use them only for narrow figures, roughly 65% width or less. Wide figures won’t float on The Stacks even if you set left or right.

For YouTube videos, use the embed URL, like https://www.youtube.com/embed/0peLwtqQX7I, not the watch?v= URL.

Tables

Use a native Google Docs table (Insert → Table).

To caption and number a table, add a :::meta block right after it:

:::meta
:id: strain-list
**Wild strains used in this study.**
Twenty representative strains from the full panel.
:::

Referencing figures and tables

Type :ref{#id} in your text, using the :id: of the figure or table:

We summarize the trend in :ref{#growth-curves}.

Note: ref is also used for citations. See Citations.

Math

Write math as LaTeX. Use $...$ for inline math and $$ fences on their own paragraphs for block math:

We normalized readings as $\log(1 + x)$.

$$
\mu_{\text{max}} = \frac{\ln(\text{OD}_{t_2}) - \ln(\text{OD}_{t_1})}{t_2 - t_1}
$$

Don’t put bold or italic formatting inside the dollar signs.

Code

Wrap inline code in single backticks. It’s fine if Google Docs turns it into green monospace text.

For code blocks, use triple-backtick fences with a language name. Paste the code with Paste without formatting (⌘+Shift+V or Ctrl+Shift+V), or The Stacks won’t recognize it.

```r
library(tidyverse)
growth_data |> group_by(strain_id, temperature)
```

See the list of supported languages.

Callouts

:::callout
**Data and code** for this pub are in [this repository](https://github.com/example/repo).
:::

Callouts can contain paragraphs, lists, links, and media blocks.

Collapsible content

Use :::details to hide content behind a click-to-expand toggle. An optional :::summary right after the opener stays visible when it’s collapsed.

:::details
:::summary
## Bonus data: one strain shows unusual cold tolerance
:::
This content is hidden until the reader expands it.
:::

If you rename a heading, update any links to its old slug.

Web-only content

Wrap content in :::only to leave it out of the PDF export, for example a feedback poll:

:::only
:platform: web
:::media
:type: iframe
:src: https://example.typeform.com/to/feedback
:align: center
:width: 100%
:height: 550px
:::
:::

Don’t use this for interactive figures that are part of your argument. By default, The Stacks puts a screenshot of them in the PDF.

Small text

You can use HTML as an escape hatch to use styles that are not covered by standard Markdown or the formatting directives. For example, you can get small text with HTML.

<span class="text-body-20">Small text content.</span>

Citations

See Citations.