只需将jupyter笔记本的代码插入latex即可

2024-06-16 11:36:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在我的latex论文中插入一个不到半页的简短python笔记本。我正在使用

\includepdf[
%% Include all pages of the PDF
pages=-,
%% make this page have the usual page style
%% (you can change it to plain etc). By default pdfpages
%% sets the pagecommand to \pagestyle{empty}
pagecommand={\pagestyle{headings}},  
%% Add a "section" entry to the ToC with the heading
%% "Quilling Shapes" and the label "sec:shapes"
addtotoc={1,section,1,Quilling Shapes,sec:shapes}]
%% The pdf file itself
{document.pdf}

但问题是,带有代码的整个pdf被插入到原始latex文件中,因此在原始latex中jupyter笔记本的代码末尾似乎有很多空白。有没有人知道一个选项,可以将调整后的笔记本放入latex,而不是pdf下面的空白区域


Tags: theto代码pdfpage笔记本sectionsec