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 229634
2602 memoir의 subsection 사이의 간격 설정 [1] ddd 2021.09.24 837
2601 oblivoir(또는 memoir)에서 챕터 스타일 적용 문제 [2] ddd 2021.09.20 869
2600 minipage 내에서의 indent와 줄간격 [7] file 판돌이 2021.09.15 52825
2599 논문에서 레퍼런스 작성할때 도와주세요! [1] 블루민 2021.09.11 921
2598 Texstudio에서 사용하는 compiler의 차이 [2] Latex사용자 2021.09.10 996
2597 TeXlive 2019 -> 2021 과정에서 발생한 오류 [6] file 판돌이 2021.09.05 919
2596 사설저장소 관련... [2] 판돌이 2021.09.05 1062
2595 xindy 색인시 CHAR: index 0 should be less than the length of the string [7] 판돌이 2021.09.03 869
2594 헷갈리는 oblivoir 클래스의 장별 첫 페이지? [6] file drask 2021.08.30 1003
2593 한글 글꼴 인식에 대한 질문 [9] file 큰바위 2021.08.30 1047
2592 위도우와 맥에서 컴파일 [4] 맥윈 2021.08.30 897
2591 texlive 2021 iso 이용한 설치중에 다음과 같은 오류가 계속 발생합니다. (user name이 한글인 경우) [5] file 2021.08.04 1498
2590 긴 텍스트와 이미지가 같이 들어 가는 테이블 만들기 [8] file dbsxowls 2021.08.25 1010
2589 한글 폰트 관련 질문입니다. [7] file dbsxowls 2021.08.22 1473
2588 table [7] file table 2021.08.17 1173
2587 Texpad(iOS)에서 Local Typesetter인 TexpadTex로 작업하면 pdf북마크가 생성되지 않습니다. [4] file Texpad 유저 2021.08.18 2226
2586 .sty not found 오류 [4] 해피밍이 2021.07.31 1406
2585 R markdown PDF knitting할때 figure caption 관련 에러가 계속 납니다. [1] kotizen 2021.08.17 1118
2584 xelatex + oblivoir에서의 코드 오작동 [3] file Kriss 2021.08.06 1388
2583 설치하였으나 [시작메뉴] 에 [TeX Live 2021] 이 없습니다 [4] 재설치 2021.08.12 955



XE Login