为什么在
--\hgnum{\theenumi}]
不会产生破折号,而是两个——
为了便于编译,mypackage.sty 包含在代码下方。
\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{tikz-cd}
\usepackage{fontspec}
%\usepackage{xypic}
\usepackage[czech]{babel}
\usepackage{mypackage}
%\usepackage[utf8]{inputenc}
\newcommand{\pullbackcorner}[1][dl]{\save*!/#1-1pc/#1:(1,-1)@^{|-}\restore}
%\usepackage[all]{xy}
%\newfontfamily\ngg{NewGardiner}
% \usepackage{pgffor}
\usepackage{babyloniannum}
%\setfont{NewGardiner}
\newfontfamily\ngg{Segoe UI Historic}
%\renewcommand{\theenumi}{\roman{enumi}--\arabic{enumi}}
%\newcommand{\stheenumm}{\babyloniannum{1}}
%\newcommand{\theenumi}{\roman{enumi}--\arabic{enumi}--\babyloniannum{enumi}}
\MakeRobust\babyloniannum
\MakeRobust\hgnum
\usepackage{enumitem}
%\renewcommand{\theenumi}{\roman{enumi}--\arabic{enumi}--\!\!\!\!\!\babyloniannum{\value{enumi}}\!\!\!--{\ngg\symbol{"\the\value{nw}}}}
%\renewcommand{\theenumi}{\ngg\symbol{"\the\value{\stepcounter{nw}}}}
\begin{document}
%\show\babyloniannum
%\renewcommand{\theenumi}{\roman{enumi}--\arabic{enumi}--\babyloniannum{enumi}}
\underline{motto:}{ každý den $\pm$ nový princip }\hfill{$\square$}
\bigskip
\bigskip
\begin{enumerate}[ label=\roman{enumi}--\arabic{enumi}--\!\!\!\!\!\babyloniannum{\value{enumi}}\!\!\!--\large\ngg\symbol{\numexpr "13000+\value{enumi}}--\hgnum{\theenumi}]
\item rozhodovat se na hraně zajímavého
\item *vždycky to tam máš (data v matematice)
\item svoboda a volnost
\end{enumerate}
\end{document}
我的包.sty
% this is my first package
%
% (c) Buffalo Bill
%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%
\NeedsTeXFormat{LaTeX2e}[2994/06/01]
\ProvidesPackage{mypackage}
[2011/01/11 v0.01 LaTeX package for my own purpose]
\usepackage{fontspec}
\usepackage{fontspec}
\newfontfamily\hg{Segoe UI Historic}
\def\hgunits#1{\ifcase#1\relax\or
^^^^^^0133fa\or
^^^^^^0133fb\or
^^^^^^0133fc\or
^^^^^^0133fd\or
^^^^^^0133fe\or
^^^^^^0133ff\or
^^^^^^013400\or
^^^^^^013401\or
^^^^^^013402\else
?\fi}
\def\hgtens#1{\ifcase#1\relax\or
^^^^^^013386\or
^^^^^^013387\or
^^^^^^013388\or
^^^^^^013389\or
^^^^^^01338a\or
^^^^^^01338b\or
^^^^^^01348c\or
^^^^^^01348d\or
^^^^^^01348e\else
?\fi}
\def\hghundreds#1{\ifcase#1\relax\or
^^^^^^013362\or
^^^^^^013363\or
^^^^^^013364\or
^^^^^^013365\or
^^^^^^013366\or
^^^^^^013367\or
^^^^^^013368\or
^^^^^^013369\or
^^^^^^01336a\else
?\fi}
\def\hgthousands#1{\ifcase#1\relax\or
^^^^^^0131bc\or
^^^^^^0131bd\or
^^^^^^0131be\or
^^^^^^0131bf\or
^^^^^^0131c0\or
^^^^^^0131c1\or
^^^^^^0131c2\or
^^^^^^0131c3\or
^^^^^^0131c4\else
?\fi}
\def\hgtenthousands#1{\ifcase#1\relax\or
^^^^^^0130ad\or
^^^^^^0130ae\or
^^^^^^0130af\or
^^^^^^0130b0\or
^^^^^^0130b1\or
^^^^^^0130b2\or
^^^^^^0130b3\or
^^^^^^0130b4\or
^^^^^^0130b5\else
?\fi}
\def\hghundredthousands#1{\ifcase#1\relax\or
^^^^^^013190\or
^^^^^^013190^^^^^^013190\or
^^^^^^013190^^^^^^013190^^^^^^013190\or
^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190\or
^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190\else
?\fi}
\DeclareRobustCommand\hgnum[1]{{\hg\expandafter\hgnumx\the\numexpr20000000+#1\relax}}
%\def\hgnum#1{{\hg\expandafter\hgnumx\the\numexpr10000000+#1\relax}}
\def\hgnumx#1#2#3#4#5#6#7#8{%
\hghundredthousands{#3}%
\hgtenthousands{#4}%
\hgthousands{#5}%
\hghundreds{#6}%
\hgtens{#7}%
\hgunits{#8}%
}
%\RequirePackage{whateverwe need}
\def\hi{Hello, this is my own package}
\let\myDate\date
\newcommand\GoodBye[1][\bfseries]{{#1Good Bye}}
\endinput
%%
%% End of file `mypackage.sty'.