Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
docs/README.md
* [svg.md](svg.md) -- Resolve issues with some SVG files
* [metadata.md](metadata.md) -- Document metadata
+* [references.md](references.md) -- Captions and cross-references
* [typesetting.md](typesetting.md) -- Document typesetting
* [variables.md](variables.md) -- Variable definitions and interpolation
docs/references.md
+# Captions and cross-references
+
+Users may define captions and cross-references to tables, figures,
+and equations. Unfortunately, at time of writing, the CommonMark
+specification is frozen. This means cross-references must be implemented
+as an extension to the Markdown specification, leaving the door open for
+differing Markdown rendering libraries and applications to diverge on
+with respect to syntax.
+
+# Syntax
+
+This section describes how to use captions and cross-references within
+Markdown documents. The CommonMark standard details different ways to
+add captions to tables and figures. While those are supported, a more
+consistent syntax is available.
+
+## Captions
+
+Tables, figures, and equations are captioned using the same syntax. In
+general, a line that starts with a double colon after a blank line will
+result in a caption added to the item immediately proceding it. The
+remainder of this section provides examples.
+
+### Images
+
+An image caption:
+
+```
+![kitten](https://placekitten.com/600/350)
+
+:: Figure caption text
+```
+
+### Table
+
+A table caption:
+
+```
+| a | b | c |
+|---|---|---|
+| 1 | 2 | 3 |
+| 4 | 5 | 6 |
+| 7 | 8 | 9 |
+
+:: Table caption text
+```
+
+### Equation
+
+An equation caption:
+
+```
+$$E | mc^2$$
+
+:: Equation caption
+```
+
+# Cross-references
+
+There are two parts to a cross-reference: the anchor name and its references.
+An anchor name must be uniquely defined. Any number of references may refer
+to an anchor name. Anchor names can be associated with any item in the
+document, and are primarily added to captions.
+
+The general syntax for anchor names and references is:
+
+* `{#type-name:label}` (anchor name)
+* `[@type-name:label]` (reference)
+
+The `type-name` can be any alphanumeric value, starting with a letter.
+Type names user-defined categories for the item type. Labels are user-defined
+identifiers that must be unique per item.
+
+Consider the following example:
+
+```
+In [@fig:kitten], a cute kitten is shown.
+
+![kitten](https://placekitten.com/600/350)
+
+:: World's cutest kitten {#fig:kitten}
+
+There is no cuter kitten than the one in [@fig:kitten].
+```
+
+The anchor name uniquely defines where an item in a document is located. Any
+number of references, anywhere in the document, may reference an anchor name.
+There are few restrictions placed on the possible type names and labels. Here
+are a few more anchor name examples:
+
+```
+{#fig:cats}
+{#図版:猫}
+{#eq:mass-energy}
+{#eqn:laplace}
+```
+
+## Type names
+
+To avoid duplicating writing the label each time (e.g., Figure, Table,
+Equation), there are a number of predefined labels associated with
+type names. The following table lists the type names and the label
+generated by the typesetting system:
+
+| Type name | English name
+|---|---|
+| algorithm | Algorithm |
+| alg | Algorithm |
+| equation | Equation |
+| eqn | Equation |
+| eq | Equation |
+| figure | Figure |
+| fig | Figure |
+| formula | Formula |
+| listing | Listing |
+| list | Listing |
+| lst | Listing |
+| lyric | Lyrics |
+| music | Score |
+| score | Score |
+| source | Listing |
+| src | Listing |
+| tab | Table |
+| table | Table |
+| tbl | Table |
+
+These values are defined in the theme's `xhtml/xml-references.tex` file.
+
docs/skins.md
can tweak them to your taste. Accomplish this as follows:
-1. Visit the [skin](https://github.com/DaveJarvis/keenwrite/tree/master/src/main/resources/com/keenwrite/skins) repository directory
+1. Visit the [skin](https://gitlab.com/DaveJarvis/KeenWrite/-/tree/main/src/main/resources/com/keenwrite/skins) repository directory
1. Click one of the files (e.g., `haunted_grey.css`).
1. Click **Raw**.
1. Copy the entire text.
1. Return to `custom.css`.
1. Delete the contents.
1. Paste the copied text.
1. Save the file.
To see how the CSS styles are applied to the text editor, open
-[markdown.css](https://github.com/DaveJarvis/keenwrite/blob/master/src/main/resources/com/keenwrite/editor/markdown.css), which is also in the repository.
+[markdown.css](https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/src/main/resources/com/keenwrite/editor/markdown.css), which is also in the repository.
# Modena
# JavaFX CSS
-The [Java CSS Reference Guide](https://openjfx.io/javadoc/11/javafx.graphics/javafx/scene/doc-files/cssref.html) is exhaustive. In addition to showing many
+The [Java CSS Reference Guide](https://openjfx.io/javadoc/21/javafx.graphics/javafx/scene/doc-files/cssref.html) is exhaustive. In addition to showing many
differences between JavaFX CSS and W3C CSS, the guide introduces numerous
helpful functions for manipulating colours and gradients using existing
If you have a look that you'd like to contribute to the project, do pass
-it along. Either open a new issue in the [issue tracker](https://github.com/DaveJarvis/keenwrite/issues) that contains the CSS file or submit a pull request.
+it along. Either open a new issue in the [issue tracker](https://gitlab.com/DaveJarvis/KeenWrite/-/issues) that contains the CSS file or submit a pull request.
docs/typesetting-custom.md
1. Run **install.bat** to download and install the software.
* If prompted, click **Run anyway** (or click **More info** first).
-1. Right-click <a href="https://github.com/DaveJarvis/keenwrite/raw/master/scripts/localpath.bat">localpath.bat</a>.
+1. Right-click [localpath.bat](https://gitlab.com/DaveJarvis/KeenWrite/-/raw/main/scripts/localpath.bat).
1. Select **Save Link As** (or similar).
1. Save the file to the typesetting software's "root" directory.
Install and configure the default theme pack as follows:
-1. Download the <a href="https://gitreleases.dev/gh/DaveJarvis/keenwrite-themes/latest/theme-pack.zip">theme-pack.zip</a> archive.
+1. Download the <a href="https://gitlab.com/DaveJarvis/keenwrite-themes/-/releases/permalink/latest/downloads/theme-pack.zip">theme-pack.zip</a> archive.
1. Extract archive into a known location.
1. Start the text editor, if not already running.
Here are a few documents that introduce the typesetting system:
-* *What is ConTeXt?* ([English](https://www.pragma-ade.com/general/manuals/what-is-context.pdf))
-* *A not so short introduction to ConTeXt* ([English](https://github.com/contextgarden/not-so-short-introduction-to-context/raw/main/en/introCTX_eng.pdf) or [Spanish](https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/es/introCTX_esp.pdf))
-* *Dealing with XML in ConTeXt MKIV* ([English](https://pragma-ade.com/general/manuals/xml-mkiv.pdf))
-* *Typographic Programming* ([English](https://www.pragma-ade.com/general/manuals/style.pdf))
+* [What is ConTeXt?](https://www.pragma-ade.com/general/manuals/what-is-context.pdf)
+* [A not so short introduction to ConTeXt](https://github.com/contextgarden/not-so-short-introduction-to-context)
+* [Dealing with XML in ConTeXt MKIV](https://pragma-ade.com/general/manuals/xml-mkiv.pdf)
+* [Typographic Programming](https://www.pragma-ade.com/general/manuals/style.pdf)
The [documentation library](https://wiki.contextgarden.net/Documentation) includes the following gems:
docs/typesetting.md
The application uses the [ConTeXt](https://contextgarden.net) typesetting
system, the [podman](https://podman.io/) container manager, various
-[themes](https://github.com/DaveJarvis/keenwrite-themes/), and numerous
+[themes](https://gitlab.com/DaveJarvis/keenwrite-themes), and numerous
fonts to produce high-quality PDF files. The container manager significantly
reduces the number of manual steps in the installation process.
1. Start the application.
1. Click **File → Export As → PDF**.
-
-A wizard appears.
-
-## Windows
-
-
-## Linux
-
-## macOS
+Follow the steps in the wizard to install the requisite software and
+typesetting themes.

Updates stale doc links, adds x-references doc

Author DaveJarvis <email>
Date 2023-12-05 00:47:36 GMT-0800
Commit 5c0385c96ead4ea5ed062388f052e19e7056238c
Parent db96bdd
Delta 142 lines added, 20 lines removed, 122-line increase