Advertisement
ruanmed

Untitled

Aug 7th, 2019
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.70 KB | None | 0 0
  1. \newcommand{\Wedidthis}{%   \legend{\textbf{Fonte:} O autor (\the\year).}
  2.     \legend{\textbf{Fonte:} Os autores.}
  3. }
  4.  
  5. %--------------------------------------------------------------------------------
  6. % Comando para inserir códigos - by @ruanmed
  7. %--------------------------------------------------------------------------------
  8. \usepackage{caption}
  9.  
  10. \newenvironment{code}{\captionsetup{type=listing}}{}
  11. \SetupFloatingEnvironment{listing}{name=Código}
  12.  
  13. \newcommand{\sourcecodenolist}[4]{
  14.     \begin{code}
  15.         \refstepcounter{sourcecode}
  16.        \captionof{listing}{#1 }
  17.        \label{code:#2}
  18.        \inputminted[linenos, bgcolor=bg, tabsize=4,breaklines]{#3}{codes/#4}
  19.        \Wedidthis
  20.    \end{code}
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement