summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/bithesis/README-zh.md88
-rw-r--r--macros/latex/contrib/bithesis/README.md5
-rw-r--r--macros/latex/contrib/bithesis/bithesis.dtx915
-rw-r--r--macros/latex/contrib/bithesis/bithesis.ins6
-rw-r--r--macros/latex/contrib/bithesis/bithesis.pdfbin252958 -> 339647 bytes
-rw-r--r--macros/latex/contrib/bithesis/contributing-zh.md22
-rw-r--r--macros/latex/contrib/bithesis/contributing.md20
-rw-r--r--macros/latex/contrib/messagepassing/README.md28
-rw-r--r--macros/latex/contrib/messagepassing/messagepassing.dtx861
-rw-r--r--macros/latex/contrib/messagepassing/messagepassing.ins49
-rw-r--r--macros/latex/contrib/messagepassing/messagepassing.pdfbin267669 -> 0 bytes
-rw-r--r--macros/latex/contrib/robotarm/README.md3
-rw-r--r--macros/latex/contrib/robotarm/robotarm.dtx940
-rw-r--r--macros/latex/contrib/robotarm/robotarm.pdfbin185467 -> 0 bytes
-rw-r--r--macros/latex/contrib/robotarm/robotarm.sty375
15 files changed, 920 insertions, 2392 deletions
diff --git a/macros/latex/contrib/bithesis/README-zh.md b/macros/latex/contrib/bithesis/README-zh.md
deleted file mode 100644
index 62e548767c..0000000000
--- a/macros/latex/contrib/bithesis/README-zh.md
+++ /dev/null
@@ -1,88 +0,0 @@
-<div align="center">
- <img src="./assets/bithesis_icon.svg" alt="BIThesis Icon">
-
-📖 _非官方本科生毕业设计毕业论文 LaTeX 模板(以及更多)_
-
-![BIThesis](./assets/bithesis_badge_solid.svg)
-[![English version](./assets/english.svg)](./README-en.md)
-[![Latexmk](https://badgen.net/badge/compiler/Latexmk?color=blue&labelColor=2b2b2b)](https://mg.readthedocs.io/latexmk.html)
-[![License](https://badgen.net/github/license/BITNP/BIThesis?color=008080&labelColor=2b2b2b)](./LICENSE)
-[![Join on Slack](https://img.shields.io/badge/Slack%20Community-BIThesis-black?logo=slack&style=social&logoColor=2eb67d)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
-
-</div>
-
-<h2>欢迎</h2>
-
-BIThesis 是针对北京理工大学本科同学毕业设计、毕业论文制作的一个非官方的 LaTeX 模板,BIThesis 同时也包括其他本科学习中涉及到的文献综述、实验报告等的 LaTeX 模板。
-
-**我们正在对项目持续更新!目前,你完全可以使用现有的版本开始你的毕业设计开题报告的写作;不过与此同时,我们也在持续推进代码的升级和更新(主要是不影响使用的底层逻辑)。更多开发计划请访问我们的 [Roadmap](https://github.com/BITNP/BIThesis/projects)。想帮助这个项目持续前进?参见我们的[贡献者指南](./contributing-zh.md)。**
-
-> 本项目获得了 [北京理工大学教务部](http://jwc.bit.edu.cn/)、[北京理工大学计算机学院](http://cs.bit.edu.cn/) 的认可、背书与大力支持。详见:[致谢 - 官方赞助](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors)。
-
-<h2>Slack 社区</h2>
-
-> 订阅更新,询问问题,提出需求……来参加 Slack 上面的北理 BIThesis 官方社区!
-
-[![Join on Slack](./assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
-
-<h2>内容</h2>
-
-- [开发者指南](#开发者指南)
-- [贡献者指南](#%e8%b4%a1%e7%8c%ae%e8%80%85%e6%8c%87%e5%8d%97)
-- [贡献者](#%e8%b4%a1%e7%8c%ae%e8%80%85)
-- [相关项目](#%e7%9b%b8%e5%85%b3%e9%a1%b9%e7%9b%ae)
-- [发布状态](#%e5%8f%91%e5%b8%83%e7%8a%b6%e6%80%81)
-
-
-
-## 开发者指南
-
-### 生成 .cls 文件
-
-```Bash
-make cls
-```
-
-### 生成宏包手册
-
-```Bash
-make doc
-```
-
-### 与 scaffold 联调开发
-
-将 `BITNP/BIThesis` 与 `BITNP/BIThesis-scaffold` 放在同一级目录下,
-然后进入 `BIThesis` 目录。
-
-```Bash
-# 请首先确保 entr 正确安装
-ls bithesis.dtx | entr -s 'yes -y y | make doc && make copy'
-```
-
-## 贡献者指南
-
-详情请查看[贡献者指南](./contributing-zh.md)。
-
-## 贡献者
-
-参见[Github Contributors](https://github.com/BITNP/BIThesis/graphs/contributors) 与 [BIThesis - 致谢](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html)。
-
-## 相关项目
-
-- [北京理工大学硕士(博士)学位论文 LaTeX 模板](https://github.com/BIT-thesis/LaTeX-template)
-- [fduthesis(复旦大学论文模板)](https://github.com/stone-zeng/fduthesis)
-- [上海交通大学 XeLaTeX 学位论文及课程论文模板](https://github.com/sjtug/SJTUThesis)
-- ……
-
-## 发布状态
-
-| CI | Build status |
-| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| GitHub Release | ![GitHub Release](https://github.com/BITNP/BIThesis/workflows/Release/badge.svg?branch=master) |
-| Netlify Deploy | [![Netlify Status](https://api.netlify.com/api/v1/badges/81f7b49b-59a1-46bc-ba52-02f8be71d247/deploy-status)](https://app.netlify.com/sites/vigorous-hoover-a697eb/deploys) |
-
----
-
-📖 **BIThesis** ©BITNP/BIThesis. Released under the [LaTeX Project Public License](LICENSE).
-
-Authored by Spencer Woo. Maintained with help from [contributors](https://github.com/BITNP/BIThesis/graphs/contributors).
diff --git a/macros/latex/contrib/bithesis/README.md b/macros/latex/contrib/bithesis/README.md
index d8a8e19997..a63fde0877 100644
--- a/macros/latex/contrib/bithesis/README.md
+++ b/macros/latex/contrib/bithesis/README.md
@@ -1,3 +1,4 @@
+<!-- This README aims to be packed into bithesis LaTeX package -->
<div align="center">
<img src="assets/bithesis_icon.svg" alt="BIThesis Icon">
@@ -13,9 +14,9 @@
<h2>Welcome</h2>
-BIThesis is an unofficial LaTeX template set for your **bachelor graduation thesis** and corresponding reports here at BIT. Hand-crafted following the specifications made by the _[Dept. of Undergraduate Academic Affairs](http://jwc.bit.edu.cn/)_ of _[Beijing Institute of Technology](http://http://www.bit.edu.cn/)_.
+BIThesis is an unofficial LaTeX template set for your **bachelor graduation thesis** and corresponding reports here at BIT. Hand-crafted following the specifications made by the _[Dept. of Undergraduate Academic Affairs](https://jwc.bit.edu.cn/)_ of _[Beijing Institute of Technology](https://www.bit.edu.cn/)_.
-> This project is supported by the _[Dept. of Undergraduate Academic Affairs, BIT](http://jwc.bit.edu.cn/)_ and the _[School of Computer Science and Technology, BIT](http://cs.bit.edu.cn/)_. See [Acknowledgements - Official Sponsors](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors).
+> This project is supported by the _[Dept. of Undergraduate Academic Affairs, BIT](https://jwc.bit.edu.cn/)_ and the _[School of Computer Science and Technology, BIT](https://cs.bit.edu.cn/)_. See [Acknowledgements - Official Sponsors](https://bithesis.bitnp.net/Guide/5-Acknowledgements/Acknowledgements.html#%E5%AE%98%E6%96%B9%E8%B5%9E%E5%8A%A9-official-sponsors).
<h2>Slack Community</h2>
diff --git a/macros/latex/contrib/bithesis/bithesis.dtx b/macros/latex/contrib/bithesis/bithesis.dtx
index d5e02c47f5..8194a4ea5f 100644
--- a/macros/latex/contrib/bithesis/bithesis.dtx
+++ b/macros/latex/contrib/bithesis/bithesis.dtx
@@ -1,18 +1,18 @@
% \iffalse meta-comment
%
-% Copyright (C) 2021
+% Copyright (C) 2022
% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
% -----------------------------------
%
-% This file 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 2020/11/27 or later.
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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 2020/11/27 or later.
%
% \fi
%
@@ -20,10 +20,11 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<book>\ProvidesClass{bitbook}
%<article>\ProvidesClass{bitart}
-%<cls> [2021/09/07 v1.1.0 BIT Thesis Templates]
+%<graduate>\ProvidesClass{bitgrad}
+%<cls> [2022/04/01 v2.0.0 BIT Thesis Templates]
%
%<*driver>
-\ProvidesFile{bithesis.dtx}[2021/09/07 1.1.0 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2022/04/01 2.0.0 BIT Thesis Templates]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -116,17 +117,21 @@
% \section{项目简介}
% \subsection{历史与贡献者们}
% \begin{itemize}
-% \item 2019 - 2020 年,\BIThesis 最早由 2016 级的武上博、王赞、唐誉铭、牟思睿和詹熠莎等人维护。
+% \item 2019 - 2020 年,\BIThesis 最早由 2016 级的武上博、王赞、唐誉铭、牟思睿和詹熠莎等人维护。
% \begin{itemize}
% \item 在此期间,\BIThesis 从无到有诞生了,包括使用手册、在线文档和开箱即用的模板。
% \item 同时,2017 级的赵池等同学完成了一系列 \BIThesisLaTeX 的视频教程。
% \end{itemize}
-% \item 2020 - 2021 年,2017 级的冯开宇、杨思云、郝正亮和顾骁等人接管了维护开发工作。
+% \item 2020 - 2021 年,2017 级的冯开宇、杨思云、郝正亮和顾骁等人接管了维护开发工作。
% \begin{itemize}
% \item 在此期间,冯开宇将原来的 .tex 文件制作成了宏包,并发布到 CTAN 上。
% \item 项目代码也随之被拆分成了 \BIThesisMacroPackage,\BIThesisWiki 和 \BIThesisScaffold。
% \end{itemize}
-% \item 2021 - 2022 年,2021 级(硕士研究生)的冯开宇针对 2021 年毕业季收到的反馈对该项目进行维护升级(前向兼容)。
+% \item 2021 - 2022 年,2021 级(硕士研究生)的冯开宇针对 2021、2022 毕业季收到的反馈对该项目进行维护升级(前向兼容)。
+% \begin{itemize}
+% \item 在此期间,冯开宇合入了杨雅婷等人在 2017 年开发的研究生学位论文模板。
+% \item 在项目架构上,BIThesis-scaffold 合入 BIThesis 以便于进一步维护。
+% \end{itemize}
% \end{itemize}
% \subsection{\BIThesis 是什么?}
% \BIThesis 之名是英文单词 Beijing Institution of Technology(北京理工大学)的首字母缩写“BIT” 与“Thesis”结合而成。在纯文本环境下,该名字应写作“BIThesis”。
@@ -158,7 +163,8 @@
% \toprule
% 类别 & 文件 & 说明 \\ \midrule
% \multirow{2}{*}{文档类} & bitart.cls & 对应 ctxart.cls,提供实验报告模板、开题报告模板。 \\
-% & bitbook.cls & 对应 ctexbook.cls ,提供本科毕业模板。 \\ \cmidrule(l){2-3}
+% & bitbook.cls & 对应 ctexbook.cls ,提供本科生毕业设计模板。 \\ \cmidrule(l){2-3}
+% & bitgrad.cls & 对应 ctexbook.cls ,提供研究生毕业设计模板。(全体硕士及2020级以前博士适用) \\ \cmidrule(l){2-3}
% \end{tabular}
% \end{table}
% \subsection{\BIThesis 宏包的安装和更新}
@@ -230,8 +236,8 @@
\ProcessOptions\relax
-
-\LoadClass[UTF8,AutoFakeBold,AutoFakeSlant,zihao=-4,oneside,openany]{ctexbook}
+\PassOptionsToPackage{AutoFakeBold,AutoFakeSlant}{xeCJK}
+\LoadClass[UTF8,zihao=-4,oneside,openany]{ctexbook}
\RequirePackage[a4paper,left=3cm,right=2.6cm,top=3.5cm,bottom=2.9cm]{geometry}
% 目前 29mm 最接近 Word 排版
@@ -469,7 +475,8 @@
\ExecuteOptions{lab-report}
\ProcessOptions\relax
-\LoadClass[UTF8,AutoFakeBold,AutoFakeSlant,zihao=-4]{ctexart}%
+\PassOptionsToPackage{AutoFakeBold,AutoFakeSlant}{xeCJK}
+\LoadClass[UTF8,zihao=-4]{ctexart}%
\if@bit@labreport
\RequirePackage[a4paper,left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm,includeheadfoot]{geometry}%
@@ -612,6 +619,876 @@
% \begin{macrocode}
%</article>
% \end{macrocode}
+% \begin{macrocode}
+%<*graduate>
+% \end{macrocode}
+% \begin{macrocode}
+
+%% ==================================================
+%% BIT-thesis-grd.cls for BIT Thesis
+%% modified by yang yating
+%% version: 1.4
+%% last update: Mar 25th, 2018
+%% ==================================================
+
+%% math packages -- conflict with xunicode
+\RequirePackage{amsmath,amsthm,amsfonts,amssymb,bm,mathrsfs}
+% 直立希腊字母字体
+\RequirePackage{upgreek}
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
+\newif\ifBIT@master\BIT@masterfalse
+\newif\ifBIT@doctor\BIT@doctorfalse
+\newif\ifBIT@istwoside\BIT@istwosidefalse
+\DeclareOption{twoside}{\BIT@istwosidetrue}
+\DeclareOption{master}{\BIT@mastertrue}
+\DeclareOption{doctor}{\BIT@doctortrue}
+
+\ProcessOptions\relax
+\ifBIT@istwoside
+\LoadClass[zihao=-4,a4paper,UTF8,space=auto]{ctexbook}
+\else
+\LoadClass[zihao=-4,a4paper,oneside,openany,UTF8,space=auto]{ctexbook}
+\fi
+
+%%
+%% the setup of ctex package
+%%
+\def\contentsname{目\BITspace 录}
+\def\listfigurename{插\BITspace 图}
+\def\listtablename{表\BITspace 格}
+
+%%
+%% 封面标题
+%%
+\def\BIT@label@major{学~~~~科~~~~专~~~~业}
+\def\BIT@label@title{论文题目}
+\def\BIT@label@author{作~~~~者~~~~姓~~~~名}
+\def\BIT@label@classification{中图分类号:}
+\def\BIT@label@confidential{密级}
+\def\BIT@label@UDC{UDC\!分类号:}
+\def\BIT@label@serialnumber{编号}
+\def\BIT@label@thesis{学位论文}
+\def\BIT@label@advisor{指~~~~导~~~~教~~~~师}
+\def\BIT@label@degree{申~~~~请~~~~学~~~~位}
+\def\BIT@label@submitdate{论文提交日期}
+\def\BIT@label@defenddate{论~文~答~辩~日~期}
+\def\BIT@label@institute{学~~~~院~~~~名~~~~称}
+\def\BIT@label@school{学~位~授~予~单~位}
+\def\BIT@label@chairman{答辩委员会主席}
+
+%%
+%% 封面内容
+%%
+
+\def\BIT@value@classification{}
+\def\BIT@value@confidential{}
+\def\BIT@value@UDC{}
+\def\BIT@value@serialnumber{}
+\def\BIT@value@school{}
+\def\BIT@value@degree{}
+\def\BIT@value@title{~~~~~(论~文~题~目)~~~~~}
+\def\BIT@value@vtitle{竖排论文题目}
+\def\BIT@value@titlemark{\BIT@value@title}
+\def\BIT@value@author{(作~者~姓~名)}
+\def\BIT@value@advisor{(姓名、专业技术职务、学位)}
+\def\BIT@value@advisorinstitute{(单位)}
+\def\BIT@value@major{}
+\def\BIT@value@studentnumber{} % _ added by wei.jianwen@gmail.com
+\def\BIT@value@submitdate{}
+\def\BIT@value@defenddate{}
+\def\BIT@value@institute{}
+\def\BIT@value@chairman{}
+\def\BIT@label@statement{}
+
+%% 设置圆圈的格式 或使用\textcircled
+\usepackage{tikz}
+\usepackage{etoolbox}
+\newcommand{\circled}[2][]{\tikz[baseline=(char.base)]
+ {\node[shape = circle, draw, inner sep = 1pt]
+ (char) {\phantom{\ifblank{#1}{#2}{#1}}};
+ \node at (char.center) {\makebox[0pt][c]{#2}};}}
+\robustify{\circled}
+
+%% 论文原创性声明
+\def\BIT@label@original{研究成果声明}
+\def\BIT@label@authorization{关于学位论文使用权的说明}
+\def\BIT@label@authorsign{作者签名:}
+\def\BIT@label@Supervisorsign{导师签名:}
+\def\BIT@label@originalDate{签字日期:}
+\def\BIT@label@originalcontent{\BITspace\BITspace 本人郑重声明:所提交的学位论文是我本人在指导教师的指导下进行的研究工作获得的研究成果。尽我所知,文中除特别标注和致谢的地方外,学位论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得北京理工大学或其它教育机构的学位或证书所使用过的材料。与我一同工作的合作者对此研究工作所做的任何贡献均已在学位论文中作了明确的说明并表示了谢意。\par 特此申明。}
+\def\BIT@label@authorizationcontent{\BITspace\BITspace 本人完全了解北京理工大学有关保管、使用学位论文的规定,其中包括:\circled{1} 学校有权保管、并向有关部门送交学位论文的原件与复印件;\circled{2} 学校可以采用影印、缩印或其它复制手段复制并保存学位论文;\circled{3} 学校可允许学位论文被查阅或借阅;\circled{4} 学校可以学术交流为目的,复制赠送和交换学位论文;\circled{5} 学校可以公布学位论文的全部或部分内容(保密学位论文在解密后遵守此规定)。}
+
+%%
+%% 英语封面标题
+%%
+\def\BIT@label@englishadvisor{Supervisor:}
+\def\BIT@label@englishstatement{Submitted in total fulfilment
+ of the requirements for the degree of \BIT@value@englishdegree \\
+ in \BIT@value@englishmajor}
+\def\BIT@label@englishauthor{Candidate Name:}
+\def\BIT@label@englishadvisor{Faculty Mentor:}
+\def\BIT@label@englishchairman{Chair, Thesis Committee:}
+\def\BIT@label@englishinstitute{School or Department:}
+\def\BIT@label@englishdegree{Degree Applied:}
+\def\BIT@label@englishmajor{Major:}
+\def\BIT@label@englishschool{Degree by:}
+\def\BIT@label@englishdate{The Date of Defence:}
+
+
+%%
+%% 英语封面内容
+%%
+\def\BIT@value@englishtitle{(English Title of Thesis)}
+\def\BIT@value@englishauthor{(Author Name)}
+\def\BIT@value@englishadvisor{(Supervisor Name)}
+\def\BIT@value@englishinstitute{(Institute Name)}
+\def\BIT@value@englishscholl{(BIT)}
+\def\BIT@value@englishchair{(someone)}
+\def\BIT@value@englishdate{}
+\def\BIT@value@englishdegree{}
+\def\BIT@value@englishmajor{}
+
+
+
+\def\BIT@label@abstract{摘要}
+\def\BIT@label@englishabstract{Abstract}
+\def\BIT@label@keywords{关键词:}
+\def\BIT@label@englishkeywords{Key Words:~}
+\def\BIT@label@conclusion{结论}
+\def\BIT@label@appendix{附录}
+\def\BIT@label@publications{攻读学位期间发表论文与研究成果清单}
+\def\BIT@label@projects{攻读学位期间参与的项目}
+\def\BIT@label@resume{作者简介}
+\def\BIT@label@reference{参考文献!!!!}
+\def\BIT@label@thanks{致谢}
+\def\BIT@value@templateversion{v1.2}
+%%
+%% label in the head 页眉页脚
+%%
+\def\BIT@label@headschoolname{北京理工大学硕士学位论文}
+
+%% 当前模板的版本
+\newcommand{\version}{\BIT@value@templateversion}
+
+%% ==============引用geometry 宏包设置纸张和页面========================
+% 设置版面:上3.5cm,下2.5cm,左2.7cm,右2.7cm,页眉2.5cm,页脚1.8cm,装订线0cm
+\usepackage[%
+paper=a4paper,%
+top=3.5cm,% 上 3.5cm %
+bottom=2.5cm,% 下 2.5cm %
+left=2.7cm,% 左 2.7cm %
+right=2.7cm,% 右 2.7cm %
+headheight=1.0cm,% 页眉 2.5cm %
+footskip=0.7cm% 页脚 1.8cm %
+]{geometry} % 页面设置 %
+
+\parskip 0.5ex plus 0.25ex minus 0.25ex
+%% Command -- Clear Double Page
+\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
+ \thispagestyle{empty}%
+ \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
+% 设置行距,大概为22榜
+\RequirePackage{setspace}
+\setstretch{1.523}
+
+%% 设置章节格式, 黑体三号加粗居中,行距22磅,与正文或节标题的间距设定为段后间距1行。章序号与章名间空一格。
+\ctexset{chapter={
+ name = {第,章},
+ number = {\arabic{chapter}},
+ format = {\bfseries \sffamily \centering \zihao{3}},
+ pagestyle = {BIT@headings},
+ beforeskip = 16 bp,
+ afterskip = 32 bp,
+ fixskip = true,
+ }
+}
+%% 设置一级章节格式
+% 黑体四号加粗顶左,行距22磅,与上一节的间距为1行,与下面正文或节标题的段间间距为0.5行。序号与题目间空一格。
+
+\ctexset{section={
+ format={\raggedright \bfseries \sffamily \zihao{4}},
+ beforeskip = 28bp plus 1ex minus .2ex,
+ afterskip = 24bp plus .2ex,
+ fixskip = true,
+ }
+}
+
+% 设置二级标题格式
+
+% 黑体小四加粗顶左,行距22磅,与上一节的间距为1行,与下面正文或节标题的段间间距为0.5行。序号与题目间空一格。
+
+\ctexset{subsection={
+ format = {\bfseries \sffamily \raggedright \zihao{-4}},
+ beforeskip =28bp plus 1ex minus .2ex,
+ afterskip = 24bp plus .2ex,
+ fixskip = true,
+ }
+}
+
+% 设置三节标题格式
+
+\ctexset{subsubsection={
+ format={\heiti \raggedright \zihao{-4}},
+ beforeskip=28bp plus 1ex minus .2ex,
+ afterskip=24bp plus .2ex,
+ fixskip=true,
+ }
+}
+
+%% 设定目录格式。目录颜色更改黑色
+\addtocontents{toc}{\protect\hypersetup{hidelinks}}
+\addtocontents{lot}{\protect\hypersetup{hidelinks}}
+\addtocontents{lof}{\protect\hypersetup{hidelinks}}
+
+\RequirePackage{titletoc}
+\titlecontents{chapter}[0pt]{\songti \zihao{4}}
+ {\bf\thecontentslabel\hspace{\ccwd}}{\bf}
+ {\hspace{.5em}\titlerule*{.}\contentspage}
+\titlecontents{section}[2\ccwd]{\songti \zihao{-4}}
+ {\thecontentslabel\hspace{\ccwd}}{}
+ {\hspace{.5em}\titlerule*{.}\contentspage}
+\titlecontents{subsection}[4\ccwd]{\songti \zihao{-4}}
+ {\thecontentslabel\hspace{\ccwd}}{}
+ {\hspace{.5em}\titlerule*{.}\contentspage}
+
+\titlecontents{figure}[0pt]{\songti\zihao{-4}}
+ {\figurename~\thecontentslabel\quad}{\hspace*{-1.5cm}}
+ {\hspace{.5em}\titlerule*{.}\contentspage}
+
+\titlecontents{table}[0pt]{\songti\zihao{-4}}
+ {\tablename~\thecontentslabel\quad}{\hspace*{-1.5cm}}
+ {\hspace{.5em}\titlerule*{.}\contentspage}
+
+%% 选择编译
+\RequirePackage{ifthen}
+
+%% check pdfTeX mode
+\RequirePackage{ifpdf}
+
+%% fancyhdr 页眉页脚控制
+\RequirePackage{fancyhdr}
+
+% 空 页眉页脚
+\fancypagestyle{BIT@empty}{%
+ \fancyhf{}}
+
+% ======正文页眉页脚=================
+\fancypagestyle{BIT@headings}{%
+ \fancyhf{}
+ \fancyfoot[C]{\songti\zihao{5} \thepage}
+ \fancyhead[C]{\ifBIT@master\zihao{5}{\songti 北京理工大学硕士学位论文}
+ \else\zihao{5}{\songti 北京理工大学博士学位论文}\fi}
+ }
+
+% ==================================对于openright 选项,必须保证章页右开,且如果前章末页内容须清空其页眉页脚。===================
+\let\BIT@cleardoublepage\cleardoublepage
+\newcommand{\BIT@clearemptydoublepage}{%
+ \clearpage{\pagestyle{BIT@empty}\BIT@cleardoublepage}}
+\let\cleardoublepage\BIT@clearemptydoublepage
+
+ % ================修该frontmatter 的页码为大写罗马格式,并调整页面风格===============
+\renewcommand{\frontmatter}{
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \@mainmatterfalse
+ \pagenumbering{Roman}
+ \pagestyle{BIT@headings}
+}
+% =======================修改mainmatter 的页码为阿拉伯格式,并调整页面风格========================
+\renewcommand{\mainmatter}{
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \@mainmattertrue
+ \pagenumbering{arabic}
+ \pagestyle{BIT@headings}
+}
+
+
+%% 复杂表格
+\RequirePackage{threeparttable}
+\RequirePackage{dcolumn}
+\RequirePackage{multirow}
+\RequirePackage{booktabs}
+\newcolumntype{d}[1]{D{.}{.}{#1}}% or D{.}{,}{#1} or D{.}{\cdot}{#1}
+
+
+%% 定义几个常用的数学常量符号
+\newcommand{\me}{\mathrm{e}} % 定义 对数常数e,虚数符号i,j以及微分算子d为直立体。
+\newcommand{\mi}{\mathrm{i}}
+\newcommand{\mj}{\mathrm{j}}
+\newcommand{\dif}{\,\mathrm{d}}
+
+\theoremstyle{plain}
+ \newtheorem{algo}{算法~}[chapter]
+ \newtheorem{thm}{定理~}[chapter]
+ \newtheorem{lem}[thm]{引理~}
+ \newtheorem{prop}[thm]{命题~}
+ \newtheorem{cor}[thm]{推论~}
+\theoremstyle{definition}
+ \newtheorem{defn}{定义~}[chapter]
+ \newtheorem{conj}{猜想~}[chapter]
+ \newtheorem{exmp}{例~}[chapter]
+ \newtheorem{rem}{注~}
+ \newtheorem{case}{情形~}
+\renewcommand{\proofname}{\bf 证明}
+
+%% 英文字体使用 Times New Roman
+\RequirePackage{xltxtra} % \XeTeX Logo
+\setmainfont{Times New Roman}
+\setsansfont{Arial}
+\setmonofont{Courier New}
+
+
+%% graphics packages
+\RequirePackage{graphicx}
+%% 并列子图
+\RequirePackage{subfigure}
+
+\RequirePackage{wrapfig}
+%% ===========================设置图表标题选项==========================
+\RequirePackage{amsmath}
+\RequirePackage{caption}
+\DeclareCaptionLabelSeparator{zhspace}{\hspace{1\ccwd}}
+\DeclareCaptionFont{fontsize}{\zihao{5}}
+\captionsetup{
+ font = {fontsize},
+ labelsep = zhspace,
+}
+\captionsetup[table]{
+ position = top,
+ aboveskip = 6bp,
+ belowskip = 6bp,
+}
+\numberwithin{table}{chapter}
+\captionsetup[figure]{
+ position = bottom,
+ aboveskip = 6bp,
+ belowskip = 6bp,
+}
+
+%% 如果插入的图片没有指定扩展名,那么依次搜索下面的扩展名所对应的文件
+\DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.jpeg}
+% ccaption -- bicaption
+% \RequirePackage{ccaption}
+% \captiondelim{\ }
+% \captionnamefont{\songti\zihao{5}}
+% \captiontitlefont{\songti\zihao{5}}
+
+
+%% sort and compress citations
+\RequirePackage[numbers,square,comma,super,sort&compress]{natbib}
+% 上标引用
+\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}}
+
+
+% 将浮动参数设为较宽松的值
+\renewcommand{\textfraction}{0.15}
+\renewcommand{\topfraction}{0.85}
+\renewcommand{\bottomfraction}{0.65}
+\renewcommand{\floatpagefraction}{0.60}
+
+
+% 定公式、图、表编号为"3-1"的形式,即分隔符由.变为短杠
+\renewcommand\theequation{\arabic{chapter}.\arabic{equation}}
+\renewcommand\thefigure{\arabic{chapter}.\arabic{figure}}
+\renewcommand\thetable{\arabic{chapter}.\arabic{table}}
+
+% 颜色宏包
+\RequirePackage{xcolor}
+
+
+% 中文破折号
+\newcommand{\cndash}{\rule{0.0em}{0pt}\rule[0.35em]{1.4em}{0.05em}\rule{0.2em}{0pt}}
+
+% listings 源代码显示宏包
+\RequirePackage{listings}
+\lstset{tabsize=4, %
+ frame=shadowbox, % 把代码用带有阴影的框圈起来
+ commentstyle=\color{red!50!green!50!blue!50},% 浅灰色的注释
+ rulesepcolor=\color{red!20!green!20!blue!20},% 代码块边框为淡青色
+ keywordstyle=\color{blue!90}\bfseries, % 代码关键字的颜色为蓝色,粗体
+ showstringspaces=false,% 不显示代码字符串中间的空格标记
+ stringstyle=\ttfamily, % 代码字符串的特殊格式
+ keepspaces=true, %
+ breakindent=22pt, %
+ numbers=left,% 左侧显示行号
+ stepnumber=1,%
+ numberstyle=\tiny, % 行号字体用小号
+ basicstyle=\footnotesize, %
+ showspaces=false, %
+ flexiblecolumns=true, %
+ breaklines=true, % 对过长的代码自动换行
+ breakautoindent=true,%
+ breakindent=4em, %
+ aboveskip=1em, % 代码块边框
+ %% added by http://bbs.ctex.org/viewthread.php?tid=53451
+ fontadjust,
+ captionpos=t,
+ framextopmargin=2pt,framexbottommargin=2pt,abovecaptionskip=-3pt,belowcaptionskip=3pt,
+ xleftmargin=4em,xrightmargin=4em, % 设定listing左右的空白
+ texcl=true,
+ % 设定中文冲突,断行,列模式,数学环境输入,listing数字的样式
+ extendedchars=false,columns=flexible,mathescape=true
+ numbersep=-1em
+}
+\renewcommand{\lstlistingname}{代码} %% 重命名Listings标题头
+
+%% hyperref package
+\definecolor{navyblue}{RGB}{0,0,128}
+\RequirePackage{hyperref}
+\hypersetup{
+ bookmarksnumbered,%
+ linktoc=all,
+ colorlinks=true,
+ citecolor=navyblue,
+ filecolor=cyan,
+ linkcolor=navyblue,
+ linkbordercolor=navyblue,
+ urlcolor=navyblue,
+ plainpages=false,%
+ pdfstartview=FitH
+}
+
+%% enumerate 列表环境间距调节
+\usepackage{enumitem}
+% \setenumerate[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt}
+% \setitemize[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=0pt}
+% \setdescription{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt}
+
+% _ 参考文献风格 added by wei.jianwen@gmail.com
+\bibliographystyle{GBT7714-2005NLang}
+
+% _ BITspace
+% \newcommand\BITspace{\protect\CTEX@spaceChar\protect\CTEX@spaceChar}
+\newcommand{\BITspace}[1][1]{\hspace{#1\ccwd}}
+
+\def\BIT@getfileinfo#1 #2 #3\relax#4\relax{%
+ \def\BITfiledate{#1}%
+ \def\BITfileversion{#2}%
+ \def\BITfileinfo{#3}}%
+\expandafter\ifx\csname ver@bitmaster-xetex.cls\endcsname\relax
+ \edef\reserved@a{\csname ver@ctextemp_bitmaster-xetex.cls\endcsname}
+\else
+ \edef\reserved@a{\csname ver@bitmaster-xetex.cls\endcsname}
+\fi
+\expandafter\BIT@getfileinfo\reserved@a\relax? ? \relax\relax
+\def\BIT@underline[#1]#2{%
+ \underline{\hbox to #1{\hfill#2\hfill}}}
+\def\BITunderline{\@ifnextchar[\BIT@underline\underline}
+
+% 中文标题页的可用命令
+\newcommand\classification[1]{\def\BIT@value@classification{#1}}
+\newcommand\studentnumber[1]{\def\BIT@value@studentnumber{#1}}
+\newcommand\confidential[1]{\def\BIT@value@confidential{#1}}
+\newcommand\UDC[1]{\def\BIT@value@UDC{#1}}
+\newcommand\serialnumber[1]{\def\BIT@value@serialnumber{#1}}
+\newcommand\school[1]{\def\BIT@value@school{#1}}
+\newcommand\degree[1]{\def\BIT@value@degree{#1}}
+\renewcommand\title[2][\BIT@value@title]{%
+ \def\BIT@value@title{#2}
+ \def\BIT@value@titlemark{\MakeUppercase{#1}}}
+
+\newcommand\vtitle[1]{\def\BIT@value@vtitle{#1}}
+\renewcommand\author[1]{\def\BIT@value@author{#1}}
+\newcommand\advisor[1]{\def\BIT@value@advisor{#1}}
+\newcommand\advisorinstitute[1]{\def\BIT@value@advisorinstitute{#1}}
+\newcommand\major[1]{\def\BIT@value@major{#1}}
+\newcommand\submitdate[1]{\def\BIT@value@submitdate{#1}}
+\newcommand\defenddate[1]{\def\BIT@value@defenddate{#1}}
+\newcommand\institute[1]{\def\BIT@value@institute{#1}}
+\newcommand\chairman[1]{\def\BIT@value@chairman{#1}}
+
+%% 第一页和第二页
+% “绘制”BIT中文标题页
+\renewcommand\maketitle[1]{%
+ \cleardoublepage
+ \thispagestyle{empty}
+ \begin{center}
+ \vspace*{60mm}
+ {\heiti\zihao{-2} \BIT@value@title}
+ \vskip 40mm
+ {\heiti \zihao{-3} \BIT@value@author} % 黑体 小三
+ \vskip 4mm
+ {\heiti \zihao{-3} \BIT@value@defenddate} % 黑体 小三
+ \end{center}
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+ }
+
+\newcommand\makeInfo[1]%
+ {
+ \newpage
+ \cleardoublepage
+ \thispagestyle{empty}
+
+% udc ltz
+{ %
+ {\heiti \zihao{5} \noindent \BIT@label@classification} \BIT@value@classification \\
+ {\heiti \zihao{5} \BIT@label@UDC} \BIT@value@UDC
+}
+
+ \begin{center}
+
+ \vskip \stretch{1}
+ {\heiti\zihao{-2} \BIT@value@title}
+ \vskip \stretch{1}
+
+ {\fangsong\zihao{4}}
+ \def\tabcolsep{1pt}
+ \def\arraystretch{1.5}
+
+ % 黑体 小三
+ {\heiti\zihao{-3}
+ \begin{tabular}{l p{3mm} c}
+ \BIT@label@author & &\BITunderline[180pt]{\BIT@value@author}
+ \\
+ \BIT@label@institute & & \BITunderline[180pt]{\BIT@value@institute}
+ \\
+ \BIT@label@advisor & & \BITunderline[180pt]{\BIT@value@advisor}
+ \\
+ \BIT@label@chairman & & \BITunderline[180pt]{\BIT@value@chairman}
+ \\
+ \BIT@label@degree & & \BITunderline[180pt]{\BIT@value@degree}
+ \\
+ \BIT@label@major & & \BITunderline[180pt]{\BIT@value@major}
+ \\
+ \BIT@label@school & & \BITunderline[180pt]{\BIT@value@school}
+ \\
+ \BIT@label@defenddate & & \BITunderline[180pt]{\BIT@value@defenddate}
+ \end{tabular}}
+
+ \end{center}
+
+ \vskip \stretch{0.5}
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+}
+
+% English Title Page
+% 英文标题页可用命令
+\newcommand\englishtitle[1]{\def\BIT@value@englishtitle{#1}}
+\newcommand\englishauthor[1]{\def\BIT@value@englishauthor{#1}}
+\newcommand\englishadvisor[1]{\def\BIT@value@englishadvisor{#1}}
+\newcommand\englishschool[1]{\def\BIT@value@englishschool{#1}}
+\newcommand\englishinstitute[1]{\def\BIT@value@englishinstitute{#1}}
+\newcommand\englishdate[1]{\def\BIT@value@englishdate{#1}}
+\newcommand\englishdegree[1]{\def\BIT@value@englishdegree{#1}}
+\newcommand\englishmajor[1]{\def\BIT@value@englishmajor{#1}}
+\newcommand\englishchairman[1]{\def\BIT@value@englishchairman{#1}}
+
+% "绘制"英文标题页
+\newcommand\makeEnglishInfo[1]{%
+ \cleardoublepage
+ \thispagestyle{empty}
+
+ \begin{center}
+
+
+ \vspace*{10em}
+% 论文题目 Times New Roman 小二 加粗
+ {\zihao{-2}\textbf{\BIT@value@englishtitle}}
+ % \bfseries
+ \vskip \stretch{1}
+
+% Times New Roman 小三
+ {\zihao{-3}
+ \begin{tabular}{ll}
+ \BIT@label@englishauthor & \BITunderline[200pt]{\BIT@value@englishauthor}
+ \\
+ \BIT@label@englishinstitute & \BITunderline[200pt]{\BIT@value@englishinstitute}
+ \\
+ \BIT@label@englishadvisor & \BITunderline[200pt]{\BIT@value@englishadvisor}
+ \\
+ \BIT@label@englishchairman & \BITunderline[200pt]{\BIT@value@englishchairman}
+ \\
+ \BIT@label@englishdegree & \BITunderline[200pt]{\BIT@value@englishdegree}
+ \\
+ \BIT@label@englishmajor & \BITunderline[200pt]{\BIT@value@englishmajor}
+ \\
+ \BIT@label@englishschool & \BITunderline[200pt]{\BIT@value@englishschool}
+ \\
+ \BIT@label@englishdate & \BITunderline[200pt]{\BIT@value@englishdate}
+ \end{tabular}}
+
+ \end{center}
+
+ \vskip \stretch{0.5}
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+}
+
+% 绘制树立排放的论文题目和学校名称
+
+\newcommand\makeVerticalTitle{
+ \cleardoublepage
+ \thispagestyle{empty}
+ \vskip 5cm
+ \begin{center}
+ \setstretch{1.1}
+ \begin{minipage}{1em}
+ {\heiti\zihao{3}\BIT@value@vtitle}
+ \vskip 2cm
+ {\heiti\zihao{3}\BIT@value@school}
+ \end{minipage}
+ \end{center}
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+
+}
+
+% 原创性声明
+\newcommand\makeDeclareOriginal{%
+ \cleardoublepage
+ \pdfbookmark[0]{声明}{statement}
+ \thispagestyle{empty}
+ \begin{center}
+ {\bf\zihao{3} \BIT@label@original}
+ \end{center}
+ \vskip 10pt
+ {\zihao{4}\BIT@label@originalcontent}
+ \vskip 10pt
+ \hspace{8em}{\zihao{4}\BIT@label@authorsign} \BITunderline[6em]{} \hspace{2em} {\zihao{4}\BIT@label@originalDate} \BITunderline[6em]{}
+
+ \vskip 30mm
+
+ \begin{center}
+ {\bf\zihao{3} \BIT@label@authorization}
+ \end{center}
+ \vskip 10pt
+ {\zihao{4} \BIT@label@authorizationcontent}
+ \vskip 40pt
+
+ \hspace{8em}{\zihao{4}\BIT@label@authorsign} \BITunderline[6em]{} \hspace{2em} {\zihao{4}\BIT@label@Supervisorsign} \BITunderline[6em]{}
+ \vskip 15pt
+ \hspace{8em}{\zihao{4}\BIT@label@originalDate} \BITunderline[6em]{} \hspace{2em} {\zihao{4}\BIT@label@originalDate} \BITunderline[6em]{}
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+
+}
+
+
+% 页眉页脚
+\pagestyle{fancy}
+\fancyhf{}
+\fancyhead[C]{\songti \zihao{5} \BIT@label@headschoolname} % 奇数页左页眉
+\fancyfoot[C]{\songti \zihao{5} {\thepage}} % 页脚
+
+
+\fancypagestyle{plain}{% 设置开章页页眉页脚风格(只有页码作为页脚)
+ \fancyhf{}%
+ \fancyfoot[C]{\songti \zihao{5} \BIT@label@headschoolname}
+ \fancyfoot[C]{\songti \zihao{5} ~---~{\thepage}~---~} % 首页页脚格式
+}
+
+
+ % 中文摘要
+ \newenvironment{abstract}
+ {
+ \cleardoublepage
+ \chapter{\BIT@label@abstract}
+ }
+ {}
+% 下一页从偶数页开始
+ \newcommand\beginatevenpage{
+ \clearpage
+ \if@twoside
+ \thispagestyle{empty}
+ \cleardoublepage
+ \fi
+ }
+ % 中文关键词
+ \newcommand\keywords[1]{%
+ \vspace{2ex}\noindent{\bf \BIT@label@keywords} #1}
+
+ % 英文摘要
+ \newenvironment{englishabstract}
+ {
+ \clearpage
+ \chapter{\BIT@label@englishabstract}
+ }
+ {}
+
+ % 英文摘要
+ \newcommand\englishkeywords[1]{%
+ \vspace{2ex}\noindent{\bf \BIT@label@englishkeywords} #1}
+
+
+% 目录
+\renewcommand\tableofcontents{%
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \chapter*{\contentsname}% 目录里显示“目录”,否则\chapter*
+ \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
+ \pdfbookmark[0]{目录}{bittoc}
+ \@starttoc{toc}%
+ \if@restonecol\twocolumn\fi
+}
+
+
+% 参考文献环境
+\renewenvironment{thebibliography}[1]
+ {\zihao{5}
+ \chapter*{\bibname}
+ \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
+ \addcontentsline{toc}{chapter}{参考文献}
+ \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \setlength{\parsep}{1mm}
+ \setlength{\labelsep}{0.5em}
+ \setlength{\itemsep}{0.05pc}
+ \setlength{\listparindent}{0in}
+ \setlength{\itemindent}{0in}
+ \setlength{\rightmargin}{0in}
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+
+
+\newenvironment{publications}[1]
+ {\chapter{\BIT@label@publications}%
+ \@mkboth{\MakeUppercase\BIT@label@publications}
+ {\MakeUppercase\BIT@label@publications}%
+ \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \setlength{\parsep}{1mm}
+ \setlength{\labelsep}{0.5em}
+ \setlength{\itemsep}{0.05pc}
+ \setlength{\listparindent}{0in}
+ \setlength{\itemindent}{0in}
+ \setlength{\rightmargin}{0in}
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `publications' environment}}%
+ \endlist}
+
+
+\newenvironment{projects}[1]
+ {\chapter{\BIT@label@projects}%
+ \@mkboth{\MakeUppercase\BIT@label@projects}
+ {\MakeUppercase\BIT@label@projects}%
+ \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `projects' environment}}%
+ \endlist}
+
+ \newenvironment{resume}
+ {\chapter{\BIT@label@resume}}
+ {}
+
+\newenvironment{resumesection}[1]
+ {{\noindent\normalfont\bfseries #1}
+ \list{}{\labelwidth\z@
+ \leftmargin 2\ccwd}
+ \item\relax}
+ {\endlist}
+
+\newenvironment{resumeli}[1]
+ {{\noindent\normalfont\bfseries #1}
+ \list{}{\labelwidth\z@
+ \leftmargin 4\ccwd
+ \itemindent -2\ccwd
+ \listparindent\itemindent}
+ \item\relax}
+ {\endlist}
+
+\newenvironment{conclusion}
+ {\chapter*{结论}
+ \@mkboth{结论}{结论}%
+ \addcontentsline{toc}{chapter}{结论}}
+ {}
+
+\renewenvironment{thanks}
+ {\chapter{\BIT@label@thanks}
+ \fangsong
+ }
+ {}
+
+\newenvironment{symbolnote}
+ {\chapter{\BIT@label@symbolnote}
+ \fangsong}
+ {}
+
+ %% ===========================术语=====================
+ \newcommand{\bit@denotation@name}{主要符号对照表}
+ \newenvironment{denotation}[1][2.5cm]{
+ \chapter{\bit@denotation@name} % no tocline
+ \noindent\begin{list}{}%
+ {\vskip-30bp\zihao{-4}
+ \renewcommand\makelabel[1]{##1\hfil}
+ \setlength{\labelwidth}{#1} % 标签盒子宽度
+ \setlength{\labelsep}{0.5cm} % 标签与列表文本距离
+ \setlength{\itemindent}{0cm} % 标签缩进量
+ \setlength{\leftmargin}{\labelwidth+\labelsep} % 左边界
+ \setlength{\rightmargin}{0cm}
+ \setlength{\parsep}{0cm} % 段落间距
+ \setlength{\itemsep}{0cm} % 标签间距
+ \setlength{\listparindent}{0cm} % 段落缩进量
+ \setlength{\topsep}{0pt} % 标签与上文的间距
+ }}{\end{list}}
+% ====增加化学、国际单位宏包
+ \RequirePackage[version=4]{mhchem}
+ \RequirePackage{siunitx}
+\setcounter{secnumdepth}{4} % 章节编号深度 (part 对应 -1)
+\setcounter{tocdepth}{2} % 目录深度 (part 对应 -1)
+
+%% End of file `bitmaster-xetex.cls'.
+
+%% =========================================================
+
+% \end{macrocode}
+% \begin{macrocode}
+%</graduate>
+% \end{macrocode}
%
% \iffalse
%<*dtx-style>
diff --git a/macros/latex/contrib/bithesis/bithesis.ins b/macros/latex/contrib/bithesis/bithesis.ins
index 98393c70e9..eb76bab010 100644
--- a/macros/latex/contrib/bithesis/bithesis.ins
+++ b/macros/latex/contrib/bithesis/bithesis.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2021
+%% Copyright (C) 2022
%% Association of Bit Network Pioneer and any individual authors listed elsewhere in this file.
%% --------------------------------------------------------------------------
%%
@@ -22,7 +22,7 @@
\preamble
- Copyright (C) 2021
+ Copyright (C) 2022
Association of Bit Network Pioneer and any individual authors listed in the documentation.
------------------------------------------------------------------------------
@@ -48,6 +48,7 @@
\usedir{tex/latex/bithesis}
\file{bitart.cls} {\from{\jobname.dtx}{cls,article}}
\file{bitbook.cls} {\from{\jobname.dtx}{cls,book}}
+ \file{bitgrad.cls} {\from{\jobname.dtx}{cls,graduate}}
\file{dtx-style.sty} {\from{\jobname.dtx}{dtx-style}}
}
@@ -61,6 +62,7 @@
\Msg{* *}
\Msg{* bitart.cls *}
\Msg{* bitbook.cls *}
+\Msg{* bitgrad.cls *}
\Msg{* *}
\Msg{* To produce the documentation run the file ctex.dtx *}
\Msg{* through XeLaTeX. *}
diff --git a/macros/latex/contrib/bithesis/bithesis.pdf b/macros/latex/contrib/bithesis/bithesis.pdf
index ac61b8a83b..536c9af015 100644
--- a/macros/latex/contrib/bithesis/bithesis.pdf
+++ b/macros/latex/contrib/bithesis/bithesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/bithesis/contributing-zh.md b/macros/latex/contrib/bithesis/contributing-zh.md
index cfdf95b80d..bbc6163d82 100644
--- a/macros/latex/contrib/bithesis/contributing-zh.md
+++ b/macros/latex/contrib/bithesis/contributing-zh.md
@@ -12,25 +12,21 @@
## Guidance
-**[我不想看下面的内容,我只是想问个小问题!!!](#加入我们的-slack-频道)**
+**[我不想看下面的内容,我只是想问个小问题!!!](#加入我们的-QQ-群)**
| | 普通使用者 | 开发者 |
| ---------- | ------------------------------- | ------------------------------------------- |
-| 提出问题 | [Slack](#加入我们的-slack-频道) | [Slack](#加入我们的-slack-频道) |
-| 提交 Bug | [Slack](#加入我们的-slack-频道) | [Github - Issues](#在-github-上提交-bug) |
-| 有好的想法 | [Slack](#加入我们的-slack-频道) | [Slack](#加入我们的-slack-频道) |
+| 提出问题 | [QQ 群](#加入我们的-qq-群) | [QQ 群](#加入我们的-qq-群) |
+| 提交 Bug | [QQ 群](#加入我们的-qq-群) | [Github - Issues](#在-github-上提交-bug) |
+| 有好的想法 | [QQ 群](#加入我们的-qq-群) | Github - Issues |
| 提交 PR | | [Github - Pull Request](#提交-pull-request) |
-| 有信心维护代码 | | [加入 Slack 并联系我们](#加入我们的-slack-频道) |
+| 有信心维护代码 | | [加入QQ 群并联系我们](#加入我们的-qq-群) |
-## 加入我们的 Slack 频道
+## 加入我们的 QQ 群
-在我们提供的[官方 Slack 频道][slack channel invitation]中有**很多活跃的维护者**和**友好的社区氛围**。在这里你能获得很多与本项目有关的帮助。
+在我们提供的[QQ 群(737548118)][QQ chat group invitation]中有**很多活跃的维护者**和**友好的社区氛围**。在这里你能获得很多与本项目有关的帮助。
-[![点击这里加入 Slack](/assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
-
-- 使用 `#community` 频道来**讨论问题**、**提出你的建议**或者**寻求帮助**。
-- 使用 `#random` 频道来**水群**:laughing:!
-- 使用 `#announcement` 频道获取和本项目相关的**最新资讯和使用方法**!
+[![Join on QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-737548118-green)](https://jq.qq.com/?_wv=1027&k=KYDrmS5z)
> 提示:关于具体如何提出问题并没有明确的要求。总之请提供尽可能详细的信息,并且思考一下这个问题是不是已经被解决了。
@@ -54,5 +50,5 @@
寻找更细致的流程请参考
_[Github Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_。
-[slack channel invitation]: https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw
+[QQ chat group invitation]: https://jq.qq.com/?_wv=1027&k=KYDrmS5z
[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/macros/latex/contrib/bithesis/contributing.md b/macros/latex/contrib/bithesis/contributing.md
index 7fe28f4955..3dcd006aaa 100644
--- a/macros/latex/contrib/bithesis/contributing.md
+++ b/macros/latex/contrib/bithesis/contributing.md
@@ -11,26 +11,22 @@ and feel free to propose changes to this document in a pull request.
## Guidance
-**[I don't want to read this whole thing, I just have a small question!!!](#join-our-slack-channel)**
+**[I don't want to read this whole thing, I just have a small question!!!](#join-our-QQ-chat-group)**
| | For Users | For Developers |
| --------------- | -------------------------------- | ---------------------------------------------- |
-| Have a Question | [Slack](#join-our-slack-channel) | [Slack](#join-our-slack-channel) |
-| Bug Report | [Slack](#join-our-slack-channel) | [Github - Issues](#bug-report-on-github) |
-| Feature Request | [Slack](#join-our-slack-channel) | [Slack](#join-our-slack-channel) |
+| Have a Question | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
+| Bug Report | [QQ Chat Group](#join-our-QQ-chat-group) | [Github - Issues](#bug-report-on-github) |
+| Feature Request | [QQ Chat Group](#join-our-QQ-chat-group) | [QQ Chat Group](#join-our-QQ-chat-group) |
| Pull Request | | [Github - Pull Request](#pull-request-process) |
-## Join Our Slack Channel
+## Join Our QQ Chat Group
-We provide an [official Slack channel][slack channel invitation]
+We provide an [QQ Chat Group][QQ chat group invitation]
with **a bunch of active maintainers** and **a friendly community**
to give helpful advice **if you have any questions**.
-[![Join on Slack](/assets/slack.svg)](https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw)
-
-- use `#community` channel to **report a bug**, **feature request** and **asking for help**.
-- use `#random` channel to have **unrelated discussion**:laughing:!
-- use `#announcement` channel if you don't want to miss the **updated news and features**!
+[![Join on QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-737548118-green)](https://jq.qq.com/?_wv=1027&k=KYDrmS5z)
> note: there is no detailed rules about how to ask question, just provide enough information and
rethink before write.
@@ -56,5 +52,5 @@ The following steps will help you finish a pull request.
For more information, refer to the
_[Github Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests)_.
-[slack channel invitation]: https://join.slack.com/t/bithesis/shared_invite/zt-epmzkyk0-fJRsUS36AlwMNB2AI_Q~Vw
+[QQ chat group invitation]: https://jq.qq.com/?_wv=1027&k=KYDrmS5z
[issue reporting link]: https://github.com/BITNP/BIThesis/issues/new
diff --git a/macros/latex/contrib/messagepassing/README.md b/macros/latex/contrib/messagepassing/README.md
deleted file mode 100644
index 4af22705d4..0000000000
--- a/macros/latex/contrib/messagepassing/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# The `messagepassing` package
-
-This package provides an environement and commands to easily draw diagrams to represent communication protocols using message passing among processes.
-
-Processes are represented as horizontal (or vertical) lines, and communications as arrows between lines. The package also provides multiple macros to decorate those diagrams, for instance to annotate the diagram, to add crashes to the processes, checkpoints, etc..
-
-The package works on top of tikz, which makes it easy to add ad-hoc items using regular tikz commands.
-To use it, run the following commands:
-
-```
-$ latex messagepassing.ins
-$ pdflatex messagepassing.dtx
-```
-
-The first command generates the file messagepassing.sty that should be placed in the same folder than your main document. The second command generates the file messagepassing.pdf (you may require multiple runs to adjust internal references), which is the documentation for the package.
-
-
-## License
-
-This package is provided under the terms of the LaTeX Project Public License, version 1.3 or later.
-
-## Author
-
-The initial author of this package is Martin Vassor.
-
-## Related packages
-
- - [msc](https://www.ctan.org/pkg/msc): used to typeset message sequence diagrams, according to the Recommendation Z.120 of the International Telecommunication Union;
diff --git a/macros/latex/contrib/messagepassing/messagepassing.dtx b/macros/latex/contrib/messagepassing/messagepassing.dtx
deleted file mode 100644
index 3811f558a5..0000000000
--- a/macros/latex/contrib/messagepassing/messagepassing.dtx
+++ /dev/null
@@ -1,861 +0,0 @@
-% \iffalse meta-comment
-% Copyright (C) 2022 by Martin Vassor
-% This file 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.
-%
-% \fi
-
-% \iffalse
-%<package> \NeedsTeXFormat{LaTeX2e}
-%<package> \ProvidesPackage{messagepassing}[2022/02/18 v1.0 A package to draw message passing diagrams]
-%<package> \RequirePackage{tikz}
-%<package> \usetikzlibrary{quotes, calc, arrows.meta}
-%<package> \RequirePackage{xparse}
-%<package> \RequirePackage{float}
-%
-
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage{messagepassing}
-\usepackage[hidelinks]{hyperref}
-\usepackage{xspace}
-\usepackage[super]{nth}
-\usepackage{subcaption}
-\usepackage{listings}
-\lstset{
- language=[LaTeX]{TeX},
-}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
- \DocInput{messagepassing.dtx}
-\end{document}
-%</driver>
-% \fi
-
-% \CheckSum{0}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-%
-% \changes{v1.0}{2022/02/18}{Initial version for publication}
-%
-% \GetFileInfo{messagepassing.sty}
-%
-% \title{The \textsf{messagepassing} package\thanks{This document
-% corresponds to \textsf{messagepassing}~\fileversion,
-% dated \filedate.}}
-% \author{Martin Vassor\\ \texttt{bromind+ctan@gresille.org}}
-%
-%
-% \maketitle
-% \tableofcontents
-% \newcommand{\TikZ}{Ti\textit{k}Z\xspace}
-
-% \section{Introduction}
-% This package provides an environment and associated macros to easily draw
-% message passing diagrams. For instance, Execution.~\ref{mp:ex1} shows the capabilities offered
-% by the package.
-%
-% \begin{messagepassing}[][An example of message passing][h][mp:ex1]
-% \newprocesswithlength{p}{9}
-% \newprocesswithlength{q}{9}
-% \newprocesswithlength{r}{5}
-% \crash{r}{5}{k}
-%
-% \checkpoint{p}{0}{c_p^0}
-% \checkpoint{q}{0}{c_q^0}
-% \checkpoint{r}{0}{c_r^0}
-% \checkpoint{p}{4}{c_p^1}
-%
-% \stateinterval{p}{0}{si_p^0}
-% \stateinterval{q}{0}{si_q^0}
-% \stateinterval{r}{0}{si_r^0}
-%
-% \sendwithstateinterval{p}{1}{q}{2}{si_q^1}
-% \sendwithstateinterval{r}{3}{q}{4}{si_q^2}
-% \sendwithstateintervalandname{q}{5}{p}{6}{si_p^1}{\(m\)}
-% \sendoutofband{q}{5}{r}{6}{\(m_\mathrm{copy}\)}
-% \stateinterval{r}{6}{si_r^0}
-% \restart{r}{6}{3}
-%
-% \annotate{r}{8}{restart}
-% \annotatexplicit{p}{8}{\(1+1=2\)}{note}
-%
-% \colouredbox{p}{q}{7}{9}{Protocol}
-%
-% \drawtimeline{9}
-% \end{messagepassing}
-
-%
-% \section{Usage}
-% \subsection{Loading the package}
-% The package accepts two options: \verb+vertical+ and \verb+annotatevertical+.
-% If the former is set, executions will be drawn with time going from top to
-% bottom, instead of from left to right. Doing so, almost all
-% labels\footnote{Annotations are not rotated, unless explicitly asked.} are
-% rotated as well. If, \emph{in addition}, \verb+annotatevertical+ is set, then
-% annotations (including named of colouredboxes) are rotated as well.
-
-% \subsection{Basic usage}
-% \subsubsection{Creating a diagram.}
-
-% \DescribeEnv{messagepassing} A diagram can easily be created using the
-% |messagepassing| environment. The syntax is:
-% |\begin{messagepassing}| \oarg{tikz} \oarg{caption} \oarg{placement}
-% \oarg{label}.
-% The first optional argument (\emph{tikz}) contains arguments that are passed
-% to the underlying tikz environment. The second argument (\emph{caption}) has
-% two effect: if set, it turns the diagram into a floating figure, and the
-% content of the argument is the caption of the floating figure. The third
-% argument (\emph{placement}) is the placement option of the figure, the default
-% is |p|. Finally, the fourth option (\emph{label}) is the label used to
-% reference the figure.
-%
-% For instance, the diagram in Figure~\ref{mp:ex1} is created with the following
-% commands:
-% \begin{verbatim}
-% \begin{messagepassing}[][An example of message passing][h][mp:ex1]
-% % ...
-% \end{messagepassing}
-% \end{verbatim}
-
-% \paragraph{Setting up the diagram.}
-% When created, the diagram is empty. Before actually writing the message
-% exchanges, we have to set up a few things: set whether we want a timeline (and
-% if it is the case, of which length), and set the number of processes with
-% their names, etc.
-% \subparagraph{Creating a new process.}
-% Each process is characterised by its name.
-% \DescribeMacro{\newprocess} The simplest macro to create a new process is then
-% |\newprocess| \marg{name}, where \marg{name} is the name of the process (resp.
-% \(p\), \(q\), and \(r\) in Figure~\ref{mp:ex1}).
-%
-% In addition, we often draw a horizontal\footnote{By default, the line is vertical if
-% the option |vertical| is used.} line that represent the running process.
-% Although this line can be manually
-% added\footnote{|processlength|\marg{process}\marg{length}
-% creates a line of length \emph{length} for process \emph{process}.}, we also
-% provide a simple macro that performs both actions:
-% \DescribeMacro{\newprocesswithlength}
-% |\newprocesswithlength|\marg{name}\marg{length}.
-%
-% An other alternative is to name the state in which the process starts (in
-% Fig~\ref{mp:ex1}, we call those states \(si\) as \emph{state intervals}).
-% Again, this can be achieved using individual commands, but we also provide
-% \DescribeMacro{\newprocesswithstateinterval}
-% |\newprocesswithstateinterval|\marg{name}\marg{state name}.
-%
-% Finally, an other way to create a process is to create a process that
-% (eventually) fails, which is represented by the process' line terminating
-% early with a cross. For that, we provide \DescribeMacro{\newprocesswithcrash}
-% |\newprocesswithcrash|\marg{name}\marg{length}\marg{crash coordinate name}.
-% The first two arguments are similar to |\newprocesswithlength|, and the latter
-% one is used to provide a name for the coordinate where the crash occurs. This
-% name can later be used to place nodes.
-%
-% Of course, we can imagine other combinations (e.g. a process with a length and
-% a state interval). We do not provide individual commands for each combination,
-% but the can be easily achieved using separate commands.
-%
-% As an example, the processes of Fig.~\ref{mp:ex1} are created as follows.
-% \begin{verbatim}
-% \newprocesswithlength{p}{9}
-% \newprocesswithlength{q}{9}
-% \newprocesswithlength{r}{5}
-% \end{verbatim}
-%
-% \subparagraph{Setting up a timeline.}
-% An other setup action consists in setting up (if wanted) the timeline. Notice
-% that this can be done \emph{at any place} in the diagram. To do so, simply use
-% the command \DescribeMacro{\drawtimeline}|\drawtimeline|\marg{length}, where
-% \emph{length} is the length of the desired timeline.
-
-% \subsubsection{Populating the run.}
-% Now that we have some processes, we have to populate the diagram with some
-% actions.
-%
-% \paragraph{Basic message.}
-% The most basic action is to send a message. For that, we provide the command
-% \DescribeMacro{\send} |\send|\marg{sender}\marg{send
-% time}\marg{receiver}\marg{receive time}. The sender and receiver are
-% identified with their names, and the sending and receiving times are given
-% according to their timestamp\footnote{Notice that nothing prevents sending
-% messages in the past, simply set a receiving time before the sending time.}.
-%
-% In addition, we can label the arrow with the message that is sent with
-% \DescribeMacro{\sendwithname}
-% |\sendwithname|\marg{sender}\marg{send time}\marg{receiver}\marg{receive
-% time}\marg{label}.
-% For instance, in Figure~\ref{fig:ex_msg}, we use |\send{p}{1}{q}{2}|.
-%
-% Finally, we sometimes distinguish \emph{out-of-band} messages, e.g. messages
-% that do not carry informations, but that are for instance used for metadata,
-% etc.. We provide the macro
-% \DescribeMacro{\sendoutofband}|\sendoutofband|\marg{sender}\marg{send time}\marg{receiver}\marg{receive
-% time}\marg{label}, which behaves similarly to |\sendwithname|, but prints the
-% message in an other colour.
-%
-% \begin{figure}
-% \centering
-% \begin{minipage}{.35\textwidth}
-% \begin{messagepassing}
-% \newprocesswithlength{p}{4}
-% \newprocesswithlength{q}{4}
-% \send{p}{1}{q}{2}
-% \sendwithname{p}{2}{q}{3}{msg}
-% \end{messagepassing}
-% \end{minipage}
-% ~
-% \begin{minipage}{.60\textwidth}
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\begin{messagepassing}
- \newprocesswithlength{p}{4}
- \newprocesswithlength{q}{4}
- \send{p}{1}{q}{2}
- \sendwithname{p}{2}{q}{3}{msg}
-\end{messagepassing}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \end{minipage}
-% \caption{A very simple protocol with a single message exchanged.}
-% \label{fig:ex_msg}
-% \end{figure}
-%
-%
-
-% \paragraph{Process crash and restore.}
-% The crash of a process can be represented using
-% \DescribeMacro{\crash}
-% |\crash|\marg{process name}\marg{time}\marg{crash name}. The argument \emph{process name}
-% is the name of the process that crashes, and \emph{crash name} is used to give
-% a name to the crash. Naming the crash is useful for coordinates (see below).
-% Finally, \emph{time} specifies when the crash occurs. Notice that this does
-% not modify the timeline: it simply adds a crash token at the specified
-% coordinate. This means that (i) then timeline has to stop at the crash's time;
-% and (ii) it has to be restarted after. To stop the timeline, simply take the
-% crash into account when setting the initial timeline. To restart the timeline,
-% we provide the command
-% \DescribeMacro{\restart}|\restart|\marg{name}\marg{date}\marg{duration}.
-% \emph{name} specifies which process is to be restarted; \emph{date} specifies
-% when the process should be restarted, and \emph{duration} specifies how long
-% the process shoud be alive (i.e. what is the length of the timeline) after the
-% restart.
-% \begin{figure}
-% \centering
-% \begin{minipage}{.35\textwidth}
-% \begin{messagepassing}
-% \newprocesswithlength{p}{4}
-% \newprocesswithlength{q}{2}
-% \send{p}{1}{q}{2}
-% \crash{q}{2}{crash}
-% \restart{q}{3}{1}
-% \end{messagepassing}
-% \end{minipage}
-% ~
-% \begin{minipage}{.60\textwidth}
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
- \begin{messagepassing}
- \newprocesswithlength{p}{4}
- \newprocesswithlength{q}{2}
- \send{p}{1}{q}{2}
- \crash{q}{2}{crash}
- \restart{q}{3}{1}
- \end{messagepassing}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \end{minipage}
-% \caption{A protocol with a crashed process.}
-% \end{figure}
-%
-
-% \paragraph{Tokens on the run}
-%
-% The package also proposes two kinds of tokens that can be added on protocols'
-% lines. The first one is a \emph{checkpoint} (i.e. a state that is saved
-% somewhere) and the second is used to denote the begining of a \emph{state
-% interval} (a state interval denotes a period in which a process only performs
-% deterministic events). The former are denoted with a small black rectangle,
-% while the later is denoted with a vertical line. Although those two tokens are
-% intended for the usage mentionned above, we encourage users to use them for
-% other usages if need be.
-%
-% A checkpoint can be added with
-% \DescribeMacro{\checkpoint}|\checkpoint|\marg{process}\marg{time}\marg{name},
-% where \emph{process} is the name of the process which takes a checkpoint,
-% \emph{time} is the the time at which the checkpoint is taken, and \emph{name}
-% is the name of the checkpoint, that is printed next to it, and can be used as
-% a coordinate. Notice that the name is printed in a math environment, as we
-% expect most checkpoints names to be indexed, e.g.\(c_1\), \(c_2\), etc.
-% To have more control on the printed name, or if the proposed name is not a
-% valid coordinate name, we offer a variant
-% \DescribeMacro{\checkpointspecial}|\checkpointspecial|\marg{process}\marg{time}\marg{name}\marg{label},
-% where \emph{name} is the name of the coordinate of the checkpoint, and
-% \emph{label} is the label to be printed. Notice that, in that case, the label
-% is printed as is, i.e. not typeset as maths.
-
-%
-% A state interval can be added similarly with the command
-% \DescribeMacro{\stateinterval}|\stateinterval|
-% \marg{process}\marg{time}\marg{name}.
-%
-% For the sake of completeness, if you need the name of the coordinate and the
-% displayed label to be different (e.g. if the label can not be the name of a
-% coordinate, for whatever reason), we also provide the command
-% \DescribeMacro{\stateintervalspecial}
-% |\stateintervalspecial|\marg{process}\marg{time}\marg{name}\marg{label}, in
-% which \emph{name} is the name of the created coordinate, and \emph{label} is
-% the label attached to the state interval.
-
-% \begin{figure}
-% \centering
-% \begin{minipage}{.35\textwidth}
-% \begin{messagepassing}
-% \newprocesswithlength{q}{2}
-% \checkpoint{q}{1}{c_1}
-% \crash{q}{2}{crash}
-% \restart{q}{3}{1}
-% \end{messagepassing}
-% \end{minipage}
-% ~
-% \begin{minipage}{.60\textwidth}
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
- \begin{messagepassing}
- \newprocesswithlength{q}{2}
- \checkpoint{q}{1}{c_1}
- \crash{q}{2}{crash}
- \restart{q}{3}{1}
- \end{messagepassing}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \end{minipage}
-% \caption{A protocol with a checkpoint.}
-% \end{figure}
-
-% \paragraph{Grey boxes}
-%
-% In Execution~\ref{mp:ex1}, we created a light-red box between processes \(p\)
-% and \(q\), from time \(7\) to \(9\), to indicate that they perform a given
-% protocol that we don't detail further. We call such boxes (which can be used for a lot
-% of other purposes) \emph{colouredboxes}, and they
-% can be added with \DescribeMacro{\colouredbox} |\colouredbox|\marg{first
-% process}\marg{second process}\marg{start time}\marg{end time}\marg{label}.
-% This creates a box that spans between \emph{first process} and \emph{second
-% process}, from \emph{start time} to \emph{end time}, with the label
-% \emph{label} printed.
-%
-% Notice that there are no technical restrictions to adding messages on top of a
-% box, typically to highlight a specific part of a larger execution.
-
-% \paragraph{Annotations}
-% Finally, it is possible to add annotations on the diagram. To do so, we
-% provide the macro
-% \DescribeMacro{\annotate}|\annotate|\marg{process}\marg{time}\marg{text} which
-% adds an annotation with \emph{text} over the timeline of the given
-% \emph{process} at time \emph{time}. This also creates a coordinate at the
-% annotation time, which name is the content of the annotation (i.e.\
-% \emph{text}). If \emph{text} is not a valid coordinate name, then the
-% alternative \DescribeMacro{\annotatexplicit}
-% |\annotatexplicit|\marg{process}\marg{time}\marg{text}\marg{name} behaves
-% similarly, except that the coordinate name is explicitly given in argument
-% \emph{name}.
-
-% \subsubsection{Combined commands}
-% The above commands are sufficient to use all primitives offered by the
-% package. In addition, we provide a lot of \emph{combined commands}, which, as
-% the name suggest, have the effect of multiple \emph{simple} commands.
-%
-% \begin{itemize}
-% \item |\newprocesswithlength|\marg{name}\marg{lifetime}: combination of
-% |\newprocess|\marg{name} and |\processlength|\marg{name}\marg{lifetime}
-% \item |\newprocesswithstateinterval|\marg{process name}\marg{state interval
-% name}: combination of |\newprocess|\marg{process name} and
-% |\stateinterval|\marg{process name}\marg{0}\marg{state interval name}
-% \item |\newprocesswithcrash|\marg{process name}\marg{crash time}\marg{crash
-% name}: creates a process \emph{process name} that runs until \emph{crash
-% time}. The crash is named \emph{crash name}.
-% \item |\sendwithstateinterval|\marg{sender}\marg{send
-% time}\marg{receiver}\marg{receive time}\marg{si name}: combines |\send| and
-% |\stateinterval|.
-% \item |\sendwithstateintervalandname|\marg{sender}\marg{send
-% time}\marg{receiver}\marg{receive time}\marg{si name}\marg{message name}:
-% combines |\sendwithname| and |\stateinterval|
-% \end{itemize}
-
-% \subsection{Advanced usage}
-% \subsubsection{Customising colours}
-%
-% Two parts of the package use colours: colouredboxes and out-of-band messages. By
-% default both are shades of red. We provide commands to change that if desired.
-%
-% \DescribeMacro{\colouredboxcolor}|\colouredboxcolor|\marg{colour} changes the colour
-% used for colouredboxes. Notice that this sets both the background colour (which is
-% a light variant of the provided colour) and the text colour (which uses the
-% provided colour).
-%
-% \DescribeMacro{\oobcolor}|\oobcolor|\marg{colour} changes the colour used for
-% out-of-band messages.
-%
-% \subsubsection{Coordinates}
-%
-% \paragraph{\TikZ coordinates.}
-% Message passing diagrams are drawn using \TikZ, which means that one can add
-% arbitrary commands to a diagram. In addition, the package defines useful
-% coordinates to refer to. Execution~\ref{mp:ex2} shows the \TikZ coordinate plan
-% overlayed on top of Execution~\ref{mp:ex1}.
-%
-% On \TikZ \(y\)-axis processes are instanciated one unit apart from each other,
-% in their declaration order.
-% To keep the coordinate system simple, processes expand in the negative (e.g.
-% the first process declared is at coordinate \((0, -1)\), the second at \((0,
-% -2)\), etc.).
-%
-% The \TikZ \(x\)-axis corresponds to the time axis of the diagram. Therefore,
-% e.g. coordinate \((3, -4)\) corresponds to the \nth{3} time step of the
-% \nth{4} process.
-%
-% \paragraph{Named coordinates.}
-% In addition to explicit coordinates explained above, the package names most of
-% the points of interest in the diagram.
-%
-% \subparagraph{Coordinates of processes.}
-% At each process declaration, a coordinate named after the name of the process
-% is created. The coordinate corresponds to the beginning of the corresponding
-% process' timeline (for instance, in Execution~\ref{mp:ex2}, we show coordinate
-% \((\texttt{q})\), that corresponds to the process \(q\)).
-%
-% \subparagraph{Coordinate of states intervals (resp. checkpoints, resp. crashes).}
-% Similarly to processes, each state interval (resp. checkpoint, resp. crashes) creates a
-% coordinate, named after the name of the state interval (resp. checkpoint,
-% resp. crashes), is created. The coordinates refers to the place of the state
-% interval (resp. checkpoint, resp. crashes). For instance, in
-% Execution~\ref{mp:ex2}, we show the coordinates \((\texttt{si\_q\^{}1})\),
-% \((\texttt{c\_p\^{}1})\) and \((\texttt{k})\), that respectively correspond to the state interval
-% \(si_q^1\), the checkpoint \(c_p^1\) and the crash\footnote{The names of
-% crashes are not printed on the figure, although they are internally defined.} \(k\).
-%
-% \subparagraph{Coordinates of annotations.}
-% When an annotation is created, a coordinate is created at the same place, on
-% the process' timeline\footnote{Notice that, using the explicit variant of |annotate|
-% (|annotatexplicit|), the name of the annotation has to be explicitly given.}
-% For instance, in Execution~\ref{mp:ex1}, the annotation \(1+1=2\) is created
-% with the explicit name ``\texttt{note}''. We show the corresponding coordinate in
-% Execution~\ref{mp:ex2}.
-%
-%
-% \begin{messagepassing}[][Showing \TikZ coordinates][h][mp:ex2]
-% \newprocesswithlength{p}{9}
-% \newprocesswithlength{q}{9}
-% \newprocesswithlength{r}{5}
-% \crash{r}{5}{k}
-%
-% \checkpoint{p}{0}{c_p^0}
-% \checkpoint{q}{0}{c_q^0}
-% \checkpoint{r}{0}{c_r^0}
-% \checkpoint{p}{4}{c_p^1}
-%
-% \stateinterval{p}{0}{si_p^0}
-% \stateinterval{q}{0}{si_q^0}
-% \stateinterval{r}{0}{si_r^0}
-%
-% \sendwithstateinterval{p}{1}{q}{2}{si_q^1}
-% \sendwithstateinterval{r}{3}{q}{4}{si_q^2}
-% \sendwithstateintervalandname{q}{5}{p}{6}{si_p^1}{\(m\)}
-% \sendoutofband{q}{5}{r}{6}{\(m_\mathrm{copy}\)}
-% \stateinterval{r}{6}{si_r^0}
-% \restart{r}{6}{3}
-%
-% \annotate{r}{8}{restart}
-% \annotatexplicit{p}{8}{\(1+1=2\)}{note}
-%
-% \colouredbox{p}{q}{7}{9}{Protocol}
-% \drawtimeline{9}
-%
-%
-% \fill[fill=white, opacity=0.8] (-1, 0) rectangle (10, -5);
-%
-% \draw[dotted, gray] (-1,0) grid (10,-5);
-% \draw[->, thick, red] (0, 0) -- (1, 0) node [anchor=south, text=black] {\((1, 0)\)};
-% \draw[->, thick, red] (0, 0) -- (0, -1) node [anchor=east, text=black] {\((0, -1)\)};
-%
-% \draw[fill] (q) circle [radius=.5mm];
-% \node[anchor=east] at (q) {\((\texttt{q})\)};
-%
-% \draw[fill] (si_q^1) circle [radius=.5mm];
-% \node[anchor=east] at (si_q^1) {\((\texttt{si\_q\^{}1})\)};
-%
-% \draw[fill] (c_p^1) circle [radius=.5mm];
-% \node[anchor=east] at (c_p^1) {\((\texttt{c\_p\^{}1})\)};
-%
-% \draw[fill] (k) circle [radius=.5mm];
-% \node[anchor=east] at (k) {\((\texttt{k})\)};
-%
-% \draw[fill] (note) circle [radius=.5mm];
-% \node[anchor=east] at (note) {\((\texttt{note})\)};
-%
-% \end{messagepassing}
-
-% \StopEventually{}
-%
-% \section{Implementation}
-
-% \begin{macrocode}
-\newcounter{processnb}
-\setcounter{processnb}{0}
-\newcounter{maxtime}
-
-\pgfdeclarelayer{background}
-\pgfsetlayers{background,main}
-
-\newfloat{float_messagepassing}{t b h p}{.mp}
-\floatname{float_messagepassing}{Execution}
-
-\newif\ifmp@vertical\mp@verticalfalse
-\DeclareOption{vertical}{
- \mp@verticaltrue
-}
-\newif\ifmp@annotatevertical\mp@annotateverticalfalse
-\DeclareOption{annotatevertical}{
- \mp@annotateverticaltrue
-}
-\ProcessOptions\relax
-
-\ifmp@vertical
- \newcommand{\mp@processnameanchor}{south}
- \newcommand{\mp@timeticksanchor}{east}
- \newcommand{\mp@messagelabelanchor}{south}
- \newcommand{\mp@stateintervalanchor}{north west}
- \newcommand{\mp@checkpointanchor}{east}
- \newcommand{\mp@verticalrotation}{270}
- \ifmp@annotatevertical
- \newcommand{\mp@annotaterotation}{270}
- \else
- \newcommand{\mp@annotaterotation}{0}
- \fi
-\else
- \newcommand{\mp@processnameanchor}{east}
- \newcommand{\mp@timeticksanchor}{north}
- \newcommand{\mp@messagelabelanchor}{west}
- \newcommand{\mp@stateintervalanchor}{south west}
- \newcommand{\mp@checkpointanchor}{north}
- \newcommand{\mp@verticalrotation}{0}
- \newcommand{\mp@annotaterotation}{0}
-\fi
-
-\newcommand{\mp@oobcolor}{red}
-\newcommand{\oobcolor}[1]{
- \renewcommand\mp@oobcolor{#1}
-}
-
-\newcommand{\mp@colouredboxcolor}{red}
-\newcommand{\colouredboxcolor}[1]{
- \renewcommand\mp@colouredboxcolor{#1}
-}
-
-\newif\iftimeline
-% \end{macrocode}
-%
-
-%\begin{environment}{messagepassing}
-% \begin{macrocode}
-\ExplSyntaxOn
-%% 1st argument: tikz arguments
-%% 2nd argument: Float caption (turns in floating)
-%% 3rd argument: Float placement (`p` by default)
-%% 4th argument: Float label
- \NewDocumentEnvironment{messagepassing} {o o o o}
- {
- \timelinefalse
- \setcounter{processnb}{0}
- \IfNoValueTF{#2} {
- }{
- \IfNoValueTF{#3}{
- \begin{float_messagepassing}[p]
- } {
- \begin{float_messagepassing}[#3]
- }
- \begin{center}
- }
- \IfNoValueTF{#1}{
- \begin{tikzpicture}[rotate=\mp@verticalrotation]
- } {
- \begin{tikzpicture}[rotate=\mp@verticalrotation, #1]
- }
- }{
- %% Draw timeline if boolean is true
- \iftimeline
- \begin{pgfonlayer}{background}
- \setcounter{maxtime}{\@maxtime}
- \addtocounter{maxtime}{-1}
- \coordinate (maxtime) at (\@maxtime, 0);
-
- \addtocounter{processnb}{1}
- \coordinate (timeline) at (0, -\value{processnb});
- \draw (timeline) node [anchor=\mp@processnameanchor] {{\it time}};
- \draw[->] (timeline) -- ($(timeline) + (maxtime)$);
- \foreach \i in {0,...,\value{maxtime}} {
- \draw ($(timeline) + (\i, 0) + (0, 0.1)$) -- ($(timeline) + (\i, 0) + (0, -0.1)$) node [anchor=\mp@timeticksanchor] {$\i$};
- }
- \end{pgfonlayer}
- \else
- \fi
- \end{tikzpicture}
- \IfNoValueTF{#2} {
- \linebreak
- } {
- \end{center}
- \caption{#2}
- \IfNoValueTF{#4} {
- }{
- \label{#4}
- }
- \end{float_messagepassing}
- }
- }
-\ExplSyntaxOff
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{macrocode}
-%% #1: name
-\newcommand{\newprocess}[1]{
- \addtocounter{processnb}{1}
- \coordinate (#1) at (0, -\value{processnb});
- \draw (#1) node[anchor=\mp@processnameanchor] {$#1$};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: name
-%% #2: width
-\newcommand{\newprocesswithlength}[2]{
- \newprocess{#1}
- \processlength{#1}{#2}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: name
-%% #2: state interval name
-\newcommand{\newprocesswithstateinterval}[2]{
- \newprocess{#1}
- \stateinterval{#1}{0}{#2}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: name
-%% #2: width
-%% #3: crash name
-\newcommand{\newprocesswithcrash}[3]{
- \newprocess{#1}{#2}
- \crash{#1}{#2}{#3}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: sender's name
-%% #2: send date
-%% #3: receiver's name
-%% #4: receive date
-\newcommand{\send}[4]{
- \draw[->] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $);
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: sender's name
-%% #2: send date
-%% #3: receiver's name
-%% #4: receive date
-%% #5: message name
-\newcommand{\sendwithname}[5]{
- \draw[->] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process name
-%% #2: process width
-\newcommand{\processlength}[2]{
- \draw (#1) -- +(#2, 0);
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: sender's name
-%% #2: send date
-%% #3: receiver's name
-%% #4: receive date
-%% #5: state interval name
-\newcommand{\sendwithstateinterval}[5] {
- \send{#1}{#2}{#3}{#4}
- \stateinterval{#3}{#4}{#5}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: sender's name
-%% #2: send date
-%% #3: receiver's name
-%% #4: receive date
-%% #5: state interval name
-%% #6: message name
-\newcommand{\sendwithstateintervalandname}[6] {
- \sendwithname{#1}{#2}{#3}{#4}{#6}
- \stateinterval{#3}{#4}{#5}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: sender's name
-%% #2: send date
-%% #3: receiver's name
-%% #4: receive date
-%% #5: OoB message name
-\newcommand{\sendoutofband}[5]{
- \draw[->, color=\mp@oobcolor] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: state interval date
-%% #3: state interval name
-\newcommand{\stateinterval}[3] {
- \stateintervalspecial{#1}{#2}{#3}{#3}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: state interval date
-%% #3: coordinate name
-%% #4: state interval label
-\newcommand{\stateintervalspecial}[4] {
- \coordinate (#3) at ($ (#1) +(#2, 0) $);
- \draw (#3) + (0, 0.1) -- +(0, -0.1) node[anchor=\mp@stateintervalanchor] {$#4$};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: checkpoint date
-%% #3: checkpoint name
-\newcommand{\checkpoint}[3]{
- \coordinate (#3) at ($ (#1) + (#2, 0) $);
- \fill (#3) + (-0.05, 0.1) rectangle +(0.05, -0.1);
- \draw (#3) + (0, -0.1) node[anchor=\mp@checkpointanchor] {$#3$};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: checkpoint date
-%% #3: checkpoint coordinate name
-%% #4: checkpoint label
-\newcommand{\checkpointspecial}[4]{
- \coordinate (#3) at ($ (#1) + (#2, 0) $);
- \fill (#3) + (-0.05, 0.1) rectangle +(0.05, -0.1);
- \draw (#3) + (0, -0.1) node[anchor=\mp@checkpointanchor] {#4};
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: crash date
-%% #3: crash name
-\newcommand{\crash}[3]{
- \coordinate (#3) at ($ (#1) + (#2, 0) $);
- \draw (#3) + (-0.1, -0.1) -- +(0.1, 0.1);
- \draw (#3) + (0.1, -0.1) -- +(-0.1, 0.1);
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: restart date
-%% #3: restart length
-\newcommand{\restart}[3]{
- \draw (#1) + (#2, 0) -- ($ (#1) + (#2, 0) + (#3, 0) $);
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: first process's name
-%% #2: second process's name
-%% #3: begining of the grey box
-%% #4: end of the grey box
-%% #5: caption
-\newcommand{\colouredbox}[5]{
- \begin{pgfonlayer}{background}
- \fill[color=\mp@colouredboxcolor!20] ($(#1) + (#3, 0)$) rectangle ($(#2) + (#4, 0)$) node[midway, color = \mp@colouredboxcolor, rotate=\mp@annotaterotation]{#5};
- \end{pgfonlayer}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: Timeline length
-\newcommand{\drawtimeline}[1]{
- \timelinetrue
- \def\@maxtime{#1}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% #1: process's name
-%% #2: annotation date
-%% #3: annotation
-\newcommand{\annotate}[3]{
- \annotatexplicit{#1}{#2}{#3}{#3}
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-%% Same than annotate, but with the coordinate name provided explicitly
-%% #1: process's name
-%% #2: annotation date
-%% #3: annotation
-%% #4: coordinate name
-\newcommand{\annotatexplicit}[4]{
- \coordinate (#4) at ($ (#1) +(#2, 0.1) $);
- \draw (#4) node[rotate=\mp@annotaterotation, anchor=south] {#3};
-}
-% \end{macrocode}
diff --git a/macros/latex/contrib/messagepassing/messagepassing.ins b/macros/latex/contrib/messagepassing/messagepassing.ins
deleted file mode 100644
index 750bc28697..0000000000
--- a/macros/latex/contrib/messagepassing/messagepassing.ins
+++ /dev/null
@@ -1,49 +0,0 @@
-%%
-%% Copyright (C) 2021 by Martin Vassor
-%%
-
-%% This file 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.
-%%
-
-\input docstrip.tex
-\keepsilent
-\usedir{tex/latex/messagepassing}
-\preamble
-This is a generated file.
-Copyright (C) 2022 by Martin Vassor
-
-This file 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.
-
-\endpreamble
-
-\generate{\file{messagepassing.sty}{\from{messagepassing.dtx}{package}}}
-
-\Msg{*********************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the}
-\Msg{* following file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* \space\space messagepassing.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file grammar.dtx}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*********************************************************}
-\endbatchfile
diff --git a/macros/latex/contrib/messagepassing/messagepassing.pdf b/macros/latex/contrib/messagepassing/messagepassing.pdf
deleted file mode 100644
index 410b4d22ca..0000000000
--- a/macros/latex/contrib/messagepassing/messagepassing.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/robotarm/README.md b/macros/latex/contrib/robotarm/README.md
deleted file mode 100644
index f95f712205..0000000000
--- a/macros/latex/contrib/robotarm/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# `robotarm` LaTeX package
-
-This LaTeX package uses Tikz to draw parameterized 2D robot arms, for example to be used in educational material. \ No newline at end of file
diff --git a/macros/latex/contrib/robotarm/robotarm.dtx b/macros/latex/contrib/robotarm/robotarm.dtx
deleted file mode 100644
index 79986b388f..0000000000
--- a/macros/latex/contrib/robotarm/robotarm.dtx
+++ /dev/null
@@ -1,940 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 2021 by M.J.W. Snippe
-% -----------------------------------
-%
-% 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 `author-maintained'.
-%
-% This work consists of the files found at github.com/max-sn/robotarm.
-%
-% \fi
-%
-% \iffalse
-%<*driver>
-\documentclass{ltxdoc}
-\input{robotarm.doc.settings.sty}
-\EnableCrossrefs
-\RecordChanges
-\begin{document}
- \DocInput{robotarm.dtx}
-\end{document}
-%</driver>
-%
-% \fi
-%
-% \iffalse
-%
-%<*robotarm-doc-settings>
-
-\usepackage[utf8]{inputenc}
-\usepackage{xspace}
-\usepackage{multicol}
-\usepackage{geometry}
-\usepackage{mathpazo}
-\usepackage{robotarm}
-\usepackage{biblatex}
-\usepackage{hypdoc}
-\usepackage{tcolorbox}
-
-\addbibresource{robotarm.doc.bib.bib}
-\defbibheading{robotarmbibheading}[\bibname]{%
- \clearpage\section*{#1}\addcontentsline{toc}{section}{#1}}
-
-\geometry{pass}
-
-\tcbuselibrary{documentation,breakable,minted}
-\tcbset{
- index german settings,
- index colorize,
- docexample/.append style={
- before lower={\begin{center}\begin{tikzpicture}},
- after lower={\end{tikzpicture}\end{center}},
- documentation minted options={autogobble},
- breakable,
- }
-}
-
-\makeindex
-
-\renewcommand{\MacroFont}{\color{black!70!blue}\small\ttfamily}
-
-\def\robotarmpackage{\textsl{robotarm}\xspace}
-\def\Tikz{{\normalfont Ti\textit{k}Z}\xspace}
-
-%</robotarm-doc-settings>
-%
-%<*robotarm-doc-main>
-
-\title{The \robotarmpackage package}
-\author{Marcus J.W. Snippe \\
- \normalsize\href{mailto:maxsnippe@gmail.nl}
- {\texttt{maxsnippe[at]gmail.nl}}}
-\date{\filedate\\[0.4em]\normalsize\fileversion}
-
-\maketitle
-
-\begin{abstract}
- With the \robotarmpackage package, you can draw configurable planar robot arms with ease, using \Tikz. It defines the macro (\refCom{robotArm}) and a lot of ways to configure it. Additionally, you can use or redefine the macros used to draw the base link (\refCom{robotArmBaseLink}), a single link (\refCom{robotArmLink}), or the end effector (\refCom{robotArmEndEffector}).
-\end{abstract}
-
-\begin{multicols}{2}
- \tableofcontents
-\end{multicols}
-
-\section{Macros}
-
- \subsection{\texttt{robotArm}}
-
- \begin{docCommand}{robotArm}{\oarg{key-value list}\marg{num}}
- This is the main macro of the \robotarmpackage package. It is meant to be used in the \texttt{tikzpicture} environment\footnote{The first example still includes the \texttt{tikzpicture} environment, but for following examples,it will be omitted in the example code.}, from the \Tikz\cite{tantau:tikz_and_pgf} package,
- and installs some styles for additional drawing, e.g. \refKey{/tikz/in link}.
-
- \begin{dispExample*}{before lower={}, after lower={}}
- \begin{tikzpicture}
- \robotArm[config={q1=60,q2=-40,q3=-50}]{3}
- \end{tikzpicture}
- \end{dispExample*}
-
- \meta{num} defines the number of links that will be drawn. For an $N$ link robot arm, the $N$\textsuperscript{th} link will be the end effector link.
-
- The \meta{key-value list} values can consist of the keys listed below.
-
-
-
- \begin{docKey}{geometry}{=\meta{key-value list}}{}
-
- The \refKey{geometry} key can be used to set geometrical configuration options of the robot arm, e.g. link length and link width. The keys in \meta{key-value list} can be one or more of the following.
-
- ^^A \begin{docKey}[][doc label=/geometry/a0]{a0}{=\meta{value}}{initially \texttt{0.0}}
- ^^A Sets the height of the base link.
-
- ^^A \begin{dispExample}
- ^^A \robotArm[config={q1=60},geometry={a0=2}]{2}
- ^^A \end{dispExample}
- ^^A \end{docKey}
-
- \begin{docKeys}
- [
- doc parameter={=\meta{value}},
- ]
- {
- {
- doc name=a,
- doc label=/geometry/a,
- doc description={initially \texttt{2}}
- },
- {
- doc name=a\meta{num},
- doc label=/geometry/anum,
- doc description={initially the value of \refKey{/geometry/a}}
- },
- }
-
- The \refKey{/geometry/a} key sets the default length for all links that are drawn in the \refCom{robotArm} command. For every link, this can be overruled by the dynamically created keys \refKey{/geometry/anum}, e.g. to set only the length of link 3 to 3, use \texttt{a3=3}.
-
- \begin{dispExample}
- \robotArm[config={q1=20,q2=-20,q3=-20},
- geometry={a=3,a3=1}]{3}
- \end{dispExample}
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc parameter={=\meta{value}}
- ]
- {
- {
- doc name=r,
- doc label=/geometry/r,
- doc description={initially \texttt{0.25}}
- },
- {
- doc name=r\meta{num},
- doc label=/geometry/rnum,
- doc description={initially the value of \refKey{/geometry/r}}
- },
- }
- The \refKey{/geometry/r} key sets the default joint radius for all links drawn in the \refCom{robotArm} command. For every link this can be overruled by the dynamically created keys \refKey{/geometry/rnum}.
-
- \begin{dispExample}
- \robotArm[config={q1=20,q2=-20},
- geometry={r=0.5,r1=0.3}]{2}
- \end{dispExample}
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc parameter={=\meta{value}}
- ]
- {
- {
- doc name=w,
- doc label=/geometry/w,
- doc description={initially \texttt{0.4}}
- },
- {
- doc name=w\meta{num},
- doc label=/geometry/wnum,
- doc description={initially the value of \refKey{/geometry/w}}
- },
- }
- The \refKey{/geometry/w} key sets the default link width for all links drawn in the \refCom{robotArm} command. For every link this can be overruled by the dynamically created keys \refKey{/geometry/wnum}.
- \end{docKeys}
-
- \end{docKey}
-
- \begin{dispExample}
- \tikzset{/robotarm/geometry={a=1}}
- \robotArm{1}
- \begin{scope}[xshift=3cm]
- \robotArm{6}
- \end{scope}
- \end{dispExample}
-
- \begin{docKey}[robotarm/styles]{link}{}{default \texttt{draw,fill=lightgray}}
- \end{docKey}
-
- \end{docCommand}
-
- \subsection{\texttt{robotArmBaseLink}}
-
- \begin{docCommand}{robotArmBaseLink}{\oarg{key-value list}}
- This command is used in \refCom{robotArm} to draw the base link. It can also be used to draw your own base link. The default base link looks as follows:
- \begin{dispExample}
- \robotArmBaseLink
- \end{dispExample}
- The \meta{key-value list} can consist of the keys listed below.
-
- \begin{docKeys}
- [
- doc keypath={robotarm/base link},
- doc parameter={=\meta{value}},
- ]
- {
- {
- doc name=height,
- doc description={initially \texttt{0.6}}
- },
- {
- doc name=width,
- doc description={initially \texttt{0.3}}
- },
- }
- The width and height of the base link can be specified with these keys. The height is measured from the center of the half-circle at the top, to the base.
- \begin{dispExample}
- \robotArmBaseLink[width=1, height=0.6]
- \end{dispExample}
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc keypath={robotarm/base link},
- doc parameter={=\meta{value}},
- ]
- {
- {
- doc name=world width,
- doc description={initially \texttt{1.0}},
- },
- {
- doc name=world height,
- doc description={initially \texttt{0.3}},
- }
- }
- The width and height of the `world' drawn below the base link can be specified with these keys.
- \begin{dispExample}
- \robotArmBaseLink[world width=5, world height=1]
- \end{dispExample}
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc keypath={robotarm/base link},
- doc description={code executing key},
- ]
- {
- {doc name=draw base link},
- {doc name=draw world},
- }
- These keys are used to draw the `world' and the base link. If the configuration options above are insufficient, you can redefine these keys, as shown in the not-so-creative example below.
- \begin{dispExample}
- \robotArmBaseLink[
- draw world/.code={
- \filldraw[fill=brown] (-2,-1) rectangle (2, -0.3);
- },
- draw base link/.code={
- \filldraw[fill=black!60] (-0.5, -0.3) rectangle
- (0.5, 0.3);
- }]
- \end{dispExample}
- To access the values of the keys listed above you can use the following macros in your redefinition:
- \begin{itemize}
- \item \docAuxCommand{RA@baselink@width},
- \item \docAuxCommand{RA@baselink@height},
- \item \docAuxCommand{RA@baselink@worldwidth}, and
- \item \docAuxCommand{RA@baselink@worldheight}.
- \end{itemize}
- \end{docKeys}
-
- \end{docCommand}
-
-
- \subsection{\texttt{robotArmLink}}
-
- \begin{docCommand}{robotArmLink}{\oarg{key-value list}}
- This command is used in \refCom{robotArm} to draw the links in a \texttt{foreach} loop. It can also be used to draw your own link(s). The default link looks as follows:
- \begin{dispExample}
- \robotArmLink
- \end{dispExample}
- The \meta{key-value list} can consist of the keys listed below.
-
- \begin{docKeys}
- [
- doc keypath={robotarm/link},
- doc parameter={=\meta{value}},
- ]{
- {
- doc name=width,
- doc description={initially \texttt{0.4}},
- },
- {
- doc name=length,
- doc description={initially \texttt{2.0}},
- },
- {
- doc name=joint radius,
- doc description={initially \texttt{0.25}},
- },
- }
- The geometrical properties of the links can be configured with these keys.
- \begin{dispExample}
- \robotArmLink[width=0.75,joint radius=0.4,length=5]
- \end{dispExample}
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc keypath={robotarm/link},
- doc description={code executing key},
- ]
- {
- {doc name=draw link},
- {doc name=draw joint},
- }
- Same as for the base link, the actual drawing is done by calling these keys. These can also be redefined to change the drawing.
- \begin{dispExample}
- \robotArmLink[draw link/.code={
- \draw[line cap=round, double=lightgray,
- double distance=4mm]
- (0,0) to[bend left] (2,0);}]
- \end{dispExample}
- Of course you can also do this globally so it applies to all links\footnote{For the end effector to change too, you have to redefine \refKey{/robotarm/end effector/draw joint} too.}.
- \begin{dispExample}
- \pgfkeys{/robotarm/link/draw joint/.code={
- \path[link style] (-0.3,-0.3) rectangle ++(0.6,0.6);
- \path[link style] (0,0) circle (0.2);}}
- \robotArm[geometry={a=1.5},
- config={q1=60,q2=-30,q3=-30}]{3}
- \end{dispExample}
- To access the values of the keys listed above you can use the following macros in your redefinition:
- \begin{itemize}
- \item \docAuxCommand{RA@link@width},
- \item \docAuxCommand{RA@link@length}, and
- \item \docAuxCommand{RA@link@jointradius}.
- \end{itemize}
- \end{docKeys}
-
- \end{docCommand}
-
- \subsection{\texttt{robotArmEndEffector}}
-
- \begin{docCommand}{robotArmEndEffector}{\oarg{key-value list}}
- This command is used in \refCom{robotArm} to draw the final link with the end effector attached. You can also use it outside that command to draw your own end effector.
- \begin{dispExample}
- \robotArmEndEffector
- \end{dispExample}
- The \meta{key-value list} can consist of the keys listed below.
-
- \begin{docKeys}
- [
- doc keypath={robotarm/end effector},
- doc parameter={=\meta{value}},
- ]
- {
- {
- doc name=width,
- doc description={initially \texttt{0.4}},
- },
- {
- doc name=length,
- doc description={initially \texttt{2.0}},
- },
- {
- doc name=joint radius,
- doc description={initially \texttt{0.25}},
- },
- {
- doc name=gripper radius,
- doc description={initially \texttt{0.3}},
- },
- {
- doc name=gripper opening angle,
- doc description={initially \texttt{60}},
- doc parameter={=\meta{angle}},
- },
- }
- The geometrical properties of the final link and the end effector, which defaults to a gripper, can be tuned with these keys. Due to some trigonometric functions in the drawing code of \refKey{/robotarm/end effector/draw end effector}, \refKey{/robotarm/end effector/gripper radius} should not be smaller than half of \refKey{/robotarm/end effector/width}.
-
- \end{docKeys}
-
- \begin{docKeys}
- [
- doc keypath={robotarm/end effector},
- doc description={code executing key},
- ]
- {
- {doc name=draw link},
- {doc name=draw joint},
- {doc name=draw end effector},
- }
- Again the actual drawing is done by calling these keys. And these can also be redefined to change how the end effector will look, as shown in the example below.
- \begin{dispExample}
- \robotArm[
- config={q1=100,q2=-100},
- end effector/.cd,
- draw link/.code={
- \draw[line cap=round, double=lightgray,
- double distance=4mm]
- (0,0) to[bend left] (2, 0.8);},
- draw end effector/.code={
- \path[link style]
- (1.8, 0.8) arc (180:0:0.2) -- (2.1, 0.4)
- -- (1.9, 0.4) -- cycle;
- \path[link style]
- (2.05,0.4) rectangle (1.95,0.0);
- \fill (2,0) circle (0.05);}]{2}
- \end{dispExample}
- To access the values of the keys listed above you can use the following macros in your redefinition:
- \begin{itemize}
- \item \docAuxCommand{RA@endeff@width},
- \item \docAuxCommand{RA@endeff@length},
- \item \docAuxCommand{RA@endeff@jointradius},
- \item \docAuxCommand{RA@endeff@gripperradius}, and
- \item \docAuxCommand{RA@endeff@gripperopeningangle}.
- \end{itemize}
- \end{docKeys}
-
- \end{docCommand}
-
-\section{\Tikz styles}
-
- \begin{docKeys}
- [
- doc keypath=tikz,
- doc description=style,
- ]
- {
- {
- doc name=in link,
- doc parameter={=\meta{number}},
- },
- {
- doc name=in base link,
- },
- {
- doc name=in world,
- },
- {
- doc name=in end effector,
- }
- }
- Only installed after calling \refCom{robotArm} at least once (last called macro defines these styles, but within scope can be made unique).
- \end{docKeys}
-
- \begin{docKey}[tikz]{link style}{}{default \texttt{/robotarm/styles/link}}
- Always installed, forwards to \refKey{/robotarm/styles/link}. Only works one way. To change link styles used in \refCom{robotArm}, change the appropriate \refKey{/robotarm/styles/link}.
- \begin{dispExample}
- \tikzset{link style/.style={draw=none, fill=red!50}}
- \robotArm[config={q1=40},styles={
- link 1/.style={fill=blue!50}}]{3}
- \end{dispExample}
- \end{docKey}
-
-
- %^^A \section{\robotarmpackage keys}
- %^^A \begin{docKeys}
- %^^A [
- %^^A doc keypath=robotarm/annotations/labels,
- %^^A ]{
- %^^A {
- %^^A doc name=a,
- %^^A doc description={no default, initially \texttt{a}},
- %^^A },
- %^^A {
- %^^A doc name=q,
- %^^A doc description={no default, initially \texttt{q}},
- %^^A }
- %^^A }
- %^^A \begin{dispExample}
- %^^A \robotArm[
- %^^A config={q1=60,q2=-40,q3=40},
- %^^A annotations/labels/a=l,
- %^^A annotations/labels/q=\theta,
- %^^A annotations/labels/q3=?]{3}
- %^^A \end{dispExample}
- %^^A \end{docKeys}
-
- %^^A \section{\Tikz keys}
-
-
- %^^A \begin{docKeys}
- %^^A [
- %^^A doc keypath=robotarm/frames,
- %^^A doc description={style},
- %^^A ]{
- %^^A {doc name=in link 0},
- %^^A {doc name=in link 1},
- %^^A {doc name=in link 2},
- %^^A {doc name=in link 3},
- %^^A {doc name=in link 4},
- %^^A {doc name=in link 5},
- %^^A {doc name=in link 6}
- %^^A }
- %^^A \end{docKeys}
-
-
-%</robotarm-doc-main>
-%
-%<*robotarm-doc-bib>
-@manual{tantau:tikz_and_pgf,
- author = {Till Tantau},
- title = {The TikZ and PGF Packages},
- subtitle = {Manual for version 3.1.8b},
- url = {https://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf},
- date = {2021-03-19},
-}
-%</robotarm-doc-bib>
-%
-% \fi
-%
-% \CheckSum{286}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-%
-% \DoNotIndex{\angleannotationcase,\link@angleannotspacing,\begin,\begingroup,\DeclareDocumentCommand,\draw,\end,\endgroup,\fi,\foreach,\ifcase,\ifnum,\ifRA@robotarm@drawannotations,\lenghtannotationspacing,\link@lenght,\link@radius,\link@startangle,\link@width,\lengthannotationspacing,\link@length,\link@case}
-%
-% \changes{v0.1}{2022/03/08}{Initial version for publishing}
-%
-% \GetFileInfo{robotarm.sty}
-%
-% \input{robotarm.doc.main.tex}
-%
-% \StopEventually{\printbibliography[heading=robotarmbibheading]\printindex\PrintChanges}
-%
-% \section{Implementation}
-% \begin{macrocode}
-%<*robotarm-package>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{robotarm}
- [2022/03/08 v0.1 Tikz commands to draw planar robot arms]
-
-\RequirePackage{tikz}
-
-\usetikzlibrary{patterns}
-
-\makeatletter
-
-\newif\ifRA@robotarm@drawannotations
-
-\pgfkeys{
- /robotarm/base link/.cd,
- width/.code={\pgfmathsetmacro\RA@baselink@width{#1}},
- width=0.6,
- height/.code={\pgfmathsetmacro\RA@baselink@height{#1}},
- height=0.3,
- world width/.code={\pgfmathsetmacro\RA@baselink@worldwidth{#1}},
- world width=1.0,
- world height/.code={\pgfmathsetmacro\RA@baselink@worldheight{#1}},
- world height=0.3,
- draw base link/.code={%
- \path[link style]
- (-1/2*\RA@baselink@width,0)
- arc (180:0:1/2*\RA@baselink@width)
- -- ++ (0, -\RA@baselink@height)
- -- ++ (-\RA@baselink@width, 0)
- -- cycle;
- },
- draw world/.code={%
- \path[world style]
- (-1/2*\RA@baselink@worldwidth,-\RA@baselink@height)
- arc (180:360:{1/2*\RA@baselink@worldwidth}
- and {\RA@baselink@worldheight}) -- cycle;
- \path[draw, world style]
- (-1/2*\RA@baselink@worldwidth,-\RA@baselink@height)
- -- ++(\RA@baselink@worldwidth,0);
- },
- /robotarm/link/.cd,
- width/.code={\pgfmathsetmacro\RA@link@width{#1}},
- width=0.4,
- length/.code={\pgfmathsetmacro\RA@link@length{#1}},
- length=2.0,
- joint radius/.code={\pgfmathsetmacro\RA@link@jointradius{#1}},
- joint radius=0.25,
- draw link/.code={%
- \path[link style]
- (0,1/2*\RA@link@width)
- -- ++ ( \RA@link@length, 0)
- arc (90:-90:1/2*\RA@link@width)
- -- ++ (-\RA@link@length, 0)
- arc (270:90:1/2*\RA@link@width)
- -- cycle;
- },
- draw joint/.code={%
- \path[link style]
- (0,0) circle (\RA@link@jointradius);
- \path[link style]
- (0,0) circle (1/3*\RA@link@jointradius);
- },
- /robotarm/end effector/.cd,
- width/.code={\pgfmathsetmacro\RA@endeff@width{#1}},
- width=0.4,
- length/.code={\pgfmathsetmacro\RA@endeff@length{#1}},
- length=2,
- joint radius/.code={\pgfmathsetmacro\RA@endeff@jointradius{#1}},
- joint radius=0.25,
- gripper radius/.code={\pgfmathsetmacro\RA@endeff@gripperradius{#1}},
- gripper radius=0.3,
- gripper opening angle/.code={%
- \pgfmathsetmacro\RA@endeff@gripperopeningangle{#1}},
- gripper opening angle=60,
- draw joint/.code={%
- \path[link style]
- (0,0) circle (\RA@endeff@jointradius);
- \path[link style]
- (0,0) circle (1/3*\RA@endeff@jointradius);
- },
- draw link/.code={%
- \pgfmathsetmacro{\link@startangle}{%
- 180-asin(1/2*\RA@endeff@width/\RA@endeff@gripperradius)}
- \pgfmathsetmacro{\link@endangle}{%
- 180+asin(1/2*\RA@endeff@width/\RA@endeff@gripperradius)}
-
- \path[link style]
- (\RA@endeff@length, 0)
- ++ (\link@startangle:\RA@endeff@gripperradius)
- arc (\link@startangle:\link@endangle:\RA@endeff@gripperradius)
- -- (0,0|-0,-1/2*\RA@endeff@width)
- arc (-90:90:1/2*\RA@endeff@width)
- -- cycle;
- },
- draw end effector/.code={
- \draw[link style]
- (\RA@endeff@length, 0)
- ++ (-1/2*\RA@endeff@gripperopeningangle:%
- \RA@endeff@gripperradius)
- arc [start angle=-1/2*\RA@endeff@gripperopeningangle,
- delta angle=-360+\RA@endeff@gripperopeningangle,
- radius=\RA@endeff@gripperradius]
- -- ++(180+1/2*\RA@endeff@gripperopeningangle:%
- 0.4*\RA@endeff@gripperradius)
- arc [start angle=1/2*\RA@endeff@gripperopeningangle,
- delta angle=360-\RA@endeff@gripperopeningangle,
- radius=0.6*\RA@endeff@gripperradius]
- -- ++(-1/2*\RA@endeff@gripperopeningangle:%
- 0.4*\RA@endeff@gripperradius)
- -- cycle;
- },
- /robotarm/.cd,
- draw annotations/.is if=RA@robotarm@drawannotations,
- draw annotations=true,
- every annotation/.style={},
- every length annotation/.style={},
- every length annotation arrow/.style={draw,->},
- every length annotation node/.style={circle,inner sep=0.5pt},
- every length annotation help line/.style={draw,help lines},
- every angle annotation/.style={},
- every angle annotation arrow/.style={draw,->},
- every angle annotation node/.style={},
- every angle annotation help line/.style={draw,help lines},
- base link/.code=\pgfkeys{/robotarm/base link/.cd,#1},
- link/.code=\pgfkeys{/robotarm/link/.cd,#1},
- end effector/.code=\pgfkeys{/robotarm/end effector/.cd,#1},
- geometry/.code=\pgfkeys{/robotarm/geometry/.cd,#1},
- config/.code=\pgfkeys{/robotarm/config/.cd,#1},
- spacing/.code=\pgfkeys{/robotarm/annotations/spacing/.cd,#1},
- labels/.code=\pgfkeys{/robotarm/annotations/labels/.cd,#1},
- styles/.code=\pgfkeys{/robotarm/styles/.cd,#1},
- /robotarm/geometry/.cd,
- a0/.initial=0,
- a/.initial=2,
- r/.initial=0.25,
- w/.initial=0.4,
- /robotarm/config/q/.initial=0,
- /robotarm/frames/.cd,
- in link 0/.style={},
- in end effector/.style={
- /robotarm/frames/in link \RA@robotarm@numlinks,
- shift={%
- (\pgfkeysvalueof{/robotarm/geometry/a\RA@robotarm@numlinks},0)},
- },
- in world/.style={
- shift={(0,-\RA@baselink@height)}
- },
- /robotarm/styles/.cd,
- world/.style={pattern=north west lines},
- link/.style={
- draw,
- fill=lightgray,
- },
- link 0/.style={/robotarm/styles/link},
- /robotarm/annotations/.cd,
- spacing/.cd,
- a/.initial=3,
- q/.initial=1/2,
- /robotarm/annotations/.cd,
- labels/.cd,
- a/.initial=a,
- q/.initial=q,
-}
-\tikzset{
- link style/.style={/robotarm/styles/link},
- world style/.style={/robotarm/styles/world},
-}
-% \end{macrocode}
-% \begin{macro}{\robotarmset}
-% \begin{macrocode}
-\newcommand\robotarmset[1]{%
- \pgfkeys{/robotarm/.cd,#1}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\robotArmLink}
-% \begin{macrocode}
-\newcommand\robotArmLink[1][]{
- \begingroup
- \pgfkeys{/robotarm/link/.cd,#1}
-
- \pgfkeys{/robotarm/link/draw link}
- \pgfkeys{/robotarm/link/draw joint}
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\robotArmEndEffector}
-% \begin{macrocode}
-\newcommand\robotArmEndEffector[1][]{
- \begingroup
- \pgfkeys{/robotarm/end effector/.cd,#1}
-
- \pgfkeys{/robotarm/end effector/draw link}
- \pgfkeys{/robotarm/end effector/draw joint}
- \pgfkeys{/robotarm/end effector/draw end effector}
-
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\robotArmBaseLink}
-% \begin{macrocode}
-\newcommand\robotArmBaseLink[1][]{
- \begingroup
- \pgfkeys{/robotarm/base link/.cd,#1}
-
- \pgfkeys{/robotarm/base link/draw world}
- \pgfkeys{/robotarm/base link/draw base link}
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\robotArm}
-% \begin{macrocode}
-\newcommand\robotArm[2][]{
- \pgfmathtruncatemacro\RA@robotarm@numlinks{#2}
- \def\@tmpkeys{}
- \foreach \@link [remember=\@link as \@prevlink (initially 0)] in %
- {1,...,\RA@robotarm@numlinks}{
- \xdef\@tmpkeys{\@tmpkeys%
- /robotarm/geometry/a\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/a},%
- /robotarm/geometry/r\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/r},%
- /robotarm/geometry/w\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/w},%
- /robotarm/config/q\@link/.initial=%
- \pgfkeysvalueof{/robotarm/config/q},%
- /robotarm/styles/link \@link/.style={/robotarm/styles/link},%
- /robotarm/annotations/labels/a\@link/.initial={%
- $\pgfkeysvalueof{/robotarm/annotations/labels/a}_{\@link}$},%
- /robotarm/annotations/labels/q\@link/.initial={%
- $\pgfkeysvalueof{/robotarm/annotations/labels/q}_{\@link}$},%
- /robotarm/annotations/spacing/a\@link/.initial={%
- \pgfkeysvalueof{/robotarm/annotations/spacing/a}},%
- /robotarm/annotations/spacing/q\@link/.initial={%
- \pgfkeysvalueof{/robotarm/annotations/spacing/q}},%
- }
- }
- \expandafter\pgfkeys\expandafter{\@tmpkeys}
- \pgfkeys{/robotarm/.cd,#1}
- \def\@tmpkeys{}
- \foreach \@link [remember=\@link as \@prevlink (initially 0)] in %
- {1,...,\RA@robotarm@numlinks}{
- \xdef\@tmpkeys{\@tmpkeys%
- /robotarm/frames/in link \@link/.style={%
- /robotarm/frames/in link \@prevlink,
- /tikz/shift={%
- (\pgfkeysvalueof{/robotarm/geometry/a\@prevlink},0)},
- /tikz/rotate={\pgfkeysvalueof{/robotarm/config/q\@link}},
- },
- }
- }
- \expandafter\pgfkeys\expandafter{\@tmpkeys}
-
- \begin{scope}[/robotarm/frames/in link 0,
- link style/.style={/robotarm/styles/link 0}]
- \robotArmBaseLink
- \end{scope}
-
- \foreach\link@num in {1,...,\RA@robotarm@numlinks}{
- \begin{scope}[/robotarm/frames/in link \link@num,
- link style/.style={/robotarm/styles/link \link@num}]
-
- \ifnum\link@num<\RA@robotarm@numlinks
- \robotArmLink[
- joint radius=\pgfkeysvalueof{/robotarm/geometry/r\link@num},
- length=\pgfkeysvalueof{/robotarm/geometry/a\link@num},
- width=\pgfkeysvalueof{/robotarm/geometry/w\link@num},
- ]
- \else
- \robotArmEndEffector[
- joint radius=\pgfkeysvalueof{/robotarm/geometry/r\link@num},
- length=\pgfkeysvalueof{/robotarm/geometry/a\link@num},
- width=\pgfkeysvalueof{/robotarm/geometry/w\link@num},
- ]
- \fi
- \end{scope}
- }
- \foreach\link@num in {1,...,\RA@robotarm@numlinks}{
- \begin{scope}[/robotarm/frames/in link \link@num]
- \pgfmathsetmacro\link@length{\pgfkeysvalueof{%
- /robotarm/geometry/a\link@num}}
- \pgfmathsetmacro\link@angle{\pgfkeysvalueof{%
- /robotarm/config/q\link@num}}
-
- \ifRA@robotarm@drawannotations
- \pgfmathsetmacro\link@lengthannotspacing{%
- \pgfkeysvalueof{/robotarm/annotations/spacing/a\link@num}*
- \pgfkeysvalueof{/robotarm/geometry/r\link@num}}
- \pgfmathsetmacro\link@angleannotspacing{%
- \pgfkeysvalueof{/robotarm/annotations/spacing/q\link@num}*
- \link@length}
-
- % Length annotation help lines
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (0,0) -- (\link@length,0);
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (0,0) -- ++ (0,{\link@lengthannotspacing +
- 0.1*sign(\link@lengthannotspacing)});
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (\link@length,0) -- ++ (0,{\link@lengthannotspacing +
- 0.1*sign(\link@lengthannotspacing)});
-% \end{macrocode}
-% Length annotation node
-% \begin{macrocode}
- \path (0,\link@lengthannotspacing)
- -- coordinate[pos=0.5] (coor) ++ (\link@length,0);
- \node[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation node]
- at (coor) (tag)
- {\pgfkeysvalueof{/robotarm/annotations/labels/a\link@num}};
-% \end{macrocode}
-% Length annotation arrows
-% \begin{macrocode}
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation arrow]
- (tag) -- (0,\link@lengthannotspacing);
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation arrow]
- (tag) -- (\link@length,\link@lengthannotspacing);
-
- \pgfmathsetmacro\angleannotationcase{%
- ifthenelse(\link@angle==0.0, 0, 1)}
- \ifnum\angleannotationcase>0
- % Angle annotation help lines
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation help line]
- (0,0) -- ++(-\link@angle:{\link@angleannotspacing+0.1});
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation help line]
- (0,0) -- ++(0:{\link@angleannotspacing+0.1});
-
- % Angle annotation arrow
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation arrow]
- (0,0) ++ (-\link@angle:\link@angleannotspacing)
- arc (-\link@angle:0:\link@angleannotspacing);
-
- % Angle annotation node
- \node[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation node]
- at (-\link@angle/2:\link@angleannotspacing+0.3)
- {\pgfkeysvalueof{/robotarm/annotations/labels/q\link@num}};
- \fi
- \fi
- \end{scope}
- }
-% \end{macrocode}
-% Install \Tikz styles for coordinate transformations.
-% \begin{macrocode}
- \tikzset{
- in link/.style={/robotarm/frames/in link #1},
- in base link/.style={/robotarm/frames/in link 0},
- in end effector/.style={/robotarm/frames/in end effector},
- in world/.style={/robotarm/frames/in world},
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\makeatother
-%</robotarm-package>
-% \end{macrocode}
-% \Finale
-\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/robotarm/robotarm.pdf b/macros/latex/contrib/robotarm/robotarm.pdf
deleted file mode 100644
index ab9689f9d9..0000000000
--- a/macros/latex/contrib/robotarm/robotarm.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/robotarm/robotarm.sty b/macros/latex/contrib/robotarm/robotarm.sty
deleted file mode 100644
index 5fb7f730aa..0000000000
--- a/macros/latex/contrib/robotarm/robotarm.sty
+++ /dev/null
@@ -1,375 +0,0 @@
-%%
-%% This is file `robotarm.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% robotarm.dtx (with options: `robotarm-package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 2021 by M.J.W. Snippe
-%% -----------------------------------
-%%
-%% This file 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
-%% `author-maintained'.
-%%
-%% This work consists of the files found at github.com/max-sn/robotarm.
-%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{robotarm}
- [2022/03/08 v0.1 Tikz commands to draw planar robot arms]
-
-\RequirePackage{tikz}
-
-\usetikzlibrary{patterns}
-
-\makeatletter
-
-\newif\ifRA@robotarm@drawannotations
-
-\pgfkeys{
- /robotarm/base link/.cd,
- width/.code={\pgfmathsetmacro\RA@baselink@width{#1}},
- width=0.6,
- height/.code={\pgfmathsetmacro\RA@baselink@height{#1}},
- height=0.3,
- world width/.code={\pgfmathsetmacro\RA@baselink@worldwidth{#1}},
- world width=1.0,
- world height/.code={\pgfmathsetmacro\RA@baselink@worldheight{#1}},
- world height=0.3,
- draw base link/.code={%
- \path[link style]
- (-1/2*\RA@baselink@width,0)
- arc (180:0:1/2*\RA@baselink@width)
- -- ++ (0, -\RA@baselink@height)
- -- ++ (-\RA@baselink@width, 0)
- -- cycle;
- },
- draw world/.code={%
- \path[world style]
- (-1/2*\RA@baselink@worldwidth,-\RA@baselink@height)
- arc (180:360:{1/2*\RA@baselink@worldwidth}
- and {\RA@baselink@worldheight}) -- cycle;
- \path[draw, world style]
- (-1/2*\RA@baselink@worldwidth,-\RA@baselink@height)
- -- ++(\RA@baselink@worldwidth,0);
- },
- /robotarm/link/.cd,
- width/.code={\pgfmathsetmacro\RA@link@width{#1}},
- width=0.4,
- length/.code={\pgfmathsetmacro\RA@link@length{#1}},
- length=2.0,
- joint radius/.code={\pgfmathsetmacro\RA@link@jointradius{#1}},
- joint radius=0.25,
- draw link/.code={%
- \path[link style]
- (0,1/2*\RA@link@width)
- -- ++ ( \RA@link@length, 0)
- arc (90:-90:1/2*\RA@link@width)
- -- ++ (-\RA@link@length, 0)
- arc (270:90:1/2*\RA@link@width)
- -- cycle;
- },
- draw joint/.code={%
- \path[link style]
- (0,0) circle (\RA@link@jointradius);
- \path[link style]
- (0,0) circle (1/3*\RA@link@jointradius);
- },
- /robotarm/end effector/.cd,
- width/.code={\pgfmathsetmacro\RA@endeff@width{#1}},
- width=0.4,
- length/.code={\pgfmathsetmacro\RA@endeff@length{#1}},
- length=2,
- joint radius/.code={\pgfmathsetmacro\RA@endeff@jointradius{#1}},
- joint radius=0.25,
- gripper radius/.code={\pgfmathsetmacro\RA@endeff@gripperradius{#1}},
- gripper radius=0.3,
- gripper opening angle/.code={%
- \pgfmathsetmacro\RA@endeff@gripperopeningangle{#1}},
- gripper opening angle=60,
- draw joint/.code={%
- \path[link style]
- (0,0) circle (\RA@endeff@jointradius);
- \path[link style]
- (0,0) circle (1/3*\RA@endeff@jointradius);
- },
- draw link/.code={%
- \pgfmathsetmacro{\link@startangle}{%
- 180-asin(1/2*\RA@endeff@width/\RA@endeff@gripperradius)}
- \pgfmathsetmacro{\link@endangle}{%
- 180+asin(1/2*\RA@endeff@width/\RA@endeff@gripperradius)}
-
- \path[link style]
- (\RA@endeff@length, 0)
- ++ (\link@startangle:\RA@endeff@gripperradius)
- arc (\link@startangle:\link@endangle:\RA@endeff@gripperradius)
- -- (0,0|-0,-1/2*\RA@endeff@width)
- arc (-90:90:1/2*\RA@endeff@width)
- -- cycle;
- },
- draw end effector/.code={
- \draw[link style]
- (\RA@endeff@length, 0)
- ++ (-1/2*\RA@endeff@gripperopeningangle:%
- \RA@endeff@gripperradius)
- arc [start angle=-1/2*\RA@endeff@gripperopeningangle,
- delta angle=-360+\RA@endeff@gripperopeningangle,
- radius=\RA@endeff@gripperradius]
- -- ++(180+1/2*\RA@endeff@gripperopeningangle:%
- 0.4*\RA@endeff@gripperradius)
- arc [start angle=1/2*\RA@endeff@gripperopeningangle,
- delta angle=360-\RA@endeff@gripperopeningangle,
- radius=0.6*\RA@endeff@gripperradius]
- -- ++(-1/2*\RA@endeff@gripperopeningangle:%
- 0.4*\RA@endeff@gripperradius)
- -- cycle;
- },
- /robotarm/.cd,
- draw annotations/.is if=RA@robotarm@drawannotations,
- draw annotations=true,
- every annotation/.style={},
- every length annotation/.style={},
- every length annotation arrow/.style={draw,->},
- every length annotation node/.style={circle,inner sep=0.5pt},
- every length annotation help line/.style={draw,help lines},
- every angle annotation/.style={},
- every angle annotation arrow/.style={draw,->},
- every angle annotation node/.style={},
- every angle annotation help line/.style={draw,help lines},
- base link/.code=\pgfkeys{/robotarm/base link/.cd,#1},
- link/.code=\pgfkeys{/robotarm/link/.cd,#1},
- end effector/.code=\pgfkeys{/robotarm/end effector/.cd,#1},
- geometry/.code=\pgfkeys{/robotarm/geometry/.cd,#1},
- config/.code=\pgfkeys{/robotarm/config/.cd,#1},
- spacing/.code=\pgfkeys{/robotarm/annotations/spacing/.cd,#1},
- labels/.code=\pgfkeys{/robotarm/annotations/labels/.cd,#1},
- styles/.code=\pgfkeys{/robotarm/styles/.cd,#1},
- /robotarm/geometry/.cd,
- a0/.initial=0,
- a/.initial=2,
- r/.initial=0.25,
- w/.initial=0.4,
- /robotarm/config/q/.initial=0,
- /robotarm/frames/.cd,
- in link 0/.style={},
- in end effector/.style={
- /robotarm/frames/in link \RA@robotarm@numlinks,
- shift={%
- (\pgfkeysvalueof{/robotarm/geometry/a\RA@robotarm@numlinks},0)},
- },
- in world/.style={
- shift={(0,-\RA@baselink@height)}
- },
- /robotarm/styles/.cd,
- world/.style={pattern=north west lines},
- link/.style={
- draw,
- fill=lightgray,
- },
- link 0/.style={/robotarm/styles/link},
- /robotarm/annotations/.cd,
- spacing/.cd,
- a/.initial=3,
- q/.initial=1/2,
- /robotarm/annotations/.cd,
- labels/.cd,
- a/.initial=a,
- q/.initial=q,
-}
-\tikzset{
- link style/.style={/robotarm/styles/link},
- world style/.style={/robotarm/styles/world},
-}
-\newcommand\robotarmset[1]{%
- \pgfkeys{/robotarm/.cd,#1}%
-}
-\newcommand\robotArmLink[1][]{
- \begingroup
- \pgfkeys{/robotarm/link/.cd,#1}
-
- \pgfkeys{/robotarm/link/draw link}
- \pgfkeys{/robotarm/link/draw joint}
- \endgroup
-}
-\newcommand\robotArmEndEffector[1][]{
- \begingroup
- \pgfkeys{/robotarm/end effector/.cd,#1}
-
- \pgfkeys{/robotarm/end effector/draw link}
- \pgfkeys{/robotarm/end effector/draw joint}
- \pgfkeys{/robotarm/end effector/draw end effector}
-
- \endgroup
-}
-\newcommand\robotArmBaseLink[1][]{
- \begingroup
- \pgfkeys{/robotarm/base link/.cd,#1}
-
- \pgfkeys{/robotarm/base link/draw world}
- \pgfkeys{/robotarm/base link/draw base link}
- \endgroup
-}
-\newcommand\robotArm[2][]{
- \pgfmathtruncatemacro\RA@robotarm@numlinks{#2}
- \def\@tmpkeys{}
- \foreach \@link [remember=\@link as \@prevlink (initially 0)] in %
- {1,...,\RA@robotarm@numlinks}{
- \xdef\@tmpkeys{\@tmpkeys%
- /robotarm/geometry/a\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/a},%
- /robotarm/geometry/r\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/r},%
- /robotarm/geometry/w\@link/.initial=%
- \pgfkeysvalueof{/robotarm/geometry/w},%
- /robotarm/config/q\@link/.initial=%
- \pgfkeysvalueof{/robotarm/config/q},%
- /robotarm/styles/link \@link/.style={/robotarm/styles/link},%
- /robotarm/annotations/labels/a\@link/.initial={%
- $\pgfkeysvalueof{/robotarm/annotations/labels/a}_{\@link}$},%
- /robotarm/annotations/labels/q\@link/.initial={%
- $\pgfkeysvalueof{/robotarm/annotations/labels/q}_{\@link}$},%
- /robotarm/annotations/spacing/a\@link/.initial={%
- \pgfkeysvalueof{/robotarm/annotations/spacing/a}},%
- /robotarm/annotations/spacing/q\@link/.initial={%
- \pgfkeysvalueof{/robotarm/annotations/spacing/q}},%
- }
- }
- \expandafter\pgfkeys\expandafter{\@tmpkeys}
- \pgfkeys{/robotarm/.cd,#1}
- \def\@tmpkeys{}
- \foreach \@link [remember=\@link as \@prevlink (initially 0)] in %
- {1,...,\RA@robotarm@numlinks}{
- \xdef\@tmpkeys{\@tmpkeys%
- /robotarm/frames/in link \@link/.style={%
- /robotarm/frames/in link \@prevlink,
- /tikz/shift={%
- (\pgfkeysvalueof{/robotarm/geometry/a\@prevlink},0)},
- /tikz/rotate={\pgfkeysvalueof{/robotarm/config/q\@link}},
- },
- }
- }
- \expandafter\pgfkeys\expandafter{\@tmpkeys}
-
- \begin{scope}[/robotarm/frames/in link 0,
- link style/.style={/robotarm/styles/link 0}]
- \robotArmBaseLink
- \end{scope}
-
- \foreach\link@num in {1,...,\RA@robotarm@numlinks}{
- \begin{scope}[/robotarm/frames/in link \link@num,
- link style/.style={/robotarm/styles/link \link@num}]
-
- \ifnum\link@num<\RA@robotarm@numlinks
- \robotArmLink[
- joint radius=\pgfkeysvalueof{/robotarm/geometry/r\link@num},
- length=\pgfkeysvalueof{/robotarm/geometry/a\link@num},
- width=\pgfkeysvalueof{/robotarm/geometry/w\link@num},
- ]
- \else
- \robotArmEndEffector[
- joint radius=\pgfkeysvalueof{/robotarm/geometry/r\link@num},
- length=\pgfkeysvalueof{/robotarm/geometry/a\link@num},
- width=\pgfkeysvalueof{/robotarm/geometry/w\link@num},
- ]
- \fi
- \end{scope}
- }
- \foreach\link@num in {1,...,\RA@robotarm@numlinks}{
- \begin{scope}[/robotarm/frames/in link \link@num]
- \pgfmathsetmacro\link@length{\pgfkeysvalueof{%
- /robotarm/geometry/a\link@num}}
- \pgfmathsetmacro\link@angle{\pgfkeysvalueof{%
- /robotarm/config/q\link@num}}
-
- \ifRA@robotarm@drawannotations
- \pgfmathsetmacro\link@lengthannotspacing{%
- \pgfkeysvalueof{/robotarm/annotations/spacing/a\link@num}*
- \pgfkeysvalueof{/robotarm/geometry/r\link@num}}
- \pgfmathsetmacro\link@angleannotspacing{%
- \pgfkeysvalueof{/robotarm/annotations/spacing/q\link@num}*
- \link@length}
-
- % Length annotation help lines
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (0,0) -- (\link@length,0);
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (0,0) -- ++ (0,{\link@lengthannotspacing +
- 0.1*sign(\link@lengthannotspacing)});
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation help line]
- (\link@length,0) -- ++ (0,{\link@lengthannotspacing +
- 0.1*sign(\link@lengthannotspacing)});
- \path (0,\link@lengthannotspacing)
- -- coordinate[pos=0.5] (coor) ++ (\link@length,0);
- \node[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation node]
- at (coor) (tag)
- {\pgfkeysvalueof{/robotarm/annotations/labels/a\link@num}};
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation arrow]
- (tag) -- (0,\link@lengthannotspacing);
- \path[/robotarm/every annotation,
- /robotarm/every length annotation,
- /robotarm/every length annotation arrow]
- (tag) -- (\link@length,\link@lengthannotspacing);
-
- \pgfmathsetmacro\angleannotationcase{%
- ifthenelse(\link@angle==0.0, 0, 1)}
- \ifnum\angleannotationcase>0
- % Angle annotation help lines
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation help line]
- (0,0) -- ++(-\link@angle:{\link@angleannotspacing+0.1});
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation help line]
- (0,0) -- ++(0:{\link@angleannotspacing+0.1});
-
- % Angle annotation arrow
- \path[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation arrow]
- (0,0) ++ (-\link@angle:\link@angleannotspacing)
- arc (-\link@angle:0:\link@angleannotspacing);
-
- % Angle annotation node
- \node[/robotarm/every annotation,
- /robotarm/every angle annotation,
- /robotarm/every angle annotation node]
- at (-\link@angle/2:\link@angleannotspacing+0.3)
- {\pgfkeysvalueof{/robotarm/annotations/labels/q\link@num}};
- \fi
- \fi
- \end{scope}
- }
- \tikzset{
- in link/.style={/robotarm/frames/in link #1},
- in base link/.style={/robotarm/frames/in link 0},
- in end effector/.style={/robotarm/frames/in end effector},
- in world/.style={/robotarm/frames/in world},
- }
-}
-\makeatother
-\endinput
-%%
-%% End of file `robotarm.sty'.