
北航论文格式零失误BUAAthesis模板中图表、公式与代码块的规范使用【免费下载链接】BUAAthesis北航毕设论文LaTeX模板项目地址: https://gitcode.com/gh_mirrors/bu/BUAAthesisBUAAthesis是北航毕设论文LaTeX模板能帮助北航学子轻松搞定论文格式让你专注于内容创作避免格式问题影响毕业。图表规范使用指南 单图插入的最快方法在BUAAthesis模板中插入单张图片使用figure环境配合\includegraphics命令即可。只需设置图片路径和宽度模板会自动处理编号和排版。\begin{figure}[h!] \centering \includegraphics[width0.4\textwidth]{figure/image.pdf} \caption{图片} \label{fig-sample} \end{figure}其中[h!]参数确保图片尽量排在当前位置width0.4\textwidth表示图片宽度为正文宽度的40%你可以根据需要调整这个比例。多图排列的实用技巧当需要展示多张图片时BUAAthesis提供了多种排列方式并排排列使用minipage环境实现左右并排\begin{figure}[h!] \begin{minipage}{.5\textwidth} \centering \includegraphics[width0.6\textwidth]{figure/image.pdf} \caption{并排的左图} \label{fig-mini-l} \end{minipage} \begin{minipage}{.5\textwidth} \centering \includegraphics[width0.6\textwidth]{figure/image.pdf} \caption{并排的右图} \label{fig-mini-r} \end{minipage} \end{figure}子图排列使用subfigure环境创建带共同标题的子图\begin{figure}[h!] \centering \subfigure[并排小图a]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \hspace{4em} \subfigure[并排小图b]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \caption{子图并排的示例} \end{figure}矩阵排列结合tabular和subfigure实现多图矩阵排列\begin{figure}[h!] \centering \begin{tabular}{cc} \subfigure[矩阵子图A]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \subfigure[矩阵子图B]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \\ \subfigure[矩阵子图C]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \subfigure[矩阵子图D]{ \includegraphics[width0.3\textwidth]{figure/image.pdf} } \\ \end{tabular} \caption{矩形的subfig排列} \end{figure}表格规范使用技巧 基础三线表格制作北航论文推荐使用三线表格在BUAAthesis中实现非常简单\begin{table} \centering \caption{降压损失计算结果} \begin{tabular}{lcr} \toprule 换热器 热边压降损失 冷边压降损失 \\ \midrule 初级 2974.37 2931.52 \\ 次级 2924.65 3789.76 \\ \bottomrule \end{tabular} \end{table}使用\toprule、\midrule和\bottomrule命令创建三线表格比普通表格更显专业和清晰。列合并与行合并方法列合并使用\multicolumn命令\begin{tabular}{l|l|l|l} \hline 1.1 1.2 1.3 1.4 \\ \hline 2.1 \multicolumn{2}{c|}{2.2 \ 2.3} 2.4 \\ \hline 3.1 3.2 3.3 3.4 \\ \hline \end{tabular}行合并使用\multirow命令\begin{tabular}{l|l|l} \hline 1.1 1.2 1.3 \\ \hline 2.1 \multirow{2}*{2.2 \ 3.2} 2.3 \\ \cline{1-1} \cline{3-3} 3.1 3.3 \\ \hline 4.1 4.2 4.3 \\ \hline \end{tabular}长表格处理方案当表格内容超过一页时使用longtable环境\begin{longtable}{|l|l|l|} % 表格的首个表头 \caption{长表格示例\label{tab-long-example}} \\ \hline \multicolumn{1}{|c|}{\textbf{Time (s)}} \multicolumn{1}{c|}{\textbf{Triple chosen}} \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline \endfirsthead % 表格的其他表头 \multicolumn{3}{l}{{\bfseries\tablename\ \thetable{} --接\,上\,页}} \\ \hline \multicolumn{1}{|c|}{\textbf{Time (s)}} \multicolumn{1}{c|}{\textbf{Triple chosen}} \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline \endhead % 表格内容行 0 (1, 11, 13725) (1, 12, 10980), (1, 13, 8235), (2, 2, 0) \\ 2745 (1, 12, 10980) (1, 13, 8235), (2, 2, 0), (2, 3, 0) \\ % ... 更多行 ... \endlastfoot \end{longtable}公式规范编辑方法 行内公式与独立公式行内公式使用$ $包裹$sin^2{\alpha}cos^2{\alpha}1$独立公式使用equation环境\begin{equation} \label{equ-sample} Emc^2 \end{equation}复杂公式排版对于多行公式可以使用align环境\begin{align} c a^2 - b^2\\ (ab)(a-b) \end{align}对于方程组使用cases环境\begin{equation} \left\{ \begin{array}{l} \nabla f(x^*)-\sum\limits_{j1}^p\lambda_j\nabla g_j(x^*)0 \\ \lambda_jg_j(x^*)0,\quad j1,2,\cdots,p \\ \lambda_j\ge 0,\quad j1,2,\cdots,p. \end{array} \right. \end{equation}代码块规范展示 使用listings环境展示代码支持语法高亮和行号\begin{lstlisting}[ language{C}, caption{一段C源代码}, label{code-c-sample}, ] #include stdio.h void main() { printf(Hello, world!); } \end{lstlisting}可以通过设置language参数指定不同编程语言如Python、Java等。图表公式交叉引用 在BUAAthesis中使用\label和\ref命令实现交叉引用% 在图表或公式后设置标签 \begin{figure}[h!] ... \label{fig-example} \end{figure} % 在正文中引用 如图\ref{fig-example}所示这是一个示例图片。快速上手BUAAthesis模板 首先克隆仓库git clone https://gitcode.com/gh_mirrors/bu/BUAAthesis根据学位类型选择对应的示例文件本科生sample-bachelor.tex研究生sample-master.tex在data目录下编写论文内容章节文件data/chapter1-intro.tex参考文献data/bibs.bib使用Makefile编译make通过以上步骤你就能快速使用BUAAthesis模板写出格式规范的北航毕业论文避免格式问题影响毕业常见问题解决 ❓如果在使用过程中遇到问题可以参考模板提供的FAQ文档data/appendix1-faq.tex里面汇总了常见问题及解决方案。希望本文能帮助你顺利完成北航毕业论文的格式排版祝大家毕业顺利【免费下载链接】BUAAthesis北航毕设论文LaTeX模板项目地址: https://gitcode.com/gh_mirrors/bu/BUAAthesis创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考