Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
- id: remove-crlf
exclude: \.rockspec$
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -42,15 +42,15 @@ repos:
args:
- --msg-filename
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.6.0
rev: 3.6.1
hooks:
- id: editorconfig-checker
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: check-mailmap
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
rev: v1.7.12
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
Expand All @@ -72,7 +72,7 @@ repos:
- mdformat-config
- mdformat-web
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
rev: v0.22.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
Expand Down
100 changes: 50 additions & 50 deletions packages/texcat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ It supports color themes:
```sh
$ hyperfine -Nw10 'texcat test.lua' 'texcat --syntax-type=textmate test.lua' 'pygmentize test.lua' 'bat test.lua'
Benchmark 1: texcat test.lua
Time (mean ± σ): 56.8 ms ± 1.9 ms [User: 49.8 ms, System: 6.3 ms]
Range (min … max): 54.4 ms … 64.2 ms 50 runs
Time (mean ± σ): 56.8 ms ± 1.9 ms [User: 49.8 ms, System: 6.3 ms]
Range (min … max): 54.4 ms … 64.2 ms 50 runs

Benchmark 2: texcat --syntax-type=textmate test.lua
Time (mean ± σ): 73.1 ms ± 11.2 ms [User: 70.7 ms, System: 7.4 ms]
Range (min … max): 62.0 ms … 89.7 ms 47 runs
Time (mean ± σ): 73.1 ms ± 11.2 ms [User: 70.7 ms, System: 7.4 ms]
Range (min … max): 62.0 ms … 89.7 ms 47 runs

Benchmark 3: pygmentize test.lua
Time (mean ± σ): 154.4 ms ± 19.9 ms [User: 140.0 ms, System: 12.8 ms]
Range (min … max): 137.4 ms … 217.3 ms 21 runs
Time (mean ± σ): 154.4 ms ± 19.9 ms [User: 140.0 ms, System: 12.8 ms]
Range (min … max): 137.4 ms … 217.3 ms 21 runs

Benchmark 4: bat test.lua
Time (mean ± σ): 8.0 ms ± 0.5 ms [User: 7.4 ms, System: 4.2 ms]
Range (min … max): 7.0 ms … 10.0 ms 429 runs
Time (mean ± σ): 8.0 ms ± 0.5 ms [User: 7.4 ms, System: 4.2 ms]
Range (min … max): 7.0 ms … 10.0 ms 429 runs

Summary
bat test.lua ran
7.14 ± 0.50 times faster than texcat test.lua
9.18 ± 1.52 times faster than texcat --syntax-type=textmate test.lua
19.40 ± 2.77 times faster than pygmentize test.lua
bat test.lua ran
7.14 ± 0.50 times faster than texcat test.lua
9.18 ± 1.52 times faster than texcat --syntax-type=textmate test.lua
19.40 ± 2.77 times faster than pygmentize test.lua
```

### LaTeX output
Expand All @@ -49,21 +49,21 @@ Summary
$ hyperfine -Nw10 'texcat --output-format=latex test.lua' 'texcat --output-format=latex --syntax-type=textmate test.lua' 'pygmentize -f latex -O full=True test.lua'

Benchmark 1: texcat --output-format=latex test.lua
Time (mean ± σ): 56.3 ms ± 1.2 ms [User: 49.6 ms, System: 6.1 ms]
Range (min … max): 54.9 ms … 60.9 ms 53 runs
Time (mean ± σ): 56.3 ms ± 1.2 ms [User: 49.6 ms, System: 6.1 ms]
Range (min … max): 54.9 ms … 60.9 ms 53 runs

Benchmark 2: texcat --output-format=latex --syntax-type=textmate test.lua
Time (mean ± σ): 63.8 ms ± 0.8 ms [User: 61.5 ms, System: 7.0 ms]
Range (min … max): 62.5 ms … 66.5 ms 45 runs
Time (mean ± σ): 63.8 ms ± 0.8 ms [User: 61.5 ms, System: 7.0 ms]
Range (min … max): 62.5 ms … 66.5 ms 45 runs

Benchmark 3: pygmentize -f latex -O full=True test.lua
Time (mean ± σ): 110.7 ms ± 1.2 ms [User: 99.2 ms, System: 10.7 ms]
Range (min … max): 109.1 ms … 114.3 ms 27 runs
Time (mean ± σ): 110.7 ms ± 1.2 ms [User: 99.2 ms, System: 10.7 ms]
Range (min … max): 109.1 ms … 114.3 ms 27 runs

Summary
texcat --output-format=latex test.lua ran
1.13 ± 0.03 times faster than texcat --output-format=latex --syntax-type=textmate test.lua
1.97 ± 0.05 times faster than pygmentize -f latex -O full=True test.lua
texcat --output-format=latex test.lua ran
1.13 ± 0.03 times faster than texcat --output-format=latex --syntax-type=textmate test.lua
1.97 ± 0.05 times faster than pygmentize -f latex -O full=True test.lua
```

## Dependencies
Expand Down Expand Up @@ -130,39 +130,39 @@ extra_servers = [
```sh
$ texcat --help
Usage: /home/wzy/Desktop/texrocks/packages/texcat/bin/texcat [-h]
[--completion {bash,zsh,fish}] [--output <output>]
[--syntax <syntax>] [--theme <theme>]
[--syntax-type {textmate,tree-sitter}]
[--theme-type {textmate}] [--extensions-dir <extensions_dir>]
[--output-format {ansi,empty,latex,preamble.tex,test,tex,txt}]
[--list {themes,syntaxes,extensions_dirs,colors,links}]
[--command-prefix <command_prefix>]
[--math-escape <math_escape>] [<file>] ...
[--completion {bash,zsh,fish}] [--output <output>]
[--syntax <syntax>] [--theme <theme>]
[--syntax-type {textmate,tree-sitter}]
[--theme-type {textmate}] [--extensions-dir <extensions_dir>]
[--output-format {ansi,empty,latex,preamble.tex,test,tex,txt}]
[--list {themes,syntaxes,extensions_dirs,colors,links}]
[--command-prefix <command_prefix>]
[--math-escape <math_escape>] [<file>] ...

Arguments:
file file name
file file name

Options:
-h, --help Show this help message and exit.
--completion {bash,zsh,fish}
Output a shell completion script for the specified shell.
--output <output> output file name, - means stdout
--syntax <syntax> set syntax, auto means decided by extension
--theme <theme> set theme, auto means first theme such as Abyss
--syntax-type {textmate,tree-sitter}
syntax highlight type (default: tree-sitter)
--theme-type {textmate}
color scheme type (default: textmate)
--extensions-dir <extensions_dir>
directories for VSCode extensions and tree-sitter grammars/queries
--output-format {ansi,empty,latex,preamble.tex,test,tex,txt}
output format (default: ansi)
--list {themes,syntaxes,extensions_dirs,colors,links}
list all themes/syntaxes/... (default: themes)
--command-prefix <command_prefix>
command prefix for TeX
--math-escape <math_escape>
the scope to escape $math TeX code$ (default: comment)
-h, --help Show this help message and exit.
--completion {bash,zsh,fish}
Output a shell completion script for the specified shell.
--output <output> output file name, - means stdout
--syntax <syntax> set syntax, auto means decided by extension
--theme <theme> set theme, auto means first theme such as Abyss
--syntax-type {textmate,tree-sitter}
syntax highlight type (default: tree-sitter)
--theme-type {textmate}
color scheme type (default: textmate)
--extensions-dir <extensions_dir>
directories for VSCode extensions and tree-sitter grammars/queries
--output-format {ansi,empty,latex,preamble.tex,test,tex,txt}
output format (default: ansi)
--list {themes,syntaxes,extensions_dirs,colors,links}
list all themes/syntaxes/... (default: themes)
--command-prefix <command_prefix>
command prefix for TeX
--math-escape <math_escape>
the scope to escape $math TeX code$ (default: comment)
$ texcat lua/texcat.lua --output-format=latex --output=main.tex
$ lualatex main.tex
```
Expand Down
2 changes: 1 addition & 1 deletion packages/texdef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A reimplementation of <https://github.com/MartinScharrer/texdef/>.
$ lx add -b texdef
$ texdef TeX
This is LuaHBTeX, Version 1.23.3 (TeX Live 2026/dev)
system commands enabled.
system commands enabled.

\TeX -> T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX
$ lx remove -b texdef
Expand Down
32 changes: 16 additions & 16 deletions packages/texluap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ Usage: tlua [-h] [-e STMT] [-l NAME] [-p] [-v] [-i] [<SCRIPT>] ...
A Lua command prompt with pretty-printing and auto-completion.

Arguments:
SCRIPT A Lua script to be executed. Any arguments
specified after the script name, are passed to
the script.
SCRIPT A Lua script to be executed. Any arguments
specified after the script name, are passed to
the script.

Options:
-h Show this help message and exit.
-e STMT Execute string 'STMT'.
-l NAME Require library 'NAME'.
-p Force plain, uncolored output.
-v Print version information.
-i Enter interactive mode.
-h Show this help message and exit.
-e STMT Execute string 'STMT'.
-l NAME Require library 'NAME'.
-p Force plain, uncolored output.
-v Print version information.
-i Enter interactive mode.
```

It is similar to standard lua:
Expand All @@ -31,13 +31,13 @@ $ lua -h
/usr/bin/lua: unrecognized option '-h'
usage: /usr/bin/lua [options] [script [args]]
Available options are:
-e stat execute string 'stat'
-i enter interactive mode after executing 'script'
-l name require library 'name' into global 'name'
-v show version information
-E ignore environment variables
-- stop handling options
- stop handling options and execute stdin
-e stat execute string 'stat'
-i enter interactive mode after executing 'script'
-l name require library 'name' into global 'name'
-v show version information
-E ignore environment variables
-- stop handling options
- stop handling options and execute stdin
```

The name of tlua comes from [nlua](https://github.com/mfussenegger/nlua).
Expand Down
Loading