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 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

\documentclass[a5]{article}
\usepackage[paperwidth=6cm,paperheight=4cm]{geometry}

\usepackage{inline-images}

\begin{document}
\inlineimg{example.png}{\img}

\end{document}


After compilation:

xelatex –shell-escape -synctex=1 -interaction=nonstopmode example.tex

Results in this

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.

inline-images – Inline images in base64 encoding

The package provides a command \inlineimg to dynamically create a file containing the inline image in base64 format, which is decoded and included in the source file.

Requirements

• must be run with option --shell-escape.
• Program base64.

 Package inline-images Home page https://mrw.sh/templates/inline-images Bug tracker https://mrw.sh/templates/inline-images/issues Version 1.0 Licenses GNU Lesser General Public License 3 Maintainer Marc Wäckerlin Contained in TeX Live as inline-imagesMiKTeX as inline-images Topics Image support