diff --git a/.gitignore b/.gitignore index 1cb355c..4888bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ scripts/tmp -scripts/deps \ No newline at end of file +scripts/deps +lib/mathjax \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index f4a06b9..87fe21f 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -7,18 +7,52 @@ "id": "5235c353398dcc73", "type": "tabs", "children": [ + { + "id": "7c859398719a1e19", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "README.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "README" + } + } + ] + }, + { + "id": "f638e1a8b87077ad", + "type": "tabs", + "children": [ + { + "id": "b8c0b940e83a0cce", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "chapters/01_Getting_Started.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "01_Getting_Started" + } + }, { "id": "aea7b6310a1ff6ff", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "chapters/02_Features.md", + "file": "chapters/00_Introduction.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "02_Features" + "title": "00_Introduction" } } ] @@ -257,14 +291,23 @@ "obsidian-kanban:Create new board": false } }, - "active": "6852f526864219b9", + "active": "b8c0b940e83a0cce", "lastOpenFiles": [ - "lib/zotero.bib", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Zero.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff", + "lib/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff", + "README.md", "chapters/01_Getting_Started.md", - "chapters/02_Features.md", "chapters/00_Introduction.md", - "conf/sedcoz12V", - "build/lib/diag", + "chapters/02_Features.md", "build/lib/img/ACEP Logo for Canvas.png", "build/lib/img/ACEP Logo.png", "build/lib/img/ACEP-50px.png", @@ -273,17 +316,8 @@ "build/lib/img/UAF.png", "build/lib/img/UAFLogo_A_black.png", "build/lib/img/UAFLogo_A_blue.png", - "README.md", - "build/b3.epub", - "build/Paths-to-Perception.epub", - "build/media", "chapters/Citations.md", "chapters/Terminology.md", - "lib/old-citations.bib", - "build/b3.html", - "build/b3.tex", - "build/Paths-to-Perception.tex", - "build/Paths-to-Perception.html", "build/lib/img/unit-circle-with-tau.png", "build/lib/img/unit-circle-with-pi.png.png", "pm/Book Action Items.md", diff --git a/README.md b/README.md index 1bdf046..b8421a2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # basic-book-builder (b3) -This is a basic book (article) builder template based on a Pandoc build process in conjunction with a number of other tools to generate PDF, ODT, HTML, LaTex, and Epub book formats from Markdown source content in an Obsidian vault. +This is a basic book (article) builder template based on a Pandoc build process in conjunction with a number of other tools to generate PDF, ODT, HTML, LaTex, Markdown, and Epub book formats from Markdown source content in an Obsidian vault. ## Directory Structure @@ -75,8 +75,8 @@ Install the Better BibTex Plugin for Zotero - Zotero > File > Export Library > Format: Better BibTeX - [ ] Keep Updated -- [ ] Save to: ~/Documents/Lib/Citations.bib -- [ ] Symlink your ~/Documents/Lib/Citations.bib to basic-book-builder/lib/citations.bib +- [ ] Save to: ~/Documents/Lib/zotero.bib +- [ ] Symlink your ~/Documents/Lib/Citations.bib to basic-book-builder/lib/zotero.bib #### Zotero Connector Browser Plugin @@ -91,6 +91,7 @@ Provides you the ability to auto add Web resources to your Zotero citation datab ``` sudo apt install https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb ``` + #### Pandoc - https://pandoc.org/ @@ -141,6 +142,7 @@ sudo apt install https://github.com/johnfactotum/foliate/releases/download/2.6.4 ``` sudo apt install calibre ``` + #### MathJax - https://www.mathjax.org/ diff --git a/build/b3.html b/build/b3.html index e302908..6e4d427 100644 --- a/build/b3.html +++ b/build/b3.html @@ -146,10 +146,7 @@ window.MathJax = { +
  • Editing the Book +
  • Example Content
  • Terminology
  • -
  • Citations
  • +
  • Citations
  • Introduction

    +

    This is a basic book (or article) builder template based on a Pandoc +build process in conjunction with a number of other tools to generate +PDF, ODT, HTML, LaTex, Markdown, and Epub book output formats from +Markdown source content , which can optionally be edited as an Obsidian +vault.

    This book builder template has been curated by John Haverlack.(“John Haverlack ACEP n.d.)

    -
    -

    If I have seen further it is by standing on the shoulders of -Giants.

    -

    – Isaac Newton

    -

    Conventions

    -

    In this book we’ll use a few conventions.

    -

    New Concepts

    -

    As many of the topics discussed in this book are a mix of -established math and physics, proposed -dualistic interpretations of established ideas, and also -speculative ideas that I don’t yet know how to address, -I wanted a way to clearly distinguish these concepts. I’ve come up with -the following convention to highlight these classes of concepts to -indicate their level of mainstream acceptance.

    -

    In this book, established concept may be highlighted in green, and -represent mainstream physics or math concepts.

    +

    A few callout box styles have been added to easily highlight +content.

    Established Concept

    Einsteins Relativistic Dynamics Equations E2 = (m0c2)2 + (pc)2

    -

    New ideas proposed by the author which have not been peer reviewed, -verified or tested, and should be looked at with scrutiny.

    Proposed Concept

    With the speed of light, c = 1: E2 = m02 + p2

    -

    Speculative Idea, that the author wonders about, but does not know -how to demonstrate, or ideas that need further treatment to prove or -disprove.

    Speculative Concept

    With the speed of light, c = 1: E2 = m02 + p2

    -

    Or Warnings…

    Caution Note

    Beware of this section.

    @@ -241,10 +232,179 @@ class="math display">E2 = m02

    Getting Started

    Installing Pre-Requisites

    +

    For Debian / ZorinOS and likely Ubuntu based systems.

    +
    +

    TODO

    +

    It would be nice to roll a setup script to take care of this.

    +

    Required

    +

    Pandoc

    + +
    sudo apt install https://github.com/jgm/pandoc/releases/download/3.8.2.1/pandoc-3.8.2.1-1-amd64.deb
    +

    Code Editor

    +
    +

    Code Editor

    +

    VSCodium is recommend for +privacy (telemetry/tracking) reasons - https://vscodium.com/

    +
    +

    But any text editor will work. #### make

    +
    sudo apt install make
    +

    jq and yq

    +
    sudo apt install jq yq
    +

    texlive

    +
    sudo apt install texlive texlive-xetex texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
    +

    MathJax

    + +
    wget https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz
    +tar xzf mathjax-3.2.2.tgz
    +mv package/es5/* lib/mathjax
    +rm -rf package mathjax-3.2.2.tgz
    +
    +

    TODO

    +

    This need to be rolled into a setup script.

    +

    Optional

    +

    The following are not strictly requires to use this book builder +template.

    +

    Obsidian

    +
    +

    Highly Recommended

    +

    Editing book chapter content in Obsidian is a very productive means +for editing Markdown source content.

    +
    + +
    sudo apt install https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb
    +

    Zotero

    +
    +

    Highly Recommended

    +

    If you need to managed citations and references, Zotero integration +is highly recommended.

    +
    + +
    sudo cp ./scripts/deps/zotero.list /etc/apt/sources.list.d/
    +
    sudo apt update
    +
    sudo apt install zotero
    +
    Better BibTex for Zotero
    +

    Install the Better BibTex Plugin for Zotero - Zotero > Tool > +Plugins

    +
    Export citations.bib
    + +
    Zotero Connector Browser +Plugin
    + +

    Provides you the ability to auto add Web resources to your Zotero +citation database.

    +

    lmodern

    +
    sudo apt install lmodern
    +

    epubcheck

    +
    sudo apt install epubcheck
    +

    foliate

    +

    An EPub Reader

    + +
    sudo apt install https://github.com/johnfactotum/foliate/releases/download/2.6.4/com.github.johnfactotum.foliate_2.6.4_all.deb
    +

    calibre

    +

    An EPub Reader

    + +
    sudo apt install calibre

    Editing the Configuration

    +

    Editing the Book

    +

    Configuration

    +

    There are a number of other config files for each format:

    +
    conf/
    +├── epub-metadata.xml
    +├── epub_template.html
    +├── epub.yaml
    +├── frontmatter_epub.md
    +├── frontmatter_epub.xhtml
    +├── frontmatter.html
    +├── frontmatter.tex
    +├── header.tex
    +├── html.yaml
    +├── latex.yaml
    +├── markdown.yaml
    +├── metadata.yaml
    +├── pandoc.yaml
    +├── pdf.yaml
    +├── style.css
    +└── style_epub.css
    +
    +

    Main Config Files

    + +

    FrontMatter Config

    +

    There are 2 Version of the FrontMatter for PDF, and HTML bases +formats that set the Title, Author, Verizon, Copyright, etc…

    + +
    +

    There is probably a better way to do this.

    +

    Editing the Content

    +

    To edit the book open the basic-book-builder directory +as an Obsidian Vault.

    + +

    Citations

    +
    +

    Note: the Zotero database needs configured to export automatically to +lib/citations.bib

    +
    +

    To insert a Zotero Citation - Ensure the Zotero App and DB are +running on you system. - Alt + I (to insert citation) - Search for and +select citation reference

    +

    Usage: Building the Book

    +

    PDF

    +
    make pdf
    +

    HTML

    +
    make html
    +

    LaTex

    +
    make latex
    +

    Markdown

    +
    make markdown
    +

    EPub

    +
    +

    Note: This ePub configuration still needs tuning.

    +
    +
    make epub

    Example Content

    In Rν the Planck @@ -842,68 +1002,68 @@ used to computer prior values is also consistent.

    Sage Code

    Unit Analysis computations have been performed with Sage Math.

    -
    # Define constance
    -one = 1.n(digits=6)
    -pi = pi.n(digits=6)
    -tau = 2 * pi
    -t = tau
    -
    -# Define the units
    -meters = var('m')
    -m = one*meters
    -
    -seconds = var('s')
    -s = seconds
    -
    -kilograms = var('kg')
    -kg = kilograms
    -
    -newtons = kg * m / s^2
    -N = newtons
    -
    -joules = N * m
    -J = joules
    -
    -print("pi    =", pi)
    -print("tau   =", t)
    -
    -# Speed of light in meters/second
    -speed_of_light = 299792458 * meters/seconds
    -sol = speed_of_light
    -c = sol
    -print("si c  =", c)
    -
    -rnu_c = c / c
    -print("R\u03BD c  =", rnu_c)
    -
    -# Gravitational Constant
    -gravitational_constant = 6.67384e-11 * N*(m^2/kg^2)
    -G = gravitational_constant
    -print("si G  =", G)
    -
    -rnu_G = 4*pi*G/c^2
    -Go = rnu_G
    -print("R\u03BD Go =", Go)
    -
    -
    -# Planck's Constant
    -reduced_plancks_constant = 1.054571726e-34 * J*s
    -h_bar = reduced_plancks_constant
    -print("si \u210F  =", h_bar)
    -
    -rnu_h_bar = h_bar * Go / c
    -print("R\u03BD "u"\u210F  =", rnu_h_bar)
    -
    -# Planck Length
    -rnu_h_bar_str = str(rnu_h_bar) 
    -numerical_part_str = rnu_h_bar_str.split('*')[0]  
    -numerical_part_str = numerical_part_str.strip('()')
    -numerical_part = float(numerical_part_str)
    -rnu_sqrt_h_bar = numerical_part^(1/2)
    -# ^ Sage cannot process sqrt on units... Lame.
    -lP = rnu_sqrt_h_bar * m
    -print("R\u03BD \u221A\u210F =", lP)
    +
    # Define constance
    +one = 1.n(digits=6)
    +pi = pi.n(digits=6)
    +tau = 2 * pi
    +t = tau
    +
    +# Define the units
    +meters = var('m')
    +m = one*meters
    +
    +seconds = var('s')
    +s = seconds
    +
    +kilograms = var('kg')
    +kg = kilograms
    +
    +newtons = kg * m / s^2
    +N = newtons
    +
    +joules = N * m
    +J = joules
    +
    +print("pi    =", pi)
    +print("tau   =", t)
    +
    +# Speed of light in meters/second
    +speed_of_light = 299792458 * meters/seconds
    +sol = speed_of_light
    +c = sol
    +print("si c  =", c)
    +
    +rnu_c = c / c
    +print("R\u03BD c  =", rnu_c)
    +
    +# Gravitational Constant
    +gravitational_constant = 6.67384e-11 * N*(m^2/kg^2)
    +G = gravitational_constant
    +print("si G  =", G)
    +
    +rnu_G = 4*pi*G/c^2
    +Go = rnu_G
    +print("R\u03BD Go =", Go)
    +
    +
    +# Planck's Constant
    +reduced_plancks_constant = 1.054571726e-34 * J*s
    +h_bar = reduced_plancks_constant
    +print("si \u210F  =", h_bar)
    +
    +rnu_h_bar = h_bar * Go / c
    +print("R\u03BD "u"\u210F  =", rnu_h_bar)
    +
    +# Planck Length
    +rnu_h_bar_str = str(rnu_h_bar) 
    +numerical_part_str = rnu_h_bar_str.split('*')[0]  
    +numerical_part_str = numerical_part_str.strip('()')
    +numerical_part = float(numerical_part_str)
    +rnu_sqrt_h_bar = numerical_part^(1/2)
    +# ^ Sage cannot process sqrt on units... Lame.
    +lP = rnu_sqrt_h_bar * m
    +print("R\u03BD \u221A\u210F =", lP)

    Output

    pi    = 3.14159
     tau   = 6.28319
    @@ -917,7 +1077,7 @@ Rν √ℏ = (5.72928e-35)*m
     si lP = (1.61620e-35)*sqrt(m^2)
     Rν lP = (2.77455e-47)*sqrt(m^3/kg)

    Terminology

    -

    Citations

    +

    Citations

    “*If I have seen further it is by standing on the shoulders of Giants.*” -> -> -- Isaac Newton - ## Conventions -In this book we'll use a few conventions. - -### New Concepts - -As many of the topics discussed in this book are a mix of **established** math and physics, **proposed** dualistic interpretations of established ideas, and also **speculative** ideas that I don't yet know how to address, I wanted a way to clearly distinguish these concepts. I've come up with the following convention to highlight these classes of concepts to indicate their level of mainstream acceptance. - -In this book, established concept may be highlighted in green, and represent mainstream physics or math concepts. +A few callout box styles have been added to easily highlight content. > [!established] Established Concept > Einsteins Relativistic Dynamics Equations > $$E^2 = (m_{0} \cdot c^2)^2 + (p \cdot c)^2 $$ -New ideas proposed by the author which have not been peer reviewed, verified or tested, and should be looked at with scrutiny. > [!proposed] Proposed Concept With the speed of light, $c = 1$: $$E^2 = m_{0}^2 + p^2 $$ -Speculative Idea, that the author wonders about, but does not know how to demonstrate, or ideas that need further treatment to prove or disprove. > [!speculative] Speculative Concept With the speed of light, $c = 1$: $$E^2 = m_{0}^2 + p^2 $$ -Or Warnings... > [!caution] Caution Note > Beware of this section. + > [!warning] Warning Note > Beware of this section. + > [!danger] Alerts > Extreme Highlight diff --git a/chapters/01_Getting_Started.md b/chapters/01_Getting_Started.md index efaded1..9d05238 100644 --- a/chapters/01_Getting_Started.md +++ b/chapters/01_Getting_Started.md @@ -3,18 +3,246 @@ ## Installing Pre-Requisites +For Debian / ZorinOS and likely Ubuntu based systems. + +> [!caution] TODO +> It would be nice to roll a setup script to take care of this. + ### Required +#### Pandoc + +- https://pandoc.org/ +- [Download](https://github.com/jgm/pandoc/releases/tag/3.8.2.1) + +``` +sudo apt install https://github.com/jgm/pandoc/releases/download/3.8.2.1/pandoc-3.8.2.1-1-amd64.deb +``` + +#### Code Editor + +> [!established] Code Editor +> [VSCodium](https://vscodium.com/) is recommend for privacy (telemetry/tracking) reasons +> - https://vscodium.com/ + +But any text editor will work. +#### make + +``` +sudo apt install make +``` + +#### jq and yq + +``` +sudo apt install jq yq +``` + +#### texlive + +``` +sudo apt install texlive texlive-xetex texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra +``` + + +#### MathJax + +- https://www.mathjax.org/ + +``` +wget https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz +tar xzf mathjax-3.2.2.tgz +mv package/es5/* lib/mathjax +rm -rf package mathjax-3.2.2.tgz +``` + +> [!caution] TODO +> This need to be rolled into a setup script. + + ### Optional +The following are not strictly requires to use this book builder template. + +#### Obsidian + +> [!established] Highly Recommended +> Editing book chapter content in Obsidian is a very productive means for editing Markdown source content. + +- https://obsidian.md/ +- [Deb Package](https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb) + +``` +sudo apt install https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb +``` + +#### Zotero + +> [!established] Highly Recommended +> If you need to managed citations and references, Zotero integration is highly recommended. + + +- https://www.zotero.org/ + +``` +sudo cp ./scripts/deps/zotero.list /etc/apt/sources.list.d/ +``` + +``` +sudo apt update +``` + +``` +sudo apt install zotero +``` + +##### Better BibTex for Zotero + +Install the Better BibTex Plugin for Zotero +- Zotero > Tool > Plugins + + +##### Export citations.bib + +- Zotero > File > Export Library > Format: Better BibTeX +- [ ] Keep Updated +- [ ] Save to: ~/Documents/Lib/zotero.bib +- [ ] Symlink your ~/Documents/Lib/Citations.bib to basic-book-builder/lib/zotero.bib + +##### Zotero Connector Browser Plugin + +- https://chromewebstore.google.com/detail/zotero-connector/ekhagklcjbdpajgpjgmbionohlpdbjgc + +Provides you the ability to auto add Web resources to your Zotero citation database. + +#### lmodern + +``` +sudo apt install lmodern +``` + +#### epubcheck + +``` +sudo apt install epubcheck +``` + +#### foliate + +An EPub Reader + +- https://johnfactotum.github.io/foliate/ + +``` +sudo apt install https://github.com/johnfactotum/foliate/releases/download/2.6.4/com.github.johnfactotum.foliate_2.6.4_all.deb +``` + +#### calibre + +An EPub Reader + +- https://calibre-ebook.com + +``` +sudo apt install calibre +``` ## Editing the Configuration +# Editing the Book +### Configuration +There are a number of other config files for each format: + +``` +conf/ +├── epub-metadata.xml +├── epub_template.html +├── epub.yaml +├── frontmatter_epub.md +├── frontmatter_epub.xhtml +├── frontmatter.html +├── frontmatter.tex +├── header.tex +├── html.yaml +├── latex.yaml +├── markdown.yaml +├── metadata.yaml +├── pandoc.yaml +├── pdf.yaml +├── style.css +└── style_epub.css + +``` + +#### Main Config Files + +- metadata.yaml - Set Title, etc +- pandoc.yaml - Main Pandoc Config +#### Per format Configs + - `pdf.yaml` + - `html.yaml` + - `latex.yaml` + - `epub.yaml` + +### FrontMatter Config + +There are 2 Version of the FrontMatter for PDF, and HTML bases formats that set the Title, Author, Verizon, Copyright, etc... + +- `frontmatter.tex` +- `frontmatter.html` +- `frontmatter_epub.*` - Work in Progress + +> There is probably a better way to do this. ## Editing the Content +To edit the book open the `basic-book-builder` directory as an Obsidian Vault. +- Edit the Markdown content in the `chapters` directory. + +### Citations + +> Note: the Zotero database needs configured to export automatically to `lib/citations.bib` + +To insert a Zotero Citation +- Ensure the Zotero App and DB are running on you system. +- Alt + I (to insert citation) +- Search for and select citation reference + +## Usage: Building the Book + +#### PDF + +``` +make pdf +``` + +#### HTML + +``` +make html +``` + +#### LaTex + +``` +make latex +``` + +#### Markdown + +``` +make markdown +``` + +#### EPub + +> Note: This ePub configuration still needs tuning. + +``` +make epub +```