xduts icon indicating copy to clipboard operation
xduts copied to clipboard

开题报告 无法插入图片

Open Aquan98 opened this issue 11 months ago • 10 comments

\section 后加figure 无法编译

Aquan98 avatar Dec 17 '24 09:12 Aquan98

开发的时候没有考虑到开题报告可能出现图表,可以参考如下代码使用。

\documentclass{xduugtp}
\usepackage{float}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\begin{document}
\section{论文名称及项目来源}
\section{研究目的和意义}
\section{国内外研究现状和发展趋势}
\begin{figure}[H]
\includegraphics[width=\linewidth]{example-image}
\caption{text}
\label{key}
\end{figure}
\figurename~\ref{key}
\section{主要研究内容、要解决的问题及本文的初步方案}
\section{工作的主要阶段、进度和完成时间}
\section{已进行的前期准备工作}
\section{指导教师意见}
\section{学院审核意见}
\end{document}

note286 avatar Dec 17 '24 09:12 note286

我去 爱死你了

Aquan98 avatar Dec 17 '24 09:12 Aquan98

可以在导言区增加如下代码来修改caption样式:

\usepackage{caption}
\DeclareCaptionLabelSeparator{xduugtpskip}{\hskip.75em}
\DeclareCaptionFont{xduugtpfont}{\rmfamily\zihao{5}}
\captionsetup{strut=off,labelsep=xduugtpskip,font=xduugtpfont}

note286 avatar Dec 17 '24 10:12 note286

子图

\documentclass{xduugtp}
\usepackage{float}
\usepackage{caption}
\DeclareCaptionLabelSeparator{xduugtpskip}{\hskip.75em}
\DeclareCaptionFont{xduugtpfont}{\rmfamily\zihao{5}}
\captionsetup{strut=off,labelsep=xduugtpskip,font=xduugtpfont}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\usepackage{subcaption}
\begin{document}
\section{论文名称及项目来源}
\section{研究目的和意义}
\section{国内外研究现状和发展趋势}
\begin{figure}[H]
\centering
\subcaptionbox{a1\label{a1}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a2\label{a2}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a3\label{a3}}{\includegraphics[width=.3\linewidth]{example-image}}
\caption{aaa}
\label{aaa}
\end{figure}
\figurename~\ref{a1}
\figurename~\ref{a2}
\figurename~\ref{a3}
\figurename~\ref{aaa}
\section{主要研究内容、要解决的问题及本文的初步方案}
\section{工作的主要阶段、进度和完成时间}
\section{已进行的前期准备工作}
\section{指导教师意见}
\section{学院审核意见}
\end{document}

note286 avatar Dec 17 '24 10:12 note286

感谢 已全部解决

Aquan98 avatar Dec 17 '24 10:12 Aquan98

@Aquan98 总结一下,并给出一些示例:

\documentclass{xduugtp}
% 提供图表环境
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\def\fps@table{H}
\makeatother
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
% 修改caption样式
\usepackage{caption}
\DeclareCaptionLabelSeparator{xduugtpskip}{\hskip.75em}
\DeclareCaptionFont{xduugtpfont}{\rmfamily\zihao{5}}
\captionsetup{strut=off,labelsep=xduugtpskip,font=xduugtpfont}
% 子图子表
\usepackage[labelformat=simple]{subcaption}
\renewcommand{\thesubfigure}{(\alph{subfigure})}
\renewcommand{\thesubtable}{(\alph{subtable})}
\begin{document}
\section{论文名称及项目来源}
\section{研究目的和意义}
\section{国内外研究现状和发展趋势}
\begin{figure}
\centering
\subcaptionbox{a1\label{a1}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a2\label{a2}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a3\label{a3}}{\includegraphics[width=.3\linewidth]{example-image}}
\caption{aaa}
\label{aaa}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=.3\linewidth]{example-image}
\caption{bbb}
\label{bbb}
\end{figure}
\begin{table}
\centering
\caption{ccc}
\label{ccc}
\begin{tabular}{|c|c|}
\hline
aaa&bbb\\
\hline
aaa&bbb\\
\hline
\end{tabular}
\end{table}
\figurename~\ref{a1}
\figurename~\ref{a2}
\figurename~\ref{a3}
\figurename~\ref{aaa}
\figurename~\ref{bbb}
\tablename~\ref{ccc}
\section{主要研究内容、要解决的问题及本文的初步方案}
\section{工作的主要阶段、进度和完成时间}
\section{已进行的前期准备工作}
\section{指导教师意见}
\section{学院审核意见}
\end{document}

image

note286 avatar Dec 17 '24 10:12 note286

开题报告文档大概会在什么时间节点加进来呢?

Enew78 avatar Mar 04 '25 08:03 Enew78

开题报告文档大概会在什么时间节点加进来呢?

研究生开题报告吗?

note286 avatar Mar 04 '25 08:03 note286

抱歉,才看到消息!是的,研究生开题报告

ΘΩΘ @.***

 

------------------ 原始邮件 ------------------ 发件人: "note286/xduts" @.>; 发送时间: 2025年3月4日(星期二) 下午4:22 @.>; @.@.>; 主题: Re: [note286/xduts] 开题报告 无法插入图片 (Issue #213)

开题报告文档大概会在什么时间节点加进来呢?

研究生开题报告吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***> note286 left a comment (note286/xduts#213)

开题报告文档大概会在什么时间节点加进来呢?

研究生开题报告吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Enew78 avatar Mar 31 '25 08:03 Enew78

@Enew78 https://github.com/note286/xdupgtp

note286 avatar Mar 31 '25 08:03 note286