Skip to content

Commit

Permalink
📖 Updates to new mystmd features (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Oct 18, 2024
1 parent b63a28c commit 4116985
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/features/commonmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ which is used to structurally seperate content.
```

```{seealso}
These can be used in [](inline-links) and are similar to [](./references.md) in MyST.
These can be used in [](#inline-links) and are similar to [](./references.md) in MyST.
This syntax is also similar to [](./footnotes.md).
```

Expand Down
12 changes: 6 additions & 6 deletions docs/features/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Targets are custom anchors that you can refer to elsewhere, for example, a figur
% TODO: name/label redundancy here would nice to be able to simplfy the onboarding (just use label, same as tex and mdast)

```{note}
There is different syntax for creating [Section/Header targets](targeting-headers) and ways to [label equations](targeting-equations) when using dollar math.
There is different syntax for creating [Section/Header targets](#targeting-headers) and ways to [label equations](#targeting-equations) when using dollar math.
```

Cross-referencing content is accomplished with markdown link syntax (`[text](link)`) or through specific roles ([ref](ref-role), [numref](numref-role), [eq](eq-role) or [doc](doc-role)), depending on your use-case.
Cross-referencing content is accomplished with markdown link syntax (`[text](#link)`) or through specific roles ([ref](#ref-role), [numref](#numref-role), [eq](#eq-role) or [doc](#doc-role)), depending on your use-case.

### Specification

Expand All @@ -36,17 +36,17 @@ Cross-referencing content is accomplished with markdown link syntax (`[text](lin

### Using Markdown Links

Using markdown link syntax is one of the most versatile ways to link to content. This uses the standard CommonMark syntax for a link (`[text](link)`), and the link can either be a label or a link to a document. For example:
Using markdown link syntax is one of the most versatile ways to link to content. This uses the standard CommonMark syntax for a link (`[text](#link)`), and the link can either be a label or a link to a document. For example:

````{list-table}
* - MyST Syntax
- Rendered
* - ```
[A **bolded _reference_** to a page](./references.md)
[A reference to a header](targeting-headers)
[A reference to a header](#targeting-headers)
```
- [A **bolded _reference_** to a page](./references.md)\
[A reference to a header](targeting-headers)
[A reference to a header](#targeting-headers)
````

```{note}
Expand Down Expand Up @@ -85,7 +85,7 @@ The `{numref}` role is exactly the same as the above `{ref}` role, but also allo

### Using the `{eq}` role

The `` {eq}`my-equation` `` syntax creates a numbered link to the equation, which is equivalent to `[](my-equation)` as there is no text content to fill in a title or caption.
The `` {eq}`my-equation` `` syntax creates a numbered link to the equation, which is equivalent to `[](#my-equation)` as there is no text content to fill in a title or caption.

% TODO: I think we should improve the syntax of links and simplify the explination
% It is annoying that numref and ref don't work for equations.
Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# MyST Specification

```{warning}
`myst-spec` is in development; any structures or features present in the JSON schema may change at any time without notice.
```

MyST (Markedly Structured Text) is designed to create publication-quality, computational documents written entirely in Markdown. The main use case driving the development and design of MyST is [JupyterBook](https://jupyterbook.org/), which creates educational online textbooks and tutorials with Jupyter Notebooks and narrative content written in MyST.

## Overview
Expand All @@ -12,7 +8,7 @@ There are three components that this documentation and repository aims to formal

1. the MyST markup language, which is a superset of [CommonMark](https://commonmark.org/) (a standard form of Markdown);
2. the MyST abstract syntax tree (AST), which is the datastructure of a document after it has been parsed, and can be used in transforming and rendering content; and
3. a set of unittests that can be used to test implementations of MyST (e.g. in Python and Javascript).
3. a set of unit-tests that can be used to test implementations of MyST (e.g. in Python and Javascript).

## MyST Markup Language

Expand Down Expand Up @@ -40,4 +36,8 @@ Test cases are available for download here: https://unpkg.com/browse/myst-spec/d

## Working with the MyST AST

```{warning}
The `myst-spec` AST is in development; any structures or features present in the JSON schema may change at any time without notice.
```

This documentation contains all the node types used to construct a MyST document. Conventionally, the AST representation of a MyST document represents the state immediately after parsing. This means, for example, references are not resolved, directive/role structures are still present, etc. You may work with AST nodes by either modifying or adding to them to modify and update the corresponding MyST document, or you may transform and reduce them into a simpler structure to consume in other contexts.
21 changes: 21 additions & 0 deletions docs/myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 1
project:
title: MyST Spec
github: https://github.com/executablebooks/myst-spec
license:
code: MIT
content: CC-BY-4.0
subject: Specification
venue:
title: MyST Spec
site:
title: MyST Spec
actions:
- title: GitHub
url: https://github.com/executablebooks/myst-spec
domains:
- mystmd-spec.curve.space
options:
twitter: mystmarkdown
logo: public/logo.svg
logo_text: MyST Spec
1 change: 1 addition & 0 deletions docs/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4116985

Please sign in to comment.