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

Add support for universal (cross-format) themes #373

Merged
merged 32 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4fe2194
Move theme docs from plain TeX to LaTeX, document macro `\markdownSuper`
Witiko Nov 22, 2023
47c3f8a
Move `import`/`theme` key-values to the plain TeX interface
Witiko Nov 22, 2023
408d975
Prevent unwanted space tokens before `*ContextEnd` renderers
Witiko Dec 13, 2023
2436b6c
Merge remote-tracking branch 'origin/main' into feat/universal-themes
Witiko Dec 13, 2023
4074197
Update `CHANGES.md`
Witiko Dec 13, 2023
86eefc0
Remove unnecessary group around LaTeX header attribute context renderers
Witiko Dec 13, 2023
9377292
Update `CHANGES.md`
Witiko Dec 13, 2023
45e6d27
Fix a typo in the documentation
Witiko Dec 13, 2023
1fb9525
Update the number of pages of the technical documentation in `Makefile`
Witiko Dec 13, 2023
ef923d5
Define function `\@@_load_theme:nn` for plain TeX
Witiko Dec 14, 2023
cd52d47
Move theme `witiko/tilde` from LaTeX to plain TeX
Witiko Dec 14, 2023
c0c12b0
Add logic for loading LaTeX themes after preamble
Witiko Dec 14, 2023
bd47207
Prevent loading themes after preamble in LaTeX
Witiko Dec 14, 2023
3eb7231
Optimize needless catcode switching in package code
Witiko Dec 14, 2023
9063ede
Move options snippet/import from LaTeX to plain TeX
Witiko Dec 14, 2023
a923f03
Update `CHANGES.md`
Witiko Dec 14, 2023
64fbe34
In `\markdownSetupSnippet`, prohibit empty snippet names
Witiko Dec 14, 2023
99fde6f
Rewrite snippets to expl3
Witiko Dec 15, 2023
6e3ebae
Move the `code` key from LaTeX to plain TeX
Witiko Dec 15, 2023
5c795b2
Reorder sections
Witiko Dec 15, 2023
5c4d7f6
Add LaTeX implementation of the `\markdownSuper` macro
Witiko Dec 15, 2023
b247e6e
Rename `\markdownSuper` to `\markdownLoadPlainTeXTheme`
Witiko Dec 29, 2023
f8829a6
Log whether a plain TeX or a LaTeX theme is being loaded
Witiko Dec 29, 2023
366f671
Prevent loading plain TeX themes multiple times
Witiko Dec 29, 2023
c46dbbf
Fix formatting of technical documentation
Witiko Dec 29, 2023
d981447
Add support for ConTeXt themes by analogy with LaTeX themes
Witiko Dec 29, 2023
de50c91
Use LaTeX and ConTeXt themes in testing
Witiko Dec 29, 2023
c11cfc7
Merge remote-tracking branch 'origin/main' into feat/universal-themes
Witiko Dec 29, 2023
2ccbd9b
Fix structure of ConTeXt theme witiko/markdown/test
Witiko Dec 29, 2023
8c1392b
Define `\tl_set:Ne` in TeX Live 2022
Witiko Dec 29, 2023
7606e96
Update `CHANGES.md`
Witiko Dec 29, 2023
1584c33
Fix typo in LaTeX theme witiko/markdown/test
Witiko Dec 29, 2023
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
16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## 3.3.0

Development:

- Add support for universal (cross-format) themes. (#276, #373)

Fixes:

- Prevent unwanted space tokens before `*ContextEnd` renderers. (#373)
- Make ConTeXt command `\inputmarkdown` properly process extra options.
(#389, #390, contributed by @ibotty)

Expand All @@ -13,6 +18,17 @@ Documentation:
(#381, #382, contributed by @solernou)
- Encourage alternatives to the `hybrid` option in the user manual. (#382)

Speed Improvements:

- Optimize needless catcode switching in package code. (3eb7231)

Default Renderer Prototypes:

- Fix the typesetting of level four headings with attributes for LaTeX document
classes without the `\chapter` command such as `article` and level five
headings for LaTeX document classes with the `\chapter` command such as
`book`. (86eefc0)

## 3.2.1 (2023-11-23)

Fixes:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ mkdir -p ${INSTALL_DIR}/scripts/ma
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/
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_tilde.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
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DOCUMENTATION=$(TECHNICAL_DOCUMENTATION) $(HTML_USER_MANUAL) $(ROOT_README) $(VE
LIBRARIES=libraries/markdown-tinyyaml.lua
INSTALLABLES=markdown.lua markdown-cli.lua markdown.tex markdown.sty t-markdown.tex \
markdownthemewitiko_dot.sty markdownthemewitiko_graphicx_http.sty \
markdownthemewitiko_tilde.sty
markdownthemewitiko_tilde.tex
EXTRACTABLES=$(INSTALLABLES) $(MARKDOWN_USER_MANUAL) $(TECHNICAL_DOCUMENTATION_RESOURCES)
MAKEABLES=$(TECHNICAL_DOCUMENTATION) $(USER_MANUAL) $(INSTALLABLES) $(EXAMPLES)
RESOURCES=$(DOCUMENTATION) $(EXAMPLES_RESOURCES) $(EXAMPLES_SOURCES) $(EXAMPLES) \
Expand Down Expand Up @@ -126,6 +126,9 @@ $(EXTRACTABLES): $(INSTALLER) $(DTXARCHIVE)
-e 's#(((VERSION)))#$(VERSION)#g' \
-e 's#(((LASTMODIFIED)))#$(LASTMODIFIED)#g' \
$(INSTALLABLES)
sed -i \
-e '/\\ExplSyntaxOff/{N;/\\ExplSyntaxOn/d;}' \
$(INSTALLABLES)

# This target produces the version file.
$(VERSION_FILE): force
Expand All @@ -138,10 +141,12 @@ $(LIBRARIES): force
# This target typesets the manual.
$(TECHNICAL_DOCUMENTATION): $(DTXARCHIVE) $(TECHNICAL_DOCUMENTATION_RESOURCES)
latexmk -silent $< || (cat $(basename $@).log 1>&2; exit 1)
test `tail $(basename $<).log | sed -rn 's/.*\(([0-9]*) pages.*/\1/p'` -gt 350
test `tail $(basename $<).log | sed -rn 's/.*\(([0-9]*) pages.*/\1/p'` -ge 380

# This pseudotarget continuously typesets the manual.
preview: $(DTXARCHIVE) $(TECHNICAL_DOCUMENTATION_RESOURCES)
-mkdir markdown/
-ln -s ../markdown.tex markdown/markdown.tex
latexmk -silent -pvc $<

# These targets typeset the examples.
Expand Down Expand Up @@ -209,9 +214,9 @@ $(TDSARCHIVE): $(DTXARCHIVE) $(INSTALLER) $(INSTALLABLES) $(DOCUMENTATION) $(EXA
tex/context/third/markdown scripts/markdown
cp markdown.lua $(LIBRARIES) tex/luatex/markdown/
cp markdown-cli.lua scripts/markdown/
cp markdown.sty markdownthemewitiko_dot.sty markdownthemewitiko_graphicx_http.sty \
markdownthemewitiko_tilde.sty tex/latex/markdown/
cp markdown.tex tex/generic/markdown/
cp markdown.sty markdownthemewitiko_graphicx_http.sty markdownthemewitiko_dot.sty \
tex/latex/markdown/
cp markdown.tex markdownthemewitiko_tilde.tex tex/generic/markdown/
cp t-markdown.tex tex/context/third/markdown/
@# Installing the documentation.
mkdir -p doc/generic/markdown doc/latex/markdown/examples \
Expand Down
Loading
Loading