-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.php
executable file
·65 lines (58 loc) · 1.71 KB
/
Test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
namespace Publish;
require_once('Paper.php');
$curdir = getcwd();
?>
<? Paper::Head(array(
'title' => 'Paper Test',
'subtitle' => 'Does it work?',
'author' => 'Jonathan D. Lettvin'
)); ?>
<?
Paper::Figures('images', 'A pair of images', array(
array(
'filename' => "file://$curdir/Synchronic.png",
'id' => 'FishEye',
'label' => 'Totally new perspective',
'width' => 256,
'height' => 256
),
array(
'filename' => "file://$curdir/NoisyGrayStep.png",
'id' => 'NGS',
'label' => 'Noisy Gray Step',
'width' => 256,
'height' => 256
)
));
Paper::Listing(
'this',
basename(__FILE__),
htmlspecialchars(file_get_contents(__FILE__)));
?>
<table align="center" border="1">
<caption align="bottom">How to run and view this script</caption>
<tr><td>
linux command</td><td>php -S localhost:8000 Test.php
</td></tr><tr><td>
browse location</td><td>http://localhost:8000/
</td></tr></table>
<?
Paper::Equation(idlabeltex('Fun:1', 'Euler\'s identity', 'e^{i\pi}+1 = 0'));
Paper::Equation(array(
'id' => 'Fun:2',
'tex' => '\nabla^2u = \frac{1}{c^2}\frac{\partial^2u}{\partial t^2}',
'label' => 'Wave equation')
);
Paper::Equation(array(
'id' => 'Fun:3',
'tex' => 'F\'(x)=\lim_{\Delta x\to 0}\frac{F(x+\Delta x)-F(x)}{\Delta x}',
'label' => 'Fundamental theorem of calculus')
);
?>
One fun equation is <? Paper::EqReference("Fun:1"); ?>.
Another is <? Paper::EqReference("Fun:2"); ?>.
For sure, <? Paper::EqReference("Fun:3"); ?> is fun too!
<? Paper::FigReference("FishEye"); ?> is a strange image but
<? Paper::FigReference("NGS"); ?> is more important.
<? Paper::Tail(); ?>