Skip to content

Commit

Permalink
📝 Add an image
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 8, 2025
1 parent 4dc0ff7 commit 1db9452
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,32 @@ You can install them by yourself.
Some packages are recommended:

- [hyperref](https://luarocks.org/modules/Freed-Wu/hyperref): hyperlinks.
- [pgf](https://luarocks.org/modules/Freed-Wu/pgf): PGF/Tikz.
- [pgf](https://luarocks.org/modules/Freed-Wu/pgf): PGF/TikZ.
- [beamer](https://luarocks.org/modules/Freed-Wu/beamer): slides.

[More packages](https://luarocks.org/m/texmf).

[A more complicated example](examples/tex/latex/test.tex):

```tex
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, quotes, graphs, graphdrawing, shapes.geometric}
\usegdlibrary{layered}
\usepackage{hyperref}
\usepackage{hologo}
\title{test}
\begin{document}
\begin{tikzpicture}[rounded corners, >=Stealth, auto]
\graph[layered layout, nodes={draw, align=center}]{%
"\TeX" -> "\hologo{pdfTeX}" -> "\hologo{XeTeX}";
"\hologo{pdfTeX}" -> "\hologo{LuaTeX}"
};
\end{tikzpicture}
\end{document}
```

![graph](https://github.com/user-attachments/assets/c66416fb-15be-4a93-8fea-8578767b663a)

### texdoc

```sh
Expand Down Expand Up @@ -165,7 +187,7 @@ By default:
```lua
local home = os.getenv('HOME')
rocks_path = home .. '/.local/share/texmf'
rocks_path = home .. '/.luarocks',
luarocks_config_path = home .. '/.luarocks/config-5.3.lua'
luarocks_binary = 'luarocks'
```
Expand Down
5 changes: 1 addition & 4 deletions examples/tex/latex/test.tex
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
% \documentclass[tikz]{standalone}
\documentclass{article}
\usepackage{tikz}
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, quotes, graphs, graphdrawing, shapes.geometric}
\usegdlibrary{layered}
\usepackage{hyperref}
\usepackage{hologo}
\title{test}
\begin{document}
\tikzset{io/.style={trapezium, trapezium left angle=60, trapezium right angle=120, rounded corners=false}}
\begin{tikzpicture}[rounded corners, >=Stealth, auto]
\graph[layered layout, nodes={draw, align=center}]{%
"\TeX" -> "\hologo{pdfTeX}" -> "\hologo{XeTeX}";
Expand Down
2 changes: 1 addition & 1 deletion lua/texrocks/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local home = os.getenv('HOME')
local config = {
require = require,
rocks_path = home .. '/.local/share/texmf',
rocks_path = home .. '/.luarocks',
luarocks_config_path = home .. '/.luarocks/config-5.3.lua',
luarocks_binary = 'luarocks'
}
Expand Down

0 comments on commit 1db9452

Please sign in to comment.