我想要将使用listings
包生成的代码框水平和垂直放置在页面中间。我该怎么做?
编辑一:
My code is this:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[frame=single,title=1.1]
Code goes here!
\end{lstlisting}
\end{document}
答案1
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\begin{document}
\leavevmode\vfill
\begin{lstlisting}[frame=single,title=1.1]
Code goes here!
\end{lstlisting}
\vfill
\end{document}