원형 배열로 직선 기준선 조판

원형 배열로 직선 기준선 조판

원형 배치를 어떻게 설정해야 할지 궁금합니다.여기그림 "(2)"에서 - 즉, 중심점에서 방사형으로 이어지는 일련의 직선입니다.

텍스트의 원형 배열

지금까지 내가 찾은 것 중 가장 유용한 것은편지 회전하기(대부분의 완전한 튜토리얼) 패키지에 있습니다 graphicx. graphicxand hspace와 명령을 엄청나게 힘들게 조합하면 가능하리라 확신합니다 vspace. 하지만 누군가가 좀 더 우아한 해결책을 알 수 있기를 바랐습니다.

(원형 베이스라인이 있는 다른 타입에 대해 물어보려고 했는데,원형 경로를 따라 텍스트 회전을 미세 조정하는 방법은 무엇입니까?그 문제를 꽤 광범위하게 정리한 것 같습니다.)

업데이트:많은 감사미브로우저를 주로 그곳에 데려다 주고 히브리어 문자를 사용하기 위해 더 많은 노력을 기울여 주셔서 감사합니다! 추가 아이디어를 갖고 싶어하는 다른 사람들에게 추가 예제에서는 로마 문자로도 충분하다는 점을 알리고 싶었습니다.

답변1

장식은 오른쪽에서 왼쪽으로 쓰는 언어의 경우 그다지 다양하지 않지만 다음은 진행 방법 중 하나를 보여줍니다. 으로 컴파일이 필요합니다 lualatex. 아마도 PSTricks이것을 더 잘할 수 있을 것입니다.

freesans또한 귀하의 시스템에서 사용 가능하거나 사용 불가능할 수 있는 글꼴을 사용합니다 .

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\usepackage{fontspec}
\newfontfamily\hebrewfont[Script=Hebrew]{freesans}

\tikzset{
    decorate path with hebrew/.style={
        decoration={
            text along path,
            text={|\luatextextdir TRT\hebrewfont|#1},
        },
        decorate,
    },
    hebrew text/.style={
        font=\hebrewfont, 
        execute at begin node={\luatextextdir TRT}
    }
}

\begin{document}

\begin{tikzpicture}
\path [decorate path with hebrew={מלון אבוקדו מישמש תפוח אבוקדו אבטיח אשכולית גזר}]
    circle [radius=1.25cm];
\foreach \w [count=\i from 0] in {מלון,אבוקדו,מישמש,תפוח,אבוקדו,אבטיח,אשכולית,גזר}
    \node [hebrew text, anchor=west,shift=(\i*45:1.25cm), rotate=\i*45] {\w};

\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

내부의 기준선을 얻으려면 reverse path열쇠를 장식과 함께 사용할 수 있습니다. 이 키의 성공적인 사용은 원에 대해 내부적으로 경로가 그려지는 방식(예: 시계 방향)에 따라 달라집니다. 4개의 호를 사용하여 원을 시계 반대 방향으로 수동으로 그린 ​​경우 reverse path키는 불필요합니다. (물론 장식 엔진 작성자가 충분히 똑똑하다면 경로의 방향을 자동으로 결정하는 방법을 알아냈을 것입니다 ;-)

내가 생각할 수 있는 글자를 쌓는 유일한 방법은 단어의 각 글자를 대략적으로 반복하는 것인데, 매크로를 사용하여 수행했습니다 \stackletters. align핵심 은~ 해야 하다\node스태킹이 작동하도록 옵션 에서 사용됩니다 . 변화 anchor와 회전도 살펴보세요.

다른 방향(즉, 안쪽)으로 쌓으려면 anchor를 로 변경 south하고 를 사용하십시오 rotate=\i*45-90. 이것은 스타일로 묶일 수 있습니다.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\usepackage{fontspec}
\newfontfamily\hebrewfont[Script=Hebrew]{freesans}

\tikzset{
    decorate path with hebrew outside/.style={
        postaction={
            decoration={
                text along path,
                text={|\luatextextdir TRT\hebrewfont|#1},
                reverse path, % Make decoration go the other way
            },
            decorate
        }
    },
    hebrew text/.style={
        font=\hebrewfont, 
        execute at begin node={\luatextextdir TRT}
    }
}

\def\stackletters#1{\let\flag=\relax\expandafter\dostackletters#1;}
\def\dostackletters#1{%
    \ifx#1;%
    \else%      
        \ifx\flag\relax%
            #1%
            \let\flag=\stackletters%
        \else%
            \\[-0.25\baselineskip]#1%
        \fi%
        \expandafter\dostackletters%
    \fi}


\begin{document}

\begin{tikzpicture}
\path [decorate path with hebrew outside={מלון אבוקדו מישמש תפוח אבוקדו אבטיח אשכולית גזר}]
    circle [radius=1cm];
\foreach \w [count=\i from 0] in {מלון,אבוקדו,מישמש,תפוח,אבוקדו,אבטיח,אשכולית,גזר}
    \node [hebrew text, align=center, anchor=north, shift=(\i*45:1.25cm), rotate=\i*45+90] {\stackletters{\w}};

\end{tikzpicture}


\end{document}

여기에 이미지 설명을 입력하세요

따라서 요청한 대로 lualatex. 노드 내용을 쌓는 코드가 조금 변경되었습니다.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\tikzset{
    decorate path with text outside/.style={
        postaction={
            decoration={
                text along path,
                text={#1},
                reverse path, % Make decoration go the other way
            },
            decorate
        }
    },
}


\def\stacknodecontents#1\ignorespaces{%
    % #1 contains a whole load of internal TikZ code
    % which terminates with an \ignorespaces
    % (just before the node text begins)
    #1\ignorespaces%
    \let\stacknext=\relax%
    % \expandafter in case the node text is a macro.
    \expandafter\dostacknodecontentslet}

\def\dostacknodecontentslet{%
    \afterassignment\dostacknodecontentstypeset%
    % Need global.
    \global\let\stacktoken=}

\def\dostacknodecontentstypeset{%
    \ifx\stacktoken\egroup% <- the } at the end of the node.
        \let\stacknext=\stacktoken%
    \else%
        % If \stacknext is \relax then \stacktoken is the first
        % token, and does not require a new line.
        \ifx\stacknext\dostacknodecontentslet%
            \\[-0.25\baselineskip]% Should parameterise this.
        \fi%
        \stacktoken%
        \let\stacknext=\dostacknodecontentslet%
    \fi%
    \stacknext}

\tikzset{
    stack node text/.style={
        align=center,
        execute at begin node=\stacknodecontents%
    }
}


\begin{document}


\begin{tikzpicture}
\path [decorate path with text outside={apple banana celary date egg fig grape honey}]
    circle [radius=1.1212cm];
\foreach \w [count=\i from 0] in {apple, banana, celary, date, egg, fig, grape, honey}
    \node [stack node text, anchor=north, shift=(\i*45:1.3636cm), rotate=\i*45+90] {\w};

\end{tikzpicture}


\end{document}

여기에 이미지 설명을 입력하세요

관련 정보