From 9ff16fa182e0ed4058d5a4bf825ddac07b297f63 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Mon, 3 Nov 2025 13:51:01 +0100 Subject: [PATCH] [Build] Refactor for import style update --- README.md | 9 ++++-- build.sh | 50 ++++++++++++++++++++++++++++++++ include.tex | 13 ++++----- {dist => scopes}/full.tex | 0 {dist => scopes}/letter.tex | 0 {dist => scopes}/minimal.tex | 0 {dist => scopes}/most.tex | 0 {dist => scopes}/recommended.tex | 0 8 files changed, 62 insertions(+), 10 deletions(-) create mode 100755 build.sh rename {dist => scopes}/full.tex (100%) rename {dist => scopes}/letter.tex (100%) rename {dist => scopes}/minimal.tex (100%) rename {dist => scopes}/most.tex (100%) rename {dist => scopes}/recommended.tex (100%) diff --git a/README.md b/README.md index a60ffcf..bc7d750 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,11 @@ This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly. -Breaking change in the current version: the time complexity commands now require the math environment. You may use the following vim-regex to fix issues in your code: -`:%s/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g` (execute first) and `:%s/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g` +# Note on future import updates +A future version (TBD) will also include combined files (i.e. quite large files in the `dist` directory, current `dist` directory will be renamed) +such that TeXlab will provide completion for the commands provided here. + +The current import method will continue to be supported, but new projects should switch to the new import style # Getting started @@ -25,4 +28,4 @@ The editors are ordered in terms of ease of use and my personal preference list -[LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2024 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/) +[LaTeX helper files](https://git.janishutz.com/janishutz/latex) © 2025 by [Janis Hutz](https://janishutz.com) is licensed under [Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/) diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..835a46d --- /dev/null +++ b/build.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +echo " + ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ +█ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █ +█ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█ +█ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄ +█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █ +█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ +█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ + + ==> Building <== + +" + +mkdir dist/ +echo "\\input{\\dir/config/config.tex}" > ./dist/minimal.tex + +# Build minimal scope +cat ./main/core.tex >> ./dist/minimal.tex +cat ./main/style/style.tex >> ./dist/minimal.tex +cat ./main/style/common.tex >> ./dist/minimal.tex + + +# Build most +cat ./dist/minimal.tex > ./dist/most.tex +cat ./main/math.tex >> ./dist/most.tex +cat ./main/cs.tex >> ./dist/most.tex +cat ./main/index.tex >> ./dist/most.tex +cat ./main/style/counters.tex >> ./dist/most.tex +cat ./main/style/cs.tex >> ./dist/most.tex +cat ./main/style/math.tex >> ./dist/most.tex +cat ./main/style/language.tex >> ./dist/most.tex + + +# Build recommended +cat ./dist/most.tex > ./dist/recommended.tex +cat ./extra/bib.tex >> ./dist/recommended.tex +cat ./extra/glossary.tex >> ./dist/recommended.tex + + +# Build full +cat ./dist/recommended.tex > ./dist/full.tex +cat ./extra/minted.tex >> ./dist/full.tex + + +# Copy letter +cp ./scopes/letter.tex ./dist/letter.tex + +echo "==> Done" diff --git a/include.tex b/include.tex index b101e39..1dc63e2 100644 --- a/include.tex +++ b/include.tex @@ -8,30 +8,29 @@ \edef\temp{#1} \ifx \temp\recommended \typeout{[CustomLaTeXHelperLoader]: Loading config recommended} - \input{\dir/dist/recommended.tex} + \input{\dir/scopes/recommended.tex} \loadRecommended \else \ifx \temp\minimal \typeout{[CustomLaTeXHelperLoader]: Loading config minimal} - \input{\dir/dist/minimal.tex} + \input{\dir/scopes/minimal.tex} \loadMinimal \else \ifx \temp\most \typeout{[CustomLaTeXHelperLoader]: Loading config most} - \input{\dir/dist/most.tex} + \input{\dir/scopes/most.tex} \loadMost \else \ifx \temp\full \typeout{[CustomLaTeXHelperLoader]: Loading config full} - \input{\dir/dist/full.tex} + \input{\dir/scopes/full.tex} \loadFull \else \ifx \temp\letters \typeout{[CustomLaTeXHelperLoader]: Loading config letter} - \input{\dir/dist/minimal.tex} + \input{\dir/scopes/minimal.tex} \loadMinimal - % \input{\dir/config/config.tex} - \input{\dir/dist/letter.tex} + \input{\dir/scopes/letter.tex} \else \typeout{[CustomLaTeXHelperLoader]: INVALID CONFIG SPECIFIED, NOTHING LOADED!} \fi diff --git a/dist/full.tex b/scopes/full.tex similarity index 100% rename from dist/full.tex rename to scopes/full.tex diff --git a/dist/letter.tex b/scopes/letter.tex similarity index 100% rename from dist/letter.tex rename to scopes/letter.tex diff --git a/dist/minimal.tex b/scopes/minimal.tex similarity index 100% rename from dist/minimal.tex rename to scopes/minimal.tex diff --git a/dist/most.tex b/scopes/most.tex similarity index 100% rename from dist/most.tex rename to scopes/most.tex diff --git a/dist/recommended.tex b/scopes/recommended.tex similarity index 100% rename from dist/recommended.tex rename to scopes/recommended.tex