Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and update built-in themes and make them part of markdown.tex and markdown.sty #529

Merged
merged 19 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ MD041: false
MD046: false
MD049: false
MD050: false
MD051: false
MD053: false
27 changes: 27 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

## 3.9.0

Development:

- Convert built-in LaTeX themes `witiko/dot` and `witiko/graphicx/http` into
plain TeX themes. (#514, #522, #529)

This allows these themes to be used in formats such as plain TeX and ConTeXt
as well.

Refactoring:

- Remove dependencies on `ifthen`, `gobble`, and `catchfile`. (#514, #522, #529)

- Store small built-in LaTeX themes `witiko/dot`, `witiko/graphicx/http`, and
`witiko/tilde` in expl3 props in files `markdown.tex` and `markdown.sty`.
(#514, #522, #529)

This simplifies the distribution and installation of these themes, which were
previously located in individual `.tex` and `.sty` files.

The built-in plain TeX, LaTeX, and ConTeXt themes `witiko/markdown/defaults`
are still distributed in individual files. This is because inlining these
themes in files `markdown.tex`, `markdown.sty`, and `t-markdown.tex` would
make it more difficult for users to copy and modify these themes without
delaying updates to the Markdown package itself. Furthermore, these themes
are large and storing/executing them from an expl3 prop would make it more
difficult to determine the line numbers when errors occur.

Fixes:

- Protect renderers and renderer prototypes. (#465, #506)
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ mkdir -p ${INSTALL_DIR}/scri
cp ${BUILD_DIR}/markdown-cli.lua ${INSTALL_DIR}/scripts/markdown/
mkdir -p ${INSTALL_DIR}/tex/generic/markdown/
cp ${BUILD_DIR}/markdown.tex ${INSTALL_DIR}/tex/generic/markdown/
cp ${BUILD_DIR}/markdownthemewitiko_tilde.tex ${INSTALL_DIR}/tex/generic/markdown/
cp ${BUILD_DIR}/markdownthemewitiko_markdown_defaults.tex ${INSTALL_DIR}/tex/generic/markdown/
mkdir -p ${INSTALL_DIR}/tex/latex/markdown/
cp ${BUILD_DIR}/markdown.sty ${INSTALL_DIR}/tex/latex/markdown/
cp ${BUILD_DIR}/markdownthemewitiko_dot.sty ${INSTALL_DIR}/tex/latex/markdown/
cp ${BUILD_DIR}/markdownthemewitiko_graphicx_http.sty ${INSTALL_DIR}/tex/latex/markdown/
cp ${BUILD_DIR}/markdownthemewitiko_markdown_defaults.sty ${INSTALL_DIR}/tex/latex/markdown/
mkdir -p ${INSTALL_DIR}/tex/context/third/markdown/
cp ${BUILD_DIR}/t-markdown.tex ${INSTALL_DIR}/tex/context/third/markdown/
Expand Down
17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SHELL=/bin/bash

AUXFILES=markdown.bbl markdown.cb markdown.cb2 markdown.glo markdown.bbl \
markdown.run.xml markdown.markdown.in markdown.markdown.lua \
markdown.hd markdown.run.xml markdown.markdown.in markdown.markdown.lua \
markdown.markdown.out markdown-interfaces.md markdown-miscellanea.md \
markdown-options.md markdown-tokens.md $(TECHNICAL_DOCUMENTATION_RESOURCES) \
$(VERSION_FILE) $(RAW_DEPENDENCIES) markdown-unicode-data-generator.lua \
Expand Down Expand Up @@ -47,9 +47,9 @@ DOCUMENTATION=$(TECHNICAL_DOCUMENTATION) $(HTML_USER_MANUAL) $(ROOT_README) $(VE
$(CHANGES_FILE) $(DEPENDENCIES)
LIBRARIES=libraries/markdown-tinyyaml.lua
INSTALLABLES=markdown.lua markdown-parser.lua markdown-cli.lua markdown-unicode-data.lua \
markdown.tex markdown.sty t-markdown.tex markdownthemewitiko_dot.sty \
markdownthemewitiko_graphicx_http.sty markdownthemewitiko_tilde.tex \
markdownthemewitiko_markdown_defaults.tex markdownthemewitiko_markdown_defaults.sty \
markdown.tex markdown.sty t-markdown.tex \
markdownthemewitiko_markdown_defaults.tex \
markdownthemewitiko_markdown_defaults.sty \
t-markdownthemewitiko_markdown_defaults.tex
EXTRACTABLES=$(INSTALLABLES) $(MARKDOWN_USER_MANUAL) $(TECHNICAL_DOCUMENTATION_RESOURCES) \
$(RAW_DEPENDENCIES)
Expand Down Expand Up @@ -231,12 +231,9 @@ $(TDSARCHIVE): $(DTXARCHIVE) $(INSTALLER) $(INSTALLABLES) $(DOCUMENTATION) $(EXA
cp markdown.lua markdown-parser.lua markdown-unicode-data.lua $(LIBRARIES) \
tex/luatex/markdown/
cp markdown-cli.lua scripts/markdown/
cp markdown.tex markdownthemewitiko_tilde.tex \
markdownthemewitiko_markdown_defaults.tex tex/generic/markdown/
cp markdown.sty markdownthemewitiko_graphicx_http.sty markdownthemewitiko_dot.sty \
markdownthemewitiko_markdown_defaults.sty tex/latex/markdown/
cp t-markdown.tex t-markdownthemewitiko_markdown_defaults.tex \
tex/context/third/markdown/
cp markdown.tex markdownthemewitiko_markdown_defaults.tex tex/generic/markdown/
cp markdown.sty markdownthemewitiko_markdown_defaults.sty tex/latex/markdown/
cp t-markdown.tex t-markdownthemewitiko_markdown_defaults.tex tex/context/third/markdown/
@# Installing the documentation.
mkdir -p doc/generic/markdown doc/latex/markdown/examples \
doc/context/third/markdown/examples doc/optex/markdown/examples
Expand Down
Loading