make pdf file generation work

This commit is contained in:
jverzani
2022-10-10 14:28:05 -04:00
parent a0b913eed8
commit a9ca131870
59 changed files with 884 additions and 1330 deletions

View File

@@ -234,14 +234,14 @@ The extra step is to specify a "`NonlinearSystem`." It is a system, as in practi
```{julia}
ns = NonlinearSystem([eq], [x], [α], name=:ns)
ns = NonlinearSystem([eq], [x], [α], name=:ns);
```
The `name` argument is special. The name of the object (`ns`) is assigned through `=`, but the system must also know this same name. However, the name on the left is not known when the name on the right is needed, so it is up to the user to keep them synchronized. The `@named` macro handles this behind the scenes by simply rewriting the syntax of the assignment:
```{julia}
@named ns = NonlinearSystem([eq], [x], [α])
@named ns = NonlinearSystem([eq], [x], [α]);
```
With the system defined, we can pass this to `NonlinearProblem`, as was done with a function. The parameter is specified here, and in this case is `α => 1.0`. The initial guess is `[1.0]`:
@@ -365,7 +365,7 @@ The above should be self explanatory. To put into a form to pass to `solve` we d
```{julia}
@named sys = OptimizationSystem(Area, [x], [P])
@named sys = OptimizationSystem(Area, [x], [P]);
```
(This step is different, as before an `OptimizationFunction` was defined; we use `@named`, as above, to ensure the system has the same name as the identifier, `sys`.)
@@ -409,7 +409,7 @@ could be similarly approached:
@variables x
y = Area/x # from A = xy
P = 2x + 2y
@named sys = OptimizationSystem(P, [x], [Area])
@named sys = OptimizationSystem(P, [x], [Area]);
u0 = [x => 4.0]
p = [Area => 25.0]
@@ -570,14 +570,12 @@ As well, suppose we wanted to parameterize our function and then differentiate.
Consider $d/dp \int_0^\pi \sin(px) dx$. We can do this integral directly to get
$$
\begin{align*}
\frac{d}{dp} \int_0^\pi \sin(px)dx
&= \frac{d}{dp}\left( \frac{-1}{p} \cos(px)\Big\rvert_0^\pi\right)\\
&= \frac{d}{dp}\left( -\frac{\cos(p\cdot\pi)-1}{p}\right)\\
&= \frac{\cos(p\cdot \pi) - 1)}{p^2} + \frac{\pi\cdot\sin(p\cdot\pi)}{p}
\end{align*}
$$
Using `Integrals` with `QuadGK` we have:

View File

@@ -468,7 +468,7 @@ layout = Config(title = "Annotations",
Plot(data, layout)
```
The following example is more complicated use of the elements previously described. It mimics an image from [Wikipedia](https://en.wikipedia.org/wiki/List_of_trigonometric_identities) for trigonometric identities. The use of $\LaTeX$ does not seem to be supported through the `JavaScript` interface; unicode symbols are used instead. The `xanchor` and `yanchor` keys are used to position annotations away from the default. The `textangle` key is used to rotate text, as desired.
The following example is more complicated use of the elements previously described. It mimics an image from [Wikipedia](https://en.wikipedia.org/wiki/List_of_trigonometric_identities) for trigonometric identities. The use of `LaTeX` does not seem to be supported through the `JavaScript` interface; unicode symbols are used instead. The `xanchor` and `yanchor` keys are used to position annotations away from the default. The `textangle` key is used to rotate text, as desired.
```{julia, hold=true}