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

초초보 조회 수:6149

문제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 230234
2812 adhochangulfont 문의 [2] file 텍초보 2023.05.09 195
2811 oblivoir 가 아닌 다른 documentclass 에서의 문장부호 [1] 창호 2023.05.07 125
2810 texlive 2023 package index가 어디에 있나요?? [1] 창호 2023.05.06 179
2809 xelatex 글꼴 배제 질문 [6] 텍사랑 2023.05.06 198
2808 두페이지로 나뉜 그림을 가운데로 모으기 [2] file 판돌이 2023.05.01 150
2807 맥m2 _2023_설치 후 colorjamo 깨짐 현상이 있습니다. [3] file mason8888 2023.04.28 370
2806 Kile 편집기 쓰시는 분께 질문드립니다. [1] 큰바위 2023.04.27 122
2805 compiler에 latex+dvips+pspdf 어떻게 추가하는 건가요? [4] 000 2023.04.25 143
2804 맥용 texlive2023의 xelatex에서 은바탕글꼴을 못 불러들입니다. [3] file 낯선사람 2023.04.23 222
2803 수식의 type1 폰트 관련 질문 [2] hmltotex 2023.04.10 184
2802 수식 색깔과 볼드 동시에 하는 법 질 [1] yhr0110 2023.04.03 228
2801 Texlive 2023과 기존 문서 파일의 사용 [2] 바보사랑 2023.03.30 258
2800 apacite.sty 에러(참고문헌 작성) [2] 만두콘샐러드 2023.03.29 117
2799 TeXLive 2023의 TeXworks editor 버그? [1] file 지나가다가 2023.03.27 173
2798 Overleaf에서 폰트 설정을 여쭙고 싶습니다. [5] 0408 2023.03.26 1149
2797 TeXLive2023 설치 후 texworks-config 패키지 설치 시 에러 발생합니다. [1] pinder 2023.03.26 154
2796 texlive2023.iso 파일 다운로드에 어려움을 겪고 있습니다. [2] file ㅇㅇ 2023.03.24 161
2795 TeXLive 2023 + WSL 2 설치에서 사설저장소 설정 [2] Dennis 2023.03.24 191
2794 tikz에서 좌표를 숫자대신 알파벳으로 넣으면 출력물이 안 나오네요. [3] 고양이 2023.03.19 162
2793 과거 사용하던 파일을 새로 사용하는데 문제가 생겼습니다. [4] ㅈㅇㅅ 2023.03.07 213



XE Login