Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. documentclass{article}
  2.  
  3. usepackage{listings}
  4. usepackage[listings]{examplep}% this doesn't work
  5. %usepackage{examplep}% this does
  6.  
  7.  
  8. begin{document}
  9. pagestyle{empty}
  10.  
  11. % This lstlisting has its own caption
  12. begin{lstlisting}[language=C++,caption={Caption of lstlisting},label=cod:c]
  13. #include<iostream>
  14.  
  15. int main{
  16. std::cout << "Hello LaTeXn";
  17. }
  18. end{lstlisting}
  19.  
  20. % The lstlisting caption is not shown here
  21. begin{WBoth}
  22. begin{lstlisting}[language=C++,caption={Caption of lstlisting}]
  23. #include<iostream>
  24.  
  25. int main{
  26. std::cout << "Hello LaTeXn";
  27. }
  28. end{lstlisting}
  29. end{WBoth}
  30. PexaShowSource{}
  31. PexaShowSample{}
  32.  
  33. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement