Tikz에서 이름으로 로고 만들기

Tikz에서 이름으로 로고 만들기

라텍스로 작은 로고를 만들어보려고 합니다. 그림(의사결정 트리)을 그리고 그 옆에 텍스트를 추가하고 싶습니다. 게다가 그림은 옆에 있는 텍스트 크기만큼 작아야 합니다.

내가 갖고 싶은 모양의 종류를 보여주는 임의의 사진입니다.

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

원천

지금까지 나는 옆에 텍스트를 추가하는 그림을 만들었습니다. 아쉽게도 결과가 없습니다.

\documentclass{scrartcl}
\usepackage[a4paper,margin=1cm,landscape]{geometry}
\usepackage{tikz}

%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>

\usetikzlibrary{positioning,shadows,arrows}

\begin{document}

\begin{figure}
   \begin{minipage}[c]{7cm}
\begin{tikzpicture}[
    state/.style={circle, draw=none, fill=orange, circular drop shadow,
        text centered, anchor=north, text=white},
    leaf/.style={circle, draw=none, fill=red, circular drop shadow,
        text centered, anchor=north, text=white},
    level distance=0.5cm, growth parent anchor=south
]
\node (State00) [state] {$X$}
   child{ [sibling distance=3cm]
            node (State01) [state] {$f(x)_{1}$}
            child{
                child{ [sibling distance=2cm]
                    node (State02) [state] {$f(x)_{11}$}
                    child{
                        child{
                            node (State03) [leaf] {$\hat{y}_{1}$}
                        }
                    }
                    child{
                        child{ [sibling distance=2.0cm]
                            node (State04) [state] {$\hat{y}_{2}$}
                        }
                    }
                }
            }
            child{ [sibling distance=2cm]
                child{
                    node (State10) [state] {$f(x)_{12}$}
                    child{
                        child{
                            node (State11) [leaf] {$\hat{y}_{3}$}
                        }
                    }
                    child{
                        child{
                            node (State12) [state] {$\hat{y}_{4}$}
                        }
                    }
                }
            }
        }
;    
\end{tikzpicture}]
\end{minipage}%

\begin{minipage}[c]{\textwidth-7cm}
      Some text describing the image.
      Some text describing the image.
      Some text describing the image.
\end{minipage}

\end{figure}

\end{document}

출력은 다음과 같습니다. 여기에 이미지 설명을 입력하세요

그리고 텍스트는 다음과 같은 형식이어야 합니다.

\documentclass{article}
\pagestyle{empty}
\usepackage{xcolor}
\usepackage{bm}
\usepackage{setspace}

\begin{document}

\setstretch{0.5}

\begin{center}
Nam$\textcolor{orange}{\bm{{\hat{e}}}}$ of New \\
~\\
 Team
\end{center}

해결책을 알려 주시겠습니까?

편집하다

@Guilherme Zanotelli의 도움으로 작동하도록 만들고 적절한 비율을 설정했습니다. 그런데 PDF로 저장하면 로고가 너무 작아요.

비율을 그대로 유지하면서 어떻게 더 크게 만들 수 있나요?

더 큰 글꼴로 해결

답변1

질문이 실제로 무엇인지 이해하지 못하지만 문제 중 하나는 Nam*ê* of New Team의사결정 트리의 오른쪽에 표시되도록 하는 것입니다.

따라서 아래는 tikzpicture 내에서 이를 수행하는 방법입니다(미니페이지가 필요 없음).

\documentclass{article}
\usepackage[a4paper,margin=1cm,landscape]{geometry}
\usepackage{tikz,pbox}
\usepackage{xcolor}
\usepackage{bm}
\usepackage{setspace}

%%%<
\usepackage{verbatim}
\usepackage[active,tightpage,floats]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>

\usetikzlibrary{positioning,shadows,arrows}

\begin{document}
    \begin{figure}[h]
            \begin{tikzpicture}[
            state/.style={circle, draw=none, fill=orange, circular drop shadow,
                text centered, anchor=north, text=white},
            leaf/.style={circle, draw=none, fill=red, circular drop shadow,
                text centered, anchor=north, text=white},
            level distance=0.5cm, growth parent anchor=south
            ]
            \node (State00) [state] {$X$}
            child{ [sibling distance=3cm]
                node (State01) [state] {$f(x)_{1}$}
                child{
                    child{ [sibling distance=2cm]
                        node (State02) [state] {$f(x)_{11}$}
                        child{
                            child{
                                node (State03) [leaf] {$\hat{y}_{1}$}
                            }
                        }
                        child{
                            child{ [sibling distance=2.0cm]
                                node (State04) [state] {$\hat{y}_{2}$}
                            }
                        }
                    }
                }
                child{ [sibling distance=2cm]
                    child{
                        node (State10) [state] {$f(x)_{12}$}
                        child{
                            child{
                                node (State11) [leaf] {$\hat{y}_{3}$}
                            }
                        }
                        child{
                            child{
                                node (State12) [state] {$\hat{y}_{4}$}
                            }
                        }
                    }
                }
            };
        \node[right] at (current bounding box.east) {\pbox{\textwidth}{\relax\ifvmode\centering\fi Nam$\textcolor{orange}{\bm{{\hat{e}}}}$ of New \\
            ~\\
            Team}};
        \end{tikzpicture}
    \end{figure}
\end{document}

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

답변2

이것은 다음의 적응이다Guilherme Zanotelli의 답변, Forest를 사용하고 있으며 그 중 나는 글꼴입니다. 또한 standalone제 생각에는 preview(그러나 preview구성에 따라 를 사용하는 것보다) 덜 소란스러운 것을 사용합니다 .

로고에서 중요한 결정은 글꼴 선택입니다. 맥락과 대상에 따라 크게 달라지기 때문에 무엇을 추천해야 할지 잘 모르겠지만 Computer Modern은 좋은 선택이 아닐 것 같습니다. 그림처럼 kpfonts아래 예에서 사용합니다.

또한 오른쪽 텍스트에 대해 임의의 글꼴 크기를 선택하는 방법을 보여 주기도 했습니다. 첫 번째 숫자는 포인트 크기입니다. 두 번째는 기준선 건너뛰기입니다. 확장 가능한 글꼴이 중요합니다. 기본적으로 비트맵 Computer Modern이 제공될 것입니다. 모든 것이 잘되고 훌륭하지만 여기서는 전혀 적합하지 않습니다. (CM을 원한다면 \usepackage[T1]{fontenc}단독으로 사용하여 확장 가능한 버전을 얻으세요.)

로고를 작은 크기로 사용하면 선이 사라지는 것을 원하지 않기 때문에 트리에서 선 너비를 늘렸습니다. 적어도 나는 당신이 그렇지 않다고 가정합니다.

심벌 마크

\documentclass[border=10pt,multi,tikz,border=5pt]{standalone}
\usepackage{forest,bm}
\usetikzlibrary{shadows}
\usepackage[T1]{fontenc}
\usepackage{kpfonts}
\begin{document}
\begin{forest}
  state/.style={fill=orange},
  leaf/.style={fill=red},
  for tree={
    text centered,
    child anchor=parent,
    text=white,
    circle,
    circular drop shadow,
    math content,
    state,
    font=\large,
    edge={line width=1pt},
  },
  for descendants={
    edge path'={(.child anchor) -- +(0,7.5mm) -- (!u.parent anchor)},
    l sep'=15mm,
  },
  l sep'=7.5mm,
  where n children=0{
    !u.s sep'=15mm,
  }{},
  [X
    [f(x)_{1}
      [f(x)_{11}
        [\hat{y}_{1}, leaf]
        [\hat{y}_{2}]
      ]
      [f(x)_{12}
        [\hat{y}_{3}, leaf]
        [\hat{y}_{4}]
      ]
    ]
  ]
  \node [right, align=center, font=\fontsize{50pt}{75pt}\selectfont] at (current bounding box.east) {Nam$\textcolor{orange}{\bm{{\hat{e}}}}$ of New\\Team};
\end{forest}
\end{document}

관련 정보