From 826f97bd5a53ba21a822596ca5e214f761914aa4 Mon Sep 17 00:00:00 2001 From: autodocs Date: Sat, 14 Apr 2018 09:04:13 +0000 Subject: [PATCH] build based on 98d31ef --- latest/generated/example.html | 2 +- latest/generated/example.ipynb | 81 ++++++++++++++++++++++++++-------- latest/outputformats.html | 2 +- latest/search_index.js | 8 ++-- 4 files changed, 68 insertions(+), 25 deletions(-) diff --git a/latest/generated/example.html b/latest/generated/example.html index 1d08411..f417a8a 100644 --- a/latest/generated/example.html +++ b/latest/generated/example.html @@ -1,3 +1,3 @@ -7. Example · Examples.jl

7. Example

7. Example

Output generated with Examples.jl based on this source file.

This is an example source file for input to Examples.jl.

If you are reading this you are seeing the markdown output generated from the source file, here you can see the corresponding notebook output: example.ipynb

Rational numbers in Julia

Rational number in julia can be constructed with the // operator:

x = 1//3
+7. Example · Examples.jl

7. Example

7. Example

This is an example for Examples.jl. The source file can be found here. The generated markdown can be found here: example.md, the generated notebook can be found here: example.ipynb, and the plain script output can be found here: example.jl.

Rational numbers in Julia

Rational number in julia can be constructed with the // operator:

x = 1//3
 y = 2//5
2//5

Operations with rational number returns a new rational number

x + y
11//15
x * y
2//15

Everytime a rational number is constructed, it will be simplified using the gcd function, for example 2//4 simplifies to 1//2:

2//4
1//2

and 2//4 + 2//4 simplifies to 1//1:

2//4 + 2//4
1//1
diff --git a/latest/generated/example.ipynb b/latest/generated/example.ipynb index f33d0ed..9bd5ea2 100644 --- a/latest/generated/example.ipynb +++ b/latest/generated/example.ipynb @@ -6,14 +6,12 @@ "source": [ "# **7.** Example\n", "\n", - "*Output generated with Examples.jl based on\n", - "[this](../../../examples/example.jl) source file.*\n", - "\n", - "This is an example source file for input to Examples.jl.\n", - "\n", - "If you are reading this you are seeing the notebook output\n", - "generated from the source file, here you can see the corresponding\n", - "markdown output: [example.md](./example.md)" + "This is an example for Examples.jl.\n", + "The source file can be found [here](https://github.com/fredrikekre/Examples.jl/blob/master/examples/example.jl).\n", + "The generated markdown can be found here: [`example.md`](./example.md), the\n", + "generated notebook can be found here:\n", + "[`example.ipynb`](https://nbviewer.jupyter.org/github/fredrikekre/Examples.jl/blob/gh-pages/latest/generated/example.ipynb), and the\n", + "plain script output can be found here: [`example.jl`](./example.jl)." ], "metadata": {} }, @@ -21,20 +19,29 @@ "outputs": [], "cell_type": "markdown", "source": [ - "## Rational numbers in Julia\n", + "### Rational numbers in Julia\n", "Rational number in julia can be constructed with the `//` operator:" ], "metadata": {} }, { - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "2//5" + }, + "metadata": {}, + "execution_count": 1 + } + ], "cell_type": "code", "source": [ "x = 1//3\n", "y = 2//5" ], "metadata": {}, - "execution_count": null + "execution_count": 1 }, { "outputs": [], @@ -45,22 +52,40 @@ "metadata": {} }, { - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "11//15" + }, + "metadata": {}, + "execution_count": 2 + } + ], "cell_type": "code", "source": [ "x + y" ], "metadata": {}, - "execution_count": null + "execution_count": 2 }, { - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "2//15" + }, + "metadata": {}, + "execution_count": 3 + } + ], "cell_type": "code", "source": [ "x * y" ], "metadata": {}, - "execution_count": null + "execution_count": 3 }, { "outputs": [], @@ -72,13 +97,22 @@ "metadata": {} }, { - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "1//2" + }, + "metadata": {}, + "execution_count": 4 + } + ], "cell_type": "code", "source": [ "2//4" ], "metadata": {}, - "execution_count": null + "execution_count": 4 }, { "outputs": [], @@ -89,13 +123,22 @@ "metadata": {} }, { - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "1//1" + }, + "metadata": {}, + "execution_count": 5 + } + ], "cell_type": "code", "source": [ "2//4 + 2//4" ], "metadata": {}, - "execution_count": null + "execution_count": 5 } ], "nbformat_minor": 3, diff --git a/latest/outputformats.html b/latest/outputformats.html index 6228de1..65dfc73 100644 --- a/latest/outputformats.html +++ b/latest/outputformats.html @@ -17,4 +17,4 @@ Here is an example with some code ```@example x = sin.(cos.([1, 2, 3])) y = x.^2 - x -```
Examples.markdownFunction.
Examples.markdown(inputfile, outputdir; kwargs...)

Generate a markdown file from inputfile and write the result to the directoryoutputdir.

Keyword arguments:

  • name: name of the output file, excluding .md. name is also used to name all the @example blocks. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
  • codefence: A Pair of opening and closing code fence. Defaults to
    "```julia" => "```"
    if documenter = false and
    "```@example $(name)" => "```"
    if documenter = true.
  • documenter: boolean that says if the output is intended to use with Documenter.jl. Defaults to false. See the the manual section on Interaction with Documenter.
source

4.2. Notebook output

Examples.notebookFunction.
Examples.notebook(inputfile, outputdir; kwargs...)

Generate a notebook from inputfile and write the result to outputdir.

Keyword arguments:

  • name: name of the output file, excluding .ipynb. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
  • execute: a boolean deciding if the generated notebook should also be executed or not. Defaults to false.
  • documenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to false. See the the manual section on Interaction with Documenter.
source

4.3. Script output

Examples.scriptFunction.
Examples.script(inputfile, outputdir; kwargs...)

Generate a plain script file from inputfile and write the result to outputdir.

Keyword arguments:

  • name: name of the output file, excluding .jl. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
source
+```
Examples.markdownFunction.
Examples.markdown(inputfile, outputdir; kwargs...)

Generate a markdown file from inputfile and write the result to the directoryoutputdir.

Keyword arguments:

  • name: name of the output file, excluding .md. name is also used to name all the @example blocks. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
  • documenter: boolean that tells if the output is intended to use with Documenter.jl. Defaults to true. See the the manual section on Interaction with Documenter.
  • codefence: A Pair of opening and closing code fence. Defaults to
    "```@example $(name)" => "```"
    if documenter = true and
    "```julia" => "```"
    if documenter = false.
source

4.2. Notebook output

Examples.notebookFunction.
Examples.notebook(inputfile, outputdir; kwargs...)

Generate a notebook from inputfile and write the result to outputdir.

Keyword arguments:

  • name: name of the output file, excluding .ipynb. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
  • execute: a boolean deciding if the generated notebook should also be executed or not. Defaults to true.
  • documenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to true. See the the manual section on Interaction with Documenter.
source

4.3. Script output

Examples.scriptFunction.
Examples.script(inputfile, outputdir; kwargs...)

Generate a plain script file from inputfile and write the result to outputdir.

Keyword arguments:

  • name: name of the output file, excluding .jl. Defaults to the filename of inputfile.
  • preprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.
source
diff --git a/latest/search_index.js b/latest/search_index.js index 089dbea..e3b04fe 100644 --- a/latest/search_index.js +++ b/latest/search_index.js @@ -157,7 +157,7 @@ var documenterSearchIndex = {"docs": [ "page": "4. Output formats", "title": "Examples.markdown", "category": "function", - "text": "Examples.markdown(inputfile, outputdir; kwargs...)\n\nGenerate a markdown file from inputfile and write the result to the directoryoutputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .md. name is also used to name all the @example blocks. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\ncodefence: A Pair of opening and closing code fence. Defaults to\n\"```julia\" => \"```\"\nif documenter = false and\n\"```@example $(name)\" => \"```\"\nif documenter = true.\ndocumenter: boolean that says if the output is intended to use with Documenter.jl. Defaults to false. See the the manual section on Interaction with Documenter.\n\n\n\n\n\n" + "text": "Examples.markdown(inputfile, outputdir; kwargs...)\n\nGenerate a markdown file from inputfile and write the result to the directoryoutputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .md. name is also used to name all the @example blocks. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\ndocumenter: boolean that tells if the output is intended to use with Documenter.jl. Defaults to true. See the the manual section on Interaction with Documenter.\ncodefence: A Pair of opening and closing code fence. Defaults to\n\"```@example $(name)\" => \"```\"\nif documenter = true and\n\"```julia\" => \"```\"\nif documenter = false.\n\n\n\n\n\n" }, { @@ -173,7 +173,7 @@ var documenterSearchIndex = {"docs": [ "page": "4. Output formats", "title": "Examples.notebook", "category": "function", - "text": "Examples.notebook(inputfile, outputdir; kwargs...)\n\nGenerate a notebook from inputfile and write the result to outputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .ipynb. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\nexecute: a boolean deciding if the generated notebook should also be executed or not. Defaults to false.\ndocumenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to false. See the the manual section on Interaction with Documenter.\n\n\n\n\n\n" + "text": "Examples.notebook(inputfile, outputdir; kwargs...)\n\nGenerate a notebook from inputfile and write the result to outputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .ipynb. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\nexecute: a boolean deciding if the generated notebook should also be executed or not. Defaults to true.\ndocumenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to true. See the the manual section on Interaction with Documenter.\n\n\n\n\n\n" }, { @@ -237,7 +237,7 @@ var documenterSearchIndex = {"docs": [ "page": "7. Example", "title": "7. Example", "category": "page", - "text": "EditURL = \"../../../examples/example.jl\"" + "text": "EditURL = \"https://github.com/fredrikekre/Examples.jl/blob/master/examples/example.jl\"" }, { @@ -245,7 +245,7 @@ var documenterSearchIndex = {"docs": [ "page": "7. Example", "title": "7. Example", "category": "section", - "text": "Output generated with Examples.jl based on this source file.This is an example source file for input to Examples.jl.If you are reading this you are seeing the markdown output generated from the source file, here you can see the corresponding notebook output: example.ipynb" + "text": "This is an example for Examples.jl. The source file can be found here. The generated markdown can be found here: example.md, the generated notebook can be found here: example.ipynb, and the plain script output can be found here: example.jl." }, {