Changed line wrapping added tests for it. Fixes #27.

- Added line_width chunk option
- Updated manual
- Removed Textwrap depency #27.
pull/29/head
Matti Pastell 2015-01-05 23:15:39 +02:00
parent 0b56046bb8
commit c8185984c3
12 changed files with 475 additions and 57 deletions

View File

@ -3,6 +3,11 @@
### Changes in master
* New chunk option: `line_width`.
* Bug fix in wrapping output lines.
* Internal changes
- Chunks are now represented with their own type. Allows multiple dispatch
and easier implementation of new chunks.
### 0.0.4

View File

@ -1,5 +1,4 @@
julia 0.3
Compat
TextWrap
ArgParse
Docile

View File

@ -57,7 +57,8 @@ Weave currently supports the following chunk options with the following defaults
* `eval = true`. Evaluate the code chunk. If false the chunk wont be executed.
* `term=false`. If true the output emulates a REPL session. Otherwise only stdout and figures will be included in output.
* `label`. Chunk label, will be used for figure labels in Latex as fig:label
* `wrap=true`. Wrap long lines from output.
* `wrap = true`. Wrap long lines from output.
* `line_width = 75`. Line width for wrapped lines.
**Options for figures**

View File

@ -17,6 +17,7 @@ const rcParams =
:term=> false,
:name=> nothing,
:wrap=> true,
:line_width => 75,
:engine=> "julia",
#:option_string=> "",
#Defined in formats

View File

@ -1,4 +1,3 @@
using TextWrap
#Format the executed document
function format(executed, doctype)
@ -72,8 +71,8 @@ function format_chunk(chunk::CodeChunk, formatdict, docformat)
result *= "$(chunk.output)\n"
elseif chunk.options[:results] == "markup"
if chunk.options[:wrap]
chunk.output = "\n" * wrap(chunk.output,
replace_whitespace=false)
chunk.output = "\n" * wraplines(chunk.output,
chunk.options[:line_width])
end
if haskey(formatdict, :indent)
@ -111,6 +110,31 @@ function indent(text, nindent)
end
function wraplines(text, line_width=75)
result = String[]
lines = split(text, "\n")
for line in lines
if length(line) > line_width
push!(result, wrapline(line, line_width))
else
push!(result, line)
end
end
#return result
return strip(join(result, "\n"))
end
function wrapline(text, line_width=75)
result = ""
while length(text) > line_width
result*= text[1:line_width] * "\n"
text = text[(line_width+1):end]
end
result *= text
end
type Tex
description::String
formatdict::Dict{Symbol,Any}

View File

@ -35,3 +35,17 @@ println(a)
<<results="as_is">>=
println("No markup for results.")
@
Test wrapping:
<<>>=
println(linspace(0,1000))
@
<<wrap=false>>=
println(linspace(0,1000))
@
<<line_width=60>>=
println(linspace(0,1000))
@

View File

@ -18,3 +18,9 @@ a = "Don't print me"
println(a)
println("No markup for results.")
println(linspace(0,1000))
println(linspace(0,1000))
println(linspace(0,1000))

View File

@ -78,4 +78,101 @@ println("No markup for results.")
No markup for results.
Test wrapping:
~~~~{.julia}
println(linspace(0,1000))
~~~~~~~~~~~~~
~~~~{.julia}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.4040404040
4041,50.505050505050505,60.60606060606061,70.7070707070707,80.8080808080808
2,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,
131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,2
12.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,2
52.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,29
2.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.
73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414
.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454
.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535
353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757
575758,585.8585858585859,595.959595959596,606.0606060606061,616.16161616161
62,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.
070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747
474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878
787879,797.979797979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,
878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1
919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959
595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
~~~~~~~~~~~~~
~~~~{.julia}
println(linspace(0,1000))
~~~~~~~~~~~~~
~~~~{.julia}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.40404040404041,50.505050505050505,60.60606060606061,70.7070707070707,80.80808080808082,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,212.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,252.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,292.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,333.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757575758,585.8585858585859,595.959595959596,606.0606060606061,616.1616161616162,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878787879,797.979797979798,808.0808080808081,818.1818181818182,828.2828282828283,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
~~~~~~~~~~~~~
~~~~{.julia}
println(linspace(0,1000))
~~~~~~~~~~~~~
~~~~{.julia}
[0.0,10.101010101010102,20.202020202020204,30.30303030303030
5,40.40404040404041,50.505050505050505,60.60606060606061,70.
7070707070707,80.80808080808082,90.9090909090909,101.0101010
1010101,111.1111111111111,121.21212121212122,131.31313131313
132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.0
2020202020202,212.12121212121212,222.2222222222222,232.32323
232323233,242.42424242424244,252.52525252525254,262.62626262
626264,272.7272727272727,282.8282828282828,292.9292929292929
6,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.636
3636363636,373.73737373737373,383.83838383838383,393.9393939
3939394,404.04040404040404,414.14141414141415,424.2424242424
2425,434.34343434343435,444.4444444444444,454.5454545454545,
464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252
525253,535.3535353535353,545.4545454545454,555.5555555555555
,565.6565656565656,575.7575757575758,585.8585858585859,595.9
59595959596,606.0606060606061,616.1616161616162,626.26262626
26263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.96
9696969697,707.070707070707,717.1717171717171,727.2727272727
273,737.3737373737373,747.4747474747475,757.5757575757576,76
7.6767676767677,777.7777777777778,787.8787878787879,797.9797
97979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868
.6868686868687,878.7878787878788,888.8888888888888,898.98989
8989899,909.090909090909,919.1919191919193,929.2929292929293
,939.3939393939395,949.4949494949495,959.5959595959596,969.6
969696969697,979.7979797979798,989.89898989899,1000.0]
~~~~~~~~~~~~~

View File

@ -87,4 +87,107 @@
No markup for results.
Test wrapping:
.. code-block:: julia
println(linspace(0,1000))
::
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.4040404040
4041,50.505050505050505,60.60606060606061,70.7070707070707,80.8080808080808
2,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,
131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,2
12.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,2
52.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,29
2.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.
73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414
.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454
.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535
353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757
575758,585.8585858585859,595.959595959596,606.0606060606061,616.16161616161
62,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.
070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747
474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878
787879,797.979797979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,
878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1
919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959
595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
.. code-block:: julia
println(linspace(0,1000))
::
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.40404040404041,50.505050505050505,60.60606060606061,70.7070707070707,80.80808080808082,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,212.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,252.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,292.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,333.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757575758,585.8585858585859,595.959595959596,606.0606060606061,616.1616161616162,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878787879,797.979797979798,808.0808080808081,818.1818181818182,828.2828282828283,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
.. code-block:: julia
println(linspace(0,1000))
::
[0.0,10.101010101010102,20.202020202020204,30.30303030303030
5,40.40404040404041,50.505050505050505,60.60606060606061,70.
7070707070707,80.80808080808082,90.9090909090909,101.0101010
1010101,111.1111111111111,121.21212121212122,131.31313131313
132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.0
2020202020202,212.12121212121212,222.2222222222222,232.32323
232323233,242.42424242424244,252.52525252525254,262.62626262
626264,272.7272727272727,282.8282828282828,292.9292929292929
6,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.636
3636363636,373.73737373737373,383.83838383838383,393.9393939
3939394,404.04040404040404,414.14141414141415,424.2424242424
2425,434.34343434343435,444.4444444444444,454.5454545454545,
464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252
525253,535.3535353535353,545.4545454545454,555.5555555555555
,565.6565656565656,575.7575757575758,585.8585858585859,595.9
59595959596,606.0606060606061,616.1616161616162,626.26262626
26263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.96
9696969697,707.070707070707,717.1717171717171,727.2727272727
273,737.3737373737373,747.4747474747475,757.5757575757576,76
7.6767676767677,777.7777777777778,787.8787878787879,797.9797
97979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868
.6868686868687,878.7878787878788,888.8888888888888,898.98989
8989899,909.090909090909,919.1919191919193,929.2929292929293
,939.3939393939395,949.4949494949495,959.5959595959596,969.6
969696969697,979.7979797979798,989.89898989899,1000.0]

View File

@ -60,4 +60,89 @@ println(a)
println("No markup for results.")
\end{juliacode}
No markup for results.
Test wrapping:
\begin{juliacode}
println(linspace(0,1000))
\end{juliacode}
\begin{juliaout}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.4040404040
4041,50.505050505050505,60.60606060606061,70.7070707070707,80.8080808080808
2,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,
131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,2
12.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,2
52.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,29
2.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.
73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414
.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454
.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535
353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757
575758,585.8585858585859,595.959595959596,606.0606060606061,616.16161616161
62,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.
070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747
474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878
787879,797.979797979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,
878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1
919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959
595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
\end{juliaout}
\begin{juliacode}
println(linspace(0,1000))
\end{juliacode}
\begin{juliaout}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.40404040404041,50.505050505050505,60.60606060606061,70.7070707070707,80.80808080808082,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,212.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,252.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,292.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,333.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757575758,585.8585858585859,595.959595959596,606.0606060606061,616.1616161616162,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878787879,797.979797979798,808.0808080808081,818.1818181818182,828.2828282828283,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
\end{juliaout}
\begin{juliacode}
println(linspace(0,1000))
\end{juliacode}
\begin{juliaout}
[0.0,10.101010101010102,20.202020202020204,30.30303030303030
5,40.40404040404041,50.505050505050505,60.60606060606061,70.
7070707070707,80.80808080808082,90.9090909090909,101.0101010
1010101,111.1111111111111,121.21212121212122,131.31313131313
132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.0
2020202020202,212.12121212121212,222.2222222222222,232.32323
232323233,242.42424242424244,252.52525252525254,262.62626262
626264,272.7272727272727,282.8282828282828,292.9292929292929
6,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.636
3636363636,373.73737373737373,383.83838383838383,393.9393939
3939394,404.04040404040404,414.14141414141415,424.2424242424
2425,434.34343434343435,444.4444444444444,454.5454545454545,
464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252
525253,535.3535353535353,545.4545454545454,555.5555555555555
,565.6565656565656,575.7575757575758,585.8585858585859,595.9
59595959596,606.0606060606061,616.1616161616162,626.26262626
26263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.96
9696969697,707.070707070707,717.1717171717171,727.2727272727
273,737.3737373737373,747.4747474747475,757.5757575757576,76
7.6767676767677,777.7777777777778,787.8787878787879,797.9797
97979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868
.6868686868687,878.7878787878788,888.8888888888888,898.98989
8989899,909.090909090909,919.1919191919193,929.2929292929293
,939.3939393939395,949.4949494949495,959.5959595959596,969.6
969696969697,979.7979797979798,989.89898989899,1000.0]
\end{juliaout}

View File

@ -60,4 +60,89 @@ println(a)
println("No markup for results.")
\end{minted}
No markup for results.
Test wrapping:
\begin{minted}[mathescape, fontsize=\small, xleftmargin=0.5em]{julia}
println(linspace(0,1000))
\end{minted}
\begin{minted}[fontsize=\small, xleftmargin=0.5em, mathescape, frame = leftline]{text}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.4040404040
4041,50.505050505050505,60.60606060606061,70.7070707070707,80.8080808080808
2,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,
131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,2
12.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,2
52.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,29
2.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.
73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414
.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454
.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535
353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757
575758,585.8585858585859,595.959595959596,606.0606060606061,616.16161616161
62,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.
070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747
474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878
787879,797.979797979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,
878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1
919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959
595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
\end{minted}
\begin{minted}[mathescape, fontsize=\small, xleftmargin=0.5em]{julia}
println(linspace(0,1000))
\end{minted}
\begin{minted}[fontsize=\small, xleftmargin=0.5em, mathescape, frame = leftline]{text}
[0.0,10.101010101010102,20.202020202020204,30.303030303030305,40.40404040404041,50.505050505050505,60.60606060606061,70.7070707070707,80.80808080808082,90.9090909090909,101.01010101010101,111.1111111111111,121.21212121212122,131.31313131313132,141.4141414141414,151.51515151515153,161.61616161616163,171.7171717171717,181.8181818181818,191.91919191919192,202.02020202020202,212.12121212121212,222.2222222222222,232.32323232323233,242.42424242424244,252.52525252525254,262.62626262626264,272.7272727272727,282.8282828282828,292.92929292929296,303.03030303030306,313.13131313131316,323.23232323232327,333.3333333333333,343.4343434343434,353.5353535353535,363.6363636363636,373.73737373737373,383.83838383838383,393.93939393939394,404.04040404040404,414.14141414141415,424.24242424242425,434.34343434343435,444.4444444444444,454.5454545454545,464.64646464646466,474.74747474747477,484.8484848484849,494.949494949495,505.0505050505051,515.1515151515151,525.2525252525253,535.3535353535353,545.4545454545454,555.5555555555555,565.6565656565656,575.7575757575758,585.8585858585859,595.959595959596,606.0606060606061,616.1616161616162,626.2626262626263,636.3636363636364,646.4646464646465,656.5656565656566,666.6666666666666,676.7676767676768,686.8686868686868,696.969696969697,707.070707070707,717.1717171717171,727.2727272727273,737.3737373737373,747.4747474747475,757.5757575757576,767.6767676767677,777.7777777777778,787.8787878787879,797.979797979798,808.0808080808081,818.1818181818182,828.2828282828283,838.3838383838383,848.4848484848485,858.5858585858585,868.6868686868687,878.7878787878788,888.8888888888888,898.989898989899,909.090909090909,919.1919191919193,929.2929292929293,939.3939393939395,949.4949494949495,959.5959595959596,969.6969696969697,979.7979797979798,989.89898989899,1000.0]
\end{minted}
\begin{minted}[mathescape, fontsize=\small, xleftmargin=0.5em]{julia}
println(linspace(0,1000))
\end{minted}
\begin{minted}[fontsize=\small, xleftmargin=0.5em, mathescape, frame = leftline]{text}
[0.0,10.101010101010102,20.202020202020204,30.30303030303030
5,40.40404040404041,50.505050505050505,60.60606060606061,70.
7070707070707,80.80808080808082,90.9090909090909,101.0101010
1010101,111.1111111111111,121.21212121212122,131.31313131313
132,141.4141414141414,151.51515151515153,161.61616161616163,
171.7171717171717,181.8181818181818,191.91919191919192,202.0
2020202020202,212.12121212121212,222.2222222222222,232.32323
232323233,242.42424242424244,252.52525252525254,262.62626262
626264,272.7272727272727,282.8282828282828,292.9292929292929
6,303.03030303030306,313.13131313131316,323.23232323232327,3
33.3333333333333,343.4343434343434,353.5353535353535,363.636
3636363636,373.73737373737373,383.83838383838383,393.9393939
3939394,404.04040404040404,414.14141414141415,424.2424242424
2425,434.34343434343435,444.4444444444444,454.5454545454545,
464.64646464646466,474.74747474747477,484.8484848484849,494.
949494949495,505.0505050505051,515.1515151515151,525.2525252
525253,535.3535353535353,545.4545454545454,555.5555555555555
,565.6565656565656,575.7575757575758,585.8585858585859,595.9
59595959596,606.0606060606061,616.1616161616162,626.26262626
26263,636.3636363636364,646.4646464646465,656.5656565656566,
666.6666666666666,676.7676767676768,686.8686868686868,696.96
9696969697,707.070707070707,717.1717171717171,727.2727272727
273,737.3737373737373,747.4747474747475,757.5757575757576,76
7.6767676767677,777.7777777777778,787.8787878787879,797.9797
97979798,808.0808080808081,818.1818181818182,828.28282828282
83,838.3838383838383,848.4848484848485,858.5858585858585,868
.6868686868687,878.7878787878788,888.8888888888888,898.98989
8989899,909.090909090909,919.1919191919193,929.2929292929293
,939.3939393939395,949.4949494949495,959.5959595959596,969.6
969696969697,979.7979797979798,989.89898989899,1000.0]
\end{minted}

View File

@ -58,32 +58,31 @@ println(x)
````julia
[0.0,2.0202020202020203,4.040404040404041,6.0606060606060606,8.0808080
80808081,10.1010101010101,12.121212121212121,14.14141414141414,16.1616
16161616163,18.181818181818183,20.2020202020202,22.22222222222222,24.2
42424242424242,26.262626262626267,28.28282828282828,30.303030303030305
,32.323232323232325,34.34343434343434,36.36363636363637,38.38383838383
838,40.4040404040404,42.42424242424242,44.44444444444444,46.4646464646
46464,48.484848484848484,50.505050505050505,52.52525252525253,54.54545
454545454,56.56565656565656,58.58585858585859,60.60606060606061,62.626
26262626263,64.64646464646465,66.66666666666666,68.68686868686868,70.7
0707070707071,72.72727272727273,74.74747474747475,76.76767676767676,78
.78787878787878,80.8080808080808,82.82828282828282,84.84848484848484,8
6.86868686868688,88.88888888888889,90.9090909090909,92.92929292929293,
94.94949494949495,96.96969696969697,98.98989898989899,101.010101010101
01,103.03030303030303,105.05050505050507,107.07070707070707,109.090909
09090908,111.11111111111111,113.13131313131312,115.15151515151516,117.
17171717171718,119.19191919191918,121.21212121212122,123.2323232323232
2,125.25252525252526,127.27272727272727,129.2929292929293,131.31313131
313132,133.33333333333331,135.35353535353536,137.37373737373736,139.39
39393939394,141.41414141414143,143.43434343434342,145.45454545454547,1
47.47474747474746,149.4949494949495,151.5151515151515,153.535353535353
52,155.55555555555557,157.57575757575756,159.5959595959596,161.6161616
161616,163.63636363636365,165.65656565656565,167.67676767676767,169.69
69696969697,171.7171717171717,173.73737373737376,175.75757575757575,17
7.77777777777777,179.7979797979798,181.8181818181818,183.8383838383838
3,185.85858585858585,187.87878787878788,189.8989898989899,191.91919191
919192,193.93939393939394,195.95959595959596,197.97979797979798,200.0]
[0.0,2.0202020202020203,4.040404040404041,6.0606060606060606,8.080808080808
081,10.1010101010101,12.121212121212121,14.14141414141414,16.16161616161616
3,18.181818181818183,20.2020202020202,22.22222222222222,24.242424242424242,
26.262626262626267,28.28282828282828,30.303030303030305,32.323232323232325,
34.34343434343434,36.36363636363637,38.38383838383838,40.4040404040404,42.4
2424242424242,44.44444444444444,46.464646464646464,48.484848484848484,50.50
5050505050505,52.52525252525253,54.54545454545454,56.56565656565656,58.5858
5858585859,60.60606060606061,62.62626262626263,64.64646464646465,66.6666666
6666666,68.68686868686868,70.70707070707071,72.72727272727273,74.7474747474
7475,76.76767676767676,78.78787878787878,80.8080808080808,82.82828282828282
,84.84848484848484,86.86868686868688,88.88888888888889,90.9090909090909,92.
92929292929293,94.94949494949495,96.96969696969697,98.98989898989899,101.01
010101010101,103.03030303030303,105.05050505050507,107.07070707070707,109.0
9090909090908,111.11111111111111,113.13131313131312,115.15151515151516,117.
17171717171718,119.19191919191918,121.21212121212122,123.23232323232322,125
.25252525252526,127.27272727272727,129.2929292929293,131.31313131313132,133
.33333333333331,135.35353535353536,137.37373737373736,139.3939393939394,141
.41414141414143,143.43434343434342,145.45454545454547,147.47474747474746,14
9.4949494949495,151.5151515151515,153.53535353535352,155.55555555555557,157
.57575757575756,159.5959595959596,161.6161616161616,163.63636363636365,165.
65656565656565,167.67676767676767,169.6969696969697,171.7171717171717,173.7
3737373737376,175.75757575757575,177.77777777777777,179.7979797979798,181.8
181818181818,183.83838383838383,185.85858585858585,187.87878787878788,189.8
989898989899,191.91919191919192,193.93939393939394,195.95959595959596,197.9
7979797979798,200.0]
````
@ -146,32 +145,31 @@ println(x)
````julia
[0.0,2.0202020202020203,4.040404040404041,6.0606060606060606,8.0808080
80808081,10.1010101010101,12.121212121212121,14.14141414141414,16.1616
16161616163,18.181818181818183,20.2020202020202,22.22222222222222,24.2
42424242424242,26.262626262626267,28.28282828282828,30.303030303030305
,32.323232323232325,34.34343434343434,36.36363636363637,38.38383838383
838,40.4040404040404,42.42424242424242,44.44444444444444,46.4646464646
46464,48.484848484848484,50.505050505050505,52.52525252525253,54.54545
454545454,56.56565656565656,58.58585858585859,60.60606060606061,62.626
26262626263,64.64646464646465,66.66666666666666,68.68686868686868,70.7
0707070707071,72.72727272727273,74.74747474747475,76.76767676767676,78
.78787878787878,80.8080808080808,82.82828282828282,84.84848484848484,8
6.86868686868688,88.88888888888889,90.9090909090909,92.92929292929293,
94.94949494949495,96.96969696969697,98.98989898989899,101.010101010101
01,103.03030303030303,105.05050505050507,107.07070707070707,109.090909
09090908,111.11111111111111,113.13131313131312,115.15151515151516,117.
17171717171718,119.19191919191918,121.21212121212122,123.2323232323232
2,125.25252525252526,127.27272727272727,129.2929292929293,131.31313131
313132,133.33333333333331,135.35353535353536,137.37373737373736,139.39
39393939394,141.41414141414143,143.43434343434342,145.45454545454547,1
47.47474747474746,149.4949494949495,151.5151515151515,153.535353535353
52,155.55555555555557,157.57575757575756,159.5959595959596,161.6161616
161616,163.63636363636365,165.65656565656565,167.67676767676767,169.69
69696969697,171.7171717171717,173.73737373737376,175.75757575757575,17
7.77777777777777,179.7979797979798,181.8181818181818,183.8383838383838
3,185.85858585858585,187.87878787878788,189.8989898989899,191.91919191
919192,193.93939393939394,195.95959595959596,197.97979797979798,200.0]
[0.0,2.0202020202020203,4.040404040404041,6.0606060606060606,8.080808080808
081,10.1010101010101,12.121212121212121,14.14141414141414,16.16161616161616
3,18.181818181818183,20.2020202020202,22.22222222222222,24.242424242424242,
26.262626262626267,28.28282828282828,30.303030303030305,32.323232323232325,
34.34343434343434,36.36363636363637,38.38383838383838,40.4040404040404,42.4
2424242424242,44.44444444444444,46.464646464646464,48.484848484848484,50.50
5050505050505,52.52525252525253,54.54545454545454,56.56565656565656,58.5858
5858585859,60.60606060606061,62.62626262626263,64.64646464646465,66.6666666
6666666,68.68686868686868,70.70707070707071,72.72727272727273,74.7474747474
7475,76.76767676767676,78.78787878787878,80.8080808080808,82.82828282828282
,84.84848484848484,86.86868686868688,88.88888888888889,90.9090909090909,92.
92929292929293,94.94949494949495,96.96969696969697,98.98989898989899,101.01
010101010101,103.03030303030303,105.05050505050507,107.07070707070707,109.0
9090909090908,111.11111111111111,113.13131313131312,115.15151515151516,117.
17171717171718,119.19191919191918,121.21212121212122,123.23232323232322,125
.25252525252526,127.27272727272727,129.2929292929293,131.31313131313132,133
.33333333333331,135.35353535353536,137.37373737373736,139.3939393939394,141
.41414141414143,143.43434343434342,145.45454545454547,147.47474747474746,14
9.4949494949495,151.5151515151515,153.53535353535352,155.55555555555557,157
.57575757575756,159.5959595959596,161.6161616161616,163.63636363636365,165.
65656565656565,167.67676767676767,169.6969696969697,171.7171717171717,173.7
3737373737376,175.75757575757575,177.77777777777777,179.7979797979798,181.8
181818181818,183.83838383838383,185.85858585858585,187.87878787878788,189.8
989898989899,191.91919191919192,193.93939393939394,195.95959595959596,197.9
7979797979798,200.0]
````