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

Update LTG #45

Merged
merged 77 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
80eefd5
Update LTG
koppor Jan 12, 2025
b3f0b6f
Refine workflow
koppor Jan 12, 2025
abbf6bf
Update LTG
koppor Jan 12, 2025
b94b4c6
Ignore some linting errors for CHANGELOG.md
koppor Jan 12, 2025
c3b7562
Remove obsolete "git status"
koppor Jan 12, 2025
048db1c
path: 'code'
koppor Jan 12, 2025
a98a914
Add forgotten dependency
koppor Jan 12, 2025
639ded8
Fix npm caching
koppor Jan 13, 2025
2699c37
Update LTG
koppor Jan 13, 2025
43e2b2b
Update LTG
koppor Jan 13, 2025
d75da54
Update LTG
koppor Jan 13, 2025
ba04f64
Do not generate Dockerfile
koppor Jan 13, 2025
1bf25b6
Add ref to checkout
koppor Jan 13, 2025
8e9afca
Update files based on generated files by template generator
koppor Jan 13, 2025
27738eb
Update files based on generated files by template generator
koppor Jan 13, 2025
f53f5f9
Update files based on generated files by template generator
koppor Jan 13, 2025
664a274
Update files based on generated files by template generator
koppor Jan 13, 2025
48190f6
Re-add Dockerfile
koppor Jan 13, 2025
00521ca
Remove double header
koppor Jan 13, 2025
3c94c7e
Add CHANGELOG entry
koppor Jan 13, 2025
1ef09ef
Refine CHANGELOG.md entry
koppor Jan 13, 2025
057785f
Refine CHANGELOG.md
koppor Jan 13, 2025
62ab118
Update LTG
koppor Jan 13, 2025
bd2de45
Update files based on generated files by template generator
koppor Jan 13, 2025
c4a04ba
Update files based on generated files by template generator
koppor Jan 13, 2025
e41af82
Update files based on generated files by template generator
koppor Jan 13, 2025
fc8ee5c
Update files based on generated files by template generator
koppor Jan 13, 2025
eb9427f
Update LTG
koppor Jan 13, 2025
1403d80
Update files based on generated files by template generator
koppor Jan 13, 2025
2678624
Update files based on generated files by template generator
koppor Jan 13, 2025
d6e14c7
Update LTG
koppor Jan 13, 2025
3f80fe7
Update files based on generated files by template generator
koppor Jan 13, 2025
cef4435
Update files based on generated files by template generator
koppor Jan 13, 2025
f9c8e4a
Update files based on generated files by template generator
koppor Jan 13, 2025
acc5c22
Update files based on generated files by template generator
koppor Jan 13, 2025
7d056c8
Update LTG
koppor Jan 13, 2025
5b21059
Update files based on generated files by template generator
koppor Jan 13, 2025
3f0a70b
Update files based on generated files by template generator
koppor Jan 13, 2025
093d1ab
Update files based on generated files by template generator
koppor Jan 13, 2025
13a7642
Update files based on generated files by template generator
koppor Jan 13, 2025
e3d8bdd
Update LTG
koppor Jan 13, 2025
4ad7498
Update files based on generated files by template generator
koppor Jan 13, 2025
0be9e31
Update LTG
koppor Jan 13, 2025
e31c7fd
Update files based on generated files by template generator
koppor Jan 13, 2025
f3c702d
Update files based on generated files by template generator
koppor Jan 13, 2025
333b749
Update files based on generated files by template generator
koppor Jan 13, 2025
4dabb93
Update files based on generated files by template generator
koppor Jan 13, 2025
0acd510
Update LTG
koppor Jan 13, 2025
03688f6
Update LTG
koppor Jan 13, 2025
49698b6
Update LTG
koppor Jan 13, 2025
e5a3662
Fix generation of _latexmkrc
koppor Jan 13, 2025
9c08353
Fix updates
koppor Jan 13, 2025
6bd44ea
Try other update
koppor Jan 13, 2025
a7005d0
Update LTG
koppor Jan 13, 2025
5b57633
Update files based on generated files by template generator
koppor Jan 13, 2025
e61e797
Update files based on generated files by template generator
koppor Jan 13, 2025
42a2c50
Update files based on generated files by template generator
koppor Jan 13, 2025
f76ce1f
Update files based on generated files by template generator
koppor Jan 13, 2025
e99214a
Update LTG
koppor Jan 13, 2025
d7b43b0
Update LTG
koppor Jan 13, 2025
b225e93
Fix update
koppor Jan 13, 2025
4a7c74b
Update files based on generated files by template generator
koppor Jan 13, 2025
10f9b6c
Also update .github/workflows
koppor Jan 13, 2025
9681799
Update LTG
koppor Jan 13, 2025
ae723dd
Update LTG
koppor Jan 14, 2025
29daefc
Update LTG
koppor Jan 14, 2025
83c606f
Add check.yml
koppor Jan 14, 2025
6fff920
Update LTG
koppor Jan 14, 2025
1ff7c08
Update files based on generated files by template generator
koppor Jan 14, 2025
f7f7d93
Update LTG
koppor Jan 14, 2025
47fd345
Update files based on generated files by template generator
koppor Jan 14, 2025
3f41188
Update LTG
koppor Jan 14, 2025
8ae93bb
Update LTG
koppor Jan 14, 2025
88b6663
Update files based on generated files by template generator
koppor Jan 14, 2025
7103445
Create latexmkrc
koppor Jan 14, 2025
e3f734c
Update LTG
koppor Jan 14, 2025
1364b8f
Use 2025.1.4 of LTG
koppor Jan 14, 2025
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
88 changes: 37 additions & 51 deletions .github/workflows/update-files.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Update Files
on:
pull_request:
push:
branches:
- update-ltg
- main
workflow_dispatch:
concurrency:
group: update-files
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
generatetex:
Expand All @@ -21,16 +22,17 @@ jobs:
examples: [true]
steps:
- name: Set up Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
path: 'code'
- uses: actions/setup-node@v3
- name: Update npm
run: npm i -g npm@latest
- run: npm i npm@latest
ref: '${{ github.event.pull_request.head.ref }}'
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: 'generator-latex-template/package-lock.json'
- name: Make generator available globally
working-directory: ${{ github.workspace }}/code/generator-latex-template
working-directory: ${{ github.workspace }}/generator-latex-template
run: |
npm install
npm link
Expand All @@ -40,15 +42,15 @@ jobs:
shell: bash
working-directory: /tmp/ltg
run: |
yo latex-template\
yo $GITHUB_WORKSPACE/generator-latex-template/generators/app/index.js \
--githubpublish\
--docker=reitzig\
--docker=iot\
--documentclass=lncs\
--papersize=a4\
--latexcompiler=pdflatex\
--latexcompiler=both\
--bibtextool=bibtex\
--overleaf=true\
--texlive=2022\
--texlive=2024\
--lang=${{ matrix.language }}\
--font=${{ matrix.font }}\
--listings=${{ matrix.listings }}\
Expand All @@ -58,7 +60,7 @@ jobs:
--examples=${{ matrix.examples }}\
--howtotext=false
env:
yeoman_test: true
yeoman_test: false
- name: Prepare files
working-directory: /tmp/ltg
run: |
Expand All @@ -78,76 +80,60 @@ jobs:
rm _latexmkrc

# copy everything
cp -r * ${{ github.workspace }}/code/
cp -r * ${{ github.workspace }}

# output current status
cd ${{ github.workspace }}/code/
cd ${{ github.workspace }}
git status
git diff
- name: Commit changes
uses: EndBug/add-and-commit@v8
uses: EndBug/add-and-commit@v9
with:
message: 'Update files based on generated files by template generator'
committer_email: [email protected]
push: false
cwd: 'code'
- name: Push changes
run: |
cd code
git status
parallel --retries 10 --delay 9 ::: "git status && git pull --rebase && git push"
publish:
runs-on: ubuntu-latest
needs: [generatetex]
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Build Docker image
uses: docker/build-push-action@v4
with:
push: true
provenance: false
tags: localhost:5000/name/app:latest
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up Git repositor4
uses: actions/checkout@v4
- run: |
cp paper-en-default-listings.tex paper.tex
cp paper-en-default-minted.tex paper-minted.tex
cp paper-en-times-listings.tex paper-newtx.tex
cp paper-en-times-minted.tex paper-minted-newtx.tex
mkdir /tmp/out
# use latexmkrc (which is disabled due to easy overleaf usage)
cp _latexmkrc latexmkrc
- name: Build paper.tex
run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk paper.tex"
- name: Build paper-minted.tex
run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk paper-minted.tex"
- name: Build paper-newtx.tex
run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk paper-newtx.tex"
- name: Build paper-minted-newtx.tex
run: docker run -v $(pwd):/work/src -v /tmp/out:/work/out localhost:5000/name/app:latest work "latexmk paper-minted-newtx.tex"
- name: Install TeX Live
uses: zauguin/install-texlive@v3
with:
package_file: '${{ github.workspace }}/Texlivefile'
- name: Prepare latexmk
run: |
updmap -sys
texhash
tlmgr generate language --rebuild-sys
- run: latexmk paper.tex
- run: latexmk paper-minted.tex
- run: latexmk paper-newtx.tex
- run: latexmk paper-minted-newtx.tex
- run: |
mkdir publish
cp /tmp/out/*.pdf publish/
cp *.pdf publish/
cp paper.tex publish/
cp README.md publish/
cp .github/_config.yml publish/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: publish
path: publish/
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).
From 2022-03-01 onwards, versioning is done using [Calendar Versioning](https://calver.org/).

## [Unreleased]

### Changed

- Compilation with both lualatex and pdflatex is possible. Defaults to lualatex.
- Nicer gray scale for `minted` listings.
- `Dockerfile` switched to [Island of TeX's docker image](https://gitlab.com/islandoftex/images/texlive#tex-live-docker-image) to enable easy addition of new LaTeX packages.

## [2022-06-06]

### Added
Expand Down Expand Up @@ -216,3 +224,5 @@ First release using semantic versioning.
[1.1.1]: https://github.com/latextemplates/LNCS/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/latextemplates/LNCS/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/latextemplates/LNCS/releases/tag/1.0.0

<!-- markdownlint-disable-file MD013 MD024 CHANGELOG-RULE-003 -->
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
FROM reitzig/texlive-base:2022.8
RUN apk update && apk add --no-cache bash perl python3 py3-pip
RUN pip3 install pygments
FROM registry.gitlab.com/islandoftex/images/texlive:latest-basic
WORKDIR /workdir

# Emulate "Install dependencies" of "entrypoint work ..."
RUN tlmgr update --self --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2022/tlnet-final
COPY Texlivefile /work/src
RUN xargs tlmgr install --repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2022/tlnet-final < "/work/src/Texlivefile" &&\
sha256sum "/work/src/Texlivefile" > "/work/tmp/Texlivefile.sha" &&\
# make latexmk and texlogsieve available
tlmgr path add
# use latest texlogsieve
# RUN cd /usr/local/bin && wget https://gitlab.com/lago/texlogsieve/-/raw/main/texlogsieve?inline=false
COPY Texlivefile /workdir/

RUN xargs tlmgr install --repository https://tug.ctan.org/systems/texlive/tlnet/ < /workdir/Texlivefile

RUN tlmgr path add
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Note that this requires a working perl installation.

In case something goes wrong, you can instruct the LaTeX compiler to stop at the first error:

pdflatex paper
lualatex paper

## Benefits

Expand All @@ -32,6 +32,7 @@ Following features are enabled in this template:
- Modern packages such as [microtype], [cleveref], [csquotes], [hyperref], [hypcap], [upquote], [natbib], [booktabs].
- (Optional) LaTeX compilation using the modern lualatex compiler.
- Ready-to-go configuration for [latexindent].
- Proper hyphenation and microtype for English texts.

## Disabled features

Expand Down Expand Up @@ -84,18 +85,6 @@ To have minted running properly, you have to do following steps on Windows:
2. Install [pygments]: `pip instal pygments` - that uses the Pyhton package manager to install the pygments library
3. When latexing, use `-shell-escape`: `pdflatex -shell-escape paper`.
You can also just execute `latexmk paper`.

## Usage with docker

The generated `Dockerfile` is based on the [Dockerfile by reitzig](https://github.com/reitzig/texlive-docker).
The idea of that system is to host the document sources in a directory separated from the output directory.

docker run --rm -v "c:\users\example\latex-document:/work/src" -v "c:\users\example\latex-document\out:/work/out" ltg work latexmk

Following one-time setup is requried:

docker build -t ltg .

## FAQs

### Q: ShareLaTeX outputs a warning regarding the llncs class
Expand All @@ -119,7 +108,7 @@ Please remove the file and update your LaTeX distribution.
After that you can use and push the `main` branch as usual.
Notes on syncing with the upstream repository [are available from GitHub](https://help.github.com/articles/syncing-a-fork/).

### Q: I get the error `! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.`
### Q: I get the error `! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.`

Install the `cm-super` package using the MiKTeX package manager. Then, run `initexmf --mkmaps` on the command line. (Long description: <https://tex.stackexchange.com/a/324972/9075>)

Expand Down Expand Up @@ -166,7 +155,6 @@ Yes. You can regenerate the template and choose "German" as language.
- Other templates: <https://latextemplates.github.io/>

[booktabs]: https://ctan.org/pkg/booktabs
[cfr-lm]: https://www.ctan.org/pkg/cfr-lm
[cleveref]: https://ctan.org/pkg/cleveref
[csquotes]: https://www.ctan.org/pkg/csquotes
[hypcap]: https://www.ctan.org/pkg/hypcap
Expand All @@ -175,7 +163,6 @@ Yes. You can regenerate the template and choose "German" as language.
[microtype]: https://ctan.org/pkg/microtype
[minted]: https://ctan.org/pkg/minted
[natbib]: https://ctan.org/pkg/natbib
[newtx]: https://ctan.org/pkg/newtx
[paralist]: https://www.ctan.org/pkg/paralist
[pdfcomment]: https://www.ctan.org/pkg/pdfcomment
[upquote]: https://www.ctan.org/pkg/upquote
Expand Down
Loading