summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/asternote
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-06-29 03:00:54 +0000
committerNorbert Preining <norbert@preining.info>2022-06-29 03:00:54 +0000
commit1803d67dcb084b1d6b825dd2f1a39df83c11db02 (patch)
tree083814d64daa39afbd3ceea4804d903a2585077a /macros/latex/contrib/asternote
parent2ef43af0215fc52966c9bbd8d5df6db6d6af224b (diff)
CTAN sync 202206290300
Diffstat (limited to 'macros/latex/contrib/asternote')
-rw-r--r--macros/latex/contrib/asternote/README.md32
-rw-r--r--macros/latex/contrib/asternote/asternote-en.md74
-rw-r--r--macros/latex/contrib/asternote/asternote-ja.md74
-rw-r--r--macros/latex/contrib/asternote/asternote.sty143
-rw-r--r--macros/latex/contrib/asternote/asternote_example.tex19
5 files changed, 342 insertions, 0 deletions
diff --git a/macros/latex/contrib/asternote/README.md b/macros/latex/contrib/asternote/README.md
new file mode 100644
index 0000000000..43e5e01623
--- /dev/null
+++ b/macros/latex/contrib/asternote/README.md
@@ -0,0 +1,32 @@
+# Asternote Package
+
+This package can output annotation symbols enclosed in square brackets and marked with an asterisk.
+
+
+## System Requirements
+
++ TeX format: LaTeX2e
++ TeX engine: pTeX, upTeX
+
+Since the unit zw is used, it can be used only in the pTeX series.
+
+
+## Installation
+
+Move asternote.sty file to $TEXMF/tex/latex/asternote.
+
+
+## License
+
+This package released under [the MIT license](https://ctan.org/license/mit).
+
+
+## Revision History
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+[Yukoh KUSAKABE](https://twitter.com/metaphysicainfo) (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/macros/latex/contrib/asternote/asternote-en.md b/macros/latex/contrib/asternote/asternote-en.md
new file mode 100644
index 0000000000..43655aa485
--- /dev/null
+++ b/macros/latex/contrib/asternote/asternote-en.md
@@ -0,0 +1,74 @@
+# Asternote Package
+
+This package can output annotation symbols enclosed in square brackets and marked with an asterisk.
+
+
+## System Requirements
+
++ TeX format: LaTeX2e
++ TeX engine: pTeX, upTeX
+
+Since the unit zw is used, it can be used only in the pTeX series.
+
+
+## Installation
+
+Move asternote.sty file to $TEXMF/tex/latex/asternote.
+
+
+## Usage
+
+### \setasternotenoindent \setasternoteindent
+
+Determines whether or not the annotation symbol is indented at the beginning of a paragraph. The default is \setasternotenoindent. Whether parentheses are considered half-width or full-width is different between text and superscript.
+
+
+### \setasternotetext \setasternotesuperscript
+
+Decide whether the annotation symbols are written in the same size as the body text or in superscript. The default is \setasternotesuperscript.
+
+
+### \setasterreftext \setasterrefsuperscript
+
+Decide whether the annotation reference are written in the same size as the body text or in superscript. The default is \setasterreftext.
+
+
+### \setasternumbertext \asternumbersetsuperscript
+
+Determines whether the manual annotation symbols are written in the same size as the body text or in superscript. The default is \setasternumbertext.
+
+
+### \asternotereset
+
+Reset the annotation symbol number to 1.
+
+
+### \asternote{<LABEL>} \asternotetext{<LABEL>} \asternotesuperscript{<LABEL>}
+
+Put an annotation symbol. You can manually choose to write the annotation in the same size as the body text or in superscript.
+
+
+### \asterref{<LABEL>} \asterreftext{<LABEL>} \asterrefsuperscript{<LABEL>}
+
+Put an annotation reference. You can manually choose to write the annotation in the same size as the body text or in superscript.
+
+
+### \asternumber{<LABEL>} \asternumbertext{<LABEL>} \asternumbersuperscript{<LABEL>}
+
+Put a manual annotation symbol. You can manually choose to write the annotation in the same size as the body text or in superscript.
+
+
+## License
+
+This package released under [the MIT license](https://ctan.org/license/mit).
+
+
+## Revision History
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+Yukoh KUSAKABE (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/macros/latex/contrib/asternote/asternote-ja.md b/macros/latex/contrib/asternote/asternote-ja.md
new file mode 100644
index 0000000000..0154cf238f
--- /dev/null
+++ b/macros/latex/contrib/asternote/asternote-ja.md
@@ -0,0 +1,74 @@
+# Asternote パッケージ
+
+このパッケージは,角括弧囲い・アスタリスク付きの注釈記号を出力することができます。
+
+
+## 前提条件
+
++ TeX format: LaTeX2e
++ TeX engine: pTeX, upTeX
+
+単位 zw を用いていますので,pTeX 系列でのみ使用できます。
+
+
+## インストール
+
+asternote.sty を $TEXMF/tex/latex/asternote (TeXが見つけられる場所)に置いてください。
+
+
+## 使用方法
+
+### \setasternotenoindent \setasternoteindent
+
+注釈記号に対して,段落初めの字下げをする否かを決めます。既定は \setasternotenoindent です。text と superscript で括弧を半角とみなすか全角とみなすかが異なります。
+
+
+### \setasternotetext \setasternotesuperscript
+
+注釈記号に対して,本文と同じ大きさで書かれるか上付き文字で書かれるかを決めます。既定は \setasternotesuperscript です。
+
+
+### \setasterreftext \setasterrefsuperscript
+
+注釈参照に対して,本文と同じ大きさで書かれるか上付き文字で書かれるかを決めます。既定は \setasterreftext です。
+
+
+### \setasternumbertext \asternumbersetsuperscript
+
+手動の注釈記号に対して,本文と同じ大きさで書かれるか上付き文字で書かれるかを決めます。既定は \setasternumbertext です。
+
+
+### \asternotereset
+
+注釈記号の番号を 1 に戻します。
+
+
+### \asternote{<LABEL>} \asternotetext{<LABEL>} \asternotesuperscript{<LABEL>}
+
+注釈記号を置きます。本文と同じ大きさで書くこと,上付き文字で書くことを手動で指定することができます。
+
+
+### \asterref{<LABEL>} \asterreftext{<LABEL>} \asterrefsuperscript{<LABEL>}
+
+注釈参照を置きます。本文と同じ大きさで書くこと,上付き文字で書くことを手動で指定することができます。
+
+
+### \asternumber{<LABEL>} \asternumbertext{<LABEL>} \asternumbersuperscript{<LABEL>}
+
+手動の注釈記号を置きます。本文と同じ大きさで書くこと,上付き文字で書くことを手動で指定することができます。
+
+
+## ライセンス
+
+このパッケージは[MITライセンス](https://ctan.org/license/mit)のもとで配布しています。
+
+
+## 更新履歴
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+Yukoh KUSAKABE (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/macros/latex/contrib/asternote/asternote.sty b/macros/latex/contrib/asternote/asternote.sty
new file mode 100644
index 0000000000..bd6639f7ed
--- /dev/null
+++ b/macros/latex/contrib/asternote/asternote.sty
@@ -0,0 +1,143 @@
+%%
+%% asternote.sty
+%%
+%% Copyright (C) 2022 Yukoh KUSAKABE (screen-name)
+%% https://www.metaphysica.info/
+%% https://twitter.com/metaphysicainfo
+%%
+%% This package released under
+%% [the MIT license](https://ctan.org/license/mit).
+%%
+%
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{asternote}[2022/06/28 v1.0]
+%
+%% \@astnt@noindent@switch
+\newif\if@astnt@noindent@switch
+\@astnt@noindent@switchtrue
+%
+%% \setasternotenoindent
+%% \setasternoteindent
+\DeclareRobustCommand{\setasternotenoindent}{\@astnt@noindent@switchtrue}
+\DeclareRobustCommand{\setasternoteindent}{\@astnt@noindent@switchfalse}
+%
+%% \@astnt@notesuperscript@switch
+\newif\if@astnt@notesuperscript@switch
+\@astnt@notesuperscript@switchtrue
+%
+%% \setasternotetext
+%% \setasternotesuperscript
+\DeclareRobustCommand{\setasternotetext}{\@astnt@notesuperscript@switchfalse}
+\DeclareRobustCommand{\setasternotesuperscript}{\@astnt@notesuperscript@switchtrue}
+%
+%% \@astnt@refsuperscriptswitch
+\newif\if@astnt@refsuperscript@switch
+\@astnt@refsuperscript@switchfalse
+%
+%% \setasterreftext
+%% \setasterrefsuperscript
+\DeclareRobustCommand{\setasterreftext}{\@astnt@refsuperscript@switchfalse}
+\DeclareRobustCommand{\setasterrefsuperscript}{\@astnt@refsuperscript@switchtrue}
+%
+%% \@astnt@numbersuperscriptswitch
+\newif\if@astnt@numbersuperscript@switch
+\@astnt@numbersuperscript@switchfalse
+%
+%% \setasternumbertext
+%% \asternumbersetsuperscript
+\DeclareRobustCommand{\setasternumbertext}{\@astnt@numbersuperscript@switchfalse}
+\DeclareRobustCommand{\asternumbersetsuperscript}{\@astnt@numbersuperscript@switchtrue}
+%
+%% asternotecounter
+\newcounter{asternotecounter}
+\setcounter{asternotecounter}{0}
+%
+%% \asternotereset
+\DeclareRobustCommand{\asternotereset}{\setcounter{asternotecounter}{0}}
+%
+%% \asternotetext{<LABEL>}
+%% \asternotesuperscript{<LABEL>}
+\DeclareRobustCommand{\asternotetext}[1]{\refstepcounter{asternotecounter}\textsf{[*\theasternotecounter ]}\expandafter\label{#1}}
+\DeclareRobustCommand{\asternotesuperscript}[1]{\refstepcounter{asternotecounter}\makebox[2zw]{\@textsuperscript{\scriptsize\!\!\textsf{[*\theasternotecounter ]}}\expandafter\label{#1}}}
+%
+%% \asternote{<LABEL>}
+\DeclareRobustCommand{\asternote}[1]{%
+\if@astnt@notesuperscript@switch
+% when \setasternotesuperscript
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asternotesuperscript{#1}}%
+ \else
+% when \setasternoteindent
+ {\asternotesuperscript{#1}}%
+ \fi
+\else
+% when \asternotetext
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asternotetext{#1}}%
+ \else
+% when \setasternoteindent
+ {\asternotetext{#1}}%
+ \fi
+\fi
+}%
+%
+%% \asterreftext{<LABEL>}
+%% \asterrefsuperscript{<LABEL>}
+\DeclareRobustCommand{\asterreftext}[1]{{\textsf{[*\ref{#1}]}}}
+\DeclareRobustCommand{\asterrefsuperscript}[1]{\@textsuperscript{\scriptsize\!\!\textsf{[*\ref{#1}]}}}
+%
+%% \asterref{<LABEL>}
+\DeclareRobustCommand{\asterref}[1]{%
+\if@astnt@refsuperscript@switch
+% when \setasterrefsuperscript
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asterrefsuperscript{#1}}%
+ \else
+% when \setasternoteindent
+ {\asterrefsuperscript{#1}}%
+ \fi
+\else
+% when \asterreftext
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asterreftext{#1}}%
+ \else
+% when \setasternoteindent
+ {\asterreftext{#1}}%
+ \fi
+\fi
+}%
+%
+%% \asternumbertext{<LABEL>}
+%% \asternumbersuperscript{<LABEL>}
+%
+\DeclareRobustCommand{\asternumbertext}[1]{{\textsf{[*{#1}]}}}
+\DeclareRobustCommand{\asternumbersuperscript}[1]{\@textsuperscript{\scriptsize\!\!\textsf{[*{#1}]}}}
+%
+%% \asternumber{<LABEL>}
+\DeclareRobustCommand{\asternumber}[1]{%
+\if@astnt@numbersuperscript@switch
+% when \setasterrefsuperscript
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asternumbersuperscript{#1}}%
+ \else
+% when \setasternoteindent
+ {\asternumbersuperscript{#1}}%
+ \fi
+\else
+% when \asterreftext
+% when \setasternotenoindent
+ \if@astnt@noindent@switch
+ {\noindent\asternumbertext{#1}}%
+ \else
+% when \setasternoteindent
+ {\asternumbertext{#1}}%
+ \fi
+\fi
+}%
+%
+%% EOF \ No newline at end of file
diff --git a/macros/latex/contrib/asternote/asternote_example.tex b/macros/latex/contrib/asternote/asternote_example.tex
new file mode 100644
index 0000000000..1510541ff2
--- /dev/null
+++ b/macros/latex/contrib/asternote/asternote_example.tex
@@ -0,0 +1,19 @@
+\documentclass[uplatex]{article}
+\usepackage{asternote}
+\begin{document}
+%\setasternoteindent
+
+\asternote{a}a
+
+\asternote{b}b
+
+\asternotereset
+
+\asternote{c}c
+
+\asterref{a}A
+
+\asterref{b}B
+
+\asterref{c}C
+\end{document} \ No newline at end of file