feat: appedix ref (#4)
This commit is contained in:
parent
61f6f7d045
commit
2c70110ac9
|
@ -168,6 +168,14 @@ pdfborder=001, linkcolor=black, citecolor=black, urlcolor=black]{hyperref} %
|
||||||
% Appendix
|
% Appendix
|
||||||
\usepackage{appendix}
|
\usepackage{appendix}
|
||||||
|
|
||||||
|
% 定义新指令 \appendixsection,接受标题和标签名两个参数
|
||||||
|
\newcommand{\appendixsection}[2]{
|
||||||
|
\section*{#1}
|
||||||
|
\phantomsection
|
||||||
|
\hypertarget{#2}{}
|
||||||
|
\addcontentsline{toc}{section}{#1}
|
||||||
|
}
|
||||||
|
|
||||||
% Figure & Table
|
% Figure & Table
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{array,booktabs,multirow} % multirow, multicolumn and more professional format support
|
\usepackage{array,booktabs,multirow} % multirow, multicolumn and more professional format support
|
||||||
|
|
10
README.md
10
README.md
|
@ -117,4 +117,14 @@ latexmk main.tex
|
||||||
|
|
||||||
这是因为现在的`见`/`In`判断逻辑非常粗糙,是通过引用条目中是否存在`language`字段来判断的,所以文献文件`ref.bib`中的引用条目添加任意取值的`language`字段都会生成为`见`,因此引用英文文献就只能手动删除`language`字段以生成为`In`。
|
这是因为现在的`见`/`In`判断逻辑非常粗糙,是通过引用条目中是否存在`language`字段来判断的,所以文献文件`ref.bib`中的引用条目添加任意取值的`language`字段都会生成为`见`,因此引用英文文献就只能手动删除`language`字段以生成为`In`。
|
||||||
|
|
||||||
|
### 如何引用附录
|
||||||
|
|
||||||
|
在附录中使用指令`\appendixsection{}{}`创建标题,第一个参数是附录标题,第二个参数是引用label。在引用时使用指令`\hyperlink{}{}`,第一个参数是引用label,第二个参数是引用显示文本。举个栗子:
|
||||||
|
|
||||||
|
```latex
|
||||||
|
appendix1.tex中:
|
||||||
|
\appendixsection{附录1\quad 缩略语表}{appendix:abbr}
|
||||||
|
|
||||||
|
chapter2.tex中:
|
||||||
|
评论量含义见\hyperlink{appendix:abbr}{附录1\quad 缩略语表}
|
||||||
|
```
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\section*{附录1\quad{}缩略语表}
|
\appendixsection{附录1\quad 缩略语表}{appendix:abbr}
|
||||||
\phantomsection\addcontentsline{toc}{section}{附录1\quad{}缩略语表}
|
|
||||||
|
|
||||||
\begin{table}[!htbp]
|
\begin{table}[!htbp]
|
||||||
\centering
|
\centering
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
\section{国内外研究现状}
|
\section{国内外研究现状}
|
||||||
|
|
||||||
|
评论量含义见\hyperlink{appendix:abbr}{附录1\quad 缩略语表}
|
||||||
|
|
||||||
\section{毕业设计论文模板的功能与要求}
|
\section{毕业设计论文模板的功能与要求}
|
||||||
|
|
||||||
\section{研究差距与挑战}
|
\section{研究差距与挑战}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user