Q&A 마당은 텍 관련 질문/답변을 위해 만들었습니다.

  • 로그인 없이 자유롭게 글을 읽고 쓸 수 있는 철학은 처음과 같이 계속됩니다.
  • 질문 전에 아래를 읽어 보세요. 좋은 질문이 좋은 답을 받을 수 있는 좋은 방법입니다.
    • 질문에 맞는 제목을 붙이세요. 질문의 내용과 관련없는 "고수님", "긴급질문", "도와주세요"와 같은 제목은 답이 잘 올라오지 않습니다. 이 게시판에 올라오는 모든 글은 질문입니다. 굳이 [질문], [Q]를 적으실 필요도 없습니다.
    • 내용을 충실히 적어 주시고, 같은 상황을 재현할 수 있는 최소한의 예제가 같이 있어야 합니다.
    • 최소 예제는 "Minimal working example"을 읽어 보세요.
  • 파일을 첨부하실 때에는 가능한 압축하여 파일 크기를 줄여서 올려주시길 바랍니다.
  • 개인적으로 사용하신 글꼴이 들어 있는 경우, preparefont.sty에 관한 답변을 참조하세요.
  • 스팸 글을 막기 위하여 짧은 시간 내에 다시 글이 등록되는 IP를 막거나, 광고 글을 막기 위하여 금지어로 .com, .net 등을 설정하고 있습니다. 다소간의 불편함이 있으시더라도 양해 바랍니다.
    • 금지어에서 stackexchange, stackoverflow, ctan, overleaf, , github, google.com, gmail.com, .org, .io, sil.org, wiki.com, tistory.com등은 해제하였습니다.
  • MathJax를 이용한 수식조판을 사용하실 수 있습니다. 여기를 참조하세요.
  • 사용하는 편집기는 CKeditor입니다.
    • 편집기에서 [enter]를 누르면 <p> 태그가 들어가고, 문단으로 생각하고 한 줄을 비웁니다.
    • 글줄만 바꾸려면 [shift-enter]를 누르면 <BR> 태그가 들어가므로 용도에 맞게 나누어 쓸 수 있습니다.
    • 수식를 문서내에 삽입하시려면 에디터를 툴바에서 [소스]를 눌러 HTML로 입력할 수 있게 바꾸신 후 <pre> </pre> tag를 사용하셔서 <pre> 여러 줄의 수식 </pre>처럼 입력하시면 좋습니다.

[tikz]mdframed 으로 그린 상자 잘림현상

2019.11.14 16:35

초초보 조회 수:6121

문제1.PNG

 

위와 같이 상자가 잘렸는데 본문상에 아무런 문제를 찾지 못하겠습니다. 그래도 아래 올려드려드리니, 도움 부탁드립니다. ㅜㅜ

 

감사합니다.

 

\RequirePackage{amsthm}

\RequirePackage{tikz}

\RequirePackage[tikz]{mdframed}

\RequirePackage{ifthen}

 

 

 

%%tikz style %%%

\tikzset{definition fill/.style={append after command={

\pgfextra

\draw[sharp corners, draw=#1, fill=#1]%

(\tikzlastnode.west)%

[rounded corners=0pt] |- (\tikzlastnode.n orth)%

[rounded corners=3pt] -| (\tikzlastnode.east)%

[rounded corners=3pt] |- (\tikzlastnode.south)%

[rounded corners=0pt] -| (\tikzlastnode.west);

\endpgfextra}}}

 

%%%%%%%%% type2

 

\mdfdefinestyle{kmsdefinition1}{}

\mdfdefinestyle{kmsdefinition2}{linecolor=termcolor,linewidth=1.3pt,innertopmargin=10pt,innerbottommargin=10pt,skipabove=10pt,skipbelow=10pt}

\mdfdefinestyle{kmsdefinition3}{roundcorner=10pt,linecolor=termcolor,linewidth=1.3pt,innertopmargin=10pt,innerbottommargin=10pt,skipabove=10pt,skipbelow=10pt}

 

%%%%%%%%% type3

 

\mdfdefinestyle{kmstheorem1}{frametitleaboveskip=10pt}

\mdfdefinestyle{kmstheorem2}{linecolor=thmcolor,linewidth=1.3pt,innertopmargin=10pt,innerbottommargin=10pt,skipabove=10pt,skipbelow=10pt,frametitleaboveskip=10pt}%,backgroundcolor=thmcolor2}

\mdfdefinestyle{kmstheorem3}{roundcorner=10pt,linecolor=thmcolor!20,backgroundcolor=thmcolor!20,linewidth=1.3pt,innertopmargin=10pt,innerbottommargin=10pt,skipabove=10pt,skipbelow=10pt,frametitleaboveskip=10pt}%,backgroundcolor=thmcolor2}

 

%%%%%%%%%% type4

\mdfdefinestyle{kmstheoremB1}{skipabove=10pt,skipbelow=10pt,innertopmargin=0pt,linecolor=black,roundcorner=5pt,linewidth=1.2pt,topline=true,frametitleaboveskip=\dimexpr-\ht\strutbox\relax}

 

 

 

%% 예제 스타일 %%%

\tikzstyle{kmsexamplestyle1}=[rectangle,rounded corners=2pt,minimum width=0.13\textwidth,align=center,draw=black,text=black]

\tikzstyle{kmsexamplestyle2}=[rectangle,rounded corners=2pt,fill=examplecolor,minimum width=0.13\textwidth,align=center,text=white]

%% 정의 스타일 %%%

\tikzstyle{kmsdefinition1}=[rectangle,rounded corners=2pt,align=center,draw=black,yshift=2pt]

\tikzstyle{kmsdefinition2}=[overlay,definition fill=termcolor,text=white,xshift=-1em,yshift=0.3em,anchor=west]

\tikzstyle{kmsdefinition3}=[overlay,draw=termcolor,fill=termcolor,text=white,rectangle,rounded corners=6pt,anchor=west,xshift=-0.1em,yshift=0.3em]

%% 정리 스타일 %%%

\tikzstyle{kmstheorem1}=[rectangle,rounded corners=2pt,align=center,draw=black,yshift=2pt]

\tikzstyle{kmstheorem2}=[overlay,draw=thmcolor,fill=thmcolor,text=white,rectangle,rounded corners,anchor=west,xshift=-0.1em,yshift=0.3em]

\tikzstyle{kmstheorem3}=[overlay,draw=white,fill=white,text=black,rectangle,rounded corners=6pt,anchor=west,xshift=-0.1em,yshift=0.3em]

 

\makeatletter

 

\newcommand{\definetheorem}[5][\empty]{%

\newcounter{#3}[chapter]

\expandafter\def\csname the#3\endcsname{\thechapter.\arabic{#3}}

\ifthenelse{\equal{#2}{type1}}{%본문형

\newenvironment{#3}[1][\empty]{\vskip 6\p@\@plus6\p@\relax%

\ifx#1\empty%

\refstepcounter{#3}%

\ifx##1\empty%

\noindent \begin{tikzpicture}[overlay,xshift=27.4pt,yshift=3pt]

\node[#5] {\small{\sffamily\bfseries#4} {\bfseries\sffamily\csname the#3\endcsname}};

\end{tikzpicture}\phantom{\hspace{0.18\textwidth}}%

\else%

\noindent \begin{tikzpicture}[overlay,xshift=27.4pt,yshift=3pt]

\node[#5] {\small{\sffamily\bfseries#4} {\bfseries\sffamily\csname the#3\endcsname}};

\end{tikzpicture}\phantom{\hspace{0.16\textwidth}} (##1) \enspace%

\fi%

\else%

\refstepcounter{#1}

\ifx##1\empty%

\noindent \begin{tikzpicture}[overlay,xshift=27.4pt,yshift=3pt]

\node[#5] {\small{\sffamily\bfseries#4} {\bfseries\sffamily\csname the#3\endcsname}};

\end{tikzpicture}\phantom{\hspace{0.18\textwidth}}%

\else%

\noindent \begin{tikzpicture}[overlay,xshift=27.4pt,yshift=3pt]

\node[#5] {\small{\sffamily\bfseries#4} {\bfseries\sffamily\csname the#3\endcsname}};

\end{tikzpicture}\phantom{\hspace{0.16\textwidth}} (##1) \enspace%

\fi%

\fi%

}%

{\vskip 6\p@\@plus6\p@\relax}%

}{%

}

\ifthenelse{\equal{#2}{type2}}{%박스본문형

\newenvironment{#3}[1][\empty]{%

\ifx#1\empty

\refstepcounter{#3}

\ifx##1\empty

\noindent\begin{mdframed}[style=#5]

\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#3\endcsname}};

\end{tikzpicture}\phantom{{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#3\endcsname}}%

\else

\noindent\begin{mdframed}[style=#5]

\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#3\endcsname}};

\end{tikzpicture}\phantom{{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#3\endcsname}} \, (##1)%

\fi

\else

\refstepcounter{#1}

\ifx##1\empty

\noindent\begin{mdframed}[style=#5]

\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#1\endcsname}};

\end{tikzpicture}\phantom{{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#1\endcsname}}%

\else

\noindent\begin{mdframed}[style=#5]

\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#1\endcsname}};

\end{tikzpicture}\phantom{{\sffamily\bfseries#4} {\sffamily\bfseries\csname the#1\endcsname}} \, (##1)%

\fi

\fi}{%

\end{mdframed}}

}{}

\ifthenelse{\equal{#2}{type3}}{%박스분리형

\newenvironment{#3}[1][\empty]{

\ifx#1\empty

\refstepcounter{#3}

\ifx##1\empty

\noindent\begin{mdframed}[style=#5,frametitle={\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#3\endcsname}};

\end{tikzpicture} \phantom{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#3\endcsname}}]

\else

\noindent\begin{mdframed}[style=#5,frametitle={\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#3\endcsname (##1)}};

\end{tikzpicture} \phantom{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#3\endcsname (##1)} }]

\fi

\else

\refstepcounter{#1}

\ifx##1\empty

\noindent\begin{mdframed}[style=#5,frametitle={\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#1\endcsname}};

\end{tikzpicture} \phantom{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#1\endcsname}}]

\else

\noindent\begin{mdframed}[style=#5,frametitle={\begin{tikzpicture}[overlay,anchor=west]

\node[#5] {{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#1\endcsname (##1)}};

\end{tikzpicture} \phantom{{\sffamily\bfseries#4} \bfseries\sffamily \csname the#1\endcsname (##1)} }]

\fi

\fi

}{\end{mdframed}}%

}{%

}

\ifthenelse{\equal{#2}{type4}}{%박스분리형-2

\newenvironment{#3}[1][\empty]{%

\ifx#1\empty

\refstepcounter{#3}

\ifx##1\empty

\mdfsetup{skipabove=10pt,skipbelow=10pt,innertopmargin=0pt,linecolor=black,roundcorner=5pt,linewidth=1.2pt,topline=true,frametitleaboveskip=\dimexpr-\ht\strutbox\relax,frametitle={\tikz[baseline=(current bounding box.east), outer sep =0pt]

\node[anchor=east,rectangle,fill=white] {\strut \small\sffamily\bfseries\bfseries #4 \csname the#3\endcsname};}}

\else

\mdfsetup{skipabove=10pt,skipbelow=10pt,innertopmargin=0pt,linecolor=black,roundcorner=5pt,linewidth=1.2pt,topline=true,frametitleaboveskip=\dimexpr-\ht\strutbox\relax,frametitle={\tikz[baseline=(current bounding box.east), outer sep =0pt]

\node[anchor=east,rectangle,fill=white] {\strut \small\sffamily\bfseries\bfseries #4 \csname the#3\endcsname (##1)};}}

\fi

\else

\refstepcounter{#1}

\ifx##1\empty

\mdfsetup{frametitle={\tikz[baseline=(current bounding box.east), outer sep =0pt]

\node[anchor=east,rectangle,fill=white] {\strut \small\sffamily\bfseries\bfseries #4 \csname the#1\endcsname};}}

\else

\mdfsetup{skipabove=10pt,skipbelow=10pt,innertopmargin=0pt,linecolor=black,roundcorner=5pt,linewidth=1.2pt,topline=true,frametitleaboveskip=\dimexpr-\ht\strutbox\relax,frametitle={\tikz[baseline=(current bounding box.east), outer sep =0pt]

\node[anchor=east,rectangle,fill=white] {\strut \small\sffamily\bfseries\bfseries #4 \csname the#1\endcsname (##1)};}}

\fi

\fi

\begin{mdframed}}{\end{mdframed}}%

}{%

}

}

\makeatother

번호 제목 글쓴이 날짜 조회 수
공지 Minimal Working Example을 첨부해주세요 [4] nanim 2015.06.23 229556
2242 texstudio 의 '코드의 해당 부분으로 가기' 가 안됩니다. [2] 텍텍 2019.12.16 1967
2241 목차 생성 좀 도와주세요 ㅜ [1] beginner! 2019.12.12 1552
2240 chapter 첫장 면주 스타일 바꾸는 방법 [2] beginner 2019.11.14 1640
2239 pdfpages를 쓰려는데 문제가 생겼습니다. [12] file 구름 2019.11.27 1735
2238 b6paper에서의 Layout 문제점 [1] file 김인동 2019.11.27 1559
2237 Visual Studio Code + Skim sync [3] 초보 2019.11.25 1779
2236 texworks 로딩 시간이 오래 걸립니다. [2] file 꼬꼬예 2019.11.20 1650
2235 xetexko에서 은신문 글꼴 지원 문제. [10] file 김인동 2019.11.14 1809
2234 그림 정렬 문제이 되지 않습니다.... [2] file 이종록 2019.11.14 1781
» [tikz]mdframed 으로 그린 상자 잘림현상 [2] file 초초보 2019.11.14 6121
2232 어떤 것을 써도 행간격이 바뀌질 않아요 [1] 초초보 2019.11.14 1608
2231 Table label을 referencing하는데 error가 있습니다. [6] file 이창섭 2019.11.11 1600
2230 한글로 작성하고 pdflatex으로 컴파일 한 PDF에서 검색이 되지 않습니다. [12] 기파랑 2019.11.11 2083
2229 은그래픽, 은신문 체는 pdfLaTeX에서 지원이 되지 않는 것입니까? [3] 김인동 2019.11.11 1672
2228 title에서 폰트 크기 수정 방법은? [4] 김인동 2019.11.05 1645
2227 makeatletter AfterEndEnvironment [1] noobSJ 2019.11.11 1572
2226 챕터 번호를 뛰어 넘으려면 어떻게 써야 하나요? [5] 기파랑 2019.10.30 4162
2225 \tableofcontents 에러 메세지 발생 [4] file 김인동 2019.11.05 1558
2224 표의 높이를 조절하고 싶어요 [5] file 찐슈가 2019.11.01 1633
2223 fallback 글자 지정 시 전체 글꼴이 변합니다. [4] Fluff 2019.10.15 3421



XE Login