업데이트

업데이트

저는 "Kunkunshi"라는 오키나와 악보를 만드는 방법을 찾으려고 노력하고 있습니다(아래 이미지 참조).

틴사구 누 하나 쿤쿤시

기본적으로 저는 일본어 문자 그리드를 만들려고 노력하고 있습니다. 한 열에는 12개의 정사각형이 있어야 하며, 정사각형 너비의 약 66% 간격으로 구분되어야 합니다. 문자는 사각형 중앙에 위치하거나 두 사각형 중앙에 작은 글꼴로 표시되어야 합니다. 이상적으로는 이미지에 표시된 대로 그리드의 문자 옆에 가사를 쓸 수 있습니다.

내가 찾을 수 있는 가장 가까운 도움은일본어 필기 템플릿에 대한 질문입니다..

답변1

다음은 시작하기 위한 내용을 제공합니다. 그리드를 그리는 루프와 일부 셀, 라인 또는 "가사" 위치에 문자를 배치하는 기본 API가 있습니다. 필요한 경우 댓글로 설명을 요청하세요.

\documentclass [border=2mm]{standalone} 
\usepackage{tikz}

\begin{document}

\def\atcenter#1#2#3{ 
  % Puts #3 at cell (#1,#2)
  \path (#1,#2) +(.3,.5) node {#3};
}

\def\atline#1#2#3{
  % Puts #3 at the line between cells (#1, #2-0.5) and (#1, #2+0.5)
  \path (#1,#2) +(.3,.5) node[fill=white, font=\tiny, inner xsep=1mm, inner ysep=0] {#3};
}

\def\lyrics#1#2#3{
  % Puts #3 at the right side of the column #1, at fractional y-coordinate #2
  \path (#1,.5) +(.6,#2) node[font=\tiny,anchor=west, inner sep=0.5mm] {#3};
}

\begin{tikzpicture}[x=10mm,y=-6mm]

    % Draw the grid
    \draw[thick] (1,1) rectangle (11,13);
    \foreach \column in {1,...,10} {
      \foreach \row in {1,...,12} {
         \draw (\column,\row) rectangle +(0.6,1);
         }
    }

    % Some example letters in cells
    \foreach \letter [count=\i  from 1] in {A,B,C,D,E,F,G,H,I,J,K,L} {
      \atcenter{10}{\i}{\letter};
    }

    % Some example letters at lines
    \atline{10}{2.5}{a};
    \atline{10}{3.5}{b};

    % Another column with letter
    \foreach \letter [count=\i  from 1] in {M,N,O,P,Q,R} {
      \atcenter{9}{\i}{\letter};
    }

    % Example "lyrics". Note the expression used as #2
    \foreach \letter [count=\i from 1] in {f,o,o,b,a,r} {
      \lyrics{9}{3+\i*0.4}{\letter}
    }
\end{tikzpicture}
\end{document}

위 코드는 다음을 생성합니다.

결과

업데이트

그냥 재미로 일본어 문자로 시도해 보고 작동하는지 확인하세요. 효과가 있었어요! (xelatex 및 AozoraMinchoRegular.ttf 글꼴이 필요합니다.무료).

부인 성명일본어는 한마디도 못해요 :-)

암호:

\documentclass [border=2mm]{standalone}
\usepackage{xeCJK}
\setCJKmainfont{AozoraMinchoRegular.ttf}
\usepackage{tikz}

\begin{document}

\def\atcenter#1#2#3{ 
  % Puts #3 at cell (#1,#2)
  \path (#1,#2) +(.3,.5) node {#3};
}

\def\atline#1#2#3{
  % Puts #3 at the line between cells (#1, #2-0.5) and (#1, #2+0.5)
  \path (#1,#2) +(.3,.5) node[fill=white, font=\tiny, inner xsep=1mm, inner ysep=0] {#3};
}

\def\lyrics#1#2#3{
  % Puts #3 at the right side of the column #1, at fractional y-coordinate #2
  \path (#1,.5) +(.6,#2) node[font=\tiny,anchor=west, inner sep=0.5mm] {#3};
}

\begin{tikzpicture}[x=10mm,y=-6mm]

    % Draw the grid
    \draw[thick] (1,1) rectangle (11,13);
    \foreach \column in {1,...,10} {
      \foreach \row in {1,...,12} {
         \draw (\column,\row) rectangle +(0.6,1);
         }
    }

    % Some example letters in cells
    \foreach \letter [count=\i  from 1] in {中,中,工,上,四,合,四,五,中,中,工,上}
    {
      \atcenter{10}{\i}{\letter};
    }

    % Some example letters at lines
    \atline{10}{2.5}{五};
    \atline{10}{3.5}{中};

    % Another column with letter
    \foreach \letter [count=\i  from 1] in {四,合,四,五,中,中,工,上}
    {
      \atcenter{9}{\i}{\letter};
    }

    % Example "lyrics". Note the expression used as #2
    \foreach \letter [count=\i from 1] in {日,本,語,で} {
      \lyrics{9}{3+\i*0.5}{\letter}
    }
\end{tikzpicture}
\end{document}

결과:

일본어 결과

관련 정보