summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-09-05 22:06:45 +0000
committerKarl Berry <karl@freefriends.org>2016-09-05 22:06:45 +0000
commit3a82053daf0f0df0ccfacaf1de278674f1d47aae (patch)
tree0fd48b363f0550fb83ebcfb9c3f9511df3a7f30b
parent230fe59e35208b77a89adf5a05e0b133bd1703a3 (diff)
mynsfc (5sep16)
git-svn-id: svn://tug.org/texlive/trunk@41996 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdfbin126838 -> 114695 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex21
-rw-r--r--Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdfbin104680 -> 110964 bytes
-rw-r--r--Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx73
-rw-r--r--Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls64
5 files changed, 124 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf b/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
index dc6d58c0266..a7844407b47 100644
--- a/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
+++ b/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex b/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
index 0acb055129f..7f59c91f043 100644
--- a/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
+++ b/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
@@ -4,8 +4,8 @@
%% Author: Fred Qi
%% Created: 2016-02-04 15:26:58(-0700)
%%
-%% Last-Updated: 2016-02-04 22:00:53(-0700) [by Fred Qi]
-%% Update #: 61
+%% Last-Updated: 2016-07-11 18:33:23(+0800) [by Fred Qi]
+%% Update #: 71
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%% Commentary:
@@ -23,7 +23,8 @@
\bibliography{IEEEabrv,my-nsfc-proposal}
% 名称与申请人(不会在正文部分出现)
-\title{自然科学基金正文\XeLaTeX{}模板}
+% \title{自然科学基金正文\XeLaTeX{}模板}
+\title{报告正文}
\author{齐飞}
\begin{document}
@@ -32,9 +33,10 @@
\thispagestyle{empty}
%% 大字体显示“报告正文”字样
-\begin{center}
- \kaiti \erhao \bfseries 报告正文
-\end{center}
+\maketitle
+% \begin{center}
+% \kaiti \erhao \bfseries 报告正文
+% \end{center}
\part{立项依据与研究内容}
\label{part:proposal}
@@ -116,9 +118,12 @@
\begin{refsection}
- 申请人针对\textbf{某问题}进行了研究~\cite{xia_saliency_2015}。
+ 申请人针对\textbf{某问题}进行了研究~\cite{xia_saliency_2015}。下面命令
+ \texttt{initauthors} 中的哈希字符串可以在Biber/bibtex 生成的文件
+ \texttt{*.bbl} 中找到。
- \forcsvlist{\listadd\boldnames}{{Qi, F\bibinitperiod}}
+ % \forcsvlist{\listadd\boldnames}{{Qi, F\bibinitperiod}}
+ \initauthors{{72b3cccfc646adeb1d6b20320b56fd7d}}
\printbibliography[prefixnumbers=J,heading=cvtype,title={相关工作}]
\end{refsection}
diff --git a/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf b/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf
index 868f9f05a7b..14ba3eb5645 100644
--- a/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf
+++ b/Master/texmf-dist/doc/xelatex/mynsfc/mynsfc.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx b/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx
index 110c20b7a82..1f48c1e6659 100644
--- a/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx
+++ b/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx
@@ -39,7 +39,7 @@ See: http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2015 by Fei Qi <fred.qi@ieee.org>
+Copyright (C) 2015,2016 by Fei Qi <fred.qi@ieee.org>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
@@ -89,7 +89,7 @@ Running "make install" installs the files in the local TeX tree.
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{mynsfc}
%<*class>
- [2015/08/18 v1.00 A LaTeX class for writing NSFC proposals.]
+ [2016/07/11 v1.01 A LaTeX class for writing NSFC proposals.]
%</class>
%<*driver>
\documentclass{ltxdoc}
@@ -124,6 +124,9 @@ Running "make install" installs the files in the local TeX tree.
%\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}
% 用于自然基金申请书正文部分的撰写。
@@ -131,6 +134,7 @@ Running "make install" installs the files in the local TeX tree.
%
% \section{使用说明}
%
+% 参见样例文件 \texttt{examples/my-nsfc-proposal.tex}。
%
%\StopEventually{^^A
% \PrintChanges
@@ -143,7 +147,10 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
%% Options
\newif\ifmynsfc@subfig\mynsfc@subfigfalse
+\newif\ifmynsfc@arabicpart\mynsfc@arabicpartfalse
\DeclareOption{subfig}{\mynsfc@subfigtrue}
+\DeclareOption{arabicpart}{\mynsfc@arabicparttrue}
+\ExecuteOptions{}
\ProcessOptions
%% Load default class
\LoadClass[a4paper,fleqn]{article}
@@ -186,6 +193,34 @@ Running "make install" installs the files in the local TeX tree.
\RequirePackage{xpatch}% or use http://tex.stackexchange.com/a/40705
+\@ifpackagelater{biblatex}{2016/03/01}
+{
+\newcommand*{\list@bold@authors}{}
+\newcommand{\initauthors}[1]{
+ \renewcommand*{\list@bold@authors}{}
+ \forcsvlist{\listadd\list@bold@authors}{#1}}
+
+\newboolean{bold}
+\renewcommand*{\mkbibnamefamily}[1]{\ifthenelse{\boolean{bold}}{\textbf{#1}}{#1}}
+\renewcommand*{\mkbibnamegiven}[1]{\ifthenelse{\boolean{bold}}{\textbf{#1}}{#1}}
+
+\newbibmacro*{name:bold}{%
+ \setboolean{bold}{false}%
+ \def\do##1{\iffieldequalstr{hash}{##1}{\setboolean{bold}{true}\listbreak}{}}%
+ \dolistloop{\list@bold@authors}%
+}
+
+\xpretobibmacro{name:family}{\begingroup\usebibmacro{name:bold}}{}{}{}{}
+\xpretobibmacro{name:given-family}{\begingroup\usebibmacro{name:bold}}{}{}{}{}
+\xpretobibmacro{name:family-given}{\begingroup\usebibmacro{name:bold}}{}
+%\xpretobibmacro{name:delim}{\begingroup\normalfont}{}{}
+
+\xapptobibmacro{name:family}{\endgroup}{}{}{}{}
+\xapptobibmacro{name:given-family}{\endgroup}{}{}{}{}
+\xapptobibmacro{name:family-given}{\endgroup}{}{}{}{}
+%\xapptobibmacro{name:delim}{\endgroup}{}{}
+}
+{
\newbibmacro*{name:bold}[2]{%
\def\do##1{\ifstrequal{#1, #2}{##1}{\bfseries\listbreak}{}}%
\dolistloop{\boldnames}}
@@ -200,6 +235,7 @@ Running "make install" installs the files in the local TeX tree.
\xapptobibmacro{name:first-last}{\endgroup}{}{}
\xapptobibmacro{name:last-first}{\endgroup}{}{}
\xapptobibmacro{name:delim}{\endgroup}{}{}
+}
% \end{macrocode}
%
% \begin{macro}{\dummyMacro}
@@ -220,6 +256,7 @@ Running "make install" installs the files in the local TeX tree.
\defaultfontfeatures{Mapping=tex-text} % after fontspec
\setCJKmainfont{仿宋_GB2312}
\setCJKsansfont{SimHei}
+\setCJKmonofont{仿宋_GB2312}
\setCJKfamilyfont{song}{仿宋_GB2312}
\setCJKfamilyfont{hei}{SimHei}
\setCJKfamilyfont{kai}{KaiTi}
@@ -360,6 +397,13 @@ Running "make install" installs the files in the local TeX tree.
% \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}
@@ -367,30 +411,33 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macro}
% Commands to format several levels of titles (part, section, subsection).
% \begin{macrocode}
+\ifmynsfc@arabicpart%
+\renewcommand{\thepart}{\arabic{part}.}
+\titleformat{\part}{\heiti\sanhao}{\thepart}{1ex}{}
+\renewcommand{\thesection}{\arabic{section})}
+\renewcommand{\thesubsection}{\Alph{subsection})}
+\else%
\def\nsfc@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@CJKnumber{\c@part})}
+\titleformat{\part}{\heiti\sanhao}{\thepart}{0ex}{}
+\renewcommand{\thesection}{\arabic{section}.}
+\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
+\fi
-\renewcommand{\thepart}{\nsfc@CJKnumber{\c@part}}
-\titleformat{\part}{\kai\bfseries\sanhao}%
- {(\thepart)}{0ex}{}
\titlespacing{\part}{0ex}{4ex}{2ex}
\@addtoreset{section}{part}
-\renewcommand{\thesection}{\arabic{section}.}
-\titleformat{\section}{\kai\bfseries\xiaosan}%
- {\thesection}{0.25em}{}
+\titleformat{\section}{\heiti\xiaosan}{\thesection}{0.25em}{}
\titlespacing{\section}{0em}{4ex}{2ex}
-\renewcommand{\thesubsection}{\bf\arabic{section}.\arabic{subsection}}
-\titleformat{\subsection}{\hei\sihao}%
- {\thesubsection}{0.25em}{}
+\titleformat{\subsection}{\hei\sihao}{\thesubsection}{0.25em}{}
\titlespacing{\subsection}{0em}{2ex}{1ex}
-\titleformat{\subsubsection}{\kaiti\bfseries\banxiaosi}%
- {\thesubsubsection}{0.25em}{}
+\titleformat{\subsubsection}{\heiti\banxiaosi}{\thesubsubsection}{0.25em}{}
\titlespacing{\subsubsection}{0em}{2ex}{1ex}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls b/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls
index 9e20cc13bf9..bb824140b11 100644
--- a/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls
+++ b/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls
@@ -15,10 +15,13 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{mynsfc}
- [2015/08/18 v1.00 A LaTeX class for writing NSFC proposals.]
+ [2016/07/11 v1.01 A LaTeX class for writing NSFC proposals.]
%% Options
\newif\ifmynsfc@subfig\mynsfc@subfigfalse
+\newif\ifmynsfc@arabicpart\mynsfc@arabicpartfalse
\DeclareOption{subfig}{\mynsfc@subfigtrue}
+\DeclareOption{arabicpart}{\mynsfc@arabicparttrue}
+\ExecuteOptions{}
\ProcessOptions
%% Load default class
\LoadClass[a4paper,fleqn]{article}
@@ -56,6 +59,32 @@
\RequirePackage{xpatch}% or use http://tex.stackexchange.com/a/40705
+\@ifpackagelater{biblatex}{2016/03/01}
+{
+\newcommand*{\list@bold@authors}{}
+\newcommand{\initauthors}[1]{
+ \renewcommand*{\list@bold@authors}{}
+ \forcsvlist{\listadd\list@bold@authors}{#1}}
+
+\newboolean{bold}
+\renewcommand*{\mkbibnamefamily}[1]{\ifthenelse{\boolean{bold}}{\textbf{#1}}{#1}}
+\renewcommand*{\mkbibnamegiven}[1]{\ifthenelse{\boolean{bold}}{\textbf{#1}}{#1}}
+
+\newbibmacro*{name:bold}{%
+ \setboolean{bold}{false}%
+ \def\do##1{\iffieldequalstr{hash}{##1}{\setboolean{bold}{true}\listbreak}{}}%
+ \dolistloop{\list@bold@authors}%
+}
+
+\xpretobibmacro{name:family}{\begingroup\usebibmacro{name:bold}}{}{}{}{}
+\xpretobibmacro{name:given-family}{\begingroup\usebibmacro{name:bold}}{}{}{}{}
+\xpretobibmacro{name:family-given}{\begingroup\usebibmacro{name:bold}}{}
+
+\xapptobibmacro{name:family}{\endgroup}{}{}{}{}
+\xapptobibmacro{name:given-family}{\endgroup}{}{}{}{}
+\xapptobibmacro{name:family-given}{\endgroup}{}{}{}{}
+}
+{
\newbibmacro*{name:bold}[2]{%
\def\do##1{\ifstrequal{#1, #2}{##1}{\bfseries\listbreak}{}}%
\dolistloop{\boldnames}}
@@ -70,6 +99,7 @@
\xapptobibmacro{name:first-last}{\endgroup}{}{}
\xapptobibmacro{name:last-first}{\endgroup}{}{}
\xapptobibmacro{name:delim}{\endgroup}{}{}
+}
\newcommand{\dummyMacro}{}
%% Setup Chinese fonts with xeCJK
\RequirePackage[AutoFakeBold]{xeCJK}
@@ -78,6 +108,7 @@
\defaultfontfeatures{Mapping=tex-text} % after fontspec
\setCJKmainfont{仿宋_GB2312}
\setCJKsansfont{SimHei}
+\setCJKmonofont{仿宋_GB2312}
\setCJKfamilyfont{song}{仿宋_GB2312}
\setCJKfamilyfont{hei}{SimHei}
\setCJKfamilyfont{kai}{KaiTi}
@@ -157,30 +188,37 @@
\def\CJKindent{%
\settowidth\mynsfc@CJK@twochars{\mynsfc@CJK@space\mynsfc@CJK@space}%
\parindent\mynsfc@CJK@twochars}
+\renewcommand{\maketitle}{%
+ \begin{center}%
+ \heiti\erhao\@title%
+ \end{center}}
+\ifmynsfc@arabicpart%
+\renewcommand{\thepart}{\arabic{part}.}
+\titleformat{\part}{\heiti\sanhao}{\thepart}{1ex}{}
+\renewcommand{\thesection}{\arabic{section})}
+\renewcommand{\thesubsection}{\Alph{subsection})}
+\else%
\def\nsfc@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@CJKnumber{\c@part})}
+\titleformat{\part}{\heiti\sanhao}{\thepart}{0ex}{}
+\renewcommand{\thesection}{\arabic{section}.}
+\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
+\fi
-\renewcommand{\thepart}{\nsfc@CJKnumber{\c@part}}
-\titleformat{\part}{\kai\bfseries\sanhao}%
- {(\thepart)}{0ex}{}
\titlespacing{\part}{0ex}{4ex}{2ex}
\@addtoreset{section}{part}
-\renewcommand{\thesection}{\arabic{section}.}
-\titleformat{\section}{\kai\bfseries\xiaosan}%
- {\thesection}{0.25em}{}
+\titleformat{\section}{\heiti\xiaosan}{\thesection}{0.25em}{}
\titlespacing{\section}{0em}{4ex}{2ex}
-\renewcommand{\thesubsection}{\bf\arabic{section}.\arabic{subsection}}
-\titleformat{\subsection}{\hei\sihao}%
- {\thesubsection}{0.25em}{}
+\titleformat{\subsection}{\hei\sihao}{\thesubsection}{0.25em}{}
\titlespacing{\subsection}{0em}{2ex}{1ex}
-\titleformat{\subsubsection}{\kaiti\bfseries\banxiaosi}%
- {\thesubsubsection}{0.25em}{}
+\titleformat{\subsubsection}{\heiti\banxiaosi}{\thesubsubsection}{0.25em}{}
\titlespacing{\subsubsection}{0em}{2ex}{1ex}
\let\mynsfc@begindocumenthook\@begindocumenthook
\let\mynsfc@enddocumenthook\@enddocumenthook
@@ -190,7 +228,7 @@
\def\@enddocumenthook{\mynsfc@enddocumenthook}
\AtBeginDocument{\ps@mynsfc@empty\CJKindent}
%%
-%% Copyright (C) 2015 by Fei Qi <fred.qi@ieee.org>
+%% Copyright (C) 2015,2016 by Fei Qi <fred.qi@ieee.org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either