summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/musikui/musikui.tex
blob: d5dfd24535b63b4434556a7aad17d21cdddede7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
\documentclass[dvipdfmx]{article}

\usepackage{musikui}
\usepackage{listings}
\usepackage[dvipdfmx]{hyperref}
\usepackage{longtable}

\title{The musikui package v1}
\author{Naoki Kaneko}
\date{2018/04/25}
\begin{document}
\maketitle

This package is for easy expression of arithmetical restorations with \LaTeX{}.

\begin{center}
\begin{musikui}
\wari{\eaten{}&\eaten{}&\eaten{}&\eaten{}&\eaten{}&\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&7&\eaten{}&\eaten{}&\eaten{}}
\musi{\eaten{}&\eaten{}&\eaten{}&\eaten{}}{4}
\sen
\musi{\eaten{}&\eaten{}&\eaten{}}{3}
\musi{\eaten{}&\eaten{}&\eaten{}}{3}
\sen
\musi{\eaten{}&\eaten{}&\eaten{}&\eaten{}}{2}
\musi{\eaten{}&\eaten{}&\eaten{}}{2}
\sen
\musi{\eaten{}&\eaten{}&\eaten{}&\eaten{}}{0}
\musi{\eaten{}&\eaten{}&\eaten{}&\eaten{}}{0}
\sen
\musi{0}{0}
\end{musikui}
\end{center}

The package is maintained on GitHub:
\begin{itemize}
\item \url{https://github.com/puripuri2100/musikui.sty}
\end{itemize}
\section{Package read}
Read using \verb|\usepackage| command. There is no option.

\begin{lstlisting}[language=TeX]
\usepackage{musikui}
\end{lstlisting}
\section{Dependent package}
graphics package

\section{License}
The \LaTeX{} Project Public License
\section{Provide command}
\subsection{Commands related to composition}
\begin{lstlisting}[language=TeX]
\kake{<multiplicand>}{<multiplier>}{<product>}
\wari{<dividend>}{<divide>}{<quotient>}
\musi{<holes>}{<distance from the right end>}
\sen
\bubunsen{<length>}{<distance from the right end>}
\end{lstlisting}

\subsection{Commands related to holes}
\begin{lstlisting}[language=TeX]
\eaten{<numbers etc.>}
\noneaten{<numbers etc.>}
\halfeaten{<numbers etc.>}
\halfnoneaten{<numbers etc.>}
\hhalfeaten{<numbers etc.>}
\hhalfnoneaten{<numbers etc.>}
\end{lstlisting}

\section{The role of each command}
The role of each command is shown in Table \ref{yakuwari}.
\begin{longtable}[h]{rp{20em}}
\caption{\label{yakuwari}}\\
\verb|\kake|&Outputs \verb|<multiplicand>| \verb|<multiplier>| \verb|<product>| of multiplication arithmetical restorations calculation.\\
\verb|\wari|&Outputs \verb|<dividend>| \verb|<divide>| \verb|<quotient>| of division arithmetical restorations calculation.\\
\verb|\musi| &Outputs \verb|<holes> <distance from the right end> |.\\
\verb|\sen|&line\\
\verb|\bubunsen|&Line of the specified length\\
\verb|\eaten|&normal hole\\
\verb|\noneaten| &hole without a line \\
\verb|\halfeaten| &Half the width hole of \verb|\eaten|.\\
\verb|\halfnoneaten| &Hole without a line with half width of  \verb|\eaten|.\\
\verb|\hhalfeaten| &Two holes with \verb|\harleaten| side by side.\\
\verb|\hhalfnoneaten| &\verb|\hhalfeaten| line without a hole
\end{longtable}

\section{Notation}
Use one musikui environment per an arithmetical restorations.
For the representation part of the hole, a hole and a hole (or a number) are connected by  ``\verb|&|".
After using \verb|\kake| or \verb|\wari|, you just line \verb|\musi| and \verb|\sen| like the hole counting you want to express.
An example of division and multiplication is given below.

\begin{longtable}[h]{l|l}
\begin{lstlisting}[language=TeX]
\begin{musikui}
\kake{8&\eaten{}&6&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten&\eaten{}&\eaten{}&\eaten{}}
\musi{\eaten{}&6&\eaten{}&\eaten{}&\eaten{}}{0}
\musi{\eaten{}&\eaten{}&\eaten{}&6}{1}
\sen
\end{musikui}
\end{lstlisting}
&
\begin{musikui}
\kake{8&\eaten{}&6&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten&\eaten{}&\eaten{}&\eaten{}}
\musi{\eaten{}&6&\eaten{}&\eaten{}&\eaten{}}{0}
\musi{\eaten{}&\eaten{}&\eaten{}&6}{1}
\sen
\end{musikui}
\\
\begin{lstlisting}[language=TeX]
\begin{musikui}
\wari{\eaten{}&\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten}
\musi{\eaten{}&\eaten{}}{1}
\sen
\musi{8&\eaten{}}{0}
\musi{\eaten{}&\eaten{}}{0}
\sen
\musi{\eaten{}}{0}
\end{musikui}
\end{lstlisting}
&
\begin{musikui}
\wari{\eaten{}&\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten}
\musi{\eaten{}&\eaten{}}{1}
\sen
\musi{8&\eaten{}}{0}
\musi{\eaten{}&\eaten{}}{0}
\sen
\musi{\eaten{}}{0}
\end{musikui}
\\
\begin{lstlisting}[language=TeX]
\begin{musikui}
\wari{\eaten{}&\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten}
\musi{\eaten{}&\eaten{}}{1}
\bubunsen{4}{0}
\musi{8&\eaten{}}{0}
\musi{\eaten{}&\eaten{}}{0}
\bubunsen{2}{0}
\musi{\eaten{}}{0}
\end{musikui}
\end{lstlisting}
&
\begin{musikui}
\wari{\eaten{}&\eaten{}&\eaten{}&\eaten{}}
{\eaten{}&\eaten{}}
{\eaten{}&\eaten}
\musi{\eaten{}&\eaten{}}{1}
\bubunsen{4}{0}
\musi{8&\eaten{}}{0}
\musi{\eaten{}&\eaten{}}{0}
\bubunsen{2}{0}
\musi{\eaten{}}{0}
\end{musikui}
\end{longtable}

\section{Customize}
You can change the value of arithmetical restorations using \verb|\renewcommand*|.

\begin{lstlisting}[language=TeX]
\renewcommand*{\musiwidth}{2em}
\end{lstlisting}
The values whose roles and default values can be changed are shown in Table \ref{kiteiti}.

\begin{longtable}[h]{lll}
\caption{\label{kiteiti}}\\
\verb|\musiwidth|&hole width&1.2em\\
\verb|\musiheight|&hole height&0.96em\\
\verb|\musidepth|&hole depth&0.24em\\
\verb|\musihgap|&distance between hole and hole&0.4em\\
\verb|\musivgap|&distance between hole and line&0.4em\\
\verb|\musirule|&line width&0.4pt\\
\verb|\musiopsymbol|&multiplication sign&\verb|$\times$|\\
\verb|\musiwarikakko|&divide symbol&\verb|\Big)|
\end{longtable}

\section{Summary}
If all of the above is taken into the drawing, it will be Figure \ref{fig:one} and Figure \ref{fig:two}.

\begin{figure}[htbp]
 \begin{minipage}{0.5\hsize}
  \begin{center}
   \includegraphics[width=60mm]{kake.pdf}
  \end{center}
  \caption{multiplication}
  \label{fig:one}
 \end{minipage}
 \begin{minipage}{0.5\hsize}
  \begin{center}
   \includegraphics[width=60mm]{wari.pdf}
  \end{center}
  \caption{division}
  \label{fig:two}
 \end{minipage}
\end{figure}
\end{document}