diff --git a/docs/make.jl b/docs/make.jl index 571c236..57a3a81 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,14 +1,28 @@ CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing using Documenter, Dates using Calculus +# Bring the CalculusWithJuliaSquared module binding into scope so its docstrings can be +# pulled into an API section here. It ships with the package (Calculus reexports it), so +# this embeds CWJS's API reference natively in the Calculus site — no cross-repo HTML. +using Calculus.CalculusWithJuliaSquared @info "Building Documentation" makedocs(; - modules=[Calculus], + modules=[Calculus, CalculusWithJuliaSquared], sitename = "Calculus", pagesonly = true, + # Keep Calculus's own content strictly checked; tolerate only what the embedded CWJS + # autodocs block needs (mirrors CalculusWithJuliaSquared's own docs/make.jl). + warnonly = Documenter.except(:autodocs_block), + # CWJS is installed as an extracted package tree (no .git), so Documenter can't infer a + # remote for its docstrings' "source" links. Point them at the fork's main branch. + remotes = Dict( + pkgdir(CalculusWithJuliaSquared) => + (Documenter.Remotes.GitHub("FourMInfo", "CalculusWithJuliaSquared.jl"), "main"), + ), pages = [ "index.md", + "API/CalculusWithJuliaSquared.md", "Differential Calculus" => [ "Differential_Calculus/01 Derivatives and Rules.md", "Differential_Calculus/02 Applications and Extrema.md", diff --git a/docs/src/API/CalculusWithJuliaSquared.md b/docs/src/API/CalculusWithJuliaSquared.md new file mode 100644 index 0000000..426c310 --- /dev/null +++ b/docs/src/API/CalculusWithJuliaSquared.md @@ -0,0 +1,17 @@ +# CalculusWithJuliaSquared API + +[`CalculusWithJuliaSquared`](https://github.com/FourMInfo/CalculusWithJuliaSquared.jl) is a +separate, pure-Julia package — a fork of `CalculusWithJulia` — that these study materials are built on. It has its own repository, versioning, and documentation; it is not maintained as part of `Calculus`. + +`Calculus` does, however, `@reexport` it, so its exported helpers (`lim`, `tangent`, `secant`, `D`, `riemann`, `∇`, …) are available directly once you `using Calculus` — no separate install or `using CalculusWithJuliaSquared` needed. That is why its API is documented here: the reference below is generated from the package's own docstrings, so it always tracks the installed version. + +The companion notes that exercise this package are a work-in-progress port of the _Calculus +with Julia_ notes onto `Symbolics` / pure Julia: + +- The original notes (Python-backed `SymPy`): [Calculus with Julia](https://calculuswithjulia.github.io/), by John Verzani. +- Our fork, where the port progresses chapter by chapter: [CalculusWithJuliaSquaredNotes.jl](https://github.com/FourMInfo/CalculusWithJuliaSquaredNotes.jl) on GitHub. +- The rendered ported book — _forthcoming_ at `fourm.info/cwjsn`. + +```@autodocs +Modules = [CalculusWithJuliaSquared] +``` diff --git a/docs/src/index.md b/docs/src/index.md index 8f54a98..36870c4 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,15 +4,23 @@ This repository contains a package that provides a collection of functions and documentation for learning and applying calculus concepts. The code and documentation are created as I work through various calculus textbooks, discussed below. -Besides the package documentation, you will also find in the left navigation tab links to documents explaining topics from the source books. These often provide more details than covered in the books. Currently, there is one section: Basics +Besides the package documentation, in the left-hand sidebar menu you will also find links to documents explaining topics from the source books. These often provide more details than covered in the books. The Basics documentation section covers the basic foundations of differential and integral calculus, including derivatives, curve sketching, integrals, antiderivatives and integration techniques. The source of the documents in this section is the book [_Foundations of Mathematics: A Preparatory Course_](https://link.springer.com/book/10.1007/978-3-662-67809-1). by Guido Walz, Frank Zeilfelder and Thomas Rießinger. The earlier contents of this book cover basic mathematical concepts, and documentation and code for those topics can be found in the [Math_Foundations](https://fourm.info/math_foundations/dev/sites/) package. The version currently up is a summary created by Claude which has not yet been edited by me. As I go through it I will edit it carefully. Also there is no code or notebooks yet, and those will be created as I go through the text. +## Calculus with Julia Squared + +A while back I came across John Verzani's excellent [Calculus with Julia Notes](https://calculuswithjulia.github.io) which makes use of his [Calculus with Julia package](https://jverzani.github.io/CalculusWithJulia.jl/dev/). Since I enjoy using Julia and have committed to it, and want to avoid context switching to Python unless absolutely necessary, I focus on using [Julia Symbolics](https://docs.sciml.ai/Symbolics/stable/) and [Nemo](https://nemo.readthedocs.io/en/latest/) instead of SymPy. So while I want to use Verzani's work, it is heavily dependent on SymPy. + +So I decided to go down the quixotic path of porting Verzani's repos to be pure Julia. I would never have attempted this in the pre-LLMs day. My knowledge of Julia, Python and calculus is just not good enough. But with the help of Claude, _Calculus with Julia_ became _Calculus with Julia with Julia not Python_. More succinctly: _Calculus with Julia Squared_ (CWJS). I am also in the process of porting a new version of _Calculus with Julia Squared_ notes. Eventually I will write up a blog post on the port experience. + +Since I will be making extensive use of CWJS in my package code, I have also added CWJS as a re-export to this package. You can see the documentation in the CWJS API link in the left-hand sidebar menu. + ## Package's Module -The Calculus package contains one module, [Calculus.jl](https://github.com/FourMInfo/Calculus/blob/main/src/Calculus.jl) which essentially encapsulates and exports all aspects of code contained in this repository. The simplest way to access all its functionality is to use the Julia package manager to add the Github repository (which is open source). Then you can use the command `using Calculus` in your notebook, code or Julia REPL. +The Calculus package contains one module, [Calculus.jl](https://github.com/FourMInfo/Calculus/blob/main/src/Calculus.jl) which essentially encapsulates and exports all aspects of code contained in this repository. The simplest way to access all its functionality is to use the Julia package manager to add the GitHub repository (which is open source). Then you can use the command `using Calculus` in your notebook, code or Julia REPL. ## Basic Calculus