Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] MyST cheat sheet documentation #637

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

najuzilu
Copy link
Contributor

@najuzilu najuzilu commented May 27, 2020

This PR adds a new document containing a MyST syntax cheat sheet discussed in issue #628.

The following content has/will been added

  • header
  • target headers
  • quote
  • list
  • thematic break
  • links
  • block break
  • line comment
  • table
  • reference doc from other location
  • math - inline (single and multiline) and directives with labels and equation referencing
  • code block - executable and non executable (should we include tags too?)
  • html block
  • figure/image - inline, image and figure directives with labels and example how to reference it
  • footnotes
  • citations
  • admonitions including note, warning, tip, caution directives
  • glue feature
  • include links for users to learn more for each of the entries above

This PR implements one option for displaying the content. The order in which the items are displayed is not final.

Any feedback would be greatly appreciated.

@najuzilu
Copy link
Contributor Author

Table information to include in cheat sheet can be found under #644.

@najuzilu
Copy link
Contributor Author

@choldgraf what's a better option for aligning a margin directive with a specific row in a table?

For this example, I have a long list of <br/> but I wonder if there's a better option...
Screen Shot 2020-05-28 at 4 33 14 PM

@choldgraf
Copy link
Collaborator

ah that is a tricky one - right now I don't know of a way to do this reliably (e.g. what if the content height changes?). You could add a custom class to it and use a CSS rule? Though for this one I'd just not worry about perfectly lining up the margin content...

@najuzilu najuzilu marked this pull request as ready for review May 29, 2020 02:27
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really awesome! Really nice work!

One other general thought is that we should try to think of ways to cross-reference this page and other pages in the site so that users land on the page. Doesn't need to be a blocker on this PR though 👍

I have a few comments in there, and then I'm +1 on merging and iterating on the content as new ideas come to mind.

docs/content/cheatsheet.md Outdated Show resolved Hide resolved
docs/_toc.yml Outdated Show resolved Hide resolved
docs/content/cheatsheet.md Outdated Show resolved Hide resolved
docs/content/cheatsheet.md Outdated Show resolved Hide resolved
@choldgraf
Copy link
Collaborator

hmmm looks like you may have some rebase weirdness in the PR now...the only files that should be changed should be the one you added, the _toc.yml file, and any files that have cross-references to your new page, right?

@najuzilu
Copy link
Contributor Author

Yeah I noticed that too. I merged the master and then the rebase introduced the other commits. I'll fix it.

@phaustin
Copy link
Contributor

Under math -- I don't see a an example of the

$$
\alpha
$$ (mylabel)

syntax for labeled Math blocks? (https://github.com/executablebooks/MyST-Parser/blob/master/tests/test_renderers/fixtures/syntax_elements.md)

(That gives you labels in html and rendered equations in jupyter)

@najuzilu
Copy link
Contributor Author

Thanks @phaustin! I'll make sure to include it under math.

add link info

add table info

add admonitions

add figure and image info

add math

add code information

add block break info

add how to ref docs

add html block info

add example of doc ref with different text

add glue feature

how to glue math block

rearrange content

misc edits + add more info links added

remove ref role path to doc as it is unnecessary

change location of cheatsheet.md from content to reference

fix doc references

add link to references.bib

rename table columns "text" and "token" to "syntax"

replace download directory with link

test filter option under bibliography directive

remove bibliography directive from myst cheatsheet

add example of math block with label & misc edits
@najuzilu
Copy link
Contributor Author

najuzilu commented Jun 2, 2020

@choldgraf I've squashed all the commits and rebased so this branch is ready to be merged.

@choldgraf
Copy link
Collaborator

amazing! what a complete and helpful resource, thanks so much @najuzilu

@choldgraf choldgraf merged commit e296471 into jupyter-book:master Jun 2, 2020
@najuzilu najuzilu deleted the myst-cheatsheet branch June 11, 2020 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants