What a Windows editor saves, and a standard user's Windows install (from dev 9d6f66456a3d)

- CRLF line endings are read as newlines on every system (the reader used
  to delete the pair, collapsing a Notepad++ file into one line on Linux
  and macOS); a leading UTF-8 byte-order mark is ignored; a UTF-16 or
  Windows-1252 source is refused with the encoding, the place and the
  remedy named. .gitattributes pins LF in every clone.
- Windows source install: the repository path must hold no space (GNU
  Make), accented letters are fine (every linker input is relative now);
  python.org's Python is selected ahead of an MSYS2 one that poppler pulls
  in; TeX Live goes to its Windows default C:\texlive\2026.
- The Python binding needs an ASCII installation path on Windows, and its
  suite says so there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-26 16:17:59 +02:00
1 parent fc2e848e91
commit 715d939727
15 files changed
+236 -41

No files matched your search

+39 -24
View File
@@ -97,11 +97,17 @@ git clone https://git.andykopra.com/ack/klammertext.git
cd klammertext
```
Git for Windows must not translate line endings: Klammertext's `.kt`
files, `.k` files and shell scripts are LF files. The clone above respects
that as long as `core.autocrlf` is not `true`; check with `git config
--get core.autocrlf` and, if it prints `true`, set it to `false` and clone
again.
The repository's path must contain no space: GNU Make cannot build under
one. If your user name has a space in it (`C:\Users\Anna Maria`), clone
somewhere else, for example into `C:\klammertext`, and write that path
wherever `C:\Users\<you>\klammertext` appears below. Accented letters in
the path are fine for the commands; only the Python binding (`kpy\`) needs
a path of plain ASCII letters.
Klammertext's `.kt` files, `.k` files and shell scripts are LF files, and
the repository says so itself (`.gitattributes`), so the clone is correct
whatever your Git's `core.autocrlf` setting. A `.kt` you write with
Windows line endings is fine too: ktext reads them as newlines.
## Environment variables
@@ -110,14 +116,14 @@ Klammertext's runtime environment is one self-configuring file, the same
one Linux and macOS use. Source it from the UCRT64 shell's profile:
```bash
echo 'source /c/Users/<you>/klammertext/env/runtime.env' >> ~/.bashrc
echo 'source "/c/Users/<you>/klammertext/env/runtime.env"' >> ~/.bashrc
source ~/.bashrc
```
On Windows it sets `KLAMMERTEXT_HOME` and `TMPDIR` in the form Windows
programs understand (`C:/Users/<you>/klammertext`), adds `bin/` to `PATH`,
finds a TeX Live installed under `C:\Users\<you>\external\texlive\<year>`
(see below), and sets `PYTHON=python`. Nothing is edited by hand.
finds a TeX Live installed under `C:\texlive\<year>` (see below), and
sets `PYTHON=python`. Nothing is edited by hand.
## Build
@@ -171,26 +177,28 @@ ktext hello.kt -t html # writes hello\index.html
## TeX Live (for PDF output)
The Standard Klammer Set renders PDF with **XeLaTeX**. Install TeX Live's
`scheme-small` plus the packages the SKS needs into
`C:\Users\<you>\external\texlive\2026`, where `runtime.env` finds it. This
is a download of about 600 MB and takes twenty to thirty minutes.
`scheme-small` plus the packages the SKS needs into `C:\texlive\2026`,
TeX Live's own default location on Windows, where `runtime.env` finds it.
(It also looks under `C:\Users\<you>\external\texlive\<year>`, the place
the Linux and macOS pages use, but TeX Live does not work under a path
with a space or an accented letter, and a user name may have either.)
This is a download of about 600 MB and takes twenty to thirty minutes.
1. Download `install-tl.zip` from a CTAN mirror, for example
`https://ctan.math.illinois.edu/systems/texlive/tlnet/install-tl.zip`,
and unzip it. It unpacks into a folder named `install-tl-<date>`.
2. In that folder, create a file `texlive.profile` with this content,
replacing `<you>` with your Windows user name:
2. In that folder, create a file `texlive.profile` with this content:
```
selected_scheme scheme-small
TEXDIR C:/Users/<you>/external/texlive/2026
TEXMFLOCAL C:/Users/<you>/external/texlive/2026/texmf-local
TEXMFSYSCONFIG C:/Users/<you>/external/texlive/2026/texmf-config
TEXMFSYSVAR C:/Users/<you>/external/texlive/2026/texmf-var
TEXMFHOME C:/Users/<you>/texmf
TEXMFVAR C:/Users/<you>/.texlive2026/texmf-var
TEXMFCONFIG C:/Users/<you>/.texlive2026/texmf-config
TEXDIR C:/texlive/2026
TEXMFLOCAL C:/texlive/2026/texmf-local
TEXMFSYSCONFIG C:/texlive/2026/texmf-config
TEXMFSYSVAR C:/texlive/2026/texmf-var
TEXMFHOME C:/texlive/2026/texmf-home
TEXMFVAR C:/texlive/2026/texmf-uvar
TEXMFCONFIG C:/texlive/2026/texmf-uconfig
tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0
tlpdbopt_autobackup 0
@@ -214,7 +222,7 @@ is a download of about 600 MB and takes twenty to thirty minutes.
installs on Linux and macOS — and rebuild the formats:
```powershell
$tl = "$env:USERPROFILE\external\texlive\2026\bin\windows"
$tl = "C:\texlive\2026\bin\windows"
$env:Path = "$tl;$env:Path"
& "$tl\tlmgr.bat" option repository https://ctan.math.illinois.edu/systems/texlive/tlnet
& "$tl\tlmgr.bat" install adjustbox collectbox collection-fontsrecommended enumitem fontaxes footmisc inconsolata layouts mdframed multirow needspace opensans pict2e textpos titlesec upquote zref
@@ -244,7 +252,7 @@ from PowerShell):
```powershell
[Environment]::SetEnvironmentVariable("KLAMMERTEXT_HOME", "C:\Users\<you>\klammertext", "User")
$p = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$p;C:\Users\<you>\klammertext\bin;C:\Users\<you>\external\texlive\2026\bin\windows", "User")
[Environment]::SetEnvironmentVariable("Path", "$p;C:\Users\<you>\klammertext\bin;C:\texlive\2026\bin\windows", "User")
```
(Not `setx Path "$env:Path;…"`: `$env:Path` is the machine and user
@@ -374,8 +382,15 @@ incomplete or `KLAMMERTEXT_HOME` points elsewhere.
**"The 'xelatex' command required to make PDF files is not installed".**
TeX Live's `bin\windows` directory is not on the `Path` of the shell you
are using. In the UCRT64 shell `runtime.env` adds it when the tree is under
`C:\Users\<you>\external\texlive\<year>`; in PowerShell add it as shown
above.
`C:\texlive\<year>` or `C:\Users\<you>\external\texlive\<year>`; in
PowerShell add it as shown above.
**`make` stops at once with `"python" is C:/msys64/ucrt64/python, not
python.org's interpreter`.** MSYS2's own Python was installed as a
dependency (poppler brings it), and in the UCRT64 shell it precedes
python.org's on the `Path`. `runtime.env` puts python.org's first: source
it (a new UCRT64 shell does, once the line is in `~/.bashrc`) and run
`make` again.
**`git` or `python` are "command not found" in the UCRT64 shell.**
`MSYS2_PATH_TYPE` is not set to `inherit`, or the shell was opened before