Hans Petter Langtangen 12 лет назад
Родитель
Сommit
7be2a998df

+ 3 - 10
doc/src/tut/basics.do.txt

@@ -451,11 +451,7 @@ first `movie` command above), is a safe method that you always
 can rely on.
 You can try loading `anim.html` into a web browser, after first
 having run the present example in the file
-# #ifdef PRIMER_BOOK
-`vehicle0.py`.
-# #else
-"`vehicle0.py`": "http://hplgit.github.com/pysketcher/doc/src/sketcher/src-tut/vehicle0.py". Alternatively, you can view a ready-made "movie": "http://hplgit.github.com/pysketcher/doc/src/sketcher/mov-tut/anim.html_vehicle0/anim.html".
-# #endif
+"`vehicle0.py`": "${src_path_pysketcher}/vehicle0.py". Alternatively, you can view a ready-made "movie": "${src_path_tut}/mov-tut/anim.html_vehicle0/anim.html".
 
 === Animation: Rolling the Wheels ===
 label{sketcher:vehicle1:anim}
@@ -522,11 +518,8 @@ def move(t, fig):
     w2.rotate(degrees(angle), center=(w_1 + L, R))
 !ec
 The complete example is found in the file
-# #ifdef PRIMER_BOOK
-`vehicle1.py`.
-# #else
-"`vehicle1.py`": "http://hplgit.github.com/pysketcher/doc/src/sketcher/src-tut/vehicle1.py". You may run this file or watch a "ready-made movie": "http://hplgit.github.com/pysketcher/doc/src/sketcher/mov-tut/anim.html_vehicle1/anim.html".
-# #endif
+"`vehicle1.py`": "${src_path_pysketcher}/vehicle1.py". You may run this file or watch a "ready-made movie": "${src_path_tut}/mov-tut/anim.html_vehicle1/anim.html".
+
 
 The advantages with making figures this way, through programming
 rather than using interactive drawing programs, are numerous.  For

+ 2 - 5
doc/src/tut/implementation.do.txt

@@ -293,11 +293,8 @@ vehicle.draw()
 drawing_tool.display()
 !ec
 A complete code defining and using class `Vehicle0` is found in the file
-# #ifdef PRIMER_BOOK
-`vehicle2.py`.
-# #else
-"`vehicle2.py`": "http://hplgit.github.com/pysketcher/doc/src/sketcher/src-tut/vehicle2.py".
-# #endif
+"`vehicle2.py`": "${src_path_pysketcher}/vehicle2.py".
+
 
 The `pysketcher` package contains a wide range of classes for various
 geometrical objects, particularly those that are frequently used in

+ 7 - 0
doc/src/tut/main_sketcher.do.txt

@@ -2,6 +2,13 @@ TITLE: Using Pysketcher to Create Principal Sketches of Physics Problems
 AUTHOR: Hans Petter Langtangen at Center for Biomedical Computing, Simula Research Laboratory and Department of Informatics, University of Oslo
 DATE: today
 
+<%
+#src_path_tut = 'http://hplgit.github.com/pysketcher/doc/src/tut'
+src_path_tut = 'http://tinyurl.com/oou9lp7'
+#src_path_pysketcher = 'https://github.com/hplgit/pysketcher/tree/master/doc/src/tut/src-tut'
+src_path_pysketcher = 'http://tinyurl.com/ot733jn'
+%>
+
 __Abstract.__
 Pysketcher is a Python package which allows principal sketches of
 physics and mechanics problems to be realized through short programs

doc/src/tut/make_primer.sh → doc/src/tut/make_primer3.sh