blob: 0ed617ea34e45059da9ea0c957b3a890e6b62e0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# luaimageembed
LuaTeX package to embed images directly as base64-encoded strings into the document. This can be useful, e.g. to package a document with images into a single TeX file, or with automatically generated graphics.
The image files will be decoded, written to a temporary directory, and cleaned up afterwards.
Use at your own risk.
## Commands
Three commands are wrapped to allow for use with base64-encoded images:
- `\includegraphicsembedded` (`\includegraphics`)
- `\pgfdeclareimageembedded` (`\pgfdeclareimage`)
- `\pgfimageembedded` (`\pgfimage`)
Each takes the base64-encoded image data instead of the filename; see the example below. Supported are `png`, `jpg`, `jb2` and `pdf` images.
## Example
```latex
\documentclass{scrartcl}
\usepackage{luaimageembed}
\usepackage{graphicx}
\begin{document}
\includegraphicsembedded[width=4cm]{%
iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAAAAABzQ+pjAAAAFElEQVQI12P4z/Cf4f9/BgYGBgYA
IOsD/UqPmwUAAAAASUVORK5CYII=
}
\end{document}
```
## Version
0.1 (alpha)
## License
MIT
|