Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{sig-alternate}
- %\usepackage{caption}
- \usepackage{listings}
- \begin{document}
- \title{The Title}
- \numberofauthors{1}
- \author{
- \alignauthor
- John Doe\\
- \affaddr{Lorem ispum}\\
- \affaddr{Lorem ispum}\\
- \affaddr{Lorem ipsum}\\
- \email{john.doe@example.com}
- }
- \date{30 July 1999}
- \maketitle
- \lstnewenvironment{mycode}[1][]
- {
- \minipage[b]{0.3\textwidth}
- \lstset{
- captionpos=b,
- language=C,
- numbers=left,
- basicstyle=\tiny\ttfamily,
- columns=fullflexible,
- showstringspaces=false,
- numbersep=3pt,
- #1
- }
- }
- {
- \endminipage
- }
- \captionsetup[lstlisting]{font={small,tt}}
- \begin{mycode}[title=Awesome C program,label=code:AwesomeC]
- int main(int argc, char* argv[]) {
- return 0;
- }
- \end{mycode}
- If I use "caption" package, caption of the figure changes style (it is no longer bold). Otherwise I cannot change caption of the code...
- \begin{figure}
- \centering
- This is a figure
- \caption{Caption of the figure}
- \end{figure}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement