texlive[41996] Master/texmf-dist: mynsfc (5sep16)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 6 00:06:45 CEST 2016


Revision: 41996
          http://tug.org/svn/texlive?view=revision&revision=41996
Author:   karl
Date:     2016-09-06 00:06:45 +0200 (Tue, 06 Sep 2016)
Log Message:
-----------
mynsfc (5sep16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.pdf
    trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
    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

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

Modified: trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex	2016-09-05 22:04:44 UTC (rev 41995)
+++ trunk/Master/texmf-dist/doc/xelatex/mynsfc/my-nsfc-proposal.tex	2016-09-05 22:06:45 UTC (rev 41996)
@@ -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}

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	2016-09-05 22:04:44 UTC (rev 41995)
+++ trunk/Master/texmf-dist/source/xelatex/mynsfc/mynsfc.dtx	2016-09-05 22:06:45 UTC (rev 41996)
@@ -39,7 +39,7 @@
 \endpreamble
 \postamble
 
-Copyright (C) 2015 by Fei Qi <fred.qi at ieee.org>
+Copyright (C) 2015,2016 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
@@ -89,7 +89,7 @@
 %<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 @@
 %\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 @@
 %
 % \section{使用说明}
 %
+% 参见样例文件 \texttt{examples/my-nsfc-proposal.tex}。
 %
 %\StopEventually{^^A
 %  \PrintChanges
@@ -143,7 +147,10 @@
 %    \begin{macrocode}
 %% 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
 %% Load default class
 \LoadClass[a4paper,fleqn]{article}
@@ -186,6 +193,34 @@
 
 \RequirePackage{xpatch}% or use http://tex.stackexchange.com/a/40705
 
+\@ifpackagelater{biblatex}{2016/03/01}
+{
+\newcommand*{\list at bold@authors}{}
+\newcommand{\initauthors}[1]{
+  \renewcommand*{\list at bold@authors}{}
+  \forcsvlist{\listadd\list at 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 at 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 @@
 \xapptobibmacro{name:first-last}{\endgroup}{}{}
 \xapptobibmacro{name:last-first}{\endgroup}{}{}
 \xapptobibmacro{name:delim}{\endgroup}{}{}
+}
 %    \end{macrocode}
 %
 % \begin{macro}{\dummyMacro}
@@ -220,6 +256,7 @@
 \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 @@
 %    \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 @@
 % \begin{macro}
 % Commands to format several levels of titles (part, section, subsection).
 %    \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
 
-\renewcommand{\thepart}{\nsfc at CJKnumber{\c at 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}

Modified: trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls	2016-09-05 22:04:44 UTC (rev 41995)
+++ trunk/Master/texmf-dist/tex/xelatex/mynsfc/mynsfc.cls	2016-09-05 22:06:45 UTC (rev 41996)
@@ -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 at subfig\mynsfc at subfigfalse
+\newif\ifmynsfc at arabicpart\mynsfc at arabicpartfalse
 \DeclareOption{subfig}{\mynsfc at subfigtrue}
+\DeclareOption{arabicpart}{\mynsfc at 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 at bold@authors}{}
+\newcommand{\initauthors}[1]{
+  \renewcommand*{\list at bold@authors}{}
+  \forcsvlist{\listadd\list at 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 at 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 at CJK@twochars{\mynsfc at CJK@space\mynsfc at CJK@space}%
   \parindent\mynsfc at CJK@twochars}
+\renewcommand{\maketitle}{%
+  \begin{center}%
+    \heiti\erhao\@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
 
-\renewcommand{\thepart}{\nsfc at CJKnumber{\c at 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 at begindocumenthook\@begindocumenthook
 \let\mynsfc at enddocumenthook\@enddocumenthook
@@ -190,7 +228,7 @@
 \def\@enddocumenthook{\mynsfc at enddocumenthook}
 \AtBeginDocument{\ps at mynsfc@empty\CJKindent}
 %% 
-%% Copyright (C) 2015 by Fei Qi <fred.qi at ieee.org>
+%% Copyright (C) 2015,2016 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