Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开题报告 无法插入图片 #213

Open
Aquan98 opened this issue Dec 17, 2024 · 10 comments
Open

开题报告 无法插入图片 #213

Aquan98 opened this issue Dec 17, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@Aquan98
Copy link

Aquan98 commented Dec 17, 2024

\section
后加figure 无法编译

@note286
Copy link
Owner

note286 commented Dec 17, 2024

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

\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 note286 added the bug Something isn't working label Dec 17, 2024
@Aquan98
Copy link
Author

Aquan98 commented Dec 17, 2024

我去 爱死你了

@note286
Copy link
Owner

note286 commented Dec 17, 2024

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

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

@note286
Copy link
Owner

note286 commented Dec 17, 2024

子图

\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}

@Aquan98
Copy link
Author

Aquan98 commented Dec 17, 2024

感谢 已全部解决

@note286
Copy link
Owner

note286 commented Dec 17, 2024

@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 note286 pinned this issue Jan 12, 2025
@Enew78
Copy link

Enew78 commented Mar 4, 2025

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

@note286
Copy link
Owner

note286 commented Mar 4, 2025

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

研究生开题报告吗?

@Enew78
Copy link

Enew78 commented Mar 31, 2025 via email

@note286
Copy link
Owner

note286 commented Mar 31, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants