latex - define image as newcommand -


i'm trying set image (canadian flag) command in latex résumé project. beginner in latex , i'm trying replicate command definition based on fontawesome package (pre-define images), integrating image.

here's original command works (faat comes fontawesome package):

\newcommand{\emailsymbol}{\faat} \newcommand{\email}[1]{\printinfo{\emailsymbol}{#1}} 

here's try doesn't work:

\newcommand{\canflag}{\def\@canada.png} \newcommand{\canadaflag}[1]{\printinfo{\canflag}{#1}} 

any idea on how achieve i'm trying do?

you can graphicx package achieve this

\documentclass[12pt]{article} \usepackage{graphicx}  \newcommand\canadaflag{\includegraphics[height=8pt]{flag}}  \begin{document}     \section{before start}     \canadaflag using... \end{document} 

enter image description here


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -