Skip to content

Instantly share code, notes, and snippets.

@3846masa
Created December 4, 2017 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3846masa/d19c0451239d57ac0f0dee328d8390ac to your computer and use it in GitHub Desktop.
Save 3846masa/d19c0451239d57ac0f0dee328d8390ac to your computer and use it in GitHub Desktop.
<%
var position = (config.position || '')[0] || 'tb';
delete config.position;
-%>
\begin{figure}[<%= position %>]
\centering
\includegraphics[<%= utils.stringify(config) %>]{<%= url %>}
<% if (caption) { -%>
\caption{<%= caption.replace(/\n/g, '\\protect\\\\%\n') %>}<%= label %>
<% } -%>
\end{figure}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment