北航latex模板排版

40 views
Skip to first unread message

Eric Wang

unread,
May 31, 2013, 5:50:01 AM5/31/13
to beihang-open...@googlegroups.com
在使用github中的模板时, 使用lstlisting环境插入代码时, 代码被前面插入的图片拦腰截断了,如图[1]所示, 请问怎么解决这个?
是不是可以再lstlisting环境外面包一层环境,将lstlisting整个构成一个整体, 或者可以设置lstlisting?

注:我的环境是windows 7,ctex的环境是 CTeX_2.9.2.164_Full.

Eric Wang

unread,
May 31, 2013, 10:56:00 AM5/31/13
to beihang-open...@googlegroups.com


在 2013年5月31日星期五UTC+8下午5时50分01秒,Eric Wang写道:
在使用github中的模板时, 使用lstlisting环境插入代码时, 代码被前面插入的图片拦腰截断了,如图[1]所示, 请问怎么解决这个?
是不是可以再lstlisting环境外面包一层环境,将lstlisting整个构成一个整体, 或者可以设置lstlisting?
 
> 插入了一个minipage解决了这个问题 

Xuan Hu

unread,
May 31, 2013, 1:11:44 PM5/31/13
to beihang-open...@googlegroups.com
Hi, Eric

Sorry for being outside having nice dinner and talking with GG in BUAA. :-)
lstlisting is treated as a special text paragraph, so it could be splited by float objects like graph.
So this kind of problem can only be solved by adjust manually.
I think your solution is pretty good and I really appreciate that you find it yourself.

--
扈煊 Xuan (Sean) Hu

北京大学信息科学技术学院2012级硕士研究生
2012, Master Degree Candidate, EECS, Peking Univ.

Reply all
Reply to author
Forward
0 new messages