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 230237
2892 beamer section에 underline을 쓰면 에러가 납니다. [1] why 2024.04.04 54
2891 그림과 문장 배치 [1] file 하늘땅 2024.04.12 61
2890 TikZ와 KoTeX 충돌? [1] puzzlist 2024.04.03 64
2889 참고문헌 표시를 로마자로 하려면 어떻게 해야 할까요? [5] file byunss 2024.04.10 65
2888 사설 package 설정 요약좀 부탁해요 [2] 문수 2024.04.16 69
2887 footer의 세로 위치를 조정하고 싶습니다 [1] file 하늘땅 2024.03.28 72
2886 running footer를 지우고 공간까지 본문으로 [2] file 판돌이 2024.04.08 77
2885 Lyx에서 LaTeX 를 입력하는 방법 문의 [3] file 하늘땅 2023.11.09 78
2884 LyX 에서 설정을 고치고 나서 Undefined control sequence 발생하여 설정을 reset하는 방법 문의 [2] file 하늘땅 2023.11.10 79
2883 MikTeX에서 graphicx 패키지 에러 [1] hyunsan 2023.01.03 80
2882 LyX 조판실행 중 Undefined control sequence 오류 문의 [2] file 하늘땅 2023.11.09 83
2881 toc의 위쪽에 있는 여백 [2] file 판돌이 2023.01.23 88
2880 \ref로 작성한 링크가 잘 동작하지 않습니다 [4] file byunss 2024.04.07 89
2879 toc 만드는 중 질문입니다. [4] file 하늘땅 2023.11.21 92
2878 DeclareDocumentCommand를 \chapter 내부에서 사용시 pdf bookmark에 식자되는 않는 문제 [2] file noname 2022.12.21 93
2877 표 작성 질문입니다. [4] file 하늘땅 2023.11.14 95
2876 tikz 그림에서 레이블을 특정부분부터 나오게 하고 싶습니다. [2] file 고양이 2023.01.18 97
2875 절에 해당하는 toc 넣기 질문(minitoc) [3] file 하늘땅 2023.11.15 101
2874 Lyx에서 갑지기 그래픽 파일 업로드가 안되요 (Mac OS Ventura 업그레이드후) [4] seongwuk 2023.11.25 101
2873 eqnarray 환경에 대한 질문 [3] file moscow 2023.09.22 102



XE Login