From 1ebf6a6467167ae9ec0db0c069cfe6170dbcc18f Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Tue, 1 Aug 2023 20:36:04 -0700 Subject: started calculus, fixed error in colorspace for phplatex --- src/phplatex.php | 2 +- src/style.php | 7 +++++-- src/writing/derivative.php | 25 +++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/phplatex.php b/src/phplatex.php index 6557ff0..4d2c60b 100644 --- a/src/phplatex.php +++ b/src/phplatex.php @@ -119,7 +119,7 @@ function texify($string,$dpi='90',$fore="",$back="",$extraprelude="",$trans=FALS if ($trans) { $convert_cmd .= ' -transparent-color "#'.$back.'" -transparent "#'.$back.'"'; } - $convert_cmd .= ' -colorspace RGB -density '.$dpi.' -trim +page '.$tfn.'.ps '.$tfn.'.'.$imgfmt; + $convert_cmd .= ' -colorspace sRGB -density '.$dpi.' -trim +page '.$tfn.'.ps '.$tfn.'.'.$imgfmt; exec($convert_cmd); #Note: +page OR -page +0+0 OR +repage moves the image to the cropped area (kills offset) diff --git a/src/style.php b/src/style.php index b55bb90..52fd66a 100644 --- a/src/style.php +++ b/src/style.php @@ -39,7 +39,7 @@ p { font-family: 'Quicksand', sans-serif; font-size: 16pt; color: var(--text); - padding: 8px 50px 8px 50px; + margin: 8px 75px 8px 75px; } h1 { @@ -94,7 +94,6 @@ ul p { font-family: 'Quicksand', sans-serif; font-size: 16pt; color: var(--text); - padding: 8px 50px 8px 50px; } a { @@ -134,3 +133,7 @@ hr { .ascii { color: var(--secondary); } +.center { + text-align: center; + margin: 14px 40px 14px 40px; +} diff --git a/src/writing/derivative.php b/src/writing/derivative.php index a7a369a..17f2e7f 100644 --- a/src/writing/derivative.php +++ b/src/writing/derivative.php @@ -3,7 +3,11 @@ $title = "The Calculus of Infinitesimals"; require($_SERVER["DOCUMENT_ROOT"] . "/head.php"); require($_SERVER["DOCUMENT_ROOT"] . "/header.php"); include($_SERVER["DOCUMENT_ROOT"] . "/phplatex.php"); -include($_SERVER["DOCUMENT_ROOT"] . "/vars.php"); +require($_SERVER["DOCUMENT_ROOT"] . "/vars.php"); +function tex($latex) { + global $c_fg, $c_bg; + return texify($latex, 130, $c_fg, $c_bg, "", FALSE); +} ?>

Calculus is often used as the complete name of a branch of mathematics dealing with @@ -12,6 +16,23 @@ include($_SERVER["DOCUMENT_ROOT"] . "/vars.php"); has come to be known in this way is a testament to its importance.

- Cube root of two: + To understand calculus, it is critical to understand the derivative. Let us begin with + the definition of a function. +

+

+

+ This expression defines a relation between two quantities x and y. It can be said that + y is given in terms of x. Specifically, we have defined a function f that provides + a mapping for values of x. The actual mapping of a given function varies; what follows is + one example. +

+

+

+ Here, the value of the function is said to be equal to the product of its argument, and + a constant a. Take note of the fact that this is a constant multiple, as it means that + the function is said to be linear--an important property. Evidently, + by the transitive property. + Here, the relation between y and x becomes clear; y is greater than x by a multiple a. + Observe the pattern that forms when evaluating f at various x.

-- cgit v1.2.3-70-g09d2