20 修改cls模板插图,编译后仍然是原来的图片

发布于 2022-11-12 23:35:47

我下载了一个大学的论文模板,链接

模板的封面中有该大学的logo和名字,我更改cls文件下的maketitle命令插入mylogo.png文件,代码如下

\renewcommand{\maketitle}{%
    \thss@int@pdfmark{\titlepagename}{titlepage}
    % Make the title page centered.
    \begin{titlepage}\begingroup\centering
        % Emblem and inscription of the university, and type of thesis.
        % 插图位置 %
        {%
            %\zihao{1}%
            这是测试。
            \includegraphics[height = 2.4em]{mylogo.png}\hspace{1.2em}
            %下面两行注释内容为源代码,使用的eps格式%
            %\includegraphics[height = 2.4em]{pkulogo}\hspace{0.4em}%
            %\raisebox{0.4em}{\includegraphics[height = 1.6em]{pkuword}}\\[0.8em]
            {\bfseries{\cthesisname}}%
        }
        \vfill
        % Title of the thesis.
        {%
            \zihao{2}{\label@ctitle}\linespread{1.6}\selectfont%
            \thss@int@fillinblank{2}{0.64\textwidth}{\textbf{\@ctitle}}%
        }
        \vfill
        % Information about the author.
        {%
            % Slightly adjust the line skip when using new font size.
            \zihao{3}\linespread{1.75}\selectfont
            \def\thss@tmp@len{0.56\textwidth}
            \begin{tabular}{l@{\extracolsep{0.2em}}c}
                {\bfseries\label@cauthor}        &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cauthor}        \\
                {\bfseries\label@studentid}    &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@studentid}    \\
                {\bfseries\label@school}        &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@school}        \\
                {\bfseries\label@cmajor}        &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cmajor}        \\
                {\bfseries\label@direction}    &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@direction}    \\
                {\bfseries\label@cmentor}        &
                \thss@int@fillinblank{1}{\thss@tmp@len}{\fangsong\@cmentor}        \\
            \end{tabular}%
        }
        \vfill
        % Date.
        {\zihao{-2}\@date 这是测试}
    \par\endgroup\end{titlepage}%
}

同时,我在开始和结束位置也输入了测试用的文本。

然后重新编译tex文件,发现pdf文件并没有任何改变,不论是图片和测试的文本,也都没有生效。请问这是怎么回事?

查看更多

关注者
0
被浏览
705
2 个回答
༺0o0༻
༺0o0༻ 2022-11-13
这家伙很懒,什么也没写!

删除临时文件,再编译一下试试看。

㡣
2022-11-13
这家伙很懒,什么也没写!

不知道是不是模板自带的Makefile导致的原因,将必要的cls, tex等文件单独拿出来编译后,这个问题已经得到解决。

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览