summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/inline-images/README.md
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-16 20:49:26 +0000
committerKarl Berry <karl@freefriends.org>2018-08-16 20:49:26 +0000
commit917d5c3b61156e675b299961a80f33233dcd4de5 (patch)
tree4cae640407c0c56467d43d095505a601a438d07b /Master/texmf-dist/doc/latex/inline-images/README.md
parent03e475af0478ac4e6cbe4fbe68e56f7461694064 (diff)
inline-images (16aug18)
git-svn-id: svn://tug.org/texlive/trunk@48415 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/inline-images/README.md')
-rw-r--r--Master/texmf-dist/doc/latex/inline-images/README.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/inline-images/README.md b/Master/texmf-dist/doc/latex/inline-images/README.md
new file mode 100644
index 00000000000..a4e0e2d8d50
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/inline-images/README.md
@@ -0,0 +1,61 @@
+LaTeX-Template for Inline Images
+================================
+
+If you want your document to be self contained, you might want to decare inline images in base64 encoding.
+
+Just use:
+
+ \usepackage{inline-images}
+ …
+ \inlineimg{<filename>}{<base64 encoded raw image data>}
+
+This creates a file `<filename>.base64` containning a copy of the raw image data, then a sytsem shell is executed to convert the raw data to the binary image and a file `<filename>` is created, which is then include in your document.
+
+**Note:** The LaTeX compiler must be able to execute system commands, so option `--shell-escape` is required.
+
+**Note:** It is desiged for Unix systems and it requires the command line tool `base64` installed. Compilation calls `base64 -d <filename>.img.base64 > <filename>.img`.
+
+
+Example
+=======
+
+This [example code]:
+
+```latex
+\documentclass[a5]{article}
+\usepackage[paperwidth=6cm,paperheight=4cm]{geometry}
+
+\usepackage{inline-images}
+
+\newcommand{\img}{iVBORw0KGgoAAAANSUhEUgAAAMgAAADIC … BQ8f/JOcTkviE7+QAAAABJRU5ErkJggg==}
+
+\begin{document}
+\inlineimg{example.png}{\img}
+
+© 2018 Marc Wäckerlin
+\end{document}
+```
+
+After compilation:
+
+ xelatex --shell-escape -synctex=1 -interaction=nonstopmode example.tex
+
+Results in this [example document]:
+
+![example screenshot](screenshots/example.jpg)
+
+
+Need More
+=========
+
+If you are missing a feature or a configuration option, consult the [project] page. Just open a [ticket] and the [author] will care about it. Or extend it, it's [lgpl].
+
+
+
+[example code]: screenshots/screenshot.tex "screenshot of the example document"
+[example document]: examples/example.pdf "full example document"
+[ticket]: https://mrw.sh/templates/inline-images/issues "open issues and tickets for my LaTeX-templates project"
+[author]: https://marc.wäckerlin.ch "Marc Wäckerlin"
+[project]: https://mrw.sh/templates/inline-images "the main project page"
+[lgpl]: https://www.gnu.org/licenses/lgpl-3.0 "Library GNU Public License"
+