Skip to content

Fix footnotes #14

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ conda install -c fastai fastdoc

Suppose your notebook is in a folder called `book`. To run fastdoc:

`fastdoc_convert_all --path book --dest_path convert_book`
`fastdoc_convert_all --path book --dest_path convert_book`

You'll find your exported asciidoc files and all images used in `convert_book`.
You'll find your exported asciidoc files and all images used in `convert_book`.

For a single notebook demonstrating all the features of `fastdoc`, see the `test/_test.ipynb` notebook.
**Note:** Filenames that start with an underscore `_` are ignored during the conversion.

For a single notebook demonstrating all the features of `fastdoc`, see the `test/_test.ipynb` notebook.

For a complete O'Reilly book written in this way, see [fastbook](https://github.com/fastai/fastbook/).
18 changes: 11 additions & 7 deletions test/_test.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ inputs->program->results''')

image::_test_files/output_8_0.svg["", 228]

== Inputs and outputs
=== Inputs and outputs

By default inputs and outputs of each code cell are shown (except
widgets).
Expand Down Expand Up @@ -188,7 +188,7 @@ input).

To hide cell entirely, use the flag `#hide`.

== Formatting
=== Formatting

`backward quotes`, 'single quotes' and "double
quotes" are all left as is. Note that in asciidoc, text in single
Expand Down Expand Up @@ -263,8 +263,8 @@ This is a tip. Important gives the same rendering.
====


For a traditional block quote, you still need to put a colon for
correct rendering.
For a traditional block quote, you still need to put a colon for correct
rendering.

____
The inside of block quotes is not converted so we need to use asciidoc syntax inside.
Expand Down Expand Up @@ -318,14 +318,18 @@ You can use math as usual in notebooks: latexmath:[\(x = \frac{a+b}{2}\)]

Or


[latexmath]
++++
\[x = \frac{a+b}{2}\]
\begin{equation}
x = \frac{a+b}{2}
\end{equation}
++++

A footnote[this is a footnote]

== Tables and images, caption and references
A footnotefootnote:[this is a footnote]

=== Tables and images, caption and references

To add a caption and a reference to an output table, use `#id` and
`#caption` flags
Expand Down
2 changes: 1 addition & 1 deletion test/_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"A footnote[this is a footnote]"
"A footnotefootnote:[this is a footnote]"
]
},
{
Expand Down