Skip to content

Commit e0398f6

Browse files
committed
doc: update README
1 parent 24ee590 commit e0398f6

1 file changed

Lines changed: 28 additions & 19 deletions

File tree

README.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Each input is provided as a key inside the `with` section of the action.
1616

1717
The root LaTeX file to be compiled. This input is required. You can also pass multiple files as a multi-line string to compile multiple documents. For example:
1818
```yaml
19-
- uses: xu-cheng/latex-action@v2
19+
- uses: xu-cheng/latex-action@v3
2020
with:
2121
root_file: |
2222
file1.tex
@@ -27,7 +27,7 @@ Each input is provided as a key inside the `with` section of the action.
2727

2828
If set, interpret the `root_file` input as bash glob pattern. For example:
2929
```yaml
30-
- uses: xu-cheng/latex-action@v2
30+
- uses: xu-cheng/latex-action@v3
3131
with:
3232
root_file: "*.tex"
3333
glob_root_file: true
@@ -61,7 +61,7 @@ Each input is provided as a key inside the `with` section of the action.
6161

6262
Install extra `.ttf`/`.otf` fonts to be used by `fontspec`. You can also pass multiple files as a multi-line string. Each file path will be interpreted as glob pattern. For example:
6363
```yaml
64-
- uses: xu-cheng/latex-action@v2
64+
- uses: xu-cheng/latex-action@v3
6565
with:
6666
root_file: main.tex
6767
extra_fonts: |
@@ -77,6 +77,26 @@ Each input is provided as a key inside the `with` section of the action.
7777

7878
Arbitrary bash codes to be executed after compiling LaTeX documents. For example, `post_compile: "latexmk -c"` to clean up temporary files.
7979
80+
* `texlive_version`
81+
82+
The version of TeXLive to be used. Supported inputs include 2020, 2021, 2022, 2023, and latest. By default the latest TeXLive is used. This input cannot co-exist with `docker_image` input. An example to use this input:
83+
```yaml
84+
- uses: xu-cheng/latex-action@v3
85+
with:
86+
root_file: main.tex
87+
texlive_version: 2022
88+
```
89+
90+
* `docker_image`
91+
92+
Custom which docker image to be used. Only [latex-docker images](https://github.com/xu-cheng/latex-docker/pkgs/container/texlive-full) are supported. For example if you want to pin the docker image:
93+
```yaml
94+
- uses: xu-cheng/latex-action@v3
95+
with:
96+
root_file: main.tex
97+
docker_image: ghcr.io/xu-cheng/texlive-full:20230801
98+
```
99+
80100
**The following inputs are only valid if the input `compiler` is not changed.**
81101

82102
* `latexmk_shell_escape`
@@ -103,7 +123,7 @@ jobs:
103123
- name: Set up Git repository
104124
uses: actions/checkout@v3
105125
- name: Compile LaTeX document
106-
uses: xu-cheng/latex-action@v2
126+
uses: xu-cheng/latex-action@v3
107127
with:
108128
root_file: main.tex
109129
- name: Upload PDF file
@@ -120,14 +140,14 @@ jobs:
120140
By default, this action uses pdfLaTeX. If you want to use XeLaTeX or LuaLaTeX, you can set the `latexmk_use_xelatex` or `latexmk_use_lualatex` input respectively. For example:
121141

122142
```yaml
123-
- uses: xu-cheng/latex-action@v2
143+
- uses: xu-cheng/latex-action@v3
124144
with:
125145
root_file: main.tex
126146
latexmk_use_xelatex: true
127147
```
128148

129149
```yaml
130-
- uses: xu-cheng/latex-action@v2
150+
- uses: xu-cheng/latex-action@v3
131151
with:
132152
root_file: main.tex
133153
latexmk_use_lualatex: true
@@ -140,7 +160,7 @@ Alternatively, you could create a `.latexmkrc` file. Refer to the [`latexmk` doc
140160
To enable `--shell-escape`, set the `latexmk_shell_escape` input.
141161

142162
```yaml
143-
- uses: xu-cheng/latex-action@v2
163+
- uses: xu-cheng/latex-action@v3
144164
with:
145165
root_file: main.tex
146166
latexmk_shell_escape: true
@@ -172,7 +192,7 @@ Sometimes you may have custom package (`.sty`) or class (`.cls`) files in other
172192
run: |
173193
curl -OL https://example.com/custom_template.zip
174194
unzip custom_template.zip
175-
- uses: xu-cheng/latex-action@v2
195+
- uses: xu-cheng/latex-action@v3
176196
with:
177197
root_file: main.tex
178198
env:
@@ -183,17 +203,6 @@ Noted that you should NOT use `{{ github.workspace }}` or `$GITHUB_WORKSPACE` in
183203

184204
You can find more information of `TEXINPUTS` [here](https://tex.stackexchange.com/a/93733).
185205

186-
### How to use old versions of TeXLive?
187-
188-
By default, this action always uses the latest docker image that contains the latest TeXLive updates. If you want to use old versions of TeXLive, you can change the action version tag accordingly. Currently, three last old versions of TeXLive are supported.
189-
190-
```yaml
191-
- uses: xu-cheng/latex-action@v2 # TeXLive 2023
192-
- uses: xu-cheng/latex-action@v2-texlive2022 # TeXLive 2022
193-
- uses: xu-cheng/latex-action@v2-texlive2021 # TeXLive 2021
194-
- uses: xu-cheng/latex-action@v2-texlive2020 # TeXLive 2020
195-
```
196-
197206
### It fails due to `xindy` cannot be found.
198207

199208
This is an upstream issue where `xindy.x86_64-linuxmusl` is currently missing in TeXLive. To work around it, try [this](https://github.com/xu-cheng/latex-action/issues/32#issuecomment-626086551).

0 commit comments

Comments
 (0)