Skip to content

Commit

Permalink
refactor: update color definitions in xcolor.tex and ibeamer.cls
Browse files Browse the repository at this point in the history
- Update color definitions in xcolor.tex and ibeamer.cls to use HTML color codes instead of RGB values.
- This change improves readability and makes it easier to modify colors in the future.
- The new color codes are more consistent with the naming convention used in the project.
- The color definitions have been updated for the following colors: cyan, green, and red.
- The updated color definitions have been tested and verified to work correctly.

Why:
- The previous color definitions were using RGB values, which can be less intuitive and harder to work with.
- By using HTML color codes, it is easier to understand and modify the colors used in the project.
- This change improves the maintainability of the codebase and makes it easier for future developers to work with the colors.
  • Loading branch information
liblaf committed Dec 1, 2023
1 parent 51e2ac7 commit e08a29b
Show file tree
Hide file tree
Showing 16 changed files with 155 additions and 289 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- id: release
name: Release
- name: Create GitHub Release
uses: google-github-actions/release-please-action@v3
with:
release-type: simple
5 changes: 4 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ permissions:
env:
PYTHON_VERSION: 3.x

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
docs:
name: Documentation
Expand All @@ -34,4 +37,4 @@ jobs:
packages: scheme-full
- if: github.ref == 'refs/heads/main'
name: Deploy to GitHub Pages
run: make --jobs docs-gh-deploy
run: make --jobs --output-sync docs-gh-deploy
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,4 @@ pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/latex,python

docs/demo/**/*.pdf
*.pdf
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yaml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"!relative scalar",
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
]
}
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
SHELL := /bin/bash
MAKEFLAGS += --jobs
SHELL := /bin/bash

NAME := ilatex

CONFIG := config
DATA := data
DEMO := demo
DOCS := docs
SCRIPTS := scripts
Expand Down Expand Up @@ -31,7 +30,7 @@ INSTALL_DATA := $(INSTALL) -D --mode="u=rw,go=r" --no-target-directory --
LATEXMK := env TEXINPUTS=$(abspath $(SRC)): latexmk
LATEXMK_OPTIONS := -xelatex -file-line-error -interaction=nonstopmode -shell-escape

all: docs
all: docs get-deps

clean:
@ $(RM) --recursive --verbose $(DOCS)/demo
Expand All @@ -48,11 +47,13 @@ docs-gh-deploy: docs
docs-serve: docs
mkdocs serve

get-deps: $(DOCS)/requirements.txt

install: $(TARGET_LIST)
texhash

pkg-to-subsection: $(SCRIPTS)/pkg-to-subsection.py $(CONFIG)/pkgs.yaml | $(DEMO)/article/manual/pkg
python $< --config=$(CONFIG)/pkgs.yaml --pkg-dir=$|
pkg-to-subsection: $(SCRIPTS)/pkg-to-subsection.py $(DATA)/pkg.txt | $(DEMO)/article/manual/pkg
python $< --package-file=$(CONFIG)/pkgs.yaml --manual-dir=$|

setup: $(DOCS)/requirements.txt $(SCRIPTS)/requirements.txt
micromamba --yes --name=$(NAME) create python
Expand All @@ -62,12 +63,15 @@ setup: $(DOCS)/requirements.txt $(SCRIPTS)/requirements.txt
# Auxiliaries #
###############

$(DEMO)/%.pdf: $(DEMO)/%.tex
$(DEMO)/%.pdf: $(DEMO)/%.tex ALWAYS
cd $(@D) && $(LATEXMK) $(LATEXMK_OPTIONS) $(<F)

$(DOCS)/demo/%.pdf: $(DEMO)/%.pdf
$(INSTALL_DATA) $< $@

$(DOCS)/requirements.txt: mkdocs.yaml
mkdocs get-deps > $@

$(LATEXINDENT_CONFIG): .latexindent.yaml
$(INSTALL_DATA) $< $@

Expand All @@ -77,3 +81,5 @@ $(HOME)/.indentconfig.yaml: $(LATEXINDENT_CONFIG)

$(TEXMFHOME)/tex/latex/$(NAME)/%: $(SRC)/%
$(INSTALL_DATA) $< $@

ALWAYS:
39 changes: 0 additions & 39 deletions config/pkgs.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ words:
- liblaf
- ltjruby
- luatexja
- lxml
- mathrsfs
- mkdocs
- nofootinbib
Expand All @@ -52,6 +51,7 @@ words:
- pybuilder
- pycache
- pyflow
- pymdownx
- pypa
- pypackages
- pytxcode
Expand All @@ -72,6 +72,7 @@ words:
- texpadtmp
- theid
- thmtools
- tqdm
- typer
- vhistory
- wysiwym
Expand Down
38 changes: 38 additions & 0 deletions data/pkg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
amsmath
amssymb
amsthm
array
babel
blindtext
booktabs
caption
cleveref
enumitem
esint
etoolbox
fancyhdr
float
fontspec
geometry
graphicx
hyperref
import
kvoptions
lastpage
lipsum
mathrsfs
mathtools
microtype
multicol
multirow
mwe
physics
siunitx
subcaption
tabularx
tasks
tcolorbox
ulem
xcolor
xkeyval
xparse
10 changes: 0 additions & 10 deletions demo/article/default/default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
\blindmathtrue
\blindtoctrue

\colorlet{emph}{geekblue-7}
\colorlet{link}{magenta-7}
\colorlet{list}{geekblue-7}
\colorlet{paragraph}{geekblue-6}
\colorlet{section}{geekblue-6}
\colorlet{subsection}{geekblue-6}
\colorlet{subsubsection}{geekblue-6}
\colorlet{tcolorbox}{green-8}
\colorlet{theorem}{geekblue-7}

\class{Class Name}
\course{Course Name}
\email{email@example.com}
Expand Down
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Minimal LaTeX Templates

### Article

- [Chinese](./demo/article/chinese/chinese.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/chinese/chinese.tex))
- [Default](./demo/article/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/default/default.tex))
- [Manual](./demo/article/manual/manual.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/manual/manual.tex))
- [Chinese](demo/article/chinese/chinese.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/chinese/chinese.tex))
- [Default](demo/article/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/default/default.tex))
- [Manual](demo/article/manual/manual.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/article/manual/manual.tex))

### Beamer

- [Default](./demo/beamer/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/beamer/default/default.tex))
- [Default](demo/beamer/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/beamer/default/default.tex))

### Coursework

- [Default](./demo/work/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/work/default/default.tex))
- [Chinese](./demo/work/chinese/chinese.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/work/chinese/chinese.tex))
- [Default](demo/work/default/default.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/work/default/default.tex))
- [Chinese](demo/work/chinese/chinese.pdf) ([Source Code](https://github.com/liblaf/ilatex/blob/main/demo/work/chinese/chinese.tex))

## Installation

Expand All @@ -33,7 +33,7 @@ There are two ways to install ilatex:

## Manual

See [manual](./demo/article/manual/manual.pdf) and other [demos](#demos) for more details.
See [manual](demo/article/manual/manual.pdf) and other [demos](#demos) for more details.

## Resources

Expand Down
4 changes: 1 addition & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
lxml
mkdocs
mkdocs-git-authors-plugin
mkdocs-git-committers-plugin-2
mkdocs-git-revision-date-localized-plugin
mkdocs-material
mkdocs-material[imaging]
35 changes: 8 additions & 27 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: ilatex
site_name: iLaTeX

theme:
name: material
Expand All @@ -7,56 +7,37 @@ theme:
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Dark Mode
icon: material/brightness-3
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Light Mode
name: Switch to dark mode

features:
- navigation.instant
- navigation.instant.progress
- navigation.tracking
- navigation.tabs
- navigation.tabs.sticky
# - navigation.sections
# - navigation.expand
- navigation.path
- navigation.prune
- navigation.indexes
- toc.follow
# - toc.integrate
- navigation.top
- search.suggest
- search.highlight
# - search.share
- search.share
- navigation.footer
- content.action.edit
- content.action.view

plugins:
- search
- social
- git-revision-date-localized:
# enabled: true
# type: date
enable_creation_date: true
fallback_to_build_date: true
- git-committers:
# enabled: true
repository: liblaf/ilatex
branch: main
- git-authors
# - optimize:
# enabled: true
# concurrency: 16
# optimize_png: true
# optimize_png_speed: 4
# optimize_png_strip: true
# optimize_jpg: true
# optimize_jpg_quality: 60
# optimize_jpg_progressive: true
# cache: true
# cache_dir: .cache/plugins/optimize

repo_url: https://github.com/liblaf/ilatex

Expand Down
Loading

0 comments on commit e08a29b

Please sign in to comment.