Skip to content

Commit f3c89ec

Browse files
authored
Merge pull request #1507 from mathics/latexdoc-fixes
Small LaTeX doc fixes
2 parents dda8af0 + c1e87d5 commit f3c89ec

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

mathics/builtin/optiondoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Axis(Builtin):
5959
<dd>is a possible value for the 'Filling' option.
6060
</dl>
6161
62-
>> ListLinePlot[Table[Sin[x], {x, -5, 5, 0.5}], Filling->Axis]
62+
>> ListLinePlot[Table[Sin[x], {x, -5, 5, 0.2}], Filling->Axis]
6363
= -Graphics-
6464
"""
6565

@@ -247,6 +247,6 @@ class Top(Builtin):
247247
<dd>is a possible value for the 'Filling' option.
248248
</dl>
249249
250-
>> ListLinePlot[Table[Sin[x], {x, -5, 5, 0.5}], Filling->Axis|Top|Bottom]
250+
>> ListLinePlot[Table[Sin[x], {x, -5, 5, 0.2}], Filling->Axis|Top|Bottom]
251251
= -Graphics-
252252
"""

mathics/doc/tex/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Here is a flow of the data::
2727
bultins/*.py -------------+--> doc/tex/doc_tex_data.pcl ---> documentation.tex -+
2828
docpipeline.py doc2latex.py |
2929
|
30-
doc/images/*.svg -------------> doc/tex/log*.pdf --------------------------------+---------------------> mathics.pdf
31-
images.sh | xetex,asyptote,gv
30+
doc/images/*.svg -------------> doc/tex/log*.pdf --------------------------------+------------------------------> mathics.pdf
31+
images.sh | latexmk,xetex,asyptote,gv
3232
|
3333
doc/tex/mathics.tex -------------------------------------------------------------+
3434

mathics/doc/tex/latexmkrc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
1+
# -*- Perl -*-
2+
# This is a configuration read and used by latexmk.
3+
# Specifically, we use it to direct how to process Asymptote (asy) vector graphics.
4+
5+
# Note the following is actually Perl code.
6+
7+
8+
# Check whether the Asymptote (asy) is new enough.
9+
my $min_asy_version = "2.71";
10+
my $out = `asy --version 2>&1 | head -1`;
11+
if ($? >> 8 == 0) {
12+
# Continue checking the version number
13+
if ($out =~ /version (\d.\d+)/) {
14+
my $version = "$1";
15+
if ($version < $min_asy_version) {
16+
print("Warning - your Asymptote version, ${version}, may be too old to handle everything.\n");
17+
print("We would like version ${min_asy_version}. Continuing with fingers crossed...\n");
18+
}
19+
}
20+
} else {
21+
print("Trouble checking Aymptote version -- skipping version check for ${min_asy_version}\n");
22+
}
23+
24+
# Check whether the Ghostscript (gs) is new enough.
25+
my $min_gs_version = "9.54";
26+
$out = `gs --version 2>&1`;
27+
if ($? >> 8 == 0) {
28+
# Continue checking the version number
29+
if ($out =~ /(\d.\d+)/) {
30+
my $version = "$1";
31+
if ($version < $min_gs_version) {
32+
print("Warning - your Ghostscript version, ${version}, may be too old to handle everything.\n");
33+
print("We would like version ${min_gs_version}. Continuing with fingers crossed...\n");
34+
}
35+
}
36+
} else {
37+
print("Trouble checking GhostScript version -- skipping version check for ${min_gs_version}\n");
38+
}
39+
40+
41+
# The Redefinition of function asy below allows us to customize how to call
42+
# asy (asymptote).
143
sub asy {return system("asy '$_[0]' -render=0 -nosafe -noprc --gsOptions='-P'");}
44+
45+
# The following add custom dependencies for Asymptote:
46+
# Basically the parameters are
47+
# from extension, to_extension, must (0=file does not have to exist), name of function
48+
# See the section "Custom Dependencies" under "man latexmk".
249
add_cus_dep("asy","eps",0,"asy");
350
add_cus_dep("asy","pdf",0,"asy");
451
add_cus_dep("asy","tex",0,"asy");

0 commit comments

Comments
 (0)