texlive[60280] Master/texmf-dist: mynsfc (19aug21)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 19 22:22:36 CEST 2021


Revision: 60280
          http://tug.org/svn/texlive?view=revision&revision=60280
Author:   karl
Date:     2021-08-19 22:22:35 +0200 (Thu, 19 Aug 2021)
Log Message:
-----------
mynsfc (19aug21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf
    trunk/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx
    trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal-contents.tex
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.bib
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.bib
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex

Deleted: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.bib
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.bib	2021-08-19 20:22:15 UTC (rev 60279)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.bib	2021-08-19 20:22:35 UTC (rev 60280)
@@ -1,22 +0,0 @@
- at article{bengio_representation_2013,
-    title = "Representation Learning: A Review and New Perspectives",
-    author = "Bengio, Y. and Courville, A. and Vincent, P.",
-    volume = "35",
-    number = "8",
-    pages = "1798--1828",
-    journal = IEEE_J_PAMI,
-    year = "2013",
-    doi = "10.1109/TPAMI.2013.50",
-}
-
- at article{xia_saliency_2015,
-    author = "Xia, Chen and Qi, Fei and Shi, Guangming and Wang, Pengjin",
-    title = "Nonlocal Center-Surround Reconstruction-based Bottom-Up Saliency Estimation",
-    journal = "{Pattern Recognition}",
-    doi = "10.1016/j.patcog.2014.10.007",
-    month = "4",
-    number = "4",
-    volume = "48",
-    year = "2015",
-    pages = "1337--1348"
-}

Deleted: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex	2021-08-19 20:22:15 UTC (rev 60279)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex	2021-08-19 20:22:35 UTC (rev 60280)
@@ -1,181 +0,0 @@
-%%% my-nsfc-proposal.tex ---
-%%
-%% Filename: my-nsfc-proposal.tex
-%% Author: Fred Qi
-%% Created: 2016-02-04 15:26:58(-0700)
-%%
-%% Last-Updated: 2016-07-11 18:33:23(+0800) [by Fred Qi]
-%%     Update #: 71
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%%% Commentary:
-%%
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%%% Change Log:
-%%
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\documentclass[subfig]{mynsfc}
-
-\bibliography{IEEEabrv,my-nsfc-proposal}
-
-% 名称与申请人(不会在正文部分出现)
-% \title{自然科学基金正文\XeLaTeX{}模板}
-\title{报告正文}
-\author{齐飞}
-
-\begin{document}
-
-% 不能编写页码
-\thispagestyle{empty}
-
-%% 大字体显示“报告正文”字样
-\maketitle
-% \begin{center}
-%   \kaiti \erhao \bfseries 报告正文
-% \end{center}
-
-\part{立项依据与研究内容}
-\label{part:proposal}
-
-\section{项目的立项依据}
-\label{sec:background}
-
-\begin{hcomment}
-  (研究意义、国内外研究现状及发展动态分析,需结合科学研究发展趋势来论述科学意
-  义; 或结合国民经济和社会发展中迫切需要解决的关键科技问题来论述其应用前景。附主
-  要参考文献目录)
-\end{hcomment}
-
-\subsection{研究意义}
-\label{sec:motivation}
-
-略。
-
-\subsection{国内外研究现状}
-\label{sec:review}
-
-可以引用相关文献~\cite{bengio_representation_2013}对研究意义与国内外研究现状进行说明。
-
-\printbibliography[heading=reftype,title={参考文献}]
-
-\section{项目的研究内容、研究目标,以及拟解决的关键科学问题}
-\label{sec:contents}
-
-\begin{hcomment}
-  (此部分为重点阐述内容)
-\end{hcomment}
-
-\subsection{研究内容}
-
-略。
-
-\subsection{研究目标}
-
-略。
-
-\subsection{拟解决的关键科学问题}
-
-略。
-
-\section{拟采取的研究方案及可行性分析}
-\label{sec:approach}
-
-\begin{hcomment}
-  (包括研究方法、技术路线、实验手段、关键技术等说明)
-\end{hcomment}
-
-略。
-
-\section{本项目的特色与创新之处}
-\label{sec:innovation}
-
-略。
-
-\section{年度研究计划及预期研究结果}
-\label{sec:plan}
-
-\begin{hcomment}
-  包括拟组织的重要学术交流活动、国际合作与交流计划等)
-\end{hcomment}
-
-略。
-
-\part{研究基础与工作条件}
-\label{sec:preparation}
-
-
-\section{工作基础}
-\label{sec:previous-work}
-
-\begin{hcomment}
-  (与本项目相关的研究工作积累和已取得的研究工作成绩)
-\end{hcomment}
-
-
-\begin{refsection}
-
-  申请人针对\textbf{某问题}进行了研究~\cite{xia_saliency_2015}。下面命令
-  \texttt{initauthors} 中的哈希字符串可以在Biber/bibtex 生成的文件
-  \texttt{*.bbl} 中找到。
-
-  % \forcsvlist{\listadd\boldnames}{{Qi, F\bibinitperiod}}
-  \initauthors{{72b3cccfc646adeb1d6b20320b56fd7d}}
-  \printbibliography[prefixnumbers=J,heading=cvtype,title={相关工作}]
-
-\end{refsection}
-
-\section{工作条件}
-\label{sec:devices-laboratory}
-
-\begin{hcomment}
-  (包括已具备的实验条件,尚缺少的实验条件和拟解决的途径,包括利用国家实验室、国
-  家重点实验室和部门重点实验室等研究基地的计划与落实情况)
-\end{hcomment}
-
-略。
-
-\section{承担科研项目情况}
-\label{sec:projects}
-
-\begin{hcomment}
-  (申请人和项目组主要参与者正在承担的科研项目情况,包括国家自然科学基金项目,
-  要注明项目的名称和编号、经费来源、起止年月、与本项目的关系及负责的内容等)
-\end{hcomment}
-
-略。
-
-\section{完成国家自然科学基金项目情况}
-\label{sec:prev-nsfc}
-
-\begin{hcomment}
-  (对申请人负责的前一个已结题科学基金项目(项目名称及批准号)完成情况、后续研究
-  进展及与本申请项目的关系加以详细说明。另附该已结题项目研究工作总结摘要(限500
-  字)和相关成果的详细目录)
-\end{hcomment}
-
-略。
-
-\part{资金预算说明}
-\label{sec:finance}
-
-\begin{hcomment}
-  购置单项经费5万元以上固定资产及设备等,须逐项说明与项目研究的直接相关性及必要
-  性。
-\end{hcomment}
-
-略。
-
-\part{其他需要说明的问题}
-\label{sec:others}
-
-略。
-
-
-\end{document}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% my-nsfc-proposal.tex ends here

Added: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal-contents.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal-contents.tex	2021-08-19 20:22:35 UTC (rev 60280)
@@ -0,0 +1,168 @@
+{\kaishu\zihao{4} 参照以下提纲撰写,要求内容翔实、清晰,层次分明,标题
+  突出。\cemph{请勿删除或改动下述提纲标题及括号中的文字。}}
+
+\part{立项依据与研究内容(建议8000字以下):}
+\label{part:background}
+
+\section{项目的立项依据}{(研究意义、国内外研究现状及发展动态分析,需
+  结合科学研究发展趋势来论述科学意义;或结合国民经济和社会发展中迫切需
+  要解决的关键科技问题来论述其应用前景。附主要参考文献目录);}
+\label{sec:background}
+
+\subsection{研究意义}
+\label{sec:motivation}
+
+略。
+
+\subsection{国内外研究现状}
+\label{sec:review}
+
+可以引用相关文献~\cite{bengio_representation_2013}对研究意义与国内外研究现状进行说明。
+
+\printbibliography[segment=\therefsegment,heading=reftype]
+
+\section{项目的研究内容、研究目标,以及拟解决的关键科学问题}{(此部分为重点阐述内容);}
+\label{sec:proposals}
+
+\subsection{研究内容}
+
+略。
+
+\begin{figure}[h]
+  \centering
+
+  \caption{测试图表标题。}
+  \label{fig:test}
+\end{figure}
+
+\begin{table}[h]
+  \centering
+  \begin{tabular}{cc}
+    \hline
+    标题 & 内容 \\
+    \hline
+    科目1 & 内容1 \\
+    \hline
+  \end{tabular}
+  \caption{测试图表标题。}
+  \label{tab:test}
+\end{table}
+
+\subsection{研究目标}
+\label{sec:goals}
+
+略。
+
+\subsection{拟解决的关键科学问题}
+
+略。
+
+\section{拟采取的研究方案及可行性分析}{(包括研究方法、技术路线、实验手段、关键技术等说明);}
+\label{sec:tech-feasibility}
+
+略。
+
+\section{本项目的特色与创新之处;}{}
+\label{sec:innovations}
+
+略。
+
+\section{年度研究计划及预期研究结果}{(包括拟组织的重要学术交流活动、国际合作与交流计划等)。}
+\label{sec:plans}
+
+略。
+
+
+\part{研究基础与工作条件}
+\label{part:foundations}
+
+\section{研究基础}{(与本项目相关的研究工作积累和已取得的研究工作成绩);}
+\label{sec:foundatioins}
+
+\newrefsegment
+
+  申请人针对\textbf{某问题}进行了研究~\cite{xia_saliency_2015}。
+
+  在使用\texttt{biblatex} 3.4以上版本的情况下,建议使用
+  \texttt{biblatex}提供数据标注功能。如第二个作者是自己,用粗体标记自己的姓
+  名;且为文章的通记作者,加上角标``*''进行标注。则仅需要在bibtex文
+  件的相应条目中增加以下标记:
+\begin{verbatim}
+  author = "Xia, C and Qi, F and Shi, G and Wang, P",
+  author+an = {2=self;2:family=corr},
+\end{verbatim}
+
+  需要强调的作者列表有三种形式,分别适用于不同版本的\texttt{biblatex}。
+  \begin{description}
+  \item[3.4+ (20160301)] 请使用\texttt{biblatex}中提供的数据标注(Data
+    annotation)功能。
+  \item[3.3 (20160301)] 由于姓名处理的宏更新,请使用哈希字符串列表指定需要强调
+    的作者。
+\begin{verbatim}
+    \initauthors{{72b3cccfc646adeb1d6b20320b56fd7d}}
+\end{verbatim}
+  \item[3.2- (20151228)] 使用旧式的姓名处理宏,使用下列形式的作者列表。
+\begin{verbatim}
+    \forcsvlist{\listadd\boldnames}{{Qi, F\bibinitperiod}}
+\end{verbatim}
+  \end{description}
+  其中命令\texttt{initauthors}中的所需要的姓名的哈希字符串可以
+  在Biber/bibtex 生成的文件\texttt{*.bbl} 中找到。
+
+\printbibliography[segment=\therefsegment,heading=cvtype,title={相关工作}]
+
+\section{工作条件}{(包括已具备的实验条件,尚缺少的实验条件和拟解决的
+  途径,包括利用国家实验室、国家重点实验室和部门重点实验室等研究基地的
+  计划与落实情况);}
+\label{sec:condition}
+
+略。
+
+\section{正在承担的与本项目相关的科研项目情况}{(申请人和项目组主要参与
+  者正在承担的与本项目相关的科研项目情况,包括国家自然科学基金的项目和
+  国家其他科技计划项目,要注明项目的名称和编号、经费来源、起止年月、与
+  本项目的关系及负责的内容等);}
+\label{sec:projects}
+
+略。
+
+\section{完成国家自然科学基金项目情况}{(对申请人负责的前一个已结题科学
+  基金项目(项目名称及批准号)完成情况、后续研究进展及与本申请项目的关
+  系加以详细说明。另附该已结题项目研究工作总结摘要(限500字)和相关成果
+  的详细目录)。}
+\label{sec:finished-project}
+
+\newrefsegment
+
+略。
+
+\part{其他需要说明的问题}
+\label{cha:others}
+
+\section{}{申请人同年申请不同类型的国家自然科学基金项目情况(列明同年
+  申请的其他项目的项目类型、项目名称信息,并说明与本项目之间的区别与联
+  系)。}
+
+无
+
+\section{}{具有高级专业技术职务(职称)的申请人或者主要参与者是否存在
+  同年申请或者参与申请国家自然科学基金项目的单位不一致的情况;如存在上
+  述情况,列明所涉及人员的姓名,申请或参与申请的其他项目的项目类型、项
+  目名称、单位名称、上述人员在该项目中是申请人还是参与者,并说明单位不
+  一致原因。}
+
+无
+
+\section{}{具有高级专业技术职务(职称)的申请人或者主要参与者是否存在与
+  正在承担的国家自然科学基金项目的单位不一致的情况;如存在上述情况,列
+  明所涉及人员的姓名,正在承担项目的批准号、项目类型、项目名称、单位名
+  称、起止年月, 并说明单位不一致原因。}
+
+无
+
+\section{}{其他。}
+
+无
+
+使用方法参见样例文件 \texttt{my-proposal.tex}。
+


Property changes on: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal-contents.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.bib
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.bib	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.bib	2021-08-19 20:22:35 UTC (rev 60280)
@@ -0,0 +1,25 @@
+ at STRING{IEEE_J_PAMI       = "{IEEE} Trans. Pattern Anal. Mach. Intell."}
+
+ at article{bengio_representation_2013,
+    title = "Representation Learning: A Review and New Perspectives",
+    author = "Bengio, Y. and Courville, A. and Vincent, P.",
+    volume = "35",
+    number = "8",
+    pages = "1798--1828",
+    journal = IEEE_J_PAMI,
+    year = "2013",
+    doi = "10.1109/TPAMI.2013.50",
+}
+
+ at article{xia_saliency_2015,
+    author = "Xia, Chen and Qi, Fei and Shi, Guangming and Wang, Pengjin",
+    author+an = {2=self;2:family=corr},
+    title = "Nonlocal Center-Surround Reconstruction-based Bottom-Up Saliency Estimation",
+    journal = "{Pattern Recognition}",
+    doi = "10.1016/j.patcog.2014.10.007",
+    month = "4",
+    number = "4",
+    volume = "48",
+    year = "2015",
+    pages = "1337--1348"
+}


Property changes on: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.bib
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf	2021-08-19 20:22:15 UTC (rev 60279)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf	2021-08-19 20:22:35 UTC (rev 60280)

Property changes on: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.tex	2021-08-19 20:22:35 UTC (rev 60280)
@@ -0,0 +1,17 @@
+\documentclass[boldtoc]{mynsfc}
+
+\addbibresource{my-proposal.bib}
+
+\title{报告正文}
+\author{齐飞}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+%% 大字体显示“报告正文”字样
+\maketitle
+
+\input{my-proposal-contents.tex}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-proposal.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx	2021-08-19 20:22:15 UTC (rev 60279)
+++ trunk/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx	2021-08-19 20:22:35 UTC (rev 60280)
@@ -1,23 +1,5 @@
 % \iffalse meta-comment
 %<*internal>
-\iffalse
-%</internal>
-%<*readme>
-# mynsfc
-My XeLaTeX template for writing the main body of NSFC proposals.
-
-----------------------------------------------------------------
-mynsfc --- A XeLaTeX template for writing the main body of NSFC proposals.
-Author:  Fei Qi
-E-mail:  fred.qi at ieee.org
-License: Released under the LaTeX Project Public License v1.3c or later
-See:     http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
-Some text about the class: probably the same as the abstract.
-%</readme>
-%<*internal>
-\fi
 \def\nameofplainTeX{plain}
 \ifx\fmtname\nameofplainTeX\else
   \expandafter\begingroup
@@ -35,11 +17,10 @@
 License: Released under the LaTeX Project Public License v1.3c or later
 See:     http://www.latex-project.org/lppl.txt
 ----------------------------------------------------------------
-
 \endpreamble
 \postamble
 
-Copyright (C) 2015,2016 by Fei Qi <fred.qi at ieee.org>
+Copyright (C) 2015-2021 by Fei Qi <fred.qi at ieee.org>
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License (LPPL), either
@@ -58,22 +39,23 @@
 
 \endpostamble
 
-\usedir{tex/xelatex/mynsfc}
+\usedir{tex/latex/mynsfc}
 \generate{
   \file{\jobname.cls}{\from{\jobname.dtx}{class}}
 }
+\usedir{doc/latex/mynsfc}
+\nopreamble\nopostamble
+\generate{
+  \file{examples/my-proposal-contents.tex}{\from{\jobname.dtx}{content}}
+}
 %</install>
 %<install>\endbatchfile
 %<*internal>
-\usedir{source/xelatex/mynsfc}
+\usedir{source/latex/mynsfc}
 \generate{
   \file{\jobname.ins}{\from{\jobname.dtx}{install}}
 }
 \nopreamble\nopostamble
-% \usedir{doc/xelatex/mynsfc}
-% \generate{
-%   \file{README.md}{\from{\jobname.dtx}{readme}}
-% }
 \ifx\fmtname\nameofplainTeX
   \expandafter\endbatchfile
 \else
@@ -89,24 +71,19 @@
 %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<class>\ProvidesClass{mynsfc}
 %<*class>
-    [2016/07/11 v1.01 A LaTeX class for writing NSFC proposals.]
+    [2020/08/18 v1.30 A XeLaTeX class for writing NSFC proposals.]
 %</class>
 %<*driver>
-\documentclass{ltxdoc}
-\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
-\usepackage[numbered]{hypdoc}
-\usepackage{xltxtra}
-\usepackage{xeCJK}
-\defaultfontfeatures{Mapping=tex-text} % after fontspec
-\setCJKmainfont{仿宋_GB2312}
-\setCJKsansfont{SimHei}
-\setCJKmonofont{仿宋_GB2312}
-\setmainfont{Times New Roman}
-\setmonofont{Courier Std}
-\renewcommand{\abstractname}{摘\hspace{2em}要}
+\documentclass[subfig,boldtoc]{mynsfc}
+\usepackage{doc}
+\makeatletter
+\def\glossary at prologue{\section{修改记录}{}}%
+\def\index at prologue{\section{索引}{}}%
+\makeatother
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
+\bibliography{examples/my-proposal}
 \begin{document}
   \DocInput{\jobname.dtx}
 \end{document}
@@ -116,44 +93,240 @@
 % \GetFileInfo{\jobname.dtx}
 % \DoNotIndex{\newcommand,\newenvironment}
 %
-% \title{\textsf{mynsfc} --- 国家自然科学基金申请书正文模板\thanks{此文档描述的
-% 模板版本为 \fileversion, 最后修改日期为
-% \filedate.} } \author{Fred Qi\thanks{E-mail: fred.qi at ieee.org}} \date{
-% \filedate 发布}
+% \changes{v1.00}{2015/08/18}{First public release}
+% \changes{v1.01}{2016/07/11}{Improved command \texttt{maketitle}}
+% \changes{v1.01}{2016/07/11}{Added an option \texttt{arabicpart}}
+% \changes{v1.01}{2016/07/11}{Author highlight with \texttt{biblatex} newer than
+% 3.3 (2016-03-01)}
+% \changes{v1.01}{2016/09/05}{Added options \texttt{tocfont} and
+% \texttt{boldtoc} to select font on headings}
+% \changes{v1.01}{2016/09/05}{Using kvoptions to handle package options}
+% \changes{v1.01}{2016/09/05}{Added an option \texttt{toccolor} to show outline
+% in a given color specified by a HTML/CSS style hex code}
+% \changes{v1.20}{2018/08/05}{Changed to support Chinese based on the CTeX package.}
+% \changes{v1.21}{2018/08/22}{Using xelatex for the FakeBold feature.}
+% \changes{v1.22}{2019/04/07}{Added macros render author annotations with biblatex.}
+% \changes{v1.22}{2019/04/09}{Added biblatex string \texttt{patentcn}.}
+% \changes{v1.30}{2021/08/18}{Release based on a newly funded proposal.}
+% 
+% \title{\textsf{mynsfc}---国家自然科学基金申请书正文模板\thanks{此文
+% 档描述的模板版本为 \fileversion, 最后修改日期为\filedate.} }
+% \author{Fred Qi\thanks{E-mail: fred.qi at ieee.org}}
+% \date{\filedate 发布}
 %
-%\maketitle
+% \maketitle
 %
-%\changes{v1.00}{2015/08/18}{First public release}
-%\changes{v1.01}{2016/07/11}{Revised command maketitle}
-%\changes{v1.01}{2016/07/11}{Added an option arabicpart}
-%\changes{v1.01}{2016/07/11}{Author highlight with latest biblatex}
-%
 % \begin{abstract}
 % 用于自然基金申请书正文部分的撰写。
 % \end{abstract}
 %
-% \section{使用说明}
+% \input{examples/my-proposal-contents.tex}
 %
-% 参见样例文件 \texttt{examples/my-nsfc-proposal.tex}。
+% \iffalse
+%<*content>
 %
-%\StopEventually{^^A
+{\kaishu\zihao{4} 参照以下提纲撰写,要求内容翔实、清晰,层次分明,标题
+  突出。\cemph{请勿删除或改动下述提纲标题及括号中的文字。}}
+
+\part{立项依据与研究内容(建议8000字以下):}
+\label{part:background}
+
+\section{项目的立项依据}{(研究意义、国内外研究现状及发展动态分析,需
+  结合科学研究发展趋势来论述科学意义;或结合国民经济和社会发展中迫切需
+  要解决的关键科技问题来论述其应用前景。附主要参考文献目录);}
+\label{sec:background}
+
+\subsection{研究意义}
+\label{sec:motivation}
+
+略。
+
+\subsection{国内外研究现状}
+\label{sec:review}
+
+可以引用相关文献~\cite{bengio_representation_2013}对研究意义与国内外研究现状进行说明。
+
+\printbibliography[segment=\therefsegment,heading=reftype]
+
+\section{项目的研究内容、研究目标,以及拟解决的关键科学问题}{(此部分为重点阐述内容);}
+\label{sec:proposals}
+
+\subsection{研究内容}
+
+略。
+
+\begin{figure}[h]
+  \centering
+  
+  \caption{测试图表标题。}
+  \label{fig:test}
+\end{figure}
+
+\begin{table}[h]
+  \centering
+  \begin{tabular}{cc}
+    \hline
+    标题 & 内容 \\
+    \hline
+    科目1 & 内容1 \\
+    \hline
+  \end{tabular}
+  \caption{测试图表标题。}
+  \label{tab:test}
+\end{table}
+
+\subsection{研究目标}
+\label{sec:goals}
+
+略。
+
+\subsection{拟解决的关键科学问题}
+
+略。
+
+\section{拟采取的研究方案及可行性分析}{(包括研究方法、技术路线、实验手段、关键技术等说明);}
+\label{sec:tech-feasibility}
+
+略。
+
+\section{本项目的特色与创新之处;}{}
+\label{sec:innovations}
+
+略。
+
+\section{年度研究计划及预期研究结果}{(包括拟组织的重要学术交流活动、国际合作与交流计划等)。}
+\label{sec:plans}
+
+略。
+
+% \clearpage
+
+\part{研究基础与工作条件}
+\label{part:foundations}
+
+\section{研究基础}{(与本项目相关的研究工作积累和已取得的研究工作成绩);}
+\label{sec:foundatioins}
+
+\newrefsegment
+  
+  申请人针对\textbf{某问题}进行了研究~\cite{xia_saliency_2015}。
+
+  在使用\texttt{biblatex} 3.4以上版本的情况下,建议使用
+  \texttt{biblatex}提供数据标注功能。如第二个作者是自己,用粗体标记自己的姓
+  名;且为文章的通记作者,加上角标``*''进行标注。则仅需要在bibtex文
+  件的相应条目中增加以下标记:
+\begin{verbatim}
+  author = "Xia, C and Qi, F and Shi, G and Wang, P",
+  author+an = {2=self;2:family=corr},
+\end{verbatim}
+  
+  需要强调的作者列表有三种形式,分别适用于不同版本的\texttt{biblatex}。
+  \begin{description}
+  \item[3.4+ (20160301)] 请使用\texttt{biblatex}中提供的数据标注(Data
+    annotation)功能。
+  \item[3.3 (20160301)] 由于姓名处理的宏更新,请使用哈希字符串列表指定需要强调
+    的作者。
+\begin{verbatim}
+    \initauthors{{72b3cccfc646adeb1d6b20320b56fd7d}}
+\end{verbatim}
+  \item[3.2- (20151228)] 使用旧式的姓名处理宏,使用下列形式的作者列表。
+\begin{verbatim}
+    \forcsvlist{\listadd\boldnames}{{Qi, F\bibinitperiod}}
+\end{verbatim}
+  \end{description}
+  其中命令\texttt{initauthors}中的所需要的姓名的哈希字符串可以
+  在Biber/bibtex 生成的文件\texttt{*.bbl} 中找到。
+
+\printbibliography[segment=\therefsegment,heading=cvtype,title={相关工作}]
+  
+\section{工作条件}{(包括已具备的实验条件,尚缺少的实验条件和拟解决的
+  途径,包括利用国家实验室、国家重点实验室和部门重点实验室等研究基地的
+  计划与落实情况);}
+\label{sec:condition}
+
+略。
+
+\section{正在承担的与本项目相关的科研项目情况}{(申请人和项目组主要参与
+  者正在承担的与本项目相关的科研项目情况,包括国家自然科学基金的项目和
+  国家其他科技计划项目,要注明项目的名称和编号、经费来源、起止年月、与
+  本项目的关系及负责的内容等);}
+\label{sec:projects}
+
+略。
+
+\section{完成国家自然科学基金项目情况}{(对申请人负责的前一个已结题科学
+  基金项目(项目名称及批准号)完成情况、后续研究进展及与本申请项目的关
+  系加以详细说明。另附该已结题项目研究工作总结摘要(限500字)和相关成果
+  的详细目录)。}
+\label{sec:finished-project}
+
+\newrefsegment
+
+略。
+
+\part{其他需要说明的问题}
+\label{cha:others}
+
+\section{}{申请人同年申请不同类型的国家自然科学基金项目情况(列明同年
+  申请的其他项目的项目类型、项目名称信息,并说明与本项目之间的区别与联
+  系)。}
+
+无
+
+\section{}{具有高级专业技术职务(职称)的申请人或者主要参与者是否存在
+  同年申请或者参与申请国家自然科学基金项目的单位不一致的情况;如存在上
+  述情况,列明所涉及人员的姓名,申请或参与申请的其他项目的项目类型、项
+  目名称、单位名称、上述人员在该项目中是申请人还是参与者,并说明单位不
+  一致原因。}
+
+无
+
+\section{}{具有高级专业技术职务(职称)的申请人或者主要参与者是否存在与
+  正在承担的国家自然科学基金项目的单位不一致的情况;如存在上述情况,列
+  明所涉及人员的姓名,正在承担项目的批准号、项目类型、项目名称、单位名
+  称、起止年月, 并说明单位不一致原因。}
+
+无
+
+\section{}{其他。}
+
+无
+
+使用方法参见样例文件 \texttt{my-proposal.tex}。
+
+%</content>
+% \fi
+% 
+%\StopEventually{
 %  \PrintChanges
 %  \PrintIndex
 %}
 %
-% \section{实现}
+% \part{附录}
+% \appendix
+% \section{实现}{}
 %
 %<*class>
 %    \begin{macrocode}
+\ExecuteOptions{}
+\ProcessOptions*
 %% Options
-\newif\ifmynsfc at subfig\mynsfc at subfigfalse
-\newif\ifmynsfc at arabicpart\mynsfc at arabicpartfalse
-\DeclareOption{subfig}{\mynsfc at subfigtrue}
-\DeclareOption{arabicpart}{\mynsfc at arabicparttrue}
-\ExecuteOptions{}
-\ProcessOptions
+\RequirePackage{kvoptions}
+\DeclareBoolOption[false]{subfig}
+\DeclareBoolOption[false]{boldtoc}
+\DeclareStringOption[zhkai]{tocfont}
+\DeclareStringOption[0070c0]{toccolor}
+\ProcessKeyvalOptions*
 %% Load default class
-\LoadClass[a4paper,fleqn]{article}
+\LoadClass[a4paper,UTF8,fontset=fandol,zihao=-4]{ctexart}
+%\setmainfont{Times New Roman}
+\setCJKmainfont{FandolSong}[%
+    Extension   = .otf,
+    UprightFont = *-Regular,
+    BoldFont    = *-Bold]
+\setCJKfamilyfont{zhkai}{FandolKai-Regular.otf}[AutoFakeBold=2]
+\RequirePackage[hmargin=1.25in,vmargin=1in]{geometry}
+\setlength{\parskip}{0pt \@plus2pt \@minus0pt}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -160,13 +333,13 @@
 %% Load required packages
 \RequirePackage{titlesec}
 \RequirePackage{marvosym}
-\RequirePackage{bm,amsmath,amssymb}
+\RequirePackage{amsmath,amssymb}
 \RequirePackage{paralist}
 \RequirePackage{graphicx}
 \ifmynsfc at subfig
 \RequirePackage[config]{subfig}
 \else
-\RequirePackage{subcaption}
+\RequirePackage{caption,subcaption}
 \fi
 \RequirePackage{xcolor}
 \RequirePackage{calc}
@@ -181,18 +354,36 @@
 %    \begin{macrocode}
 %% Load and setup package biblatex
 \RequirePackage[backend=biber,
-                url=true,
+                doi=false,
+                url=false,
                 isbn=false,
-                defernumbers=true,
+                defernumbers=true,                
                 style=ieee]{biblatex}
 
-\appto{\bibfont}{\wuhao}
-\defbibheading{reftype}[\bibname]{\subsection*{#1}}
-\defbibheading{cvtype}[\bibname]{\paragraph{#1}}
+\setlength{\bibitemsep}{2pt}
+\appto{\bibfont}{\normalfont\zihao{5}\linespread{1}\selectfont}
+\defbibheading{reftype}[参考文献]{\subsection*{#1}}
+\defbibheading{cvtype}[\bibname]{\subsubsection*{#1}}
 \defbibfilter{conference}{type=inproceedings or type=incollection}
 
+\NewBibliographyString{patentcn}
+
+\DefineBibliographyStrings{english}{%
+  and      = {\&},
+  patentcn = {中国发明专利\adddot},
+}
+
 \RequirePackage{xpatch}% or use http://tex.stackexchange.com/a/40705
 
+\@ifpackagelater{biblatex}{2016/05/10}
+{
+\renewcommand*{\mkbibnamegiven}[1]{%
+  \ifitemannotation{self}{\textbf{#1}}{#1}}
+\renewcommand*{\mkbibnamefamily}[1]{%
+  \ifitemannotation{self}{\textbf{#1}}{#1}%
+  \ifpartannotation{family}{corr}{\textsuperscript{*}}{}}
+}
+{
 \@ifpackagelater{biblatex}{2016/03/01}
 {
 \newcommand*{\list at bold@authors}{}
@@ -218,7 +409,7 @@
 \xapptobibmacro{name:family}{\endgroup}{}{}{}{}
 \xapptobibmacro{name:given-family}{\endgroup}{}{}{}{}
 \xapptobibmacro{name:family-given}{\endgroup}{}{}{}{}
-%\xapptobibmacro{name:delim}{\endgroup}{}{}
+% \xapptobibmacro{name:delim}{\endgroup}{}{}
 }
 {
 \newbibmacro*{name:bold}[2]{%
@@ -236,115 +427,17 @@
 \xapptobibmacro{name:last-first}{\endgroup}{}{}
 \xapptobibmacro{name:delim}{\endgroup}{}{}
 }
+}
 %    \end{macrocode}
 %
-% \begin{macro}{\dummyMacro}
-% This is a dummy macro.  If it did anything, we'd describe its
-% implementation here.
+% \begin{macro}{\tocformat}
 %    \begin{macrocode}
-%    \begin{macrocode}
-%
-\newcommand{\dummyMacro}{}
+\newcommand{\tocformat}{%
+  \CJKfamily{\mynsfc at tocfont}%
+  \color[HTML]{\mynsfc at toccolor}}
 %    \end{macrocode}
 % \end{macro}
-%
 %    \begin{macrocode}
-%% Setup Chinese fonts with xeCJK
-\RequirePackage[AutoFakeBold]{xeCJK}
-\def\CJK at null{\kern\CJKnullspace\Unicode{48}{7}\kern\CJKnullspace}
-\punctstyle{quanjiao}
-\defaultfontfeatures{Mapping=tex-text} % after fontspec
-\setCJKmainfont{仿宋_GB2312}
-\setCJKsansfont{SimHei}
-\setCJKmonofont{仿宋_GB2312}
-\setCJKfamilyfont{song}{仿宋_GB2312}
-\setCJKfamilyfont{hei}{SimHei}
-\setCJKfamilyfont{kai}{KaiTi}
-\setmainfont{Times New Roman}
-\setmonofont{Courier Std}
-%    \end{macrocode}
-%
-% \begin{macro}{\kai}
-% \begin{macro}{\kaiti}
-% \begin{macro}{\song}
-% \begin{macro}{\songti}
-% \begin{macro}{\hei}
-% \begin{macro}{\heiti}
-% Define commands to select Chinese fonts.
-%    \begin{macrocode}
-\newcommand{\kai}{\CJKfamily{kai}} % 仿宋体
-\newcommand{\song}{\CJKfamily{song}} % 宋体
-\newcommand{\hei}{\CJKfamily{hei}} % 黑体
-\def\kaiti{\kai}
-\def\songti{\song}
-\def\heiti{\hei}
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%    \begin{macrocode}
-\newlength\mynsfc at linespace
-\newcommand{\mynsfc at choosefont}[2]{%
-  \setlength{\mynsfc at linespace}{#2*\real{#1}}%
-  \fontsize{#2}{\mynsfc at linespace}\selectfont}
-\def\mynsfc at define@fontsize#1#2{%
-  \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
-    \mynsfc at choosefont{##1}{#2}}}
-\mynsfc at define@fontsize{chuhao}{42bp}
-\mynsfc at define@fontsize{xiaochu}{36bp}
-\mynsfc at define@fontsize{yihao}{26bp}
-\mynsfc at define@fontsize{xiaoyi}{24bp}
-\mynsfc at define@fontsize{erhao}{22bp}
-\mynsfc at define@fontsize{xiaoer}{18bp}
-\mynsfc at define@fontsize{sanhao}{16bp}
-\mynsfc at define@fontsize{xiaosan}{15bp}
-\mynsfc at define@fontsize{sihao}{14bp}
-\mynsfc at define@fontsize{banxiaosi}{13bp}
-\mynsfc at define@fontsize{xiaosi}{12bp}
-\mynsfc at define@fontsize{dawu}{11bp}
-\mynsfc at define@fontsize{wuhao}{10.5bp}
-\mynsfc at define@fontsize{xiaowu}{9bp}
-\mynsfc at define@fontsize{liuhao}{7.5bp}
-\mynsfc at define@fontsize{xiaoliu}{6.5bp}
-\mynsfc at define@fontsize{qihao}{5.5bp}
-\mynsfc at define@fontsize{bahao}{5bp}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-% Define page layout
-\setlength{\textwidth}{\paperwidth}
-\setlength{\textheight}{\paperheight}
-\setlength\marginparwidth{0mm}
-\setlength\marginparsep{0mm}
-\addtolength{\textwidth}{-50mm}
-\setlength{\oddsidemargin}{0mm}
-\setlength{\evensidemargin}{\oddsidemargin}
-\setlength{\headheight}{20pt}
-\setlength{\topskip}{0mm}
-\setlength{\skip\footins}{15pt}
-\setlength{\topmargin}{-15mm}
-\setlength{\footskip}{13mm}
-\setlength{\headsep}{6mm}
-\addtolength{\textheight}{-50mm}
-\setlength{\parskip}{0pt \@plus2pt \@minus0pt}
-%    \end{macrocode}
-%
-% \begin{macro}{\normalsize}
-% Redefine command 
-%    \begin{macrocode}
-\renewcommand\normalsize{%
-  \@setfontsize\normalsize{12bp}{20bp}
-  \abovedisplayskip=10bp \@plus 2bp \@minus 2bp
-  \abovedisplayshortskip=10bp \@plus 2bp \@minus 2bp
-  \belowdisplayskip=\abovedisplayskip
-  \belowdisplayshortskip=\abovedisplayshortskip}
-%    \end{macrocode}
-% \end{macro}
-%    \begin{macrocode}
 % Define page styles      
 \def\ps at mynsfc@empty{%
   \let\@oddhead\@empty%
@@ -352,100 +445,63 @@
   \let\@oddfoot\@empty%
   \let\@evenfoot\@empty}
 %    \end{macrocode}
-%
-% \begin{environment}{hcomment}
-% Dimmed text used as hint after section titles. 
+% \begin{macro}{\maketitle}
 %    \begin{macrocode}
-\newenvironment{hcomment}{\vskip-3pt\color{gray}}{\vskip6pt}
+\renewcommand{\maketitle}{%
+  \begin{center}%
+    \kaishu\zihao{3}\bfseries\@title%
+  \end{center}}
 %    \end{macrocode}
-% \end{environment}
+% \end{macro}
 %
-% \begin{macro}{\figurename}
-% \begin{macro}{\tablename}
-% \begin{macro}{\contentsname}
-% Translate English to Chinese.
+% \begin{macro}{\part}
 %    \begin{macrocode}
-\renewcommand{\figurename}{图}
-\renewcommand{\tablename}{表}
-\renewcommand{\contentsname}{内容目录}
+\ctexset{
+  part/name         = {(,)},
+  part/aftername    = {},
+  part/number       = \chinese{part},
+  part/format       = \tocformat\bfseries\zihao{4},
+  part/indent       = 2em,
+}
 %    \end{macrocode}
 % \end{macro}
+% 
+% \begin{macro}{\section}
+%    \begin{macrocode}
+\titleformat{\section}[block]{\tocformat\zihao{4}}
+                             {\bfseries\hskip2em\thesection{.}}{1ex}{}
+\titlespacing{\section}{0em}{4ex}{2ex}
+\let\oldsection\section
+\renewcommand{\section}[2]{\oldsection{\textbf{#1}{#2}}}
+\@addtoreset{section}{part}
+%    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
+% \begin{macro}{\subsection}
 %    \begin{macrocode}
-%      
-\DeclareCaptionLabelFormat{mynsfc at cap}{{\wuhao#1\rmfamily#2}}
-\DeclareCaptionLabelSeparator{mynsfc at sep}{\hspace{1em}}
-\DeclareCaptionFont{mynsfc at capfont}{\wuhao}
-\captionsetup{labelformat=mynsfc at cap,
-              labelsep=mynsfc at sep,
-              font=mynsfc at capfont,
-              justification=centering}
+\titleformat{\subsection}{\tocformat\bfseries\zihao{-4}}
+                         {\thesubsection{.}}{0.25em}{}
+\titlespacing{\subsection}{0em}{2ex}{1ex}
 %    \end{macrocode}
+% \end{macro}
 %
-% \begin{macro}{CJKindent}
-% Indent with two Chinese full spaces.
+% \begin{macro}{\subsubsection}
 %    \begin{macrocode}
-%      
-\newlength\mynsfc at CJK@twochars
-\newcommand{\mynsfc at unicode}[2]{\char\numexpr#1*256+#2\relax}
-\def\mynsfc at CJK@space{\mynsfc at unicode{48}{7}}
-\def\CJKindent{%
-  \settowidth\mynsfc at CJK@twochars{\mynsfc at CJK@space\mynsfc at CJK@space}%
-  \parindent\mynsfc at CJK@twochars}
+\renewcommand{\thesubsubsection}{(\arabic{subsubsection})}
+\titleformat{\subsubsection}{\CJKfamily{\mynsfc at tocfont}\bfseries\zihao{-4}}
+                            {\thesubsubsection}{0.25em}{}
+\titlespacing{\subsubsection}{0ex}{2ex}{1ex}
+\captionsetup{font=small}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\maketitle}
-\renewcommand{\maketitle}{%
-  \begin{center}%
-    \heiti\erhao\@title%
-  \end{center}}
-% \end{macro}
-%
-% \begin{macro}{\part}
-% \begin{macro}{\section}
-% \begin{macro}{\subsection}
-% \begin{macro}{\subsubsection}
-% \begin{macro}
-% Commands to format several levels of titles (part, section, subsection).
+% \begin{macro}{\cemph}
 %    \begin{macrocode}
-\ifmynsfc at arabicpart%
-\renewcommand{\thepart}{\arabic{part}.}
-\titleformat{\part}{\heiti\sanhao}{\thepart}{1ex}{}
-\renewcommand{\thesection}{\arabic{section})}
-\renewcommand{\thesubsection}{\Alph{subsection})}
-\else%
-\def\nsfc at CJKnumber#1{\ifcase#1{零}\or%
-  {一}\or{二}\or{三}\or{四}\or{五}\or%
-  {六}\or{七}\or{八}\or{九}\or{十}\or%
-  {十一}\or{十二}\or{十三}\or{十四}\or{十五}\or%
-  {十六}\or{十七}\or{十八}\or{十九}\or{二十}\fi}
-\renewcommand{\thepart}{(\nsfc at CJKnumber{\c at part})}
-\titleformat{\part}{\heiti\sanhao}{\thepart}{0ex}{}
-\renewcommand{\thesection}{\arabic{section}.}
-\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
-\fi
-
-\titlespacing{\part}{0ex}{4ex}{2ex}
-
-\@addtoreset{section}{part}
-\titleformat{\section}{\heiti\xiaosan}{\thesection}{0.25em}{}
-\titlespacing{\section}{0em}{4ex}{2ex}
-
-\titleformat{\subsection}{\hei\sihao}{\thesubsection}{0.25em}{}
-\titlespacing{\subsection}{0em}{2ex}{1ex}
-
-\titleformat{\subsubsection}{\heiti\banxiaosi}{\thesubsubsection}{0.25em}{}
-\titlespacing{\subsubsection}{0em}{2ex}{1ex}
+\newcommand{\cemph}[1]{\textbf{\color[HTML]{\mynsfc at toccolor}#1}}
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%    \begin{macrocode}
+% 
+% \begin{macrocode}
 \let\mynsfc at begindocumenthook\@begindocumenthook
 \let\mynsfc at enddocumenthook\@enddocumenthook
 \def\AtBeginDocument{\g at addto@macro\mynsfc at begindocumenthook}
@@ -452,7 +508,7 @@
 \def\AtEndDocument{\g at addto@macro\mynsfc at enddocumenthook}
 \def\@begindocumenthook{\mynsfc at begindocumenthook}
 \def\@enddocumenthook{\mynsfc at enddocumenthook}
-\AtBeginDocument{\ps at mynsfc@empty\CJKindent}
+\AtBeginDocument{\ps at mynsfc@empty}
 \endinput
 %</class>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls	2021-08-19 20:22:15 UTC (rev 60279)
+++ trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls	2021-08-19 20:22:35 UTC (rev 60280)
@@ -12,29 +12,37 @@
 %% License: Released under the LaTeX Project Public License v1.3c or later
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
-%% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{mynsfc}
-    [2016/07/11 v1.01 A LaTeX class for writing NSFC proposals.]
+    [2020/08/18 v1.30 A XeLaTeX class for writing NSFC proposals.]
+\ExecuteOptions{}
+\ProcessOptions*
 %% Options
-\newif\ifmynsfc at subfig\mynsfc at subfigfalse
-\newif\ifmynsfc at arabicpart\mynsfc at arabicpartfalse
-\DeclareOption{subfig}{\mynsfc at subfigtrue}
-\DeclareOption{arabicpart}{\mynsfc at arabicparttrue}
-\ExecuteOptions{}
-\ProcessOptions
+\RequirePackage{kvoptions}
+\DeclareBoolOption[false]{subfig}
+\DeclareBoolOption[false]{boldtoc}
+\DeclareStringOption[zhkai]{tocfont}
+\DeclareStringOption[0070c0]{toccolor}
+\ProcessKeyvalOptions*
 %% Load default class
-\LoadClass[a4paper,fleqn]{article}
+\LoadClass[a4paper,UTF8,fontset=fandol,zihao=-4]{ctexart}
+\setCJKmainfont{FandolSong}[%
+    Extension   = .otf,
+    UprightFont = *-Regular,
+    BoldFont    = *-Bold]
+\setCJKfamilyfont{zhkai}{FandolKai-Regular.otf}[AutoFakeBold=2]
+\RequirePackage[hmargin=1.25in,vmargin=1in]{geometry}
+\setlength{\parskip}{0pt \@plus2pt \@minus0pt}
 %% Load required packages
 \RequirePackage{titlesec}
 \RequirePackage{marvosym}
-\RequirePackage{bm,amsmath,amssymb}
+\RequirePackage{amsmath,amssymb}
 \RequirePackage{paralist}
 \RequirePackage{graphicx}
 \ifmynsfc at subfig
 \RequirePackage[config]{subfig}
 \else
-\RequirePackage{subcaption}
+\RequirePackage{caption,subcaption}
 \fi
 \RequirePackage{xcolor}
 \RequirePackage{calc}
@@ -47,18 +55,36 @@
 \urlstyle{same}
 %% Load and setup package biblatex
 \RequirePackage[backend=biber,
-                url=true,
+                doi=false,
+                url=false,
                 isbn=false,
                 defernumbers=true,
                 style=ieee]{biblatex}
 
-\appto{\bibfont}{\wuhao}
-\defbibheading{reftype}[\bibname]{\subsection*{#1}}
-\defbibheading{cvtype}[\bibname]{\paragraph{#1}}
+\setlength{\bibitemsep}{2pt}
+\appto{\bibfont}{\normalfont\zihao{5}\linespread{1}\selectfont}
+\defbibheading{reftype}[参考文献]{\subsection*{#1}}
+\defbibheading{cvtype}[\bibname]{\subsubsection*{#1}}
 \defbibfilter{conference}{type=inproceedings or type=incollection}
 
+\NewBibliographyString{patentcn}
+
+\DefineBibliographyStrings{english}{%
+  and      = {\&},
+  patentcn = {中国发明专利\adddot},
+}
+
 \RequirePackage{xpatch}% or use http://tex.stackexchange.com/a/40705
 
+\@ifpackagelater{biblatex}{2016/05/10}
+{
+\renewcommand*{\mkbibnamegiven}[1]{%
+  \ifitemannotation{self}{\textbf{#1}}{#1}}
+\renewcommand*{\mkbibnamefamily}[1]{%
+  \ifitemannotation{self}{\textbf{#1}}{#1}%
+  \ifpartannotation{family}{corr}{\textsuperscript{*}}{}}
+}
+{
 \@ifpackagelater{biblatex}{2016/03/01}
 {
 \newcommand*{\list at bold@authors}{}
@@ -100,126 +126,41 @@
 \xapptobibmacro{name:last-first}{\endgroup}{}{}
 \xapptobibmacro{name:delim}{\endgroup}{}{}
 }
-\newcommand{\dummyMacro}{}
-%% Setup Chinese fonts with xeCJK
-\RequirePackage[AutoFakeBold]{xeCJK}
-\def\CJK at null{\kern\CJKnullspace\Unicode{48}{7}\kern\CJKnullspace}
-\punctstyle{quanjiao}
-\defaultfontfeatures{Mapping=tex-text} % after fontspec
-\setCJKmainfont{仿宋_GB2312}
-\setCJKsansfont{SimHei}
-\setCJKmonofont{仿宋_GB2312}
-\setCJKfamilyfont{song}{仿宋_GB2312}
-\setCJKfamilyfont{hei}{SimHei}
-\setCJKfamilyfont{kai}{KaiTi}
-\setmainfont{Times New Roman}
-\setmonofont{Courier Std}
-\newcommand{\kai}{\CJKfamily{kai}} % 仿宋体
-\newcommand{\song}{\CJKfamily{song}} % 宋体
-\newcommand{\hei}{\CJKfamily{hei}} % 黑体
-\def\kaiti{\kai}
-\def\songti{\song}
-\def\heiti{\hei}
-\newlength\mynsfc at linespace
-\newcommand{\mynsfc at choosefont}[2]{%
-  \setlength{\mynsfc at linespace}{#2*\real{#1}}%
-  \fontsize{#2}{\mynsfc at linespace}\selectfont}
-\def\mynsfc at define@fontsize#1#2{%
-  \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
-    \mynsfc at choosefont{##1}{#2}}}
-\mynsfc at define@fontsize{chuhao}{42bp}
-\mynsfc at define@fontsize{xiaochu}{36bp}
-\mynsfc at define@fontsize{yihao}{26bp}
-\mynsfc at define@fontsize{xiaoyi}{24bp}
-\mynsfc at define@fontsize{erhao}{22bp}
-\mynsfc at define@fontsize{xiaoer}{18bp}
-\mynsfc at define@fontsize{sanhao}{16bp}
-\mynsfc at define@fontsize{xiaosan}{15bp}
-\mynsfc at define@fontsize{sihao}{14bp}
-\mynsfc at define@fontsize{banxiaosi}{13bp}
-\mynsfc at define@fontsize{xiaosi}{12bp}
-\mynsfc at define@fontsize{dawu}{11bp}
-\mynsfc at define@fontsize{wuhao}{10.5bp}
-\mynsfc at define@fontsize{xiaowu}{9bp}
-\mynsfc at define@fontsize{liuhao}{7.5bp}
-\mynsfc at define@fontsize{xiaoliu}{6.5bp}
-\mynsfc at define@fontsize{qihao}{5.5bp}
-\mynsfc at define@fontsize{bahao}{5bp}
-\setlength{\textwidth}{\paperwidth}
-\setlength{\textheight}{\paperheight}
-\setlength\marginparwidth{0mm}
-\setlength\marginparsep{0mm}
-\addtolength{\textwidth}{-50mm}
-\setlength{\oddsidemargin}{0mm}
-\setlength{\evensidemargin}{\oddsidemargin}
-\setlength{\headheight}{20pt}
-\setlength{\topskip}{0mm}
-\setlength{\skip\footins}{15pt}
-\setlength{\topmargin}{-15mm}
-\setlength{\footskip}{13mm}
-\setlength{\headsep}{6mm}
-\addtolength{\textheight}{-50mm}
-\setlength{\parskip}{0pt \@plus2pt \@minus0pt}
-\renewcommand\normalsize{%
-  \@setfontsize\normalsize{12bp}{20bp}
-  \abovedisplayskip=10bp \@plus 2bp \@minus 2bp
-  \abovedisplayshortskip=10bp \@plus 2bp \@minus 2bp
-  \belowdisplayskip=\abovedisplayskip
-  \belowdisplayshortskip=\abovedisplayshortskip}
+}
+\newcommand{\tocformat}{%
+  \CJKfamily{\mynsfc at tocfont}%
+  \color[HTML]{\mynsfc at toccolor}}
 \def\ps at mynsfc@empty{%
   \let\@oddhead\@empty%
   \let\@evenhead\@empty%
   \let\@oddfoot\@empty%
   \let\@evenfoot\@empty}
-\newenvironment{hcomment}{\vskip-3pt\color{gray}}{\vskip6pt}
-\renewcommand{\figurename}{图}
-\renewcommand{\tablename}{表}
-\renewcommand{\contentsname}{内容目录}
-\DeclareCaptionLabelFormat{mynsfc at cap}{{\wuhao#1\rmfamily#2}}
-\DeclareCaptionLabelSeparator{mynsfc at sep}{\hspace{1em}}
-\DeclareCaptionFont{mynsfc at capfont}{\wuhao}
-\captionsetup{labelformat=mynsfc at cap,
-              labelsep=mynsfc at sep,
-              font=mynsfc at capfont,
-              justification=centering}
-\newlength\mynsfc at CJK@twochars
-\newcommand{\mynsfc at unicode}[2]{\char\numexpr#1*256+#2\relax}
-\def\mynsfc at CJK@space{\mynsfc at unicode{48}{7}}
-\def\CJKindent{%
-  \settowidth\mynsfc at CJK@twochars{\mynsfc at CJK@space\mynsfc at CJK@space}%
-  \parindent\mynsfc at CJK@twochars}
 \renewcommand{\maketitle}{%
   \begin{center}%
-    \heiti\erhao\@title%
+    \kaishu\zihao{3}\bfseries\@title%
   \end{center}}
-\ifmynsfc at arabicpart%
-\renewcommand{\thepart}{\arabic{part}.}
-\titleformat{\part}{\heiti\sanhao}{\thepart}{1ex}{}
-\renewcommand{\thesection}{\arabic{section})}
-\renewcommand{\thesubsection}{\Alph{subsection})}
-\else%
-\def\nsfc at CJKnumber#1{\ifcase#1{零}\or%
-  {一}\or{二}\or{三}\or{四}\or{五}\or%
-  {六}\or{七}\or{八}\or{九}\or{十}\or%
-  {十一}\or{十二}\or{十三}\or{十四}\or{十五}\or%
-  {十六}\or{十七}\or{十八}\or{十九}\or{二十}\fi}
-\renewcommand{\thepart}{(\nsfc at CJKnumber{\c at part})}
-\titleformat{\part}{\heiti\sanhao}{\thepart}{0ex}{}
-\renewcommand{\thesection}{\arabic{section}.}
-\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
-\fi
-
-\titlespacing{\part}{0ex}{4ex}{2ex}
-
+\ctexset{
+  part/name         = {(,)},
+  part/aftername    = {},
+  part/number       = \chinese{part},
+  part/format       = \tocformat\bfseries\zihao{4},
+  part/indent       = 2em,
+}
+\titleformat{\section}[block]{\tocformat\zihao{4}}
+                             {\bfseries\hskip2em\thesection{.}}{1ex}{}
+\titlespacing{\section}{0em}{4ex}{2ex}
+\let\oldsection\section
+\renewcommand{\section}[2]{\oldsection{\textbf{#1}{#2}}}
 \@addtoreset{section}{part}
-\titleformat{\section}{\heiti\xiaosan}{\thesection}{0.25em}{}
-\titlespacing{\section}{0em}{4ex}{2ex}
-
-\titleformat{\subsection}{\hei\sihao}{\thesubsection}{0.25em}{}
+\titleformat{\subsection}{\tocformat\bfseries\zihao{-4}}
+                         {\thesubsection{.}}{0.25em}{}
 \titlespacing{\subsection}{0em}{2ex}{1ex}
-
-\titleformat{\subsubsection}{\heiti\banxiaosi}{\thesubsubsection}{0.25em}{}
-\titlespacing{\subsubsection}{0em}{2ex}{1ex}
+\renewcommand{\thesubsubsection}{(\arabic{subsubsection})}
+\titleformat{\subsubsection}{\CJKfamily{\mynsfc at tocfont}\bfseries\zihao{-4}}
+                            {\thesubsubsection}{0.25em}{}
+\titlespacing{\subsubsection}{0ex}{2ex}{1ex}
+\captionsetup{font=small}
+\newcommand{\cemph}[1]{\textbf{\color[HTML]{\mynsfc at toccolor}#1}}
 \let\mynsfc at begindocumenthook\@begindocumenthook
 \let\mynsfc at enddocumenthook\@enddocumenthook
 \def\AtBeginDocument{\g at addto@macro\mynsfc at begindocumenthook}
@@ -226,9 +167,9 @@
 \def\AtEndDocument{\g at addto@macro\mynsfc at enddocumenthook}
 \def\@begindocumenthook{\mynsfc at begindocumenthook}
 \def\@enddocumenthook{\mynsfc at enddocumenthook}
-\AtBeginDocument{\ps at mynsfc@empty\CJKindent}
+\AtBeginDocument{\ps at mynsfc@empty}
 %% 
-%% Copyright (C) 2015,2016 by Fei Qi <fred.qi at ieee.org>
+%% Copyright (C) 2015-2021 by Fei Qi <fred.qi at ieee.org>
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License (LPPL), either



More information about the tex-live-commits mailing list.