summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-05 03:03:23 +0000
committerNorbert Preining <norbert@preining.info>2022-12-05 03:03:23 +0000
commit673717f7c662dd135f63b61c1da1ecd59bcdbe90 (patch)
tree9fe13f30ece99ab02f375cefab300a65b069560c /macros
parentb153d9b098596910fb2be9311f13c4415233c2a2 (diff)
CTAN sync 202212050303
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/hfutexam/CHANGELOG.md18
-rw-r--r--macros/latex/contrib/hfutexam/LICENSE416
-rw-r--r--macros/latex/contrib/hfutexam/README.md7
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam.cls346
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam.pdfbin0 -> 200040 bytes
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam.tex270
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdfbin0 -> 92519 bytes
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex158
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_datizhi.pdfbin0 -> 70715 bytes
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_datizhi.tex73
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_shijuan.pdfbin0 -> 95057 bytes
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_shijuan.tex82
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_simple.pdfbin0 -> 110461 bytes
-rw-r--r--macros/latex/contrib/hfutexam/hfutexam_simple.tex260
-rw-r--r--macros/latex/contrib/mathfont/README.txt74
-rw-r--r--macros/latex/contrib/mathfont/mathfont_code.dtx235
-rw-r--r--macros/latex/contrib/mathfont/mathfont_code.pdfbin371018 -> 363665 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_example_cormorant.pdfbin51264 -> 51367 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_example_kelvinch.pdfbin84913 -> 85049 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_example_roboto.pdfbin54246 -> 54342 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_example_typey.pdfbin38746 -> 47387 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_symbol_list.pdfbin232449 -> 186232 bytes
-rw-r--r--macros/latex/contrib/mathfont/mathfont_user_guide.pdfbin115029 -> 115314 bytes
-rw-r--r--macros/latex/contrib/ppt-slides/README.md2
-rw-r--r--macros/latex/contrib/ppt-slides/ppt-slides.dtx38
-rw-r--r--macros/latex/contrib/ppt-slides/ppt-slides.pdfbin885857 -> 932594 bytes
-rw-r--r--macros/unicodetex/latex/bithesis/bithesis.dtx26
-rw-r--r--macros/unicodetex/latex/bithesis/bithesis.pdfbin1043619 -> 1046235 bytes
28 files changed, 1872 insertions, 133 deletions
diff --git a/macros/latex/contrib/hfutexam/CHANGELOG.md b/macros/latex/contrib/hfutexam/CHANGELOG.md
new file mode 100644
index 0000000000..c0174e3a9e
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/CHANGELOG.md
@@ -0,0 +1,18 @@
+# 更新日志
+
+## [1.5] - 2022/12/04
++ 现在`\XiZhuRenQianMing`不设置或设置为空时即可不显示签名.
+
+## [1.4] - 2022/12/04
++ 修复了有时选择题选项未能正确计算行数的问题.
++ 修复了有时填空题答案会被横线截断的问题.
+
+## [1.3] - 2022/11/27
++ 移除了简易模式下学期的下划线.
++ 打分框的宽度减少了`10%`.
+
+## [1.2] - 2022/10/31
++ 选择题选项后增加了`5pt`的垂直间距.
+
+## [1.1] - 2022/10/30
++ 首次提交.
diff --git a/macros/latex/contrib/hfutexam/LICENSE b/macros/latex/contrib/hfutexam/LICENSE
new file mode 100644
index 0000000000..2244313901
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/LICENSE
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/macros/latex/contrib/hfutexam/README.md b/macros/latex/contrib/hfutexam/README.md
new file mode 100644
index 0000000000..6162cde72d
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/README.md
@@ -0,0 +1,7 @@
+# hfutexam: exam class for Hefei University of Technology (China)
+
+The package provides an exam class for Hefei University of Technology (China).
+
++ Package: An exam class for Jinan University
++ Author: Shenxing Zhang <zhangshenxing@hfut.edu.cn>
++ License: The LaTeX Project Public License 1.3c
diff --git a/macros/latex/contrib/hfutexam/hfutexam.cls b/macros/latex/contrib/hfutexam/hfutexam.cls
new file mode 100644
index 0000000000..4d560ba7b4
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam.cls
@@ -0,0 +1,346 @@
+% 文件 `hfutexam.cls'
+% !TEX TS-program = xelatex
+% !TEX encoding = UTF-8 Unicode
+% 合肥工业大学试卷模板
+% 作者: 张神星
+% 使用前请先安装字体: 方正小标宋、方正仿宋, 否则请使用选项 nofangzheng (采用新宋体和仿宋代替)
+% 编译模式: XeLaTeX
+% 你可以任意修改或再次分发该文件
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{hfutexam}[2022/12/04 v1.5 HFUTExam document class by Zhang Shenxing]
+% 文档选项 shijuan, datizhi, cankaodaan, simple
+\newif\ifHFUT@ShiJuan\HFUT@ShiJuantrue
+\newif\ifHFUT@DaTiZhi\HFUT@DaTiZhifalse
+\newif\ifHFUT@CanKaoDaAn\HFUT@CanKaoDaAnfalse
+\newif\ifHFUT@Simple\HFUT@Simplefalse
+\DeclareOption{datizhi}{\HFUT@ShiJuanfalse\HFUT@DaTiZhitrue}
+\DeclareOption{cankaodaan}{\HFUT@ShiJuanfalse\HFUT@CanKaoDaAntrue}
+\DeclareOption{simple}{\HFUT@ShiJuanfalse\HFUT@Simpletrue}
+% 文档选项 nofangzheng
+\newif\ifHFUT@Fandol\HFUT@Fandoltrue
+\DeclareOption{nofangzheng}{\HFUT@Fandolfalse}
+% 基于 ctexart 文档类
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}}
+\ProcessOptions\relax
+\ifHFUT@Simple\else\PassOptionsToClass{twocolumn}{ctexart}\fi
+\ProcessOptions\relax
+\LoadClass[12pt,oneside]{ctexart}
+% 页面设置
+\RequirePackage{amsmath,amssymb,amsthm}
+\RequirePackage{graphicx}
+\RequirePackage{enumitem}
+\RequirePackage{geometry}
+\ifHFUT@Simple
+ \geometry{a4paper,scale=0.8}
+\else
+ \geometry{
+ paperheight=29.7cm,
+ paperwidth=42cm,
+ left=3.17cm,
+ right=3.17cm,
+ voffset=2.2cm,
+ headheight=77pt,
+ headsep=12pt,
+ footskip=1cm
+ }
+\fi
+% 试卷信息
+\newcommand{\BiaoTi}[1]{\gdef\HFUT@BiaoTi{#1}}
+\newcommand{\XueNian}[2]{\gdef\HFUT@XueNians{#1}\gdef\HFUT@XueNiane{#2}}
+\newcommand{\XueQi}[1]{\gdef\HFUT@XueQi{#1}}
+\newcommand{\KeChengDaiMa}[1]{\gdef\HFUT@KeChengDaiMa{#1}}
+\newcommand{\KeChengMingCheng}[1]{\gdef\HFUT@KeChengMingCheng{#1}}
+\newcommand{\XueFen}[1]{\gdef\HFUT@XueFen{#1}}
+\newcommand{\KeChengXingZhi}[1]{\gdef\HFUT@KeChengXingZhi{#1}}
+\newcommand{\KaoShiXingShi}[1]{\gdef\HFUT@KaoShiXingShi{#1}}
+\newcommand{\ZhuanYeBanJi}[1]{\gdef\HFUT@ZhuanYeBanJi{#1}}
+\newcommand{\KaoShiRiQi}[1]{\gdef\HFUT@KaoShiRiQi{#1}}
+\newcommand{\MingTiJiaoShi}[1]{\gdef\HFUT@MingTiJiaoShi{#1}}
+\newcommand{\XiZhuRenQianMing}[1]{\gdef\HFUT@XiZhuRenQianMing{#1}}
+\BiaoTi{}
+\XueNian{}{}
+\XueQi{}
+\KeChengDaiMa{}
+\KeChengMingCheng{}
+\XueFen{}
+\KeChengXingZhi{}
+\KaoShiXingShi{}
+\ZhuanYeBanJi{}
+\KaoShiRiQi{}
+\MingTiJiaoShi{}
+\XiZhuRenQianMing{}
+% 粗字体设定
+\newfontfamily\timesnewroman[AutoFakeBold={1.5}]{Times New Roman} % 粗罗马
+\ifHFUT@Fandol
+ \setCJKfamilyfont{titlesongti}[AutoFakeBold={1.5}]{FZXiaoBiaoSong-B05S} % 粗方正小标宋
+ \newfontfamily\entitlesongti[AutoFakeBold={1.5}]{FZXiaoBiaoSong-B05S}
+ \setCJKfamilyfont{titlefangsong}[AutoFakeBold={1.5}]{FZFangSong-Z02S} % 粗方正仿宋
+ \newfontfamily\entitlefangsong[AutoFakeBold={1.5}]{FZFangSong-Z02S}
+\else
+ \setCJKfamilyfont{titlesongti}[AutoFakeBold={4}]{NSimSun} % 粗新宋体
+ \newfontfamily\entitlesongti[AutoFakeBold={4}]{NSimSun}
+ \setCJKfamilyfont{titlefangsong}[AutoFakeBold={1.5}]{FangSong} % 粗仿宋
+ \newfontfamily\entitlefangsong[AutoFakeBold={1.5}]{FangSong}
+\fi
+\newcommand{\titlesongti}{\entitlesongti\CJKfamily{titlesongti}}
+\newcommand{\titlefangsong}{\entitlefangsong\CJKfamily{titlefangsong}}
+\setCJKfamilyfont{xinsongti}[AutoFakeBold={1.5}]{NSimSun} % 粗新宋体
+\newfontfamily\enxinsongti[AutoFakeBold={1.5}]{NSimSun}
+\newcommand{\xinsongti}{\enxinsongti\CJKfamily{xinsongti}}
+\setCJKfamilyfont{cusongti}[AutoFakeBold={1.5}]{SimSun} % 粗宋体
+\newcommand{\cusongti}{\CJKfamily{cusongti}}
+% 重新设定字体大小
+\renewcommand{\LARGE}{\fontsize{21}{21}}
+\renewcommand{\large}{\fontsize{14}{14}}
+\renewcommand{\normalsize}{\fontsize{12}{12}}
+\renewcommand{\small}{\fontsize{10.5}{10.5}}
+% 缩进
+\setlength{\parindent}{0em}
+\renewcommand{\indent}{\hspace*{2em}}
+% 分栏
+\setlength\columnsep{0.8cm} % 分栏间距
+\columnseprule=0.5pt % 分栏线宽度
+% 填空题
+\newlength{\ltemp}
+\RequirePackage[normalem]{ulem}
+\ifHFUT@ShiJuan%
+ \NewDocumentCommand\fillblank{O{3.5cm} O{0.5cm} m}{\uline{\makebox[#1]{\rule{0pt}{#2}#3}}}%
+ \else\ifHFUT@DaTiZhi%
+ \NewDocumentCommand\fillblank{O{3.5cm} O{1cm} m}{\uline{\makebox[#1]{\rule{0pt}{#2}#3}}}%
+ \else%
+ \NewDocumentCommand\fillblank{O{3.5cm} O{1cm} m}{%
+ \settodepth{\ltemp}{#3}%
+ \uline{\makebox[#1]{\rule{0pt}{#2}\raisebox{\ltemp}{#3}}}%
+ }%
+\fi\fi
+% 页眉页脚
+\RequirePackage{fancyhdr}
+\RequirePackage{lastpage}
+\RequirePackage{etoolbox}
+\renewcommand\headrulewidth{0.5pt} % 页眉线宽度
+\renewcommand\footrulewidth{0.5pt} % 页脚线宽度
+\pagestyle{fancy}
+\fancyhf{}
+\newcommand{\boxyes}{{\raisebox{-0.5mm}{\LARGE$\checkmark\hspace{-1.2em}\square$}}}
+\newcommand{\boxno}{{\raisebox{-0.5mm}{\LARGE$\square$}}}
+\newcommand{\filltitle}[2]{\uline{\makebox[#1]{#2}}}
+\newlength{\ltitle}
+\settowidth{\ltitle}{\HFUT@BiaoTi}
+\ifHFUT@ShiJuan%试卷页眉页脚
+ \fancyhead[C]{%
+ \hfill\bfseries\LARGE\titlesongti\ifdimcomp\ltitle>{0.5\linewidth}{\HFUT@BiaoTi}{\makebox[0.5\linewidth][s]{\HFUT@BiaoTi}}\hfill%
+ \large\cusongti 共\filltitle{1.5em}{\timesnewroman\pageref{LastPage}}页第\filltitle{1.5em}{\timesnewroman\thepage}页\\\vspace{5pt}%
+ \timesnewroman\HFUT@XueNians\titlefangsong~\timesnewroman\HFUT@XueNiane\titlefangsong 学年第\filltitle{2em}{\HFUT@XueQi}学期\hfill%
+ 课程代码\filltitle{5em}{\HFUT@KeChengDaiMa}\hfill%
+ 课程名称\filltitle{12em}{\HFUT@KeChengMingCheng}\hfill%
+ 学分\filltitle{2.5em}{\HFUT@XueFen}\hfill%
+ 课程性质: 必修\ifdefstring{\HFUT@KeChengXingZhi}{必修}{\boxyes}{\boxno}%
+ 选修\ifdefstring{\HFUT@KeChengXingZhi}{选修}{\boxyes}{\boxno}%
+ 限修\ifdefstring{\HFUT@KeChengXingZhi}{限修}{\boxyes}{\boxno}\hfill%
+ 考试形式: 开卷\ifdefstring{\HFUT@KaoShiXingShi}{开卷}{\boxyes}{\boxno}%
+ 闭卷\ifdefstring{\HFUT@KaoShiXingShi}{闭卷}{\boxyes}{\boxno}\\\vspace{2pt}%
+ 专业班级(教学班)\filltitle{11em}{\HFUT@ZhuanYeBanJi}\hfill%
+ 考试日期\filltitle{16em}{\HFUT@KaoShiRiQi}\hfill%
+ 命题教师\fillblank[5.5em][0.6cm]{\HFUT@MingTiJiaoShi}\hfill%
+ 系(所或教研室)主任审批签名%
+ \begin{tikzpicture}[overlay,xshift=3.25em,yshift=0.15cm]%
+ \node at (0,0) {\ifx\HFUT@XiZhuRenQianMing\@empty\else\includegraphics[height=0.9cm]{\HFUT@XiZhuRenQianMing}\fi};%
+ \end{tikzpicture}%
+ \filltitle{6.5em}{}\vspace{4pt}%
+ }
+ \fancyfoot[C]{\small\vspace{0.5\baselineskip}命题教师注意事项:
+ 1. 主考教师必须于考试一周前将“试卷A”、“试卷B”经教研室主任审批签字后送教务科印刷。\hspace{1em}%
+ 2. 请命题教师用黑色水笔工整地书写题目或用A4纸横式打印贴在试卷版芯中。
+ }
+\fi
+\ifHFUT@DaTiZhi%答题纸页眉页脚
+ \fancyhead[C]{%
+ \bfseries\LARGE\xinsongti\scalebox{2.0}[1.0]{%
+ \ifdimcomp\ltitle>{0.35\linewidth}{\HFUT@BiaoTi}{\makebox[0.35\linewidth][s]{\HFUT@BiaoTi}}%
+ }\\\vspace{8pt}%
+ \large\timesnewroman\HFUT@XueNians\titlefangsong~\timesnewroman\HFUT@XueNiane\titlefangsong 学年第\filltitle{2em}{\HFUT@XueQi}学期\hfill%
+ 课程代码\filltitle{6.5em}{\HFUT@KeChengDaiMa}\hfill%
+ 课程名称\filltitle{13em}{\HFUT@KeChengMingCheng}\hfill%
+ 命题教师\filltitle{7em}{\HFUT@MingTiJiaoShi}\hfill%
+ 系主任审批%
+ \begin{tikzpicture}[overlay,xshift=3.5em,yshift=0.2cm]%
+ \node at (0,0) {\ifx\HFUT@XiZhuRenQianMing\@empty\else\includegraphics[height=0.9cm]{\HFUT@XiZhuRenQianMing}\fi};%
+ \end{tikzpicture}%
+ \filltitle{7em}{}\\\vspace{2pt}%
+ 教学班级\filltitle{10.5em}{}\hfill%
+ 学生姓名\fillblank[8em][0.6cm]{}\hfill%
+ 学号\filltitle{8em}{}\hfill%
+ 考试日期\filltitle{16em}{\HFUT@KaoShiRiQi}\hfill%
+ 成绩\filltitle{6.3em}{}\vspace{4pt}%
+ }
+ \fancyfoot[C]{\small\vspace{0.5\baselineskip}
+ 第 \timesnewroman\thepage 页~共 \timesnewroman\pageref{LastPage} 页
+ }
+\fi
+\ifHFUT@CanKaoDaAn%参考答案页眉页脚
+ \fancyhead[C]{%
+ \bfseries\LARGE\titlesongti\ifdimcomp\ltitle>{0.6\linewidth}{\HFUT@BiaoTi}{\makebox[0.6\linewidth][s]{\HFUT@BiaoTi}}\\\vspace{5pt}%
+ \large\timesnewroman\HFUT@XueNians\titlefangsong~\timesnewroman\HFUT@XueNiane\titlefangsong 学年第\filltitle{2em}{\HFUT@XueQi}学期\hfill%
+ 课程代码\filltitle{6.5em}{\HFUT@KeChengDaiMa}\hfill%
+ 课程名称\filltitle{13em}{\HFUT@KeChengMingCheng}\hfill%
+ 命题教师\filltitle{7em}{\HFUT@MingTiJiaoShi}\hfill%
+ 系主任审批%
+ \begin{tikzpicture}[overlay,xshift=3.5em,yshift=0.2cm]%
+ \node at (0,0) {\ifx\HFUT@XiZhuRenQianMing\@empty\else\includegraphics[height=0.9cm]{\HFUT@XiZhuRenQianMing}\fi};%
+ \end{tikzpicture}%
+ \filltitle{7em}{}\\\vspace{2pt}%
+ 教学班级\filltitle{10.5em}{}\hfill%
+ 学生姓名\fillblank[8em][0.6cm]{}\hfill%
+ 学号\filltitle{8em}{}\hfill%
+ 考试日期\filltitle{16em}{\HFUT@KaoShiRiQi}\hfill%
+ 成绩\filltitle{6.3em}{}\vspace{4pt}%
+ }
+ \fancyfoot[C]{\small\vspace{0.5\baselineskip}
+ 第 \timesnewroman\thepage 页~共 \timesnewroman\pageref{LastPage} 页
+ }
+\fi
+\ifHFUT@Simple%简单模式页眉页脚
+ \renewcommand\headrulewidth{0pt}
+ \renewcommand\footrulewidth{0pt}
+ \renewcommand{\maketitle}{%
+ \begin{center}
+ \bfseries\LARGE\titlesongti%
+ \ifdimcomp\ltitle>{0.9\linewidth}{\HFUT@BiaoTi}{\makebox[0.9\linewidth][s]{\HFUT@BiaoTi}}\\%
+ \makebox[0.75\linewidth]{\large\timesnewroman\HFUT@XueNians\titlefangsong~\timesnewroman\HFUT@XueNiane\titlefangsong 学年%
+ 第{\HFUT@XueQi}学期\hfill\HFUT@KeChengMingCheng(\HFUT@KeChengDaiMa)}
+ \end{center}
+ }
+ \fancyfoot[C]{\small\vspace{0.5\baselineskip}
+ 第 \timesnewroman\thepage 页~共 \timesnewroman\pageref{LastPage} 页
+ }
+\fi
+% 题号加粗
+\renewcommand{\labelenumi}{{\bfseries \theenumi.}}
+% 题干
+\newcommand\tigan[1]{\noindent{\large\textbf{#1}}}
+% 打分栏
+\RequirePackage{tikz}
+\usetikzlibrary{overlay-beamer-styles}
+\newcommand\scorebox{%
+ \vspace{0.5\baselineskip}\noindent%
+ \begin{tikzpicture}[overlay,xshift=13.8cm,yshift=-1.6cm]%
+ \draw (0,0) rectangle (3.6,2);%
+ \draw (1.8,0)--(1.8,2);%
+ \draw (0,1)--(3.6,1);%
+ \draw (0.9,1.5) node {\textbf{\normalsize 得分}};%
+ \draw (2.7,1.5) node {\textbf{\normalsize 阅卷人}};%
+ \end{tikzpicture}%
+}
+% 答题纸提示信息
+\newcommand\notice{%
+ \noindent\textbf{\small 考生注意事项:\\%
+ \indent 1. 本试卷分试题与答卷两部分;\\%
+ \indent 2. 所有试题的解答(包括选择、填空)必须写在专用答卷纸上,在试题上直接作答一律无效;\\%
+ \indent 3. 考试结束后,必须将试题、答卷整理上交,不得将试题带离考场;\\%
+ \indent 4. 考生务必认真填写班级、姓名、学号等信息。}\par%
+ {\leavevmode\xleaders\hbox{\rule[4pt]{8pt}{0.5pt}\,}\hfill\null}%
+}
+% 选择题, 根据选项内容长度自动排版
+\newlength{\lxxmax}
+\newlength{\lquar}
+\newlength{\lhalf}
+\newlength{\lfull}
+\newcounter{lxxtype}
+\NewDocumentCommand\xx{O{0} m m m m}{%
+ \setlength{\lfull}{\columnwidth}%
+ \addtolength{\lfull}{-\leftmargin}%
+ \setlength{\lhalf}{0.5\lfull}%
+ \setlength{\lquar}{0.25\lfull}%
+ \setcounter{lxxtype}{0}%
+ \ifnum#1=1\setcounter{lxxtype}{1}\fi%
+ \ifnum#1=2\setcounter{lxxtype}{2}\fi%
+ \ifnum#1=4\setcounter{lxxtype}{4}\fi%
+ \settowidth{\lxxmax}{A.~#2~}% 获取最长选项长度
+ \settowidth{\ltemp}{B.~#3~}%
+ \ifdimcomp\ltemp>\lxxmax{\setlength{\lxxmax}{\ltemp}}{}%
+ \settowidth{\ltemp}{C.~#4~}%
+ \ifdimcomp\ltemp>\lxxmax{\setlength{\lxxmax}{\ltemp}}{}%
+ \settowidth{\ltemp}{D.~#5~}%
+ \ifdimcomp\ltemp>\lxxmax{\setlength{\lxxmax}{\ltemp}}{}%
+ \ifnum\value{lxxtype}=0%
+ \setcounter{lxxtype}{4}%
+ \ifdimcomp\lxxmax>\lquar{\setcounter{lxxtype}{2}}{}%
+ \ifnum\value{lxxtype}=2%
+ \ifdimcomp\lxxmax>\lhalf{\setcounter{lxxtype}{1}}{}%
+ \fi%
+ \fi%
+ \vspace{5pt}%
+ \ifnum\value{lxxtype}=1%
+ \\\makebox[\lfull][l]{A.~#2}%
+ \\\makebox[\lfull][l]{B.~#3}%
+ \\\makebox[\lfull][l]{C.~#4}%
+ \\\makebox[\lfull][l]{D.~#5}%
+ \fi%
+ \ifnum\value{lxxtype}=2%
+ \\\makebox[\lhalf][l]{A.~#2}%
+ \makebox[\lhalf][l]{B.~#3}%
+ \\\makebox[\lhalf][l]{C.~#4}%
+ \makebox[\lhalf][l]{D.~#5}%
+ \fi%
+ \ifnum\value{lxxtype}=4%
+ \\\makebox[\lquar][l]{A.~#2}%
+ \makebox[\lquar][l]{B.~#3}%
+ \makebox[\lquar][l]{C.~#4}%
+ \makebox[\lquar][l]{D.~#5}%
+ \fi%
+}
+% 选择题答题框
+\newcommand\xuanzeti[2]{%
+ \begin{tikzpicture}%
+ \draw (0,0) rectangle (1.8,2);%
+ \draw (0,1)--(1.8,1);%
+ \draw (0.9,0.5) node {#2} (0.9,1.5) node {\textbf{#1}};%
+ \end{tikzpicture}%
+}
+% 得分点命令
+% https://ask.latexstudio.net/ask/question/7557.html
+\RequirePackage{zref-savepos}
+\makeatletter
+\ExplSyntaxOn
+\zref@require@unique
+\NewDocumentCommand{\examscore}{O{} m}{
+ \mode_if_math:TF
+ { \@@_math_cdotfill:n {\text{#2}} }
+ { \__examzh_cdotfill: #2 }
+ \mode_if_math:F{
+ \ignorespaces
+ }
+}
+\cs_new:Npn \__examzh_cdotfill:
+{
+ \mode_leave_vertical:
+ \cleaders \hb@xt@ .44em {\hss $\cdot$ \hss} \hfill
+ \kern\z@
+}
+\cs_new_protected:Npn \@@_math_cdotfill:n #1
+{
+ \stepcounter { zref@unique }
+ \hbox_overlap_right:n
+ {
+ \zsaveposx { \thezref@unique L }
+ \zref@ifrefundefined { \thezref@unique R }
+ { }
+ {
+ \cleaders
+ \hbox_to_wd:nn { .44em } { \hss $\cdot$ \hss }
+ \skip_horizontal:n
+ {
+ \zposx { \thezref@unique R } sp
+ - \zposx { \thezref@unique L } sp
+ }
+ }
+ }
+ \tag * { \zsaveposx { \thezref@unique R } #1 }
+}
+\ExplSyntaxOff
+\makeatother
+\newcommand\Score[1]{~~~\examscore{#1}}
+\newcommand\score[1]{~~~\examscore{(#1分)}}
+\renewcommand\le{\leqslant}
+\renewcommand\ge{\geqslant}
+
diff --git a/macros/latex/contrib/hfutexam/hfutexam.pdf b/macros/latex/contrib/hfutexam/hfutexam.pdf
new file mode 100644
index 0000000000..47d4a72aab
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam.pdf
Binary files differ
diff --git a/macros/latex/contrib/hfutexam/hfutexam.tex b/macros/latex/contrib/hfutexam/hfutexam.tex
new file mode 100644
index 0000000000..ffadfa2959
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam.tex
@@ -0,0 +1,270 @@
+\documentclass{hfutexam}
+
+%% 示例所需的自定义命令
+\newcommand{\diff}{\,\mathrm{d}}
+\usetikzlibrary{arrows.meta, overlay-beamer-styles}
+\newfontfamily\couriernew{Courier New}
+\usepackage{enumitem}
+\usepackage{tcolorbox}
+\usepackage{listings}
+\makeatletter
+\definecolor{winered}{rgb}{0.5,0,0}
+\definecolor{lightgrey}{rgb}{0.9,0.9,0.9}
+\definecolor{frenchplum}{RGB}{190,20,83}
+\lstset{language=[LaTeX]TeX,
+ basicstyle=\couriernew,
+ texcsstyle=*\color{winered},
+ mathescape,
+ breaklines=true,
+ keywordstyle=\color{winered},
+ commentstyle=\color{green!70!black},
+ stringstyle=\color{green!50!blue},
+ frame=single,
+ tabsize=3,
+ framerule=0.5pt,
+ columns=flexible,
+ backgroundcolor=\color{black!5},
+ morekeywords={\diff, \maketitle, \titlesep, \BiaoTi, \XueNian, \XueQi, \KeChengDaiMa, \KeChengMingCheng, \XueFen, \KeChengXingZhi, \KaoShiXingShi, \ZhuanYeBanJi, \KaoShiRiQi, \MingTiJiaoShi, \XiZhuRenQianMing, \tigan, \scorebox, \score, \Score, \fillblank, \xx, \notice, \xuanzeti, \yihang, \erhang, \sihang, XeLaTeX},
+ keywordstyle=\color{winered},
+ morekeywords=[2]{hfutexam, shijuan, datizhi, cankaodaan, simple, nofangzheng, flalign, 5cm, enumerate, align},
+ keywordstyle=[2]\color{blue},
+}
+\tcbset{
+ colback=white,
+ colframe=blue,
+ boxrule=0.5pt,
+ arc=0pt,
+}
+\makeatother
+
+\begin{document}
+\BiaoTi{合肥工业大学试卷(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+\XiZhuRenQianMing{}
+
+
+\tigan{一、模板选项}
+
+\indent
+本模板 (2022/12/04 v1.5) 旨在为将合肥工业大学试卷的 word 格式转为\LaTeX{}格式.
+使用时, 只需在文档开头写上
+\begin{lstlisting}
+\documentclass[shijuan]{hfutexam}
+\end{lstlisting}
+即可使用.
+需要使用~{\color{blue}{\lstinline|UTF-8|}} 编码, 并使用 \lstinline|XeLaTeX| 至少编译两次, 以正确生成页码.
+
+\indent
+可使用的选项为: \lstinline|shijuan| (试卷), \lstinline|datizhi| (答题纸), \lstinline|cankaodaan| (参考答案) 和 \lstinline|simple| (简易模式). 如果留空则为默认值 \lstinline|shijuan| (试卷).
+\begin{enumerate}
+\item 试卷/答题纸/参考答案三个选项下页面会设置为 A3 大小, 三种情形的页眉页脚显示的内容以及标题的文字间隔有所不同.
+\item 简易模式选项下页面会设置为 A4 大小, 页眉页脚也较为简单. 此时需要使用命令 \lstinline|\maketitle| 来生成标题.
+一般用于保存(多张)试卷的内容,或者便于打印使用.
+\item 标题默认使用方正字体, 因此请在使用前先安装字体: {\bfseries\titlesongti 方正小标宋}和{\bfseries\titlefangsong 方正仿宋}(右键选择为所有用户安装), 否则请使用选项 \lstinline|nofangzheng| (采用新宋体和仿宋代替).
+\end{enumerate}
+
+\tigan{二、试卷信息}
+
+\indent
+通过下述命令来设置试卷信息.
+
+\textit{\color{blue}{试卷信息示例:}}
+\begin{lstlisting}
+\BiaoTi{合肥工业大学试卷(A)} % 试卷标题, 一般为: 合肥工业大学试卷(A)或(B)
+\XueNian{2021}{2022} % 学年起始和结束, 一般为相差 1 的 4 位数字
+\XueQi{二} % 学期, 一般为: 一, 二
+\KeChengDaiMa{034Y01} % 课程代码
+\KeChengMingCheng{数学(下)} % 课程名称
+\XueFen{5} % 学分
+\KeChengXingZhi{必修} % 课程性质, 只能为: 必修, 选修, 限修
+\KaoShiXingShi{闭卷} % 考试形式, 只能为: 开卷, 闭卷
+\ZhuanYeBanJi{少数民族预科班} % 专业班级, 一般不需要填写
+\KaoShiRiQi{2022年6月18日8:00-10:00} % 考试日期
+\MingTiJiaoShi{集体} % 命题教师
+\XiZhuRenQianMing{dengbing.png} % 系主任签名
+\end{lstlisting}
+其中系主任签名处需要填写相应的图片名, 若不设置或设置为空则不显示.
+
+其它选项默认均为空, 可根据需要只填部分内容.
+
+\newpage
+\tigan{三、命令}
+\begin{enumerate}
+\item \lstinline|\tigan{三、命令}| 用于生成题干, 字体相对较大, 且为黑体. 小题建议使用~{\color{blue}\lstinline|enumerate|} 环境来生成.
+\item \hspace{-8mm}\scorebox\hspace{8mm}\lstinline|\scorebox| 用于生成打分框, 请放置在答题纸一行的开头使用.
+\vspace{-2mm}
+\item \lstinline|\notice| 用于生成答题纸提示信息, 请放置在答题纸的正文开始处.
+\item 答题纸中可能需要设置一定高度的空白, 使用命令 \lstinline|\hspace{5cm}| 之类的命令即可. 也可以使用 \lstinline|\newpage| 换到新的一页(或分栏).
+\end{enumerate}
+
+\tigan{填空题相关}
+\begin{enumerate}[resume]
+\item \lstinline|\fillblank[长度][最低高度]{内容}| 用于生成填空题的空白, 内容可以为空. 其中长度默认值是~{\color{blue}{\lstinline|3.5cm|}}, 最低高度默认值是~{\color{blue}{\lstinline|1cm|}} (答题纸和参考答案)或~{\color{blue}{\lstinline|0.5cm|}} (其它).
+\end{enumerate}
+
+\textit{\color{blue}{填空题示例:}}
+\begin{lstlisting}
+\textbf{请将你的答案对应填在横线上:}
+
+\textbf{1.} \fillblank{},
+\textbf{2.} \fillblank[5cm]{},
+\textbf{3.} \fillblank{}.
+\end{lstlisting}
+
+\begin{tcolorbox}
+\textbf{请将你的答案对应填在横线上:}
+
+\textbf{1.} \fillblank[3.5cm][1cm]{},
+\textbf{2.} \fillblank[5cm][1cm]{},
+\textbf{3.} \fillblank[3.5cm][1cm]{}.
+\end{tcolorbox}
+
+\tigan{选择题相关}
+\begin{enumerate}[resume]
+\item \lstinline|\xx{选项}{选项}{选项}{选项}| 用于生成选择题的选项, 直接在选择题题干后使用即可. 该命令会自动根据选项长度设置行数. 只支持四个选项, 选项会自动带上 ABCD.
+\item 如果想要手动改变每行显示的选项数, 可使用命令 \lstinline|\xx[每行显示的选项数]{选项}{选项}{选项}{选项}|, 每行只能显示 1, 2 或 4 个选项.
+\item \lstinline|\xuanzeti{题号}{答案}| 用于生成答题纸选择题的答题区域, 或参考答案选择题的答案区域.
+\end{enumerate}
+
+\textit{\color{blue}{选择题示例:}}
+\begin{lstlisting}
+\begin{enumerate}
+\item 柳宗元的《江雪》包含下面哪一句? (~~~~)
+\xx[2]{一山鸟飞绝}{百山鸟飞绝}{千山鸟飞绝}{亿山鸟飞绝}
+\item 张志和的《渔歌子》是(~~~~).
+\xx{东塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{南塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{西塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{北塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+\end{enumerate}
+\end{lstlisting}
+
+\begin{tcolorbox}
+\begin{enumerate}
+\item 柳宗元的《江雪》包含下面哪一句? (~~~~).
+\xx[2]{一山鸟飞绝}{百山鸟飞绝}{千山鸟飞绝}{亿山鸟飞绝}
+\item 张志和的《渔歌子》是(~~~~).
+\xx{东塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{南塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{西塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+{北塞山前白鹭飞,桃花流水鳜鱼肥。青箬笠,绿蓑衣,斜风细雨不须归。}
+\end{enumerate}
+\end{tcolorbox}
+
+%\newpage
+\textit{\color{blue}{选择题示例:}}
+\begin{lstlisting}
+\textbf{请将你所选择的字母 A, B, C, D 之一对应填在下列表格里:}
+
+\xuanzeti{\textbf{题号}}{\textbf{答案}}%
+\xuanzeti{1}{}\xuanzeti{2}{}\xuanzeti{3}{}\xuanzeti{4}{}
+\end{lstlisting}
+
+\begin{tcolorbox}
+\textbf{请将你所选择的字母 A, B, C, D 之一对应填在下列表格里:}
+
+\xuanzeti{\textbf{题号}}{\textbf{答案}}%
+\xuanzeti{1}{}\xuanzeti{2}{}\xuanzeti{3}{}\xuanzeti{4}{}
+\end{tcolorbox}
+
+\newpage
+\tigan{得分点相关}
+\begin{enumerate}[resume]
+\item \lstinline|\score{数值}| 用于在参考答案一行结尾处生成得分点的虚线.\score2
+\item \lstinline|\Score{(2分, 缺少常数得1分)}| 用于自定义得分说明.\Score{(2分, 缺少常数得1分)}
+\item 在公式中也可使用, 但是需要编译两次才会正常计算出虚线长度.
+\end{enumerate}
+\textit{\color{blue}{得分点示例:}}
+\begin{lstlisting}
+\[\int e^x\diff x=e^x+C. \Score{(4分, 缺少常数得2分)}\]
+\begin{align*}
+\int\sin x\diff x&=-\cos x+C, \Score{(4分, 缺少常数得2分)}\\
+\int_0^\pi(1+\sin x)\diff x&=\pi+2. \score5
+\end{align*}
+\end{lstlisting}
+
+\begin{tcolorbox}
+\[\int e^x\diff x=e^x+C. \Score{(4分, 缺少常数得2分)}\]
+\begin{align*}
+\int\sin x\diff x&=-\cos x+C, \Score{(4分, 缺少常数得2分)}\\
+\int_0^\pi(1+\sin x)\diff x&=\pi+2. \score5
+\end{align*}
+\end{tcolorbox}
+
+\textbf{如有疑问或建议, 欢迎联系我: {\color{red}{zhangshenxing@hfut.edu.cn}} 或 {\color{blue}{QQ362037052}}.}
+
+\textbf{CTAN: \color{blue}https://www.ctan.org/pkg/hfutexam}
+
+\newpage
+\tigan{一、填空题(每题3分,共18分)}
+\begin{enumerate}
+\item 如果 $f(x)>0$ 且 $\displaystyle\lim_{x\to\infty}f(x)=0$, 则 $\displaystyle\lim_{x\to\infty}\bigl[1+f(x)\bigr]^{1/f(x)}=$\fillblank{}.
+\item 设 $y=\sin(x^2+1)$, 则 $\diff y=$\fillblank{}.
+\item 极限 $\displaystyle\lim_{n\to\infty}\left(\frac1{n^2-1}+\frac2{n^2-2}+\cdots+\frac n{n^2-n}\right)=$\fillblank{}.
+\item 曲线 $y=2\ln(x+1)$ 在点 $(1,2\ln2)$ 处的切线方程为\fillblank{}.
+\item 若 $e^{y-1}=1+xy$, 则 $\dfrac{\diff y}{\diff x}\bigg|_{x=0}=$\fillblank{}.
+\item 如果函数 $f(x)$ 的定义域是 $(0,+\infty)$, 且 $x=0$ 是曲线 $y=f(x)$ 的垂直渐近线, 那么 $\displaystyle\lim_{x\to0^+}\frac1{f(x)}=$\fillblank{}.
+\end{enumerate}
+
+\tigan{二、选择题(每题3分,共18分)}
+\begin{enumerate}
+\item 当 $x\to+\infty$ 时, $\dfrac1x$ 和(~~~~)是等价无穷小.
+% 自动根据选项长度设置行数
+\xx{$\sin\dfrac1x$}{$\sin x$}{$e^{-x}$}{$e^{1/x}$}
+\item 若当 $x\to0$ 时, $\arctan(e^x-1)\cdot(\cos x-1)$ 和 $x^n$ 是同阶无穷小, 则 $n=$(~~~~).
+\xx{$0$}{$1$}{$2$}{$3$}
+\item 设 $f(x)=\arctan\dfrac1{x(x-1)^2}$, 则 $x=0$ 是 $f(x)$ 的(~~~~).
+\xx{可去间断点}{跳跃间断点}{第二类间断点}{连续点}
+\item
+\begin{tikzpicture}[overlay,xshift=12.5cm,yshift=-3cm]
+\draw[-Stealth,thick](-3,0)--(3,0);
+\draw[-Stealth,thick](0,-0.8)--(0,2.5);
+\draw[very thick,smooth,domain=-55:55] plot ({\x/50-1.3}, {tan(\x)*tan(\x)});
+\draw[very thick,smooth,domain=0.15:2] plot ({\x}, {-ln(\x)});
+\draw
+ (-0.3,-0.3) node {$O$}
+ (2.8,-0.3) node {$x$}
+ (-0.3,2.3) node {$y$};
+\end{tikzpicture}
+设 $f(x)$ 是定义在 $(-\infty,+\infty)$ 上的连续函数, 且 $f'(x)$ 的图像如下图所示, 则 $f(x)$ 有(~~~~).
+% 手动设置为每行1个
+\xx[1]{一个极大值点,没有极小值点}{没有极大值点,一个极小值点}{一个极大值点和一个极小值点}{一个极大值点和两个极小值点}
+\newpage
+\item 设函数 $f(x)$ 在点 $x=0$ 处可导, 且 $f(0)=0$, 则 $\displaystyle\lim_{x\to0}\frac{f(x^{2022})+x^{2021}f(x)}{x^{2022}}=$(~~~~).
+\xx{$0$}{$f'(0)$}{$2f'(0)$}{$2022f'(0)$}
+\item 如果点 $(x_0,y_0)$ 是曲线 $y=f(x)$ 的拐点, 则 $f''(x_0)=$(~~~~).
+\xx{$0$}{$\infty$}{不存在}{$0$ 或不存在}
+\end{enumerate}
+
+\tigan{三、解答题(每题8分,共64分)}
+\begin{enumerate}
+\item 求极限 $\displaystyle\lim_{x\to-1}\frac{x^2-1}{x^2+3x+2}$.
+\item 求极限 $\displaystyle\lim_{x\to0}\frac{e^x-1-x}{\arcsin x^2}$.
+\item 设 $\begin{cases}x=t^2+t&\\y=t^3+t&\end{cases}$, 求 $\dfrac{\diff y}{\diff x}$ 和 $\dfrac{\diff^2 y}{\diff x^2}$.
+\item 设 $f(x)=\begin{cases}x\arctan\dfrac1x,&x<0,\\x^2+ax+b,&x\ge0.\end{cases}$
+求常数 $a,b$ 使得函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 并求出此时曲线 $y=f(x)$ 的渐近线.
+\item 求函数 $f(x)=x^3-x^2-x$ 在区间 $[-2,2]$ 上的最大值和最小值.
+\item 证明: 当 $-\dfrac\pi2<x_1<x_2<\dfrac\pi2$ 时, $\tan x_2-\tan x_1\ge x_2-x_1$.
+\item 设函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 且 $f(1)=0$.
+证明: 存在 $\xi\in(0,1)$ 使得 $\xi f'(\xi)+2022f(\xi)=0$.
+\item 设函数 $f(x)=\ln x+\dfrac2{x^2}, x\in(0,+\infty)$. 求
+\begin{enumerate}
+\item[(1)] 函数 $f(x)$ 的增减区间及极值;
+\item[(2)] 曲线 $y=f(x)$ 的凹凸区间及拐点.
+\end{enumerate}
+\end{enumerate}
+
+\end{document}
+
+
+
+
diff --git a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf
new file mode 100644
index 0000000000..3776c11ac8
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.pdf
Binary files differ
diff --git a/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex
new file mode 100644
index 0000000000..f9f20890d5
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_cankaodaan.tex
@@ -0,0 +1,158 @@
+\documentclass[cankaodaan]{hfutexam}
+\usepackage{extarrows}
+\newcommand{\diff}{\,\mathrm{d}}
+
+\begin{document}
+\BiaoTi{合肥工业大学试卷参考答案(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+%\XiZhuRenQianMing{dengbing.png}
+
+\tigan{一、填空题(每小题3分,共18分)}
+
+\textbf{请将你的答案对应填在横线上:}
+
+\textbf{1.} \fillblank{$e$},
+\textbf{2.} \fillblank{$2x\cos(x^2+1)\diff x$},
+\textbf{3.} \fillblank{$\dfrac12$},
+
+\textbf{4.} \fillblank{$y=x-1+2\ln 2$},
+\textbf{5.} \fillblank{$1$},
+\textbf{6.} \fillblank{$0$}.
+
+\tigan{二、选择题(每小题3分,共18分)}
+
+\textbf{请将你所选择的字母 A, B, C, D 之一对应填在下列表格里:}
+
+\xuanzeti{\textbf{题号}}{\textbf{答案}}%
+\xuanzeti{1}{A}%
+\xuanzeti{2}{D}%
+\xuanzeti{3}{B}%
+\xuanzeti{4}{A}%
+\xuanzeti{5}{C}%
+\xuanzeti{6}{D}
+
+\tigan{三、解答题(每小题8分,共64分)}
+% 得分点命令 \score1, 得分点长度是自动的
+% \Score{(2分, 缺少常数得1分)} 用于自定义得分说明
+
+\textbf{1. (8分)【解】}
+\begin{align*}
+\lim_{x\to-1}\frac{x^2-1}{x^2+3x+2}&=\lim_{x\to-1}\frac{(x-1)(x+1)}{(x+2)(x+1)} \score3\\
+&=\lim_{x\to-1}\frac{x-1}{x+2} \score3\\
+&=\frac{-2}1=-2. \score2
+\end{align*}
+
+\textbf{2. (8分)【解】}
+\begin{align*}
+\lim_{x\to0}\frac{e^x-1-x}{\arcsin x^2}&=\lim_{x\to0}\frac{e^x-1-x}{x^2} \score3\\
+&\xlongequal{\text{洛必达}}\lim_{x\to0}\frac{e^x-1}{2x} \score3\\
+&=\lim_{x\to0}\frac{x}{2x}=\frac12. \score2
+\end{align*}
+
+\newpage
+
+\textbf{3. (8分)【解】}
+\begin{align*}
+\frac{\diff y}{\diff x}&=\frac{\diff y/\diff t}{\diff x/\diff t} \score2\\
+&=\frac{3t^2+1}{2t+1}, \score2\\
+\frac{\diff^2 y}{\diff x^2}&=\frac{\diff y'/\diff t}{\diff x/\diff t} \score2\\
+&=\frac{6t(2t+1)-(3t^2+1)2}{(2t+1)^3}=\frac{6t^2+6t-2}{(2t+1)^3}. \score2
+\end{align*}
+
+\textbf{4. (8分)【解】}
+
+\indent 由于 $f(x)$ 在 $x=0$ 处连续, 因此
+\begin{align*}
+f(0)&=f(0^+) \score1\\
+ &=b=\lim_{x\to0^-}x\arctan\frac1x=0\times\left(-\frac\pi2\right)=0. \score1
+\end{align*}
+
+\indent 由于 $f(x)$ 在 $x=0$ 处可导, 因此
+\begin{align*}
+f'_-(0)&=f'_+(0), \score1\\
+f'_-(0)&=\lim_{x\to0^-}\frac{x\arctan\frac1x}x=\lim_{x\to0^-}\arctan\frac1x=-\frac\pi2 \score1\\
+f'_+(0)&=(2x+a)|_{x=0}=a, \score1
+\end{align*}
+因此 $a=-\dfrac\pi2$. \score1
+
+\indent 由于
+\begin{align*}
+\lim_{x\to+\infty}\frac yx&=\lim_{x\to+\infty}\left(x-\frac\pi2\right)=+\infty, \score1\\
+\lim_{x\to-\infty}\frac yx&=\lim_{x\to-\infty}\arctan\frac1x=0,\\
+\lim_{x\to-\infty}y&=\lim_{x\to-\infty}x\arctan\frac1x=\lim_{t\to0^-}\frac{\arctan t}t=1,
+\end{align*}
+因此曲线 $y=f(x)$ 的渐近线只有 $y=1$. \score1
+
+\newpage
+
+\textbf{5. (8分)【解】}
+
+\indent 由
+\[f'(x)=3x^2-2x-1=(3x+1)(x-1)=0 \score2\]
+可得驻点 $x=-\dfrac13,1$. \score2
+
+\indent 由于
+\[f(-2)=-10,\quad f(2)=2,\quad f\left(-\frac13\right)=\frac5{27},\quad f(1)=-1, \score2\]
+因此最大值为 $2$, 最小值为 $-10$. \score2
+
+\textbf{6. (8分)【证明】}
+
+\textbf{证法一}: 设 $f(x)=\tan x-x$, 则 \score2
+\begin{align*}
+f'(x)=\frac1{\cos^2x}-1=\tan^2x\ge0. \score2
+\end{align*}
+因此 $f(x)$ 在 $\left(-\dfrac\pi2,\dfrac\pi2\right)$ 上单调递增, 从而 \score2
+\begin{align*}
+f(x_2)\ge f(x_1),\quad\tan x_2-\tan x_1\ge x_2-x_1. \score2
+\end{align*}
+
+\textbf{证法二}: 设 $f(x)=\tan x$, 则 $f(x)$ 在 $[x_1,x_2]$ 上连续, $(x_1,x_2)$ 内可导. \score2
+
+\indent 由拉格朗日中值定理, 存在 $\xi\in(x_1,x_2)$ 使得
+\begin{align*}
+\frac{f(x_2)-f(x_1)}{x_2-x_1}=f'(\xi), \score2
+\end{align*}
+即
+\begin{align*}
+\frac{\tan x_2-\tan x_1}{x_2-x_1}=\frac1{\cos^2\xi}\ge1. \score2
+\end{align*}
+所以 $\tan x_2-\tan x_1\ge x_2-x_1$. \score2
+\newpage
+
+\textbf{7. (8分)【证明】}
+
+\indent 设 $F(x)=x^{2022}f(x)$, \score2\\
+则 $F(x)$ 在 $[0,1]$ 上连续, $(0,1)$ 内可导, \score1\\
+且 $F(0)=0,F(1)=f(1)=0$. \score1
+
+\indent 由罗尔中值定理, 存在 $\xi\in(0,1)$ 使得 $F'(\xi)=0$. \score2\\
+由于 $F'(x)=x^{2022}f'(x)+2022x^{2021}f(x)$ 且 $\xi\neq0$, \score1\\
+所以 $\xi f'(\xi)+2022f(\xi)=1$. \score1
+
+
+\textbf{8. (8分)【解】}
+
+(1)
+\[f'(x)=\frac1x-\frac4{x^3}=\frac{x^2-4}{x^3}=\frac{(x+2)(x-2)}{x^3}. \score1\]
+当 $0<x<2$ 时, $f'(x)<0$. 当 $x>2$ 时, $f'(x)>0$. \score1\\
+因此 $(0,2]$ 是 $f(x)$ 的单减区间, $[2,+\infty)$ 是 $f(x)$ 的单增区间. \Score{(1分, 写成开区间不扣分)}\\
+所以 $f(x)$ 只有唯一的极小值 $f(2)=\ln2+\dfrac12$. \score1
+
+(2)
+\[f''(x)=-\frac1{x^2}+\frac{12}{x^4}=-\frac{x^2-12}{x^4}=-\frac{(x-2\sqrt3)(x+2\sqrt3)}{x^4}. \score1\]
+当 $0<x<2\sqrt3$ 时, $f''(x)>0$. 当 $x>2\sqrt3$ 时, $f''(x)<0$. \score1\\
+因此 $(0,2\sqrt3]$ 是曲线 $y=f(x)$ 的凹区间, \\
+$[2\sqrt3,+\infty)$ 是曲线 $y=f(x)$ 的凸区间, \Score{(1分, 写成开区间不扣分)}\\
+拐点为 $\left(2\sqrt3,\ln(2\sqrt3)+\dfrac16\right)$. \score1
+
+\end{document}
+
diff --git a/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf b/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf
new file mode 100644
index 0000000000..ad9dc41ade
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_datizhi.pdf
Binary files differ
diff --git a/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex b/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex
new file mode 100644
index 0000000000..d5ad8907e4
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_datizhi.tex
@@ -0,0 +1,73 @@
+\documentclass[datizhi]{hfutexam}
+\newcommand{\diff}{\,\mathrm{d}}
+
+\begin{document}
+\BiaoTi{合肥工业大学考试专用答卷纸(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+%\XiZhuRenQianMing{dengbing.png}
+
+
+\notice
+
+%\scorebox 为打分框, 必须放在行首
+\scorebox\tigan{一、填空题(每小题3分,共18分)}
+
+\textbf{请将你的答案对应填在横线上:}
+
+\textbf{1.} \fillblank{},
+\textbf{2.} \fillblank{},
+\textbf{3.} \fillblank{},
+
+\textbf{4.} \fillblank{},
+\textbf{5.} \fillblank{},
+\textbf{6.} \fillblank{}.
+
+\scorebox\tigan{二、选择题(每小题3分,共18分)}
+
+\textbf{请将你所选择的字母 A, B, C, D 之一对应填在下列表格里:}
+
+\xuanzeti{\textbf{题号}}{\textbf{答案}}%
+\xuanzeti{1}{}%
+\xuanzeti{2}{}%
+\xuanzeti{3}{}%
+\xuanzeti{4}{}%
+\xuanzeti{5}{}%
+\xuanzeti{6}{}
+
+\tigan{三、解答题(每小题8分,共64分)}
+
+\scorebox\textbf{1. (8分)【解】}
+% \vspace 用于生成一定高度的空白, \newpage 直接换页
+\vspace{3cm}
+
+\scorebox\textbf{2. (8分)【解】}
+\newpage
+
+\scorebox\textbf{3. (8分)【解】}
+\vspace{7cm}
+
+\scorebox\textbf{4. (8分)【解】}
+\newpage
+
+\scorebox\textbf{5. (8分)【解】}
+\vspace{7cm}
+
+\scorebox\textbf{6. (8分)【证明】}
+\newpage
+
+\scorebox\textbf{7. (8分)【证明】}
+\vspace{7cm}
+
+\scorebox\textbf{8. (8分)【解】}
+
+\end{document}
+
diff --git a/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf b/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf
new file mode 100644
index 0000000000..97f57ce402
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_shijuan.pdf
Binary files differ
diff --git a/macros/latex/contrib/hfutexam/hfutexam_shijuan.tex b/macros/latex/contrib/hfutexam/hfutexam_shijuan.tex
new file mode 100644
index 0000000000..e4a5617329
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_shijuan.tex
@@ -0,0 +1,82 @@
+\documentclass{hfutexam}
+\newcommand{\diff}{\,\mathrm{d}}
+\usetikzlibrary{arrows.meta, overlay-beamer-styles}
+
+\begin{document}
+\BiaoTi{合肥工业大学试卷(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+\XiZhuRenQianMing{}
+% \XiZhuRenQianMing{dengbing.png}
+
+\tigan{一、填空题(每题3分,共18分)}
+\begin{enumerate}
+\item 如果 $f(x)>0$ 且 $\displaystyle\lim_{x\to\infty}f(x)=0$, 则 $\displaystyle\lim_{x\to\infty}\bigl[1+f(x)\bigr]^{1/f(x)}=$\fillblank{}.
+\item 设 $y=\sin(x^2+1)$, 则 $\diff y=$\fillblank{}.
+\item 极限 $\displaystyle\lim_{n\to\infty}\left(\frac1{n^2-1}+\frac2{n^2-2}+\cdots+\frac n{n^2-n}\right)=$\fillblank{}.
+\item 曲线 $y=2\ln(x+1)$ 在点 $(1,2\ln2)$ 处的切线方程为\fillblank{}.
+\item 若 $e^{y-1}=1+xy$, 则 $\dfrac{\diff y}{\diff x}\bigg|_{x=0}=$\fillblank{}.
+\item 如果函数 $f(x)$ 的定义域是 $(0,+\infty)$, 且 $x=0$ 是曲线 $y=f(x)$ 的垂直渐近线, 那么 $\displaystyle\lim_{x\to0^+}\frac1{f(x)}=$\fillblank{}.
+\end{enumerate}
+
+\tigan{二、选择题(每题3分,共18分)}
+\begin{enumerate}
+\item 当 $x\to+\infty$ 时, $\dfrac1x$ 和(~~~~)是等价无穷小.
+% 自动根据选项长度设置行数
+\xx{$\sin\dfrac1x$}{$\sin x$}{$e^{-x}$}{$e^{1/x}$}
+\item 若当 $x\to0$ 时, $\arctan(e^x-1)\cdot(\cos x-1)$ 和 $x^n$ 是同阶无穷小, 则 $n=$(~~~~).
+\xx{$0$}{$1$}{$2$}{$3$}
+\item 设 $f(x)=\arctan\dfrac1{x(x-1)^2}$, 则 $x=0$ 是 $f(x)$ 的(~~~~).
+\xx{可去间断点}{跳跃间断点}{第二类间断点}{连续点}
+\item
+\begin{tikzpicture}[overlay,xshift=13cm,yshift=-3.5cm]
+\draw[-Stealth,thick](-3,0)--(3,0);
+\draw[-Stealth,thick](0,-1)--(0,3);
+\draw[very thick,smooth,domain=-55:55] plot ({\x/50-1.3}, {tan(\x)*tan(\x)});
+\draw[very thick,smooth,domain=0.15:2] plot ({\x}, {-ln(\x)});
+\draw
+ (-0.3,-0.3) node {$O$}
+ (2.8,-0.3) node {$x$}
+ (-0.3,2.8) node {$y$};
+\end{tikzpicture}
+设 $f(x)$ 是定义在 $(-\infty,+\infty)$ 上的连续函数, 且 $f'(x)$ 的图像如下图所示, 则 $f(x)$ 有(~~~~).
+% 手动设置为每行1个
+\xx[1]{一个极大值点,没有极小值点}{没有极大值点,一个极小值点}{一个极大值点和一个极小值点}{一个极大值点和两个极小值点}
+\newpage
+\item 设函数 $f(x)$ 在点 $x=0$ 处可导, 且 $f(0)=0$, 则 $\displaystyle\lim_{x\to0}\frac{f(x^{2022})+x^{2021}f(x)}{x^{2022}}=$(~~~~).
+\xx{$0$}{$f'(0)$}{$2f'(0)$}{$2022f'(0)$}
+\item 如果点 $(x_0,y_0)$ 是曲线 $y=f(x)$ 的拐点, 则 $f''(x_0)=$(~~~~).
+\xx{$0$}{$\infty$}{不存在}{$0$ 或不存在}
+\end{enumerate}
+
+\tigan{三、解答题(每题8分,共64分)}
+\begin{enumerate}
+\item 求极限 $\displaystyle\lim_{x\to-1}\frac{x^2-1}{x^2+3x+2}$.
+\item 求极限 $\displaystyle\lim_{x\to0}\frac{e^x-1-x}{\arcsin x^2}$.
+\item 设 $\begin{cases}x=t^2+t&\\y=t^3+t&\end{cases}$, 求 $\dfrac{\diff y}{\diff x}$ 和 $\dfrac{\diff^2 y}{\diff x^2}$.
+\item 设 $f(x)=\begin{cases}x\arctan\dfrac1x,&x<0,\\x^2+ax+b,&x\ge0.\end{cases}$
+求常数 $a,b$ 使得函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 并求出此时曲线 $y=f(x)$ 的渐近线.
+\item 求函数 $f(x)=x^3-x^2-x$ 在区间 $[-2,2]$ 上的最大值和最小值.
+\item 证明: 当 $-\dfrac\pi2<x_1<x_2<\dfrac\pi2$ 时, $\tan x_2-\tan x_1\ge x_2-x_1$.
+\item 设函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 且 $f(1)=0$.
+证明: 存在 $\xi\in(0,1)$ 使得 $\xi f'(\xi)+2022f(\xi)=0$.
+\item 设函数 $f(x)=\ln x+\dfrac2{x^2}, x\in(0,+\infty)$.
+\begin{enumerate}
+\item[(1)] 函数 $f(x)$ 的增减区间及极值;
+\item[(2)] 曲线 $y=f(x)$ 的凹凸区间及拐点.
+\end{enumerate}
+\end{enumerate}
+
+\end{document}
+
+
+
+
diff --git a/macros/latex/contrib/hfutexam/hfutexam_simple.pdf b/macros/latex/contrib/hfutexam/hfutexam_simple.pdf
new file mode 100644
index 0000000000..18b857b946
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_simple.pdf
Binary files differ
diff --git a/macros/latex/contrib/hfutexam/hfutexam_simple.tex b/macros/latex/contrib/hfutexam/hfutexam_simple.tex
new file mode 100644
index 0000000000..54175ece65
--- /dev/null
+++ b/macros/latex/contrib/hfutexam/hfutexam_simple.tex
@@ -0,0 +1,260 @@
+\documentclass[simple]{hfutexam}
+\newcommand{\diff}{\,\mathrm{d}}
+\usetikzlibrary{arrows.meta, overlay-beamer-styles}
+\RequirePackage{extarrows}
+
+\begin{document}
+\BiaoTi{合肥工业大学期中试卷}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年5月13日8:00-10:00}
+\MingTiJiaoShi{集体}
+\maketitle
+
+\begin{enumerate}
+\item \textbf{(10分)} 求函数 $\displaystyle f(x)=\ln\frac1{\sqrt{x^2-1}}+\arctan\frac1x$ 的定义域.
+\item \textbf{(5分)} 求函数 $\displaystyle y=\begin{cases}
+1/x,&x<0,\\1,&x=0,\\1+e^{-x},&x>0\end{cases}$ 的反函数.
+\item \textbf{(10分)} 求极限 $\displaystyle\lim_{x\to0^-}(1-x)^{1/x}$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{x\to-2}\frac{x^2-4}{x^3+8}$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{x\to0}\frac{\sin(e^{-x}-1)}{\arctan(1-\cos x)}$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{x\to0}\frac{\sqrt{1+2x-x^2}-\sqrt{1-2x+x^2}}x$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{x\to\infty}\left(\cos\frac1x\right)^{\frac1{\ln(1+x^2)-2\ln x}}$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{x\to\infty}\left(\frac\pi{e^x-1}-\arctan\frac x2\right)$.
+\item \textbf{(5分)} 求极限 $\displaystyle\lim_{n\to\infty}\left(\frac1{n^2+2}+\frac2{n^2+4}+\cdots+\frac n{n^2+2n}\right)$.
+\item \textbf{(5分)} 设 $a_1=4,a_{n+1}=\sqrt{a_n+6}$, 证明 $\displaystyle\lim_{n\to\infty}a_n$ 存在并求之.
+\item \textbf{(10分)} 证明 $e^x+x=4$ 在 $(0,+\infty)$ 内有零点.
+\item \textbf{(5分)} 设函数 $f(x)$ 在 $[-1,1]$ 上连续, 且 $f(-1)\le1\le f(1)$. 证明存在 $\xi\in[-1,1]$, 使得 $f(\xi)=\xi^2$.
+\item \textbf{(10分)} 求 $y=e^{x+1}\sin x-e^2\sin1$ 的导数.
+\item \textbf{(5分)} 求 $y=\arctan e^x$ 的导数.
+\item \textbf{(5分)} 求曲线 $y=\tan x$ 在点 $\left(-\dfrac\pi4,-1\right)$ 处的切线方程和法线方程.
+\item \textbf{(5分)} 设
+$\displaystyle f(x)=\begin{cases}\dfrac{e^{3x}-1}{\arctan x},&x<0,\\2x+a,&x\ge0\end{cases}$
+在 $x=0$ 处连续, 求常数 $a$.
+\end{enumerate}
+\newpage
+
+\BiaoTi{合肥工业大学试卷(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+\maketitle
+
+\tigan{一、填空题(每题3分,共18分)}
+\begin{enumerate}
+\item 如果 $f(x)>0$ 且 $\displaystyle\lim_{x\to\infty}f(x)=0$, 则 $\displaystyle\lim_{x\to\infty}\bigl[1+f(x)\bigr]^{1/f(x)}=$\fillblank{}.
+\item 设 $y=\sin(x^2+1)$, 则 $\diff y=$\fillblank{}.
+\item 极限 $\displaystyle\lim_{n\to\infty}\left(\frac1{n^2-1}+\frac2{n^2-2}+\cdots+\frac n{n^2-n}\right)=$\fillblank{}.
+\item 曲线 $y=2\ln(x+1)$ 在点 $(1,2\ln2)$ 处的切线方程为\fillblank{}.
+\item 若 $e^{y-1}=1+xy$, 则 $\dfrac{\diff y}{\diff x}\bigg|_{x=0}=$\fillblank{}.
+\item 如果函数 $f(x)$ 的定义域是 $(0,+\infty)$, 且 $x=0$ 是曲线 $y=f(x)$ 的垂直渐近线, 那么 $\displaystyle\lim_{x\to0^+}\frac1{f(x)}=$\fillblank{}.
+\end{enumerate}
+
+\tigan{二、选择题(每题3分,共18分)}
+\begin{enumerate}
+\item 当 $x\to+\infty$ 时, $\dfrac1x$ 和(~~~~)是等价无穷小.
+\xx{$\sin\dfrac1x$}{$\sin x$}{$e^{-x}$}{$e^{1/x}$}
+\item 若当 $x\to0$ 时, $\arctan(e^x-1)\cdot(\cos x-1)$ 和 $x^n$ 是同阶无穷小, 则 $n=$(~~~~).
+\xx{$0$}{$1$}{$2$}{$3$}
+\item 设 $f(x)=\arctan\dfrac1{x(x-1)^2}$, 则 $x=0$ 是 $f(x)$ 的(~~~~).
+\xx{可去间断点}{跳跃间断点}{第二类间断点}{连续点}
+\item
+\begin{tikzpicture}[overlay,xshift=12cm,yshift=-3cm]
+\draw[-Stealth,thick](-3,0)--(3,0);
+\draw[-Stealth,thick](0,-0.8)--(0,2.5);
+\draw[very thick,smooth,domain=-55:55] plot ({\x/50-1.3}, {tan(\x)*tan(\x)});
+\draw[very thick,smooth,domain=0.15:2] plot ({\x}, {-ln(\x)});
+\draw
+ (-0.3,-0.3) node {$O$}
+ (2.8,-0.3) node {$x$}
+ (-0.3,2.3) node {$y$};
+\end{tikzpicture}
+设 $f(x)$ 是定义在 $(-\infty,+\infty)$ 上的连续函数, 且 $f'(x)$ 的图像如下图所示, 则 $f(x)$ 有(~~~~).
+\xx[1]{一个极大值点,没有极小值点}{没有极大值点,一个极小值点}{一个极大值点和一个极小值点}{一个极大值点和两个极小值点}
+\item 设 $f(x)$ 在点 $x=0$ 处可导, 且 $f(0)=0$, 则 $\displaystyle\lim_{x\to0}\frac{f(x^{2022})+x^{2021}f(x)}{x^{2022}}=$(~~~~).
+\xx{$0$}{$f'(0)$}{$2f'(0)$}{$2022f'(0)$}
+\item 如果点 $(x_0,y_0)$ 是曲线 $y=f(x)$ 的拐点, 则 $f''(x_0)=$(~~~~).
+\xx{$0$}{$\infty$}{不存在}{$0$ 或不存在}
+\end{enumerate}
+
+\tigan{三、解答题(每题8分,共64分)}
+\begin{enumerate}
+\item 求极限 $\displaystyle\lim_{x\to-1}\frac{x^2-1}{x^2+3x+2}$.
+\item 求极限 $\displaystyle\lim_{x\to0}\frac{e^x-1-x}{\arcsin x^2}$.
+\item 设 $\begin{cases}x=t^2+t&\\y=t^3+t&\end{cases}$, 求 $\dfrac{\diff y}{\diff x}$ 和 $\dfrac{\diff^2 y}{\diff x^2}$.
+\item 设 $f(x)=\begin{cases}x\arctan\dfrac1x,&x<0,\\x^2+ax+b,&x\ge0.\end{cases}$
+求常数 $a,b$ 使得函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 并求出此时曲线 $y=f(x)$ 的渐近线.
+\item 求函数 $f(x)=x^3-x^2-x$ 在区间 $[-2,2]$ 上的最大值和最小值.
+\item 证明: 当 $-\dfrac\pi2<x_1<x_2<\dfrac\pi2$ 时, $\tan x_2-\tan x_1\ge x_2-x_1$.
+\item 设函数 $f(x)$ 在 $(-\infty,+\infty)$ 内可导, 且 $f(1)=0$.
+证明: 存在 $\xi\in(0,1)$ 使得 $\xi f'(\xi)+2022f(\xi)=0$.
+\item 设函数 $f(x)=\ln x+\dfrac2{x^2}, x\in(0,+\infty)$. 求
+\begin{enumerate}
+\item[(1)] 函数 $f(x)$ 的增减区间及极值;
+\item[(2)] 曲线 $y=f(x)$ 的凹凸区间及拐点.
+\end{enumerate}
+\end{enumerate}
+
+\newpage
+\BiaoTi{合肥工业大学试卷参考答案(A)}
+\XueNian{2021}{2022}
+\XueQi{二}
+\KeChengDaiMa{034Y01}
+\KeChengMingCheng{数学(下)}
+\XueFen{5}
+\KeChengXingZhi{必修}
+\KaoShiXingShi{闭卷}
+\ZhuanYeBanJi{少数民族预科班}
+\KaoShiRiQi{2022年6月18日8:00-10:00}
+\MingTiJiaoShi{集体}
+\maketitle
+
+\tigan{一、填空题(每小题3分,共18分)}
+
+\textbf{请将你的答案对应填在横线上:}
+
+\textbf{1.} \fillblank{$e$},
+\textbf{2.} \fillblank{$2x\cos(x^2+1)\diff x$},
+\textbf{3.} \fillblank{$\dfrac12$}, \\
+\textbf{4.} \fillblank{$y=x-1+2\ln 2$},
+\textbf{5.} \fillblank{$1$},
+\textbf{6.} \fillblank{$0$}.
+
+\tigan{二、选择题(每小题3分,共18分)}
+
+\textbf{请将你所选择的字母 A, B, C, D 之一对应填在下列表格里:}
+
+\xuanzeti{\textbf{题号}}{\textbf{答案}}%
+\xuanzeti{1}{A}%
+\xuanzeti{2}{D}%
+\xuanzeti{3}{B}%
+\xuanzeti{4}{A}%
+\xuanzeti{5}{C}%
+\xuanzeti{6}{D}
+
+\tigan{三、解答题(每小题8分,共64分)}
+
+\textbf{1. (8分)【解】}
+\vspace{-\baselineskip}
+
+\begin{align*}
+\lim_{x\to-1}\frac{x^2-1}{x^2+3x+2}&=\lim_{x\to-1}\frac{(x-1)(x+1)}{(x+2)(x+1)} \score3\\
+&=\lim_{x\to-1}\frac{x-1}{x+2} \score3\\
+&=\frac{-2}1=-2. \score2
+\end{align*}
+
+\textbf{2. (8分)【解】}
+\vspace{-\baselineskip}
+
+\begin{align*}
+\lim_{x\to0}\frac{e^x-1-x}{\arcsin x^2}&=\lim_{x\to0}\frac{e^x-1-x}{x^2} \score3\\
+&\xlongequal[]{\text{洛必达}}\lim_{x\to0}\frac{e^x-1}{2x} \score3\\
+&=\lim_{x\to0}\frac{x}{2x}=\frac12. \score2
+\end{align*}
+
+\textbf{3. (8分)【解】}
+\vspace{-\baselineskip}
+
+\begin{align*}
+\frac{\diff y}{\diff x}&=\frac{\diff y/\diff t}{\diff x/\diff t} \score2\\
+&=\frac{3t^2+1}{2t+1}, \score2\\
+\frac{\diff^2 y}{\diff x^2}&=\frac{\diff y'/\diff t}{\diff x/\diff t} \score2\\
+&=\frac{6t(2t+1)-(3t^2+1)2}{(2t+1)^3}=\frac{6t^2+6t-2}{(2t+1)^3}. \score2
+\end{align*}
+
+\newpage
+\textbf{4. (8分)【解】}
+
+\indent 由于 $f(x)$ 在 $x=0$ 处连续, 因此
+\begin{align*}
+f(0)&=f(0^+) \score1\\
+&=b=\lim_{x\to0^-}x\arctan\frac1x=0\times\left(-\frac\pi2\right)=0. \score1
+\end{align*}
+
+\indent 由于 $f(x)$ 在 $x=0$ 处可导, 因此
+\begin{align*}
+f'_-(0)&=f'_+(0), \score1\\
+f'_-(0)&=\lim_{x\to0^-}\frac{x\arctan\frac1x}x=\lim_{x\to0^-}\arctan\frac1x=-\frac\pi2 \score1\\
+f'_+(0)&=(2x+a)|_{x=0}=a, \score1
+\end{align*}
+因此 $a=-\dfrac\pi2$. \score1
+
+\indent 由于
+\begin{align*}
+\lim_{x\to+\infty}\frac yx&=\lim_{x\to+\infty}\left(x-\frac\pi2\right)=+\infty, \score1\\
+\lim_{x\to-\infty}\frac yx&=\lim_{x\to-\infty}\arctan\frac1x=0,\\
+\lim_{x\to-\infty}y&=\lim_{x\to-\infty}x\arctan\frac1x=\lim_{t\to0^-}\frac{\arctan t}t=1,
+\end{align*}
+因此曲线 $y=f(x)$ 的渐近线只有 $y=1$. \score1
+
+\textbf{5. (8分)【解】}
+
+\indent 由
+\[f'(x)=3x^2-2x-1=(3x+1)(x-1)=0 \score2\]
+可得驻点 $x=-\dfrac13,1$. \score2
+
+\indent 由于
+\[f(-2)=-10,\quad f(2)=2,\quad f\left(-\frac13\right)=\frac5{27},\quad f(1)=-1, \score2\]
+因此最大值为 $2$, 最小值为 $-10$. \score2
+
+\textbf{6. (8分)【证明】}
+
+\textbf{证法一}: 设 $f(x)=\tan x-x$, 则 \score2
+\[f'(x)=\frac1{\cos^2x}-1=\tan^2x\ge0. \score2\]
+因此 $f(x)$ 在 $\left(-\dfrac\pi2,\dfrac\pi2\right)$ 上单调递增, 从而 \score2
+\[f(x_2)\ge f(x_1),\quad\tan x_2-\tan x_1\ge x_2-x_1. \score2\]
+
+\newpage
+\textbf{证法二}: 设 $f(x)=\tan x$, 则 $f(x)$ 在 $[x_1,x_2]$ 上连续, $(x_1,x_2)$ 内可导. \score2
+
+\indent 由拉格朗日中值定理, 存在 $\xi\in(x_1,x_2)$ 使得
+\[\frac{f(x_2)-f(x_1)}{x_2-x_1}=f'(\xi), \score2\]
+即
+\[\frac{\tan x_2-\tan x_1}{x_2-x_1}=\frac1{\cos^2\xi}\ge1. \score2\]
+所以 $\tan x_2-\tan x_1\ge x_2-x_1$. \score2
+
+\textbf{7. (8分)【证明】}
+
+\indent 设 $F(x)=x^{2022}f(x)$, \score2\\
+则 $F(x)$ 在 $[0,1]$ 上连续, $(0,1)$ 内可导, \score1\\
+且 $F(0)=0,F(1)=f(1)=0$. \score1
+
+\indent 由罗尔中值定理, 存在 $\xi\in(0,1)$ 使得 $F'(\xi)=0$. \score2\\
+由于 $F'(x)=x^{2022}f'(x)+2022x^{2021}f(x)$ 且 $\xi\neq0$, \score1\\
+所以 $\xi f'(\xi)+2022f(\xi)=1$. \score1
+
+
+\textbf{8. (8分)【解】}
+
+(1)
+\[f'(x)=\frac1x-\frac4{x^3}=\frac{x^2-4}{x^3}=\frac{(x+2)(x-2)}{x^3}. \score1\]
+当 $0<x<2$ 时, $f'(x)<0$. 当 $x>2$ 时, $f'(x)>0$. \score1\\
+因此 $(0,2]$ 是 $f(x)$ 的单减区间,\\
+$[2,+\infty)$ 是 $f(x)$ 的单增区间. \Score{(1分, 写成开区间不扣分)}\\
+所以 $f(x)$ 只有唯一的极小值 $f(2)=\ln2+\dfrac12$. \score1
+
+(2)
+\[f''(x)=-\frac1{x^2}+\frac{12}{x^4}=-\frac{x^2-12}{x^4}=-\frac{(x-2\sqrt3)(x+2\sqrt3)}{x^4}. \score1\]
+当 $0<x<2\sqrt3$ 时, $f''(x)>0$. 当 $x>2\sqrt3$ 时, $f''(x)<0$. \score1\\
+因此 $(0,2\sqrt3]$ 是曲线 $y=f(x)$ 的凹区间,\\
+$[2\sqrt3,+\infty)$ 是曲线 $y=f(x)$ 的凸区间,\Score{(1分, 写成开区间不扣分)}\\
+拐点为 $\left(2\sqrt3,\ln(2\sqrt3)+\dfrac16\right)$. \score1
+
+\end{document}
+
+
+
+
diff --git a/macros/latex/contrib/mathfont/README.txt b/macros/latex/contrib/mathfont/README.txt
index 9cffe034ce..99ed16767f 100644
--- a/macros/latex/contrib/mathfont/README.txt
+++ b/macros/latex/contrib/mathfont/README.txt
@@ -1,35 +1,58 @@
-LaTeX package mathfont version 2.1 installation information.
+LaTeX package mathfont version 2.2 installation information,
+released December 2022.
-This file is README.txt from version 2.1 of the free and
+This file is README.txt from version 2.2 of the free and
open-source LaTeX package "mathfont," to be used with the
XeTeX or LuaTeX engines. The package is designed to adapt
text fonts for use in math mode, and if you typeset your
document with LuaLaTeX, mathfont adds resizable delimiters,
big operators, and a MathConstants table to your font.
-Besides this file, the installation contains the following
+*********************************************************
+
+To install mathfont automatically, update your TeXLive or
+MacTeX distribution or use a package manager such as tlmgr.
+
+To install mathfont manually, you need to generate the
+package file mathfont.sty from mathfont.dtx. You can do
+this in two ways:
+
+ (1) Running Plain TeX on mathfont_code.dtx will create
+ mathfont.sty as well as several other tex files
+ that can be used for typesetting documentation.
+
+ (2) Running LaTeX on mathfont_code.dtx will produce the
+ files listed in point (1) including mathfont.sty as
+ well as mathfont_code.pdf.
+
+Once you have created mathfont.sty, you should move it
+into a directory searchable by TeX to complete the
+installation.
+
+*********************************************************
+
+Besides this README, the installation contains the following
items:
- (1) mathfont_code.dtx: the primary file. Run this file
- through LaTeX to generate mathfont.sty and complete
- the installation.
+ (1) mathfont_code.dtx: the primary file. See above for
+ instructions to generate mathfont.sty from this file
+ and complete the installation.
(2) mathfont_code.pdf: documentation of the package code.
- (3) mathfont_symbol_list.pdf: a list of symbols that
+ (3) mathfont_symbol_list.pdf: a list of symbols that
mathfont provides access to.
(4) mathfont_user_guide.pdf: a user guide.
(5) four files called mathfont_example_<fontname>.pdf:
- example files showing mathfont in action.
+ examples of mathfont in action.
-To install mathfont automatically, update your TeXLive or
-MacTeX distribution or use a package manager such as tlmgr.
-To install mathfont manually, run mathfont_code.dtx through
-LaTeX. Doing so will create the file mathfont.sty, and you
-should then move mathfont.sty into a directory searchable
-by TeX.
+Typesetting mathfont_code.dtx will generate the tex files
+used to create the pdf documentation listed in points (3)
+through (5) above.
+
+*********************************************************
Copyright 2018-2022 by Conrad Kosowsky
@@ -76,7 +99,15 @@ of the following items:
and
- (6) the associated README.txt file
+ (6) this README.txt file
+
+The Work does not include any fonts, and the installation
+does not contain any font files. The fonts Bona Nova,
+Cormorant, Crimson, Kelvinch, Overpass, STIXGeneral, and
+Typey McTypeface have released under the SIL Open Font
+License and are used pursuant to that license. The font
+Roboto has been released under the Apache License and is
+used pursuant to that license.
PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT
ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF
@@ -111,15 +142,6 @@ Derivative works based on this package may come with their
own license or terms of use, and the package author is not
responsible for any third-party software.
-The Work does not include any fonts, and the installation
-does not contain any font files. The fonts Bona Nova,
-Cormorant, Crimson, Kelvinch, Overpass, STIXGeneral, and
-Typey McTypeface have released under the SIL Open Font
-License and are used pursuant to that license. The font
-Roboto has been released under the Apache License and is
-used pursuant to that license.
-
-For more information, see mathfont_code.dtx.
-
-Happy TeXing!
+*********************************************************
+For more information, see mathfont_code.dtx. Happy TeXing!
diff --git a/macros/latex/contrib/mathfont/mathfont_code.dtx b/macros/latex/contrib/mathfont/mathfont_code.dtx
index cb579ee77c..8b73b6d587 100644
--- a/macros/latex/contrib/mathfont/mathfont_code.dtx
+++ b/macros/latex/contrib/mathfont/mathfont_code.dtx
@@ -1,39 +1,47 @@
% \iffalse ---!!! FIRST META-COMMENT !!!---
%
%
-% This file is mathfont_code.dtx from version 2.1 of the
+% This file is mathfont_code.dtx from version 2.2 of the
% free and open-source LaTeX package "mathfont," to be
-% used with the XeTeX or LuaTeX engines. Running LaTeX on
-% mathfont_code.dtx will produce the following files:
+% used with the XeTeX or LuaTeX engines. Running Plain
+% TeX mathfont_code.dtx will produce the following files:
%
% (1) the package file mathfont.sty;
%
-% (2) the pdf documentation file mathfont_code.pdf;
-%
-% (3) the derived files mathfont_symbol_list.tex,
+% (2) the derived files mathfont_symbol_list.tex,
% mathfont_user_guide.tex, and four files called
% mathfont_example_<fontname>.tex, which can be
% used to typeset further documentation for
% mathfont;
%
-% (4) the stand-alone derived files mathfont_doc_patch.tex,
+% (3) the stand-alone derived files mathfont_doc_patch.tex,
% mathfont_equations.tex, and mathfont_heading.tex,
% which are used to produce documentation;
%
% and
%
-% (5) a number of other derived files.
+% (4) a number of other derived files.
+%
+% Running LaTeX on mathfont_code.dtx will produce the files
+% listed above as well as the following:
+%
+% (5) the pdf documentation file mathfont_code.pdf;
+%
+% and
+%
+% (6) a number of other derived files.
%
% To install mathfont on your computer, run this file through
-% LaTeX and move mathfont.sty into a directory searchable by
-% TeX.
+% Plain TeX or LaTeX and move mathfont.sty into a directory
+% searchable by TeX. See the associated README.txt file for
+% installation information.
%
%
% \fi
% \iffalse ---!!! SECOND META-COMMENT !!!---
%
%
-% This file is from version 2.1 of the free and open-source
+% This file is from version 2.2 of the free and open-source
% LaTeX package "mathfont," to be used with the XeTeX or
% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
%
@@ -84,6 +92,14 @@
%
% (6) the associated README.txt file
%
+% The Work does not include any fonts, and the installation
+% does not contain any font files. The fonts Bona Nova,
+% Cormorant, Crimson, Kelvinch, Overpass, STIXGeneral, and
+% Typey McTypeface have been released under the SIL Open
+% Font License and are used pursuant to that license. The
+% font Roboto has been released under the Apache License
+% and is used pursuant to that license.
+%
% PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT
% ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF
% THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING:
@@ -117,14 +133,6 @@
% own license or terms of use, and the package author is not
% responsible for any third-party software.
%
-% The Work does not include any fonts, and the installation
-% does not contain any font files. The fonts Bona Nova,
-% Cormorant, Crimson, Kelvinch, Overpass, STIXGeneral, and
-% Typey McTypeface have been released under the SIL Open
-% Font License and are used pursuant to that license. The
-% font Roboto has been released under the Apache License
-% and is used pursuant to that license.
-%
% Happy TeXing!
%
%
@@ -143,7 +151,7 @@
\askforoverwritefalse
\preamble
-This file is from version 2.1 of the free and open-source
+This file is from version 2.2 of the free and open-source
LaTeX package "mathfont," to be used with the XeTeX or
LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
@@ -193,9 +201,7 @@ Derivative works based on this package may come with their
own license or terms of use, and the package author is not
responsible for any third-party software.
-For more information, see mathfont_code.dtx.
-
-Happy TeXing!
+For more information, see mathfont_code.dtx. Happy TeXing!
\endpreamble
\generate{
@@ -210,23 +216,28 @@ Happy TeXing!
\file{mathfont_example_roboto.tex}{\from{mathfont_code.dtx}{roboto}}
\file{mathfont_example_typey.tex}{\from{mathfont_code.dtx}{typey}}}
\catcode`\ =12\relax
-\message{^^J^^J
-******************************************^^J
-* *^^J
-* To finish the installation, move the *^^J
-* following file into a directory *^^J
-* searchable by TeX once *^^J
-* mathfont_code.dtx finishes compiling: *^^J
-* *^^J
-* mathfont.sty *^^J
-* *^^J
-******************************************^^J^^J^^J^^J^^J^^J}
+\message{^^J
+****************************************************^^J
+* *^^J
+* To finish the installation, move the following *^^J
+* file into a directory searchable by TeX once *^^J
+* mathfont_code.dtx finishes compiling: *^^J
+* *^^J
+* mathfont.sty *^^J
+* *^^J
+****************************************************^^J^^J^^J^^J}
\endgroup
+\ifx\LaTeX\undefined
+ \message{Plain TeX format used; quitting now.}
+ \message{To create mathfont_code.pdf, run^^J%
+ mathfont_code.dtx through LaTeX.^^J}
+ \expandafter\end
+\fi
%</batchfile>
%<*driver>
-\documentclass[12pt,twoside]{ltxdoc}
+\documentclass[12pt,doc2,letterpaper]{ltxdoc}
\makeatletter
-\usepackage[margin=72.27pt]{geometry}
+\usepackage[margin=1in]{geometry}
\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype}
\usepackage{graphicx}
\usepackage{tabularx}
@@ -260,7 +271,7 @@ Happy TeXing!
entries indicate pages in the document. Bold means a
definition.
- \medskip
+ %\medskip
\input mathfont_code.ind
\end{document}
@@ -270,7 +281,7 @@ Happy TeXing!
% \fi
%
%
-% \CheckSum{6609}
+% \CheckSum{6615}
% \init@checksum
%
%
@@ -310,7 +321,7 @@ Happy TeXing!
% \ifM@agreeklower,\ifM@cyrillicupper,\ifM@cyrilliclower,%
% \ifM@hebrew,\ifM@digits,\ifM@operator,\ifM@symbols,%
% \ifM@extsymbols,\ifM@delimiters,\ifM@arrows,\ifM@bigops,%
-% \ifM@extbigops,\ifM@bb,\ifM@cal,\ifM@frak,\ifM@bcal,\M@font@loadedtrue%
+% \ifM@extbigops,\ifM@bb,\ifM@cal,\ifM@frak,\ifM@bcal,\M@font@loadedtrue,%
% \ifM@bfrak,\if@optionpresent,\if@suboptionpresent,%
% \mathgroup,\nolimits,\on@line,\PackageWarningNoLine,\RequirePackage,%
% \thr@@,\M@toks,\inputlineno,\mathchar@type,\DeclareMathAccent,%
@@ -349,7 +360,7 @@ Happy TeXing!
% \cyrya,\cyrvari}
%
%
-% \DoNotIndexMain{\@@set@mathchar,\@@set@mathsymbol,%
+% \DoNotIndex{\@@set@mathchar,\@@set@mathsymbol,%
% \@@set@mathaccent,\set@mathchar,\set@mathsymbol,%
% \set@mathaccent,\Umathcode,\Umathchardef,%
% \colon,\mathellipsis,\angle,\sqsubset,\sqsupset,\bowtie,%
@@ -379,7 +390,7 @@ Happy TeXing!
% First and foremost, the package needs to declare itself.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathfont}[2022/11/30 v. 2.1 Package mathfont]
+\ProvidesPackage{mathfont}[2022/12/04 v. 2.2 Package mathfont]
% \end{macrocode}
% We specify conditionals that we will use later in handling options and setup.
% \begin{macrocode}
@@ -413,16 +424,16 @@ Happy TeXing!
\protected\def\newmathscit{\M@NoMathfontError\newmathscit\@gobbletwo}
\protected\def\newmathbfsc{\M@NoMathfontError\newmathbfsc\@gobbletwo}
\protected\def\newmathbfscit{\M@NoMathfontError\newmathbfscit\@gobbletwo}
-\protected\def\newmathfontcommand{\M@NoMathfontError\newmathfontcommand
- \@gobblefour}
-\protected\def\RuleThicknessFactor{\M@NoMathfontError\RuleThicknessFactor
- \@gobble}
-\protected\def\IntegralItalicFactor{\M@NoMathfontError\IntegralItalicFactor
- \@gobble}
-\protected\def\SurdVerticalFactor{\M@NoMathfontError\SurdVerticalFactor
- \@gobble}
-\protected\def\SurdHorizontalFactor{\M@NoMathfontError\SurdHorizontalFactor
- \@gobble}
+\protected\def\newmathfontcommand{%
+ \M@NoMathfontError\newmathfontcommand\@gobblefour}
+\protected\def\RuleThicknessFactor{%
+ \M@NoMathfontError\RuleThicknessFactor\@gobble}
+\protected\def\IntegralItalicFactor{%
+ \M@NoMathfontError\IntegralItalicFactor\@gobble}
+\protected\def\SurdVerticalFactor{%
+ \M@NoMathfontError\SurdVerticalFactor\@gobble}
+\protected\def\SurdHorizontalFactor{%
+ \M@NoMathfontError\SurdHorizontalFactor\@gobble}
\protected\def\CharmLine{\M@NoMathfontError\CharmLine\@gobble}
\protected\def\CharmFile{\M@NoMathfontError\CharmFile\@gobble}
% \end{macrocode}
@@ -531,9 +542,6 @@ Happy TeXing!
use #2\MessageBreak
instead. For more information,\MessageBreak
see the mathfont documentation.}}
-\IfFileExists{atveryend.sty}
- {\RequirePackage{atveryend}\let\E@sterEggHook\AtVeryVeryEnd}
- {\let\E@sterEggHook\AtEndDocument}
% \end{macrocode}
% Now we code the package options. The deprecated options now cause an error.
% \begin{macrocode}
@@ -553,25 +561,36 @@ Happy TeXing!
\ifE@sterEggDecl@red\else
\E@sterEggDecl@redtrue
\def\EasterEggUpdate{\show\E@sterEggUpd@te}
- \def\E@sterEggUpd@te{Okay, opening your Easter egg}
- \EasterEggUpdate
- \def\E@sterEggUpd@te{..}
+ \def\E@sterEggUpd@te{Easter Egg Status:^^J^^J%
+ Okay, opening your Easter egg.^^J^^J}
\EasterEggUpdate
+ \def\E@sterEggUpd@te{Easter Egg Status:^^J^^J%
+ Uh oh. It looks like^^J%
+ your Easter egg flew^^J%
+ out the window. I don't^^J%
+ suppose you know the^^J%
+ best kind of bait to^^J%
+ lure an egg?^^J^^J}
\EasterEggUpdate
- \typeout{^^JHm, I think it flew out the^^J%
- window. Check back here when^^J%
- everything's done compiling^^J}
- \def\E@sterEggUpd@te{Uh oh}
+ \def\E@sterEggUpd@te{Easter Egg Status:^^J^^J%
+ Still wrangling. Try back later.^^J^^J}
+ \AtBeginDocument{\bgroup
+ \def\E@sterEggUpd@te{Easter Egg Status:^^J^^J:%
+ If we have zero eggs^^J%
+ and zero bunnies, how^^J%
+ many gnats does it take^^J%
+ to change a lightbulb??^^J^^J}
\EasterEggUpdate
- \def\E@sterEggUpd@te{Still wrangling. Try back later}
- \AtBeginDocument\EasterEggUpdate
- \E@sterEggHook{%
- \typeout{^^JHappy, happy day! Happy,^^J%
- happy day! Clap your hands,^^J%
- and be glad your hovercraft^^J%
- isn't full of eels!^^J}
- \def\E@sterEggUpd@te{Got it :)\@gobble}
- \EasterEggUpdate}
+ \egroup}
+ \AtEndDocument{%
+ \def\E@sterEggUpd@te{Easter Egg Status:^^J^^J%
+ Happy, happy day! Happy,^^J%
+ happy day! Clap your hands,^^J%
+ and be glad your hovercraft^^J%
+ isn't full of eels!^^J^^J}
+ \EasterEggUpdate
+ \let\E@sterEggUpd@te\relax
+ \let\EasterEggUpdate\relax}
\fi}% my easter egg :)
% \end{macrocode}
% The three real package options. The options |adjust| and |no-adjust| overwrite \textsf{mathfont}'s default decision about whether to apply Lua-based font adjustments to all future fonts loaded.
@@ -753,16 +772,18 @@ Happy TeXing!
% \indexpage{your mathconstants on line=Your \texttt{\char`\\mathconstants} on line}
% \begin{macrocode}
\def\M@BadMathConstantsFontError#1{\PackageError{mathfont}
- {Invalid font specifier for \string\mathconstantsfont:\MessageBreak"#1"}
+ {Invalid\MessageBreak font specifier for
+ \string\mathconstantsfont:\MessageBreak"#1"}
{Your command was ignored--I can't parse your argument.\MessageBreak
Please make sure to use text that you have previously\MessageBreak
fed to \string\mathfont\space for the argument of
\string\mathconstantsfont.^^J}}
\def\M@BadMathConstantsFontTypeError#1{\PackageError{mathfont}
- {Invalid font specifier for \string\mathconstantsfont:\MessageBreak"#1"}
+ {Invalid\MessageBreak font specifier for
+ \string\mathconstantsfont:\MessageBreak"#1"}
{The optional argument of \string\mathconstantsfont\MessageBreak
should be "upright" or "italic." Right now,\MessageBreak
- it's neither.^^J}}
+ it's "#1."^^J}}
\def\M@LuaTeXOnlyWarning{\PackageWarning{mathfont}
{Your \string\mathconstantsfont\space
on line \the\inputlineno\space is\MessageBreak
@@ -888,17 +909,24 @@ Happy TeXing!
\protected\xdef#2{%
\Umathaccent\mathchar@type#3+\number#1+\the\count\z@\relax}}
% \end{macrocode}
-% We increase the upper bound on the number of symbol fonts to be 256. Lua\TeX\ and \XeTeX\ allow up to 256 math families, but the \LaTeX\ kernel keeps the old upper bound of 16 symbol fonts under these two engines. We patch |\DeclareSymbolFont| to change the |\count18<15| to |\count18<\e@mathgroup@top|, where |\e@mathgroup@top| is the number of math families and is 256 in \XeTeX\ and Lua\TeX. Because macro patching is complicated, the next few lines may seem esoteric. Our approach is to get a sanitized definition with |\meaning| and |\strip@prefix|, implement the patch by expanding |\M@p@tch@decl@re|, and retokenize the whole thing. A simpler approach, such as calling |\M@p@tch@decl@re| directly on the expansion of |\DeclareSymbolFont|, won't work because of the way \TeX\ stores and expands parameter symbols inside macros.
+% We increase the upper bound on the number of symbol fonts to be 256. Lua\TeX\ and \XeTeX\ allow up to 256 math families, but the \LaTeX\ kernel keeps the old upper bound of 16 symbol fonts under these two engines. We patch |\DeclareSymbolFont| to change the |\count18<15| to |\count18<\e@mathgroup@top|, where |\e@mathgroup@top| is the number of math families and is 256 in \XeTeX\ and Lua\TeX. Because macro patching is complicated, the next few lines may seem somewhat esoteric. Our approach is to get a sanitized definition with |\meaning| and |\strip@prefix|, implement the patch by expanding |\M@p@tch@decl@re|, and retokenize the whole thing. A simpler approach, such as calling |\M@p@tch@decl@re| directly on the expansion of |\DeclareSymbolFont|, won't work because of the way \TeX\ stores and expands parameter symbols inside macros.
+%
+% As of November 2022, the \LaTeX\ kernel has redefined |\DeclareSymbolFont@m@dropped| to have the same definition as the old |\DeclareSymbolFont|, and now |\DeclareSymbolFont| is a wrapper around this macro. This was done for error checking purposes to remove extra |m|'s from certain \textsc{nfss} family names. This means that if |\DeclareSymbolFont@m@dropped| is defined, we should patch that macro, and otherwise, we should patch |\DeclareSymbolFont|.
% \begin{macrocode}
+\ifx\DeclareSymbolFont@m@dropped\@undefined
+ \edef\@tempa{\expandafter\strip@prefix\meaning\DeclareSymbolFont}
+ \def\@tempb{\def\DeclareSymbolFont##1##2##3##4##5}
+\else
+ \edef\@tempa{\expandafter\strip@prefix\meaning\DeclareSymbolFont@m@dropped}
+ \def\@tempb{\def\DeclareSymbolFont@m@dropped##1##2##3##4##5}
+\fi
\def\M@p@tch@decl@re#1<15#2\@nil{#1<\e@mathgroup@top#2}
-\edef\M@DecSymDef{\expandafter\expandafter\expandafter
- \M@p@tch@decl@re\expandafter\strip@prefix\meaning\DeclareSymbolFont\@nil}
+\edef\M@DecSymDef{\expandafter\M@p@tch@decl@re\@tempa\@nil}
% \end{macrocode}
% Now |\M@DecSymDef| contains the patched text of our new |\DeclareSymbolFont|, all with catcode 12. In order to make it useable, we have to retokenize it. We use |\scantextokens| in Lua\TeX\ and a safe version of |\scantokens| in \XeTeX. We store the |\def\DeclareSymbolFont| and parameter declaration in a separate macro |\@tempa| to make it easy to expand around them when we redefine |\DeclareSymbolFont|.
% \begin{macrocode}
-\def\@tempa{\def\DeclareSymbolFont##1##2##3##4##5}
\ifdefined\directlua
- \expandafter\@tempa\expandafter{\scantextokens\expandafter{\M@DecSymDef}}
+ \expandafter\@tempb\expandafter{\scantextokens\expandafter{\M@DecSymDef}}
% \end{macrocode}
% Unfortunately, while |\scantextokens| is straightforward, |\scantokens| is a menace. The problem is that when it expands, the primitive inserts an end-of-file token (because |\scantokens| mimics writing to a file and |\input|ing what it just wrote) after the retokenized code, and this is why |\scantokens| can produce an end-of-file error. The easiest way to make the command useable is to put a |\noexpand| before the end-of-file token with |\everyeof|, and at the same time, this needs to happen inside an |\edef| so that \TeX\ handles the |\noexpand| as it is first seeing the end-of-file token. In order to prevent the |\edef| from also expanding our retokenized definition of |\DeclareSymbolFont|, we put the definition inside an |\unexpanded|.
% \begin{macrocode}
@@ -912,7 +940,7 @@ Happy TeXing!
\edef\M@retokenize{\noexpand\scantokens{\noexpand\unexpanded{\M@DecSymDef}}}
\edef\M@retokenize{\M@retokenize}
\expandafter\endgroup
- \expandafter\@tempa\expandafter{\M@retokenize}
+ \expandafter\@tempb\expandafter{\M@retokenize}
\fi
% \end{macrocode}
% We need to keep track of the number of times we have loaded fonts, and |\M@count| fulfills this role. The |\M@toks| object will record a message that displays in the |log| file when the user calls |\mathfont|. The |\newread| is for Lua-based font adjustments.
@@ -1432,8 +1460,7 @@ Happy TeXing!
{\@mathconstantsfont[upright]}}
\def\@mathconstantsfont[#1]#2{%
\edef\@tempa{\csname M@fontfamily@base@#2\endcsname}
- \def\@tempb{\relax}
- \ifx\@tempa\@tempb
+ \expandafter\ifx\@tempa\relax
\M@BadMathConstantsFontError{#2}
\else
% \end{macrocode}
@@ -1448,7 +1475,7 @@ Happy TeXing!
\ifx\@tempb\@tempc
\let\@tempc\itdefault
\else
- \M@BadMathConstantsFontTypeError{#2}
+ \M@BadMathConstantsFontTypeError{#1}
\fi
\fi
\ifcsname symM#1\csname M@fontid@\@tempa\endcsname\endcsname\else
@@ -1581,7 +1608,7 @@ Happy TeXing!
\endgroup % first branch \endgroup
\else
\@expandtwoargs\in@{\@backslashchar}{\@tempa}
- \ifin@ % is \ in #1?
+ \ifin@ % is backslash in #1?
\endgroup % second branch \endgroup
\else
\directlua{
@@ -1641,7 +1668,7 @@ Happy TeXing!
% \begin{macrocode}
\else
\@tfor\@i:=\RuleThicknessFactor\IntegralItalicFactor\SurdHorizontalFactor
- \SurdVerticalFactor\CharmLine\CharmFile\mathconstantsfont
+ \SurdVerticalFactor\CharmLine\CharmFile
\do{%
\protected\expandafter\edef\@i{\noexpand\M@NoFontAdjustError
\expandafter\noexpand\@i
@@ -1915,7 +1942,7 @@ Happy TeXing!
\fi
\else
\@expandtwoargs\in@{\@backslashchar}{\@tempa}
- \ifin@ % is \ in #1?
+ \ifin@ % is backslash in #1?
\ifM@fromCharmFile
\M@ForbiddenCharmFile{\@backslashchar}
\else
@@ -3071,7 +3098,7 @@ local delim_glyphs = {40, % (
41, % )
47, % /
91, % [
- 92, % \
+ 92, % backslash
93, % ]
123, % {
125, % }
@@ -3669,7 +3696,7 @@ mathfont:add_extensible_variants(smash, int_glyphs, int_scale)
\protected\gdef\backslash{\ifmmode\mathbackslash\else\textbackslash\fi}
\protected\xdef\mathbackslash{%
\Udelimiter+2+\number\csname sym\M@delimiters@font\endcsname
- +92\relax} % \
+ +92\relax} % backslash
\protected\xdef\lbrace{%
\Udelimiter+4+\number\csname sym\M@delimiters@font\endcsname
+123\relax} % {
@@ -3747,7 +3774,7 @@ mathfont:add_extensible_variants(smash, int_glyphs, int_scale)
\gdef\sqrtsign##1{\@sqrts@gn{\mkern\radicandoffset##1}}}
\else
\def\M@radical@set{%
- \edef\M@radical@font{M\@radicalshape\@tempa}
+ \edef\M@radical@font{M\M@radicalshape\@tempa}
\DeclareMathSymbol{\surd}{\mathord}{\M@radical@font}{"221A}}
\fi
% \end{macrocode}
@@ -4658,15 +4685,23 @@ mathfont:add_extensible_variants(smash, int_glyphs, int_scale)
% \item |\setfont| now sets |\mathrm|, etc.
% \item added |\newmathsc|, other math alphabet commands for small caps
%
-% \version{2.1}{December 2022\strut}
+% \version{2.1}{November 2022\strut}
% \item |\mathbb|, etc.\ commands change |\Umathcode|s of letters instead of |\M@|\meta{bb,etc.}|@|\meta{letter} commands
% \item removed warnings about non-letter contents of |\mathbb|, etc.
% \item fonts loaded twice, once with default settings (for text) and once in base mode (for math)
% \item |mathconstantsfont| accepts ``upright'' or ``italic'' as optional argument
%
+% \version{2.2}{December 2022\strut}
+% \item changed the easter egg text
+% \item updated patch for |\DeclareSymbolFont| to work with changes to the kernel
+% \item calling Plain \TeX\ on \texttt{mathfont\_code.dtx} produces sty file and no pdf file
+%
+%
% \egroup
% \end{multicols*}
%
+%
+%
% \iffalse
%
%</package>
@@ -5967,6 +6002,11 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
\DeclareMathOperator{\Res}{Res}
\usepackage{mathfont}
\mathfont[radical]{Crimson}
+
+%% We have to declare Typey McTypeface manually because
+%% it has no bold fontface---we use embolden from luaotflaod
+%% to make a fake bold
+
\DeclareFontFamily{TU}{Typey}{}
\DeclareFontShape{TU}{Typey}{m}{n}
{<->"Typey McTypeface:\M@otf@features"}{}
@@ -5976,6 +6016,18 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
{<->"Typey McTypeface:\M@otf@features;embolden=6"}{}
\DeclareFontShape{TU}{Typey}{b}{it}
{<->"Typey McTypeface/I:\M@otf@features;embolden=6"}{}
+
+%% We also need to declare Typey-base family for math mode
+
+\DeclareFontFamily{TU}{Typey-base}{}
+\DeclareFontShape{TU}{Typey-base}{\mddefault}{\shapedefault}
+ {<->"Typey McTypeface:\M@otf@features;mode=base"}{}
+\DeclareFontShape{TU}{Typey-base}{\mddefault}{\itdefault}
+ {<->"Typey McTypeface/I:\M@otf@features;mode=base"}{}
+\DeclareFontShape{TU}{Typey-base}{\bfdefault}{\shapedefault}
+ {<->"Typey McTypeface:\M@otf@features;embolden=6;mode=base"}{}
+\DeclareFontShape{TU}{Typey-base}{\bfdefault}{\itdefault}
+ {<->"Typey McTypeface/I:\M@otf@features;embolden=6;mode=base"}{}
\setfont{Typey}
\mathfont[]{STIXGeneral}
\DeclareSymbolFont{Mroman2}{TU}{STIXGeneral}{m}{n}
@@ -6003,8 +6055,8 @@ This is Typey McTypeface with Crimson for the radical signs and STIXGeneral for
%<*heading>
% package date and edition
-\def\packagedate{November 2022}
-\def\packageversion{2.1}
+\def\packagedate{December 2022}
+\def\packageversion{2.2}
% header and footer commands
@@ -6059,6 +6111,7 @@ This is Typey McTypeface with Crimson for the radical signs and STIXGeneral for
\egroup
\def\topfraction{1}
\def\bottomfraction{1}
+\let\code\@undefined
\newenvironment{code}
{\strut\vadjust\bgroup\medskip\parindent\z@\leftskip2em\relax
\noindent\strut\ignorespaces}
diff --git a/macros/latex/contrib/mathfont/mathfont_code.pdf b/macros/latex/contrib/mathfont/mathfont_code.pdf
index bc13cf288a..bfaf4e1268 100644
--- a/macros/latex/contrib/mathfont/mathfont_code.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_code.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_example_cormorant.pdf b/macros/latex/contrib/mathfont/mathfont_example_cormorant.pdf
index fd96765a92..ef8e4439c2 100644
--- a/macros/latex/contrib/mathfont/mathfont_example_cormorant.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_example_cormorant.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_example_kelvinch.pdf b/macros/latex/contrib/mathfont/mathfont_example_kelvinch.pdf
index 971da39b76..3ba6738320 100644
--- a/macros/latex/contrib/mathfont/mathfont_example_kelvinch.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_example_kelvinch.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_example_roboto.pdf b/macros/latex/contrib/mathfont/mathfont_example_roboto.pdf
index 80c4022a38..221f66ba6b 100644
--- a/macros/latex/contrib/mathfont/mathfont_example_roboto.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_example_roboto.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_example_typey.pdf b/macros/latex/contrib/mathfont/mathfont_example_typey.pdf
index efc1846e4e..25b8de0567 100644
--- a/macros/latex/contrib/mathfont/mathfont_example_typey.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_example_typey.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_symbol_list.pdf b/macros/latex/contrib/mathfont/mathfont_symbol_list.pdf
index 53981a25a3..13281e93c0 100644
--- a/macros/latex/contrib/mathfont/mathfont_symbol_list.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_symbol_list.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathfont/mathfont_user_guide.pdf b/macros/latex/contrib/mathfont/mathfont_user_guide.pdf
index 1a94d2b93f..b55e9db8fe 100644
--- a/macros/latex/contrib/mathfont/mathfont_user_guide.pdf
+++ b/macros/latex/contrib/mathfont/mathfont_user_guide.pdf
Binary files differ
diff --git a/macros/latex/contrib/ppt-slides/README.md b/macros/latex/contrib/ppt-slides/README.md
index 46758695fc..3827f11588 100644
--- a/macros/latex/contrib/ppt-slides/README.md
+++ b/macros/latex/contrib/ppt-slides/README.md
@@ -1,4 +1,4 @@
-[![make](https://github.com/yegor256/ppt-slides/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/ppt-slides/actions/workflows/latexmk.yml)
+[![make](https://github.com/yegor256/ppt-slides/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/ppt-slides/actions/workflows/l3build.yml)
[![CTAN](https://img.shields.io/ctan/v/ppt-slides)](https://ctan.org/pkg/ppt-slides)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ppt-slides/blob/master/LICENSE.txt)
diff --git a/macros/latex/contrib/ppt-slides/ppt-slides.dtx b/macros/latex/contrib/ppt-slides/ppt-slides.dtx
index 5f21146d16..8aca5a1bee 100644
--- a/macros/latex/contrib/ppt-slides/ppt-slides.dtx
+++ b/macros/latex/contrib/ppt-slides/ppt-slides.dtx
@@ -40,7 +40,7 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
-% \GetFileInfo{ppt-slies.dtx}
+% \GetFileInfo{ppt-slides.dtx}
% \DoNotIndex{\endgroup,\begingroup,\let,\else,\s,\n,\r,\\,\1,\fi}
% \iffalse
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{ppt-slides}
%<*package>
-[2022-12-03 0.2.0 Slide Decks a la Power Point]
+[2022-12-04 0.2.1 Slide Decks a la Power Point]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -87,7 +87,9 @@
% \documentclass{article}
% \usepackage[template,scheme=dark]{ppt-slides}
% \begin{document}
-% \pptMiddle{\pptTitle{Hello, world!}{How are you?}}
+% \begin{pptMiddle}
+% \pptTitle{Hello, world!}{How are you?}
+% \end{pptMiddle}
% \end{document}
% \end{docshot}
@@ -243,6 +245,19 @@
% \end{document}
% \end{docshot}
+% \DescribeMacro{pptMiddle}
+% You can put your content vertically in the middle of the page, using the |pptMiddle| environment:
+% \begin{docshot}
+% \documentclass{article}
+% \usepackage[template,scheme=dark]{ppt-slides}
+% \begin{document}
+% \begin{pptMiddle}
+% ``Your time is limited, so don't waste it
+% living someone else's life.'' --- Steve Jobs
+% \end{pptMiddle}
+% \end{document}
+% \end{docshot}
+
% \DescribeMacro{\pptQR}
% Sometimes it's convenient to show a QR code to your audience instead of
% a URL, since it's easier to use --- they can scan it:
@@ -410,11 +425,12 @@
% \end{macrocode}
% \begin{macro}{\pptMiddle}
-% Then, we define the |\pptMiddle| command:
+% \changes{0.2.1}{2022/12/04}{The \texttt{\char`\\pptMiddle} command turned into \texttt{pptMiddle} environment.}
+% Then, we define the |pptMiddle| environment:
% \begin{macrocode}
-\newcommand\pptMiddle[1]{%
- \vspace*{\fill}#1\vspace*{\fill}%
-}
+\newenvironment{pptMiddle}
+ {\vspace*{\fill}}
+ {\vspace*{\fill}}
% \end{macrocode}
% \end{macro}
@@ -435,11 +451,11 @@
% \begin{macrocode}
\newcommand\pptChapter[2][]{%
\crumbection[#1]{#2}%
- \pptMiddle{%
+ \begin{pptMiddle}%
{\large\ttfamily Chapter \#\the\value{section}:}%
\newline%
\rotatebox{1}{\pptBanner[blue]{\LARGE#2}}%
- }%
+ \end{pptMiddle}%
}
% \end{macrocode}
% \end{macro}
@@ -577,7 +593,7 @@
% Then, we define the |\pptThought| command:
% \begin{macrocode}
\newcommand\pptThought[1]{%
- \pptMiddle{%
+ \begin{pptMiddle}%
\tikz{%
\node [inner sep=18pt] (z) {%
\begin{varwidth}{0.8\textwidth}
@@ -587,7 +603,7 @@
};
\path [draw=green,line width=8pt] (z.north west) -- (z.south west);
}%
- }%
+ \end{pptMiddle}%
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/ppt-slides/ppt-slides.pdf b/macros/latex/contrib/ppt-slides/ppt-slides.pdf
index c256214d9b..3293f9a60e 100644
--- a/macros/latex/contrib/ppt-slides/ppt-slides.pdf
+++ b/macros/latex/contrib/ppt-slides/ppt-slides.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/bithesis/bithesis.dtx b/macros/unicodetex/latex/bithesis/bithesis.dtx
index 1a99ce1238..7669b65639 100644
--- a/macros/unicodetex/latex/bithesis/bithesis.dtx
+++ b/macros/unicodetex/latex/bithesis/bithesis.dtx
@@ -21,7 +21,7 @@
%<thesis>\ProvidesExplClass{bithesis}
%<report>\ProvidesExplClass{bitreport}
%<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2022-10-29}{3.1.1}{BIT Thesis Templates}
+%<cls>{2022-12-02}{3.2.0}{BIT Thesis Templates}
%
%<oldcls>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<book>\ProvidesClass{bitbook}
@@ -30,7 +30,7 @@
%<oldcls> [2022/05/09 v2.1.1 BIT Thesis Templates]
%
%<*driver>
-\ProvidesFile{bithesis.dtx}[2022/10/29 3.1.1 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2022/12/02 3.2.0 BIT Thesis Templates]
\documentclass[letterpaper]{l3doc}
\usepackage{dtx-style}
@@ -587,6 +587,18 @@
% 和\kvopt{cover/valueMaxWidth}{\meta{长度}}使用,以控制下划线的长度。
% \end{function}
%
+% \begin{function}{cover/autoWidthPadding}
+% \begin{bitsyntax}[emph={[1]autoWidthPadding}]
+% autoWidthPadding = (*<\marg{任意长度}>*)
+% \end{bitsyntax}
+%
+% 自适应下划线长度时,下划线的长度会比标签和值的长度多出一些空白。
+% 该选项用于设置这些空白的长度。默认为 0.25em。
+%
+% \textit{此选项一般不需要用户自行修改。}
+%
+% \end{function}
+%
% \begin{function}{cover/labelMaxWidth}
% \begin{bitsyntax}[emph={[1]labelMaxWidth}]
% labelMaxWidth = (*\marg{任意长度}*)
@@ -2019,6 +2031,8 @@
valueAlign .initial:n = {c},
labelMaxWidth .dim_set:N = \l_@@_cover_label_max_width_dim,
valueMaxWidth .dim_set:N = \l_@@_cover_value_max_width_dim,
+ autoWidthPadding .dim_set:N = \l_@@_cover_auto_width_padding_dim,
+ autoWidthPadding .initial:n = {0.25em},
autoWidth .bool_set:N = \l_@@_cover_auto_width_bool,
autoWidth .initial:n = {true},
underlineThickness .dim_set:N = \l_@@_cover_underline_thickness_dim,
@@ -2743,7 +2757,8 @@
{
\seq_pop_left:NN \l_@@_tmpa_seq \l_@@_tmpa_tl
\@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl
- \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpa_dim } }
+ % 在两边加上空白,避免文本太靠边。
+ \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpa_dim + \l_@@_cover_auto_width_padding_dim * 2} }
}
\group_end:
}
@@ -4131,6 +4146,8 @@
valueAlign .initial:n = {c},
labelMaxWidth .dim_set:N = \l_@@_cover_label_max_width_dim,
valueMaxWidth .dim_set:N = \l_@@_cover_value_max_width_dim,
+ autoWidthPadding .dim_set:N = \l_@@_cover_auto_width_padding_dim,
+ autoWidthPadding .initial:n = {0.25em},
autoWidth .bool_set:N = \l_@@_cover_auto_width_bool,
autoWidth .initial:n = {true},
underlineThickness .dim_set:N = \l_@@_cover_underline_thickness_dim,
@@ -4281,7 +4298,8 @@
{
\seq_pop_left:NN \l_@@_tmpa_seq \l_@@_tmpa_tl
\@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl
- \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpa_dim } }
+ % 在两边加上空白,避免文本太靠边。
+ \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpa_dim + \l_@@_cover_auto_width_padding_dim * 2} }
}
\group_end:
}
diff --git a/macros/unicodetex/latex/bithesis/bithesis.pdf b/macros/unicodetex/latex/bithesis/bithesis.pdf
index 2ce8119710..0636baeb21 100644
--- a/macros/unicodetex/latex/bithesis/bithesis.pdf
+++ b/macros/unicodetex/latex/bithesis/bithesis.pdf
Binary files differ