added an example on how to use \pic

This commit is contained in:
Kjistóf 2017-12-11 23:35:01 +01:00
parent b3fb7b0864
commit 145abe9c09
3 changed files with 6 additions and 3 deletions

BIN
cat.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,8 +1,8 @@
\documentclass{article}
\usepackage{latexplate}
\usepackage[english]{babel}
\usepackage{lipsum}
\setmainfont{DejaVu Sans}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
@ -40,7 +40,10 @@
\section{Code highlighting}
This is just some \code{inline code}.
\section{Inserting pictures}
\pic[width=0.5\textwidth]{cat.jpg}{It is this easy}
\section{Lorem Ipsum}
\lipsum[1-2]
\lipsum[1]
\end{document}

View File

@ -20,7 +20,7 @@
\sethlcolor{andigray}
\newcommand{\code}[1]{\hl{\mbox{#1}}}
\newcommand{\pic}[3]
\newcommand{\pic}[3][width=\textwidth]
{
\begin{figure}[H]
\centering