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 229592
2621 texworks 실행오류 문제 [2] file 002 2021.11.03 663
2620 문화부글꼴 hangulfontset 관련과 그밖의 문의 [10] file 텍사랑 2021.10.30 847
2619 solution font를 Proof 와 같이 이탤릭+밑줄 이 안되요 / vwcol package에 그림 넣기 질문 [2] file 파랑새 2021.10.23 721
2618 verbatim 환경과 comment 환경 오고 가기? [3] file hsjun 2021.10.23 647
2617 oblivoir 3.02 관련 XeLaTeX 문의 [3] file 텍사랑 2021.10.20 759
2616 footer 위치 조정 [2] 길쭉 2021.10.22 630
2615 kaoclass에서 한글을 사용하려면 [4] 처음처럼 2021.10.20 775
2614 grruby에서 글자 크기 조정 [2] file 판돌이 2021.10.17 683
2613 각주가 페이지 별로 재설정되는 문제 [5] ㅂㄹㅎ 2021.10.13 735
2612 pdfLaTEX에 의해 PDF 변환 된 뒤 PDF를 드래그 하면 이상한 글자가 복사 됩니다. [1] dressler6 2021.10.07 866
2611 LuaTeX [1] 딩글 2021.10.07 802
2610 tikz를 이용하여 3d gear/cog 그리기 [2] tt 2021.10.07 1148
2609 긴 텍스트를 argument 로 하려는 경우 [2] 딩글 2021.10.05 741
2608 섹션 번호에 별표 붙이기 [6] file noname 2021.10.06 817
2607 첨부파일과 같은 Contents 만드는 방법 [2] file 처음처럼 2021.09.30 780
2606 XeLaTeX과 kotex을 사용할 때 생기는 italic 글꼴에서의 warning [3] 산도깨비 2021.09.28 943
2605 raisebox와 문단 줄바꿈 [9] file 판돌이 2021.09.22 839
2604 readhanja 패키지에서 [2] file yihoze 2021.09.24 6804
2603 TeX to ePub? [8] 판돌이 2021.09.21 846



XE Login