Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Adds fonts (Arimo, TW Kai), updates user manual

AuthorDaveJarvis <email>
Date2025-09-01 02:21:24 GMT-0700
Commit7aacf6ac4ee6551d3eacbd19839e10dddae6734f
Parent7f74efe
Delta109 lines added, 104 lines removed, 5-line increase
docs/01-introduction.md
{{app.title}} is a free desktop editor to help transform Markdown documents
into beautifully typeset PDFs. Whether you're crafting technical documentation,
-academic papers, or creative content, {{app.title}} layers high-quality
-publishing capabilities onto the simplicity and readability of Markdown.
+reports, or creative content, {{app.title}} layers high-quality publishing
+capabilities onto the simplicity and readability of Markdown.
-## Writing tools
+## Tooling
-The editor has features:
+The text editor has the following tools:
* User-defined variables with auto-completion
* Real-time spell checking and document statistics
* Interactive document outline for easy navigation
-* Support for international fonts (Chinese, Japanese, Korean)
+* Internationalization support (fonts, word counts)
* Integrated file manager
## Typesetting
-Transform Markdown into publication-quality documents with advanced
-formatting capabilities:
+Transform Markdown into publication-quality documents:
-* High-quality PDF file exports with customizable themes
-* Math rendering using TeX notation
+* PDF file exports by applying customizable themes
+* Render math using plain TeX notation
## Visualizations
-Enrich your documents with diagrams, data visualizations, and multimedia
+Enrich documents with diagrams, data visualizations, and multimedia
elements:
-* Built-in text-based diagram: Mermaid, GraphViz, PlantUML, and more
-* R integration for analysis and data plots
+* Render text-based diagrams (Mermaid, GraphViz, PlantUML, and more)
+* R integration for statistical analysis and data plots
* Inline images
## User interface
-Tailor the editor to match your preferences and workflow:
+Tailor the editor to taste:
* Dark mode and custom skins
-* Detachable tabs
+* Multi-document interface with detachable tabs
* Distraction-free options
docs/02-variables.md
1. Create a new file.
-1. Type in a partial variable value, such as **Dia**.
-1. Press [Ctrl+Space]{.kbd} (hold down the `Control` key and tap the spacebar).
+1. Type in a partial variable value, such as `Dia`.
+1. Press [ConTeXt Ctrl+Space]{.kbd} (hold down the [Control]{.kbd} key and tap [SPACE]{.kbd}).
The editor shows:
docs/06-r.md
1. Set the contents to:
-```r
-sum <- function( a, b ) {
- a + b
-}
-```
+ ```r
+ sum <- function( a, b ) {
+ a + b
+ }
+ ```
1. Click the **Save** icon.
1. Click **R → Script**.
1. Set the **R Startup Script** contents to:
-```r
-source( 'library.R' );
-```
+ ```r
+ source( 'library.R' );
+ ```
1. Click **OK**.
1. Create a new file.
1. Set the contents to:
-```r
-`r#sum( 5, 5 )`
-```
+ ```r
+ `r#sum( 5, 5 )`
+ ```
1. Save the file as `sum.R`.
1. Append a new function to `library.R` as follows:
-```r
-mul <- function( a, b ) {
- a * b
-}
-```
+ ```r
+ mul <- function( a, b ) {
+ a * b
+ }
+ ```
1. Click **R → Script**.
1. Set the **R Startup Script** contents to:
-```r
-setwd( v$application$r$working$directory );
-source( "library.R" );
-```
+ ```r
+ setwd( v$application$r$working$directory );
+ source( "library.R" );
+ ```
1. Change `sum.Rmd` to:
-```r
-`r#mul( 5, 5 )`
-```
+ ```r
+ `r#mul( 5, 5 )`
+ ```
1. Close the file `sum.Rmd`.
1. Change the contents to (use spaces not tabs):
-```yaml
-project:
- title: Project Title
- author: Author Name
-```
+ ```yaml
+ project:
+ title: Project Title
+ author: Author Name
+ ```
1. Save the file as `definitions.yaml`.
1. Append the following:
-```r
-x <- function( s ) {
- tryCatch( {
- r = eval( parse( text = s ) )
+ ```r
+ x <- function( s ) {
+ tryCatch( {
+ r = eval( parse( text = s ) )
- ifelse( is.atomic( r ), r, s );
- },
- warning = function( w ) { s },
- error = function( e ) { s } )
-}
-```
+ ifelse( is.atomic( r ), r, s );
+ },
+ warning = function( w ) { s },
+ error = function( e ) { s } )
+ }
+ ```
1. Click **OK**.
docs/07-typesetting.md
export LOCAL_DIR=.local/bin/context
export LOCAL_FILE=context-linuxmusl-64.zip
- export CONTEXT_HOME="${HOME}/${LOCAL_DIR}"
- mkdir -p "${CONTEXT_HOME}"
- cd "${CONTEXT_HOME}"
- wget https://lmtx.pragma-ade.nl/install-lmtx/${LOCAL_FILE}
+ export CONTEXT_DIR="${HOME}/${LOCAL_DIR}"
+ export CONTEXT_BIN="tex/texmf-linux-64/bin"
+ mkdir -p "${CONTEXT_DIR}"
+ cd "${CONTEXT_DIR}"
+ wget "https://lmtx.pragma-ade.nl/install-lmtx/${LOCAL_FILE}"
unzip ${LOCAL_FILE}
rm ${LOCAL_FILE}
chmod +x install.sh
./install.sh
- echo export CONTEXT_HOME=\"\${HOME}/${LOCAL_DIR}" \
+ echo export CONTEXT_DIR=\"\${HOME}/${LOCAL_DIR}" \
>> ${HOME}/.bashrc
- echo PATH="\"\${PATH}:\${CONTEXT_HOME}/tex/texmf-linux-64/bin\"" \
+ echo PATH="\"\${PATH}:\${CONTEXT_DIR}/${CONTEXT_BIN}\"" \
>> ${HOME}/.bashrc
source ${HOME}/.bashrc
docs/08-div.md
# Fenced divs
-This chapter provides a comprehensive overview of the fenced div syntax used to generate HTML `div` elements within Markdown documents. It covers the basic, extended, and nested syntax forms, illustrating how to structure fenced divs and how they translate into HTML.
+This chapter provides a comprehensive overview of the fenced div syntax used to generate XHTML `div` elements within Markdown documents. It covers the basic, extended, and nested syntax forms, illustrating how to structure fenced divs and how they translate into XHTML.
## Basic syntax
-This section explains the simplest form of fenced divs, outlining the minimal requirements to create an HTML `div` element using Markdown.
+This section explains the simplest form of fenced divs, outlining the minimal requirements to create an XHTML `div` element using Markdown.
A fenced div has the following basic syntax:
To start a fenced div, begin a line with at least three colons (`:::`), followed by at least one space, followed by any word. Content may follow immediately on the next line. Terminate the fenced div with at least three colons. The terminating colons needn't match in number to the starting colons, but it's a good idea to maintain symmetry.
-The HTML that is generated from the above fenced div will resemble:
+The XHTML that is generated from the above fenced div will resemble:
```html
<div class="name">
<p>Content</p>
</div>
```
## Extended syntax
-This section describes the extended syntax for fenced divs, which allows adding unique identifiers, multiple class names, and key/value data pairs to the generated HTML `div`.
+This section describes the extended syntax for fenced divs, which allows adding unique identifiers, multiple class names, and key/value data pairs to the generated XHTML `div`.
A fenced div may use an extended syntax. The extended syntax can provide a unique identifier, multiple class names, and key/value data pairs. For example:
## Nested syntax
-This section covers how fenced divs can be nested within one another, creating nested HTML `div` structures.
+This section covers how fenced divs can be nested within one another, creating nested XHTML `div` structures.
Fenced divs may be nested, such as in the following example:
docs/09-quotes.md
| Option | Encoding | Description |
| ---------- | ---------- | ----------- |
-| regular | | Do not encode. |
-| apos | `&apos;` | Curled when typeset to PDF. |
-| aposhex | `&#x27;` | Apostrophe's numeric value. |
-| quote | `&rsquo;` | Right single quotation mark, typical XHTML encoding. |
-| quotehex | `&#8217;` | Right single quotation mark's numeric value. |
-| modifier | `&#x2bc;` | The modifier letter apostrophe. |
+| regular | | Do not encode |
+| apos | `&apos;` | Curled when typeset to PDF |
+| aposhex | `&#x27;` | Apostrophe's numeric value |
+| quote | `&rsquo;` | Right single quotation mark, typical for XHTML |
+| quotehex | `&#8217;` | Right single quotation mark's numeric value |
+| modifier | `&#x2bc;` | The modifier letter apostrophe |
:: Single straight quote encoding options {#tbl:quote-encoding}
When typesetting into a PDF document, only the semantically correct value of `&apos;` will be curled automatically.
## History
-The origins of quotation marks can be traced back to Ancient Greek, where they were later adopted as the diplé (⸖) around 625 BCE. This early form foreshadowed the curved shape of modern quotation marks.
+The origins of quotation marks can be traced back to Ancient Greek. By around 625 BCE, they were adopted as the diplé (⸖). This early form foreshadowed the curved shape of modern quotation marks.
By the seventeenth century, quotation marks became common in writing. During the nineteenth century, Western Europe adopted the convention of turning the convexity of quotation mark pairs outward.
-Early mechanical typewriters, dating from around 1825, lacked many punctuation marks. As technology improved, additional keys were added, though some keys had dual roles (for example, the letter I was used for the number 1). Straight single and double quotes were used to represent quotation marks, apostrophes, feet and inches marks, as well as primes and double-primes. There was no pressing need to type curled versions because readers relied on contextual understanding.
+Early mechanical typewriters, dating from around 1825, lacked many punctuation marks. As technology improved, additional keys were added, though some keys had dual roles (sometimes capital `I` was used for the number `1`). Straight single and double quotes were used to represent quotation marks, apostrophes, feet and inches marks, as well as primes and double-primes. There was no pressing need to type curled versions because readers relied on contextual understanding.
Eventually, straight quotes were codified for computers. Unfortunately, this legacy from typewriters created challenges for encoding. Apostrophes inherited the straight quote form, and early encoding standards failed to capture the nuanced meanings in English typography. Computers forced users to treat the apostrophe as a straight quote.
Standards bodies recommended using the right single quotation mark for an apostrophe instead, which disregarded its semantic meaning. As a result, text containing English quotations---especially in British English---is now riddled with ambiguity.
Consider the sentence:
> Ambiguity lurks in \"\'cause the horses\'\".
-Does `'cause` mean _because_ or _induce_? The answer determines whether an open left single quote is used or an apostrophe, semantically speaking. This example highlights how ancient typographical decisions continue to impact modern systems.
+Does `'cause` mean _because_ or _induce_? The answer determines whether an open left single quote is used or an apostrophe, semantically speaking. This example highlights how historical typographical decisions still impact modern systems.
docs/10-references.md
# Captions and cross-references
-This chapter provides a comprehensive overview of how to define and use captions and cross-references in Markdown documents. It explains the syntax for captioning tables, figures, and equations, and details how to create unique anchors and references for cross-linking within the document.
-
-## Captions
+This chapter provides an overview of captions and cross-references. Captions
+provide context and descriptions for tables, figures, equations, and custom
+types. Note that {{app.title}} diverges from CommonMark to provide a syntax
+that is consistent and easier to remember.
-Captions are essential for providing context and descriptions to tables, figures, and equations. This section explains the consistent syntax used for adding captions in Markdown.
+## Caption syntax
-Generally, captions are added by placing a line starting with a double colon (`::`) immediately after the item to be captioned, following a blank line.
+Captions start with a double colon (`::`) separated by a blank line from the item that they are describing. Let's walk through a few examples.
### Images
-To add a caption to an image, include the image markup followed by a caption line starting with double colons:
+For images, add the caption line as follows:
```markdown
![image title](https://placecats.com/300/200)
:: Figure caption text
```
+
+The blank line between the item being captioned in the caption is important.
+Without it, the software will treat the caption as if it was part of the
+previous paragraph, and inline the text directly.
### Table
-Tables can be captioned in a similar manner, placing the caption immediately after the table:
+Caption tables in a similar manner:
```markdown
### Equation
-Equations receive captions the same way, following the displayed equation:
+Equations are the same:
```markdown
$$E = mc^2$$
:: Equation caption text
```
## Cross-references
-
-Cross-references allow you to refer to tables, figures, equations, or other items anywhere in the document using unique anchor names and reference tags.
-An anchor name uniquely identifies an item, and multiple references may point to it. Anchors are primarily added to captions to enable referencing.
+Cross-references allow you to refer to tables, figures, equations, and headings
+anywhere in the document using unique anchor names and reference tags. An
+anchor name uniquely identifies an item, and multiple references may point to
+it. Anchors are primarily added to captions to enable referencing.
The general syntax is:
:: Predefined Cross-Reference Types and Labels {#tbl:type-names}
-Using captions and cross-references improves document clarity and navigation by providing descriptive labels and links between related items, enhancing the reader's experience.
+Using captions and cross-references improves document clarity and navigation by providing descriptive labels and links between related items.
docs/11-gui.md
## Internationalization
-Internationalization (I18N) support is essential for editing and previewing text in multiple languages. The application has components dedicated to this, primarily involving font and language configurations.
-
-Both fonts and language must be set for non-Latin-based text. [@tbl:editor-font-families] lists possible font settings for the editor and preview tabs.
+Internationalization (I18N) support is essential for editing and previewing
+text in multiple languages. Both fonts and language must be set for
+non-Latin-based text. [@tbl:editor-font-families] lists example
+Chinese-Japanese-Korean (CJK) font settings for the editor and preview tabs.
| Tab | Font Family | Language |
Skins define the visual style of the application, controlling colors, fonts, spacing, highlights, drop-shadows, gradients, and more. This section explains what skins are and their role in shaping the user interface.
-A skin is a set of styles---similar to cascading style sheet classes---that configures the user interface colours, fonts, spacing, highlights, drop-shadows, gradients, and more. For information on CSS, see the [W3C CSS tutorial](https://www.w3.org/Style/Examples/011/firstcss).
+A skin is a set of styles---similar to cascading style sheet classes---that configures the user interface colours, fonts, spacing, highlights, drop-shadows, gradients, and so forth. See the [W3C CSS tutorial](https://www.w3.org/Style/Examples/011/firstcss) for details.
### Order
-
-The order in which stylesheets are applied is important to ensure proper overriding of styles. This section details the sequence in which the application loads stylesheets to achieve the desired look.
-The application's user interface is made up of the following stylesheets, applied in the order listed:
+The order in which stylesheets are applied is important to ensure proper overriding of styles. The application loads and applies stylesheets to the user interface in the following order:
1. **scene.css** --- Defines toolbar styling.
1. **markdown.css** --- Defines text editor styling.
-1. **skins/skin_name.css** --- Bundled skin selected in preferences.
-1. **custom.css** --- User-defined file set in preferences.
+1. **skins/skin_name.css** --- Main application chrome, extensible.
+1. **custom.css** --- User-defined preferences.
### Customization
1. Change the content to the following:
-```css
-.root {
- -fx-base: rgb( 30, 30, 30 );
- -fx-background: -fx-base;
-}
-```
+ ```css
+ .root {
+ -fx-base: rgb( 30, 30, 30 );
+ -fx-background: -fx-base;
+ }
+ ```
Apply the skin as follows:
docs/12-screenshots.md
Diagrams that include variables are shown in [@fig:screenshot-diagram-graphviz]
-and [@fig:screenshot-diagram-genealogy]:
+and [@fig:screenshot-diagram-genealogy].
![GraphViz diagram screenshot](images/screenshots/01.png)
## PDF themes
-The background of [@fig:screenshot-pdf-themes] depicts a novel being edited:
+The background of [@fig:screenshot-pdf-themes] depicts a novel being edited.
![PDF themes](images/screenshots/08.png)
docs/13-architecture.md
## Extension System Architecture
-An extension is an addition to the Markdown parser, flexmark-java, that is used when converting the document's abstract syntax tree into an HTML document. The {{app.classes.processors.markdown}} contains both prepackaged and custom extensions. This extensible architecture allows for specialized processing of various Markdown elements, enabling support for advanced features like mathematical expressions, enhanced image handling, and custom block types.
+An extension is an addition to the Markdown parser, flexmark-java, that is used when converting the document's abstract syntax tree into an HTML document. The `{{app.classes.processors.markdown}}` contains both prepackaged and custom extensions. This extensible architecture allows for specialized processing of various Markdown elements, enabling support for advanced features like mathematical expressions, enhanced image handling, and custom block types.
docs/user-manual.pdf
Binary files differ