├── README.md ├── makefile ├── reviewresponse.cls ├── reviewresponse_example.pdf ├── reviewresponse_example.tex └── tcolorbox.sty /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javism/responsereviewers/304c3bfa2e065aff3637f2b240a3a0a1279db6b5/README.md -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | # Copyright Javier Sánchez-Monedero. 2 | # Please report bugs and suggestions to (jsanchezm at uco.es) 3 | # 4 | # This document is released under a Creative Commons Licence 5 | # CC-BY-SA (http://creativecommons.org/licenses/by-sa/3.0/) 6 | # 7 | 8 | # Name of your tex document (without .tex) 9 | MAIN := reviewresponse_example 10 | 11 | .PHONY: $(MAIN).pdf 12 | 13 | all: $(MAIN).pdf 14 | 15 | $(MAIN).pdf: $(MAIN).tex 16 | pdflatex -interaction=nonstopmode $(MAIN).tex 17 | # bibtex $(MAIN) 18 | pdflatex -interaction=nonstopmode $(MAIN).tex 19 | 20 | pdf: $(MAIN).pdf 21 | 22 | view: pdf 23 | evince $(MAIN).pdf& 24 | 25 | clean: 26 | rm -f $(MAIN).ps $(MAIN).dvi *.out *.log *.toc *.idx *~ *.blg *.bbl *.aux *# *.dvi 27 | 28 | clean_out: 29 | rm -f *.pdf *.dvi *.tar.gz 30 | 31 | dist: 32 | tar --exclude=".*" -czf $(MAIN).tar.gz makefile *.tex *.bib *.sty *.cls *.pdf 33 | 34 | distzip: 35 | zip $(MAIN).zip makefile *.tex *.bib *.sty *.cls *.pdf 36 | 37 | -------------------------------------------------------------------------------- /reviewresponse.cls: -------------------------------------------------------------------------------- 1 | % Copyright Javier Sánchez-Monedero. 2 | % Please report bugs and suggestions to (jsanchezm at uco.es) 3 | % 4 | % This document is released under a Creative Commons Licence 5 | % CC-BY-SA (http://creativecommons.org/licenses/by-sa/3.0/) 6 | % 7 | 8 | \ProvidesClass{reviewresponse}[2014/01/29] 9 | \NeedsTeXFormat{LaTeX2e} 10 | 11 | \DeclareOption*{\InputIfFileExists{\CurrentOption}{}{% 12 | \PassOptionsToClass{\CurrentOption}{article}}} 13 | \ProcessOptions \relax 14 | \LoadClass{article} 15 | 16 | \RequirePackage{a4wide} 17 | \RequirePackage{palatino} 18 | \RequirePackage{verbatim} 19 | \RequirePackage{color} 20 | \RequirePackage{url} 21 | \RequirePackage{fancyhdr} 22 | \RequirePackage{fancybox} 23 | \RequirePackage{fancyvrb} 24 | \RequirePackage[authoryear]{natbib} 25 | \RequirePackage{tcolorbox} 26 | \RequirePackage[parfill]{parskip} 27 | 28 | %%%%%%%%%%%% headings setup %%%%%%%%%%%% 29 | \pagestyle{fancy} 30 | % clear styles 31 | \fancyhf{} 32 | % odd pages -> chapter name 33 | \fancyhead[LO]{\leftmark} 34 | % even pages 35 | \fancyhead[RE]{\myJournal -- \myShortTitle} 36 | % odd/even pages 37 | \fancyhead[RO,LE]{\thepage} 38 | 39 | \renewcommand{\sectionmark}[1]{\markboth{\textbf{\thesection. #1}}{}} 40 | %\renewcommand{\subsectionmark}[1]{\markright{\textbf{\thesection. #1}}} 41 | 42 | % line under headings 43 | \renewcommand{\headrulewidth}{0.6pt} 44 | % line over foot 45 | %\renewcommand{\footrulewidth}{0.6pt} 46 | 47 | % increases heading weight 48 | \setlength{\headheight}{1.5\headheight} 49 | \fancyfoot{} 50 | 51 | \newcommand{\newtext}[1]{\textcolor{blue}{#1}} 52 | 53 | % New revisor comment command 54 | \newcounter{comments}[section] 55 | 56 | \newcommand{\rcomment}[1] 57 | { 58 | \stepcounter{comments} 59 | \addcontentsline{toc}{subsection}{Reviewer \arabic{section} Comment \arabic{comments}} 60 | \begin{tcolorbox}[colback=blue!5,colframe=white!45!black,title=Reviewer \arabic{section} Comment \arabic{comments}] 61 | #1 62 | \end{tcolorbox} 63 | } 64 | 65 | -------------------------------------------------------------------------------- /reviewresponse_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javism/responsereviewers/304c3bfa2e065aff3637f2b240a3a0a1279db6b5/reviewresponse_example.pdf -------------------------------------------------------------------------------- /reviewresponse_example.tex: -------------------------------------------------------------------------------- 1 | % Copyright Javier Sánchez-Monedero. 2 | % Please report bugs and suggestions to (jsanchezm at uco.es) 3 | % 4 | % This document is released under a Creative Commons Licence 5 | % CC-BY-SA (http://creativecommons.org/licenses/by-sa/3.0/) 6 | % 7 | % BASIC INSTRUCTIONS: 8 | % 1. Load and set up proper language packages 9 | % 2. Complete the paper data commands 10 | % 3. Use commands \rcomment and \newtext as shown in the example 11 | 12 | \documentclass[a4paper,twoside,11pt]{reviewresponse} 13 | 14 | % 1. Load and set up proper language packages 15 | %\usepackage[utf8x]{inputenc} 16 | \usepackage[latin9]{inputenc} 17 | \usepackage[T1]{fontenc} 18 | \usepackage[english]{babel} 19 | 20 | 21 | % 2. Complete the paper data 22 | \newcommand{\myAuthors}{{John.~Doe$^{\displaystyle 1}$, ~Foo~B.~Bar$^{\displaystyle 2}$, } \\ {~Peter Sanchez$^{\displaystyle 2}$}} 23 | \newcommand{\myAuthorsShort}{John.~Doe et. al} 24 | \newcommand{\myEmail}{john@uco.es} 25 | \newcommand{\myTitle}{My Submited Paper Tittle} 26 | \newcommand{\myShortTitle}{Response to reviewers} 27 | \newcommand{\myJournal}{Journal Name} 28 | \newcommand{\myDept}{{$^{\displaystyle 1}$Department of Computer Science and Numerical Analysis, University of C\'{o}rdoba, C\'{o}rdoba 14074, Spain. \\ \url{http://www.uco.es/ayrna/}}\\ 29 | {$^{\displaystyle 2}$School of Computer Science, The University of XXX. }\\} 30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 | 32 | 33 | %\usepackage[linktoc=all]{hyperref} 34 | \usepackage[linktoc=all,bookmarks,bookmarksopen=true,bookmarksnumbered=true]{hyperref} 35 | 36 | \hypersetup{ 37 | pdfauthor = {\myAuthorsShort}, 38 | pdftitle = {\myTitle}, 39 | pdfsubject = {\myJournal\xspace}, 40 | colorlinks = true, 41 | linkcolor=black!70!green, % color of internal links 42 | citecolor=black!70!green, % color of links to bibliography 43 | filecolor=magenta, % color of file links 44 | urlcolor=black!70!green % color of external links 45 | } 46 | 47 | \begin{document} 48 | 49 | \thispagestyle{plain} 50 | 51 | \begin{center} 52 | {\LARGE\myTitle} \vspace{0.5cm} \\ 53 | {\large\myJournal} \vspace{0.5cm} \\ 54 | \today \vspace{0.5cm} \\ 55 | \myAuthors \\ 56 | \url{\myEmail} \vspace{1cm} \\ 57 | \myDept 58 | \end{center} 59 | 60 | \tableofcontents 61 | 62 | \begin{abstract} 63 | We thank the anonymous Reviewers for their efforts and feedback. 64 | \end{abstract} 65 | 66 | \section{Reviewer 1} 67 | 68 | \rcomment{ 69 | This work proposed a new method to address... 70 | } 71 | 72 | \textbf{Response} 73 | 74 | We thank the Reviewer for the positive comments about our work and manuscript. Below, we address every comment carefully and explain the corresponding changes in the manuscript. 75 | 76 | \rcomment{ 77 | Nevertheless, I personally do not agree with some of the views of the authors... 78 | } 79 | 80 | \textbf{Response} 81 | 82 | We thank the reviewer for this comment and we agree with him/her. We have rewritten the paragraph following his/her comments: 83 | 84 | \begin{quotation}\noindent 85 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an \newtext{unknown printer} took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s \newtext{the release of Letraset sheets containing Lorem Ipsum passages}, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. 86 | \end{quotation} 87 | 88 | \clearpage 89 | 90 | \section{Reviewer 2} 91 | 92 | \rcomment 93 | { 94 | I would like to see a few add ons to substantiate the approach in particular regarding its limits... 95 | } 96 | 97 | \textbf{Response} 98 | 99 | We want to thank the reviewer for this comment. In order to satisfy this petition we have added a new Subsection... 100 | 101 | % Uncomment in case references are needed 102 | %\bibliographystyle{apalike} 103 | %\bibliography{responsereferences} 104 | 105 | 106 | \end{document} 107 | -------------------------------------------------------------------------------- /tcolorbox.sty: -------------------------------------------------------------------------------- 1 | %% The LaTeX package tcolorbox - version 1.30 (2012/04/20) 2 | %% tcolorbox.sty: Text color boxes 3 | %% 4 | %% ------------------------------------------------------------------------------------------- 5 | %% Copyright (c) 2006-2012 by Prof. Dr. Dr. Thomas F. Sturm 6 | %% ------------------------------------------------------------------------------------------- 7 | %% 8 | %% This work may be distributed and/or modified under the 9 | %% conditions of the LaTeX Project Public License, either version 1.3 10 | %% of this license or (at your option) any later version. 11 | %% The latest version of this license is in 12 | %% http://www.latex-project.org/lppl.txt 13 | %% and version 1.3 or later is part of all distributions of LaTeX 14 | %% version 2005/12/01 or later. 15 | %% 16 | %% This work has the LPPL maintenance status `author-maintained'. 17 | %% 18 | %% This work consists of all files listed in README 19 | %% 20 | \NeedsTeXFormat{LaTeX2e} 21 | \ProvidesPackage{tcolorbox}[2012/04/20 version 1.30 text color boxes] 22 | 23 | \RequirePackage{pgf}[2008/01/15] 24 | \RequirePackage{calc}[2007/08/22] 25 | \RequirePackage{verbatim}[2003/08/22] 26 | 27 | % register 28 | \newif\iftcb@lowerignored 29 | \newif\iftcb@lowervisible 30 | \newif\iftcb@hasTitle 31 | \newif\iftcb@hasLower 32 | \newif\iftcb@lowerspace 33 | 34 | \newsavebox{\tcb@titlebox} 35 | \newsavebox{\tcb@upperbox} 36 | \newsavebox{\tcb@lowerbox} 37 | 38 | \newlength\tcb@textdim 39 | 40 | 41 | % key management 42 | \pgfkeys{/tcb/.is family} 43 | 44 | \def\tcbset{\pgfqkeys{/tcb}} 45 | 46 | \tcbset{ 47 | title/.store in=\kvtcb@title, 48 | notitle/.style={title=}, 49 | adjusted title/.style={title={\rule[0mm-\depthof{pgjy}]{0mm}{\depthof{pgjy}+\heightof{\"A}}#1}}, 50 | width/.store in=\kvtcb@width, 51 | boxsep/.store in=\kvtcb@boxsep, 52 | boxrule/.store in=\kvtcb@boxrule, 53 | lefttitle/.store in=\kvtcb@lefttitle, 54 | leftupper/.store in=\kvtcb@leftupper, 55 | leftlower/.store in=\kvtcb@leftlower, 56 | left/.style={lefttitle=#1,leftupper=#1,leftlower=#1}, 57 | righttitle/.store in=\kvtcb@righttitle, 58 | rightupper/.store in=\kvtcb@rightupper, 59 | rightlower/.store in=\kvtcb@rightlower, 60 | right/.style={righttitle=#1,rightupper=#1,rightlower=#1}, 61 | top/.store in=\kvtcb@top, 62 | bottom/.store in=\kvtcb@bottom, 63 | middle/.store in=\kvtcb@middle, 64 | arc/.store in=\kvtcb@arc, 65 | colback/.store in=\kvtcb@colback, 66 | colframe/.store in=\kvtcb@colframe, 67 | colupper/.store in=\kvtcb@colupper, 68 | collower/.store in=\kvtcb@collower, 69 | coltext/.style={colupper=#1,collower=#1}, 70 | coltitle/.store in=\kvtcb@coltitle, 71 | fonttitle/.store in=\kvtcb@fonttitle, 72 | fontupper/.store in=\kvtcb@fontupper, 73 | fontlower/.store in=\kvtcb@fontlower, 74 | tempfile/.store in=\kvtcb@tempfile, 75 | savelowerto/.store in=\kvtcb@savelowerto, 76 | savedelimiter/.estore in=\kvtcb@savedelimiter, 77 | floatplacement/.store in=\kvtcb@floatplacement, 78 | float/.store in=\kvtcb@float, 79 | float/.default=\kvtcb@floatplacement, 80 | nofloat/.style={float=}, 81 | before/.store in=\kvtcb@beforebox, 82 | after/.store in=\kvtcb@afterbox, 83 | lowerbox/.is choice, 84 | lowerbox/visible/.code={\tcb@lowerignoredfalse\tcb@lowervisibletrue}, 85 | lowerbox/invisible/.code={\tcb@lowerignoredfalse\tcb@lowervisiblefalse}, 86 | lowerbox/ignored/.code={\tcb@lowerignoredtrue\tcb@lowervisiblefalse}, 87 | parskip/.style={before={\par\pagebreak[0]\noindent},after={\par}}, 88 | noparskip/.style={before={\par\smallskip\pagebreak[0]\noindent},after={\par\smallskip}}, 89 | natural height/.code={\let\tcb@ch=\tcb@ch@natural}, 90 | height/.code={\def\tcb@height@fixed{#1}\let\tcb@ch=\tcb@ch@fixed}, 91 | equal height group/.code={\edef\tcb@ehgid{#1}\let\tcb@ch=\tcb@ch@equalheight}, 92 | minimum for equal height group/.code args={#1:#2}{\edef\tcb@ehgid{#1}\tcb@ehgadd{#2}}, 93 | space/.code={\def\tcb@height@fraction{#1}\let\tcb@ch@fixed@both=\tcb@ch@fixed@space}, 94 | space to upper/.style={space=1}, 95 | space to lower/.style={space=0}, 96 | space to both/.style={space=0.5}, 97 | split/.code={\def\tcb@height@fraction{#1}\let\tcb@ch@fixed@both=\tcb@ch@fixed@split}, 98 | valign/.store in=\kvtcb@valign, 99 | valign lower/.store in=\kvtcb@valignlower, 100 | %skin/.store in=\kvtcb@skin, 101 | enlarge top by/.store in=\kvtcb@bbtop, 102 | enlarge bottom by/.store in=\kvtcb@bbbottom, 103 | enlarge left by/.store in=\kvtcb@bbleft, 104 | enlarge right by/.store in=\kvtcb@bbright, 105 | toggle enlargement/.store in=\kvtcb@bbtoggle, 106 | graphical environment/.store in=\kvtcb@graphenv, 107 | frame engine/.store in=\kvtcb@engine@frame, 108 | interior titled engine/.store in=\kvtcb@engine@interiortitled, 109 | interior engine/.store in=\kvtcb@engine@interior, 110 | segmentation engine/.store in=\kvtcb@engine@segmentation, 111 | geometry nodes/.store in=\kvtcv@geonodes, 112 | geometry nodes/.default=true,% 113 | skin@standard/.style={frame engine=standard,interior titled engine=standard, 114 | interior engine=standard,segmentation engine=standard,graphical environment=pgfpicture, 115 | geometry nodes=false}, 116 | skin/.style={skin@#1}, 117 | } 118 | 119 | \tcbset{notitle,width=\linewidth,boxsep=1mm,boxrule=0.5mm, 120 | left=4mm,right=4mm,top=2mm,bottom=2mm,middle=2mm,arc=1mm,lowerbox=visible, 121 | colback=black!5!white,colframe=black!75!white,coltext=black,coltitle=white, 122 | fonttitle=,fontupper=,fontlower=,floatplacement=htb,nofloat,savelowerto=, 123 | parskip,savedelimiter={tcolorbox},tempfile={\jobname.tcbtemp}, 124 | enlarge top by=0mm,enlarge bottom by=0mm,enlarge left by=0mm,enlarge right by=0mm, 125 | toggle enlargement=none, 126 | skin=standard, 127 | }% 128 | 129 | 130 | % lrbox with integrated minipage 131 | \def\tcb@lrbox#1#2{% 132 | \edef\reserved@a{% 133 | \endgroup 134 | \setbox#1\hbox{% 135 | \begingroup\aftergroup}% 136 | \def\noexpand\@currenvir{\@currenvir}% 137 | \def\noexpand\@currenvline{\on@line}}% 138 | \reserved@a 139 | \@endpefalse 140 | \color@setgroup 141 | \ignorespaces\minipage#2\ignorespaces} 142 | \def\endtcb@lrbox{\unskip\endminipage\unskip\color@endgroup} 143 | 144 | \def\tcb@saveupperbox{% 145 | \begin{tcb@lrbox}{\tcb@upperbox}{\tcb@widthupper}\color{\kvtcb@colupper}\kvtcb@fontupper\ignorespaces} 146 | 147 | \def\tcb@savelowerbox{% 148 | \begin{tcb@lrbox}{\tcb@lowerbox}{\tcb@widthlower}\color{\kvtcb@collower}\kvtcb@fontlower\ignorespaces} 149 | 150 | 151 | % counter for float 152 | \AtBeginDocument{% 153 | \@ifundefined{c@float@type}% 154 | {\edef\ftype@tcbfloat{\ifx\c@figure\@undefined 1\else 4\fi}}% 155 | {\edef\ftype@tcbfloat{\the\c@float@type}% 156 | \addtocounter{float@type}{\value{float@type}}}% 157 | \def\c@tcbfloat{\c@float@type}% tricking the caption package 158 | } 159 | 160 | \long\def\tcb@colorbox{% 161 | \@ifnextchar[{\tcb@@icolorbox}{\tcb@@icolorbox[]}} 162 | 163 | \long\def\tcb@@icolorbox[#1]{% 164 | % setting the keys 165 | \tcbset{#1}% 166 | \tcb@hasLowerfalse% 167 | % computation of text width 168 | \setlength{\tcb@textdim}{\kvtcb@width-\kvtcb@boxsep*2-\kvtcb@boxrule*2}% 169 | \edef\tcb@innerwidth{\the\tcb@textdim}% 170 | \setlength{\tcb@textdim}{\tcb@innerwidth-\kvtcb@leftupper-\kvtcb@rightupper}% 171 | \edef\tcb@widthupper{\the\tcb@textdim}% 172 | \ifx\kvtcb@title\@empty\tcb@hasTitlefalse\else% 173 | \tcb@hasTitletrue% 174 | \setlength{\tcb@textdim}{\tcb@innerwidth-\kvtcb@lefttitle-\kvtcb@righttitle}% 175 | \edef\tcb@widthtitle{\the\tcb@textdim}% 176 | \begin{tcb@lrbox}{\tcb@titlebox}{\tcb@widthtitle}\color{\kvtcb@coltitle}\kvtcb@fonttitle\kvtcb@title\end{tcb@lrbox}% 177 | \fi% 178 | % switch for lower box 179 | \def\tcblower{% 180 | \end{tcb@lrbox}% 181 | \setlength{\tcb@textdim}{\tcb@innerwidth-\kvtcb@leftlower-\kvtcb@rightlower}% 182 | \edef\tcb@widthlower{\the\tcb@textdim}% 183 | \tcb@hasLowertrue% 184 | \ifx\kvtcb@savelowerto\@empty% 185 | \let\tcb@startbox\tcb@savelowerbox% 186 | \let\endtcolorbox\tcb@endboxanddraw% 187 | \else% 188 | \IfFileExists{\kvtcb@savelowerto}{% 189 | \tcb@savelowerbox\input{\kvtcb@savelowerto}\end{tcb@lrbox}}{}% 190 | \let\tcb@startbox\tcb@lowerverbatim% 191 | \expandafter\let\csname end\kvtcb@savedelimiter\expandafter\endcsname\csname tcb@endlowerverbatimanddraw\endcsname% 192 | \fi% 193 | \tcb@startbox}% 194 | % start of upper box 195 | \let\endtcolorbox\tcb@endboxanddraw% 196 | \tcb@saveupperbox% 197 | } 198 | 199 | \let\tcolorbox\tcb@colorbox 200 | 201 | \def\tcb@endboxanddraw{% 202 | \end{tcb@lrbox}% 203 | \tcb@drawcolorbox% 204 | } 205 | 206 | \let\endtcolorbox=\tcb@endboxanddraw 207 | 208 | % height computations 209 | \def\tcb@ch@natural{% 210 | \edef\tcb@height{\tcb@natheight}% 211 | \setlength{\tcb@textdim}{\ht\tcb@upperbox+\dp\tcb@upperbox}% 212 | \edef\tcb@height@upper{\the\tcb@textdim}% 213 | \iftcb@lowerspace% 214 | \setlength{\tcb@textdim}{\ht\tcb@lowerbox+\dp\tcb@lowerbox}% 215 | \edef\tcb@height@lower{\the\tcb@textdim}% 216 | \fi% 217 | } 218 | 219 | \def\tcb@ch@fixed@upper{% 220 | \setlength{\tcb@textdim}{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcb@height-\tcb@natheight}% 221 | \edef\tcb@height@upper{\the\tcb@textdim}% 222 | } 223 | 224 | \def\tcb@ch@fixed@space{% 225 | \setlength{\tcb@textdim}{\tcb@height-\tcb@natheight}% 226 | \edef\tcb@height@space{\the\tcb@textdim}% 227 | \setlength{\tcb@textdim}{\tcb@height@space*\real{\tcb@height@fraction}}% 228 | \edef\tcb@height@spaceupper{\the\tcb@textdim}% 229 | \setlength{\tcb@textdim}{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcb@height@spaceupper}% 230 | \edef\tcb@height@upper{\the\tcb@textdim}% 231 | \setlength{\tcb@textdim}{\ht\tcb@lowerbox+\dp\tcb@lowerbox+\tcb@height@space-\tcb@height@spaceupper}% 232 | \edef\tcb@height@lower{\the\tcb@textdim}% 233 | } 234 | 235 | \def\tcb@ch@fixed@split{% 236 | \setlength{\tcb@textdim}{\tcb@height-\tcb@natheight+\ht\tcb@upperbox+\dp\tcb@upperbox+\ht\tcb@lowerbox+\dp\tcb@lowerbox}% 237 | \edef\tcb@height@space{\the\tcb@textdim}% 238 | \setlength{\tcb@textdim}{\tcb@height@space*\real{\tcb@height@fraction}}% 239 | \edef\tcb@height@upper{\the\tcb@textdim}% 240 | \setlength{\tcb@textdim}{\tcb@height@space-\tcb@height@upper}% 241 | \edef\tcb@height@lower{\the\tcb@textdim}% 242 | } 243 | 244 | \def\tcb@ch@fixed{% 245 | \edef\tcb@height{\tcb@height@fixed}% 246 | \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi% 247 | } 248 | 249 | \def\tcb@saveehg#1{% 250 | \immediate\write\@auxout{\string\gdef\string\tcb@ehg@#1@height{\csname tcb@ehg@#1@current\endcsname}}% 251 | } 252 | 253 | \def\tcb@ehgadd#1{% 254 | \@ifundefined{tcb@ehg@\tcb@ehgid @current}{% 255 | \expandafter\xdef\csname tcb@ehg@\tcb@ehgid @current\endcsname{#1}% 256 | \edef\tcb@temp{\noexpand\AtEndDocument{\noexpand\tcb@saveehg{\tcb@ehgid}}}% 257 | \tcb@temp}{% 258 | \ifdim\csname tcb@ehg@\tcb@ehgid @current\endcsname<#1% 259 | \expandafter\xdef\csname tcb@ehg@\tcb@ehgid @current\endcsname{#1}\fi}% 260 | } 261 | 262 | \def\tcb@ch@equalheight{% 263 | \tcb@ehgadd{\tcb@natheight}% 264 | \@ifundefined{tcb@ehg@\tcb@ehgid @height}{% 265 | \edef\tcb@height{\tcb@natheight}}{% 266 | \ifdim\csname tcb@ehg@\tcb@ehgid @height\endcsname<\tcb@natheight% 267 | \edef\tcb@height{\tcb@natheight}% 268 | \else 269 | \edef\tcb@height{\csname tcb@ehg@\tcb@ehgid @height\endcsname}% 270 | \fi}% 271 | \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi% 272 | } 273 | 274 | \def\tcb@dbox@top#1#2#3#4{\pgftext[x=#1,y=#2+#3,left,top]{\usebox{#4}}}% 275 | 276 | \def\tcb@dbox@bottom#1#2#3#4{\pgftext[x=#1,y=#2,left,bottom]{\usebox{#4}}}% 277 | 278 | \def\tcb@dbox@center#1#2#3#4{\pgftext[x=#1,y=#2+#3/2,left]{\usebox{#4}}}% 279 | 280 | \tcbset{natural height,space to lower,valign=top,valign lower=top} 281 | 282 | % fill frame 283 | \def\tcb@drawframe@standard{% 284 | \begin{pgfscope}% 285 | \pgfsetcornersarced{\pgfpoint{\kvtcb@arc+\kvtcb@boxrule}{\kvtcb@arc+\kvtcb@boxrule}}% 286 | \pgfsetfillcolor{\kvtcb@colframe}% 287 | \pgfpathrectangle{\pgfpoint{0mm}{0mm}}{\pgfpoint{\kvtcb@width}{\tcb@height}}% 288 | \pgfusepath{fill}% 289 | \end{pgfscope}% 290 | } 291 | 292 | % fill inner box with title 293 | \def\tcb@drawwithtitle@standard{% 294 | \begin{pgfscope}% 295 | \pgfsetcornersarced{\pgfpoint{0mm}{0mm}}% 296 | \pgfmoveto{\pgfpoint{\kvtcb@boxrule}{\kvtcb@boxrule}}% 297 | \pgflineto{\pgfpoint{\kvtcb@boxrule}{\kvtcb@boxrule+\tcb@innerheight}}% 298 | \pgflineto{\pgfpoint{\kvtcb@width-\kvtcb@boxrule}{\kvtcb@boxrule+\tcb@innerheight}}% 299 | \pgfsetcornersarced{\pgfpoint{\kvtcb@arc}{\kvtcb@arc}}% 300 | \pgflineto{\pgfpoint{\kvtcb@width-\kvtcb@boxrule}{\kvtcb@boxrule}}% 301 | \pgflineto{\pgfpoint{\kvtcb@boxrule}{\kvtcb@boxrule}}% 302 | \pgfpathclose% 303 | \pgfsetfillcolor{\kvtcb@colback}% 304 | \pgfusepath{fill}% 305 | \end{pgfscope}% 306 | } 307 | 308 | % fill inner box without title 309 | \def\tcb@drawwithouttitle@standard{% 310 | \begin{pgfscope}% 311 | \pgfsetcornersarced{\pgfpoint{\kvtcb@arc}{\kvtcb@arc}}% 312 | \pgfsetfillcolor{\kvtcb@colback}% 313 | \pgfpathrectangle{\pgfpoint{\kvtcb@boxrule}{\kvtcb@boxrule}}% 314 | {\pgfpoint{\kvtcb@width-\kvtcb@boxrule*2}{\tcb@innerheight}}% 315 | \pgfusepath{fill}% 316 | \end{pgfscope}% 317 | } 318 | 319 | % draw segmentation line 320 | \def\tcb@drawlower@standard{% 321 | \begin{pgfscope}% 322 | \pgfsetcolor{\kvtcb@colframe}% 323 | \pgfsetdash{{1mm}{1mm}}{0.5mm}% 324 | \setlength{\tcb@textdim}{\kvtcb@boxrule+\kvtcb@boxsep*2+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}% 325 | \pgfpathmoveto{\pgfpoint{\kvtcb@boxrule}{\tcb@textdim}}% 326 | \pgfpathlineto{\pgfpoint{\kvtcb@width-\kvtcb@boxrule}{\tcb@textdim}}% 327 | \pgfusepath{stroke}% 328 | \end{pgfscope}% 329 | } 330 | 331 | 332 | \def\tcb@setbb@toggle@none{% 333 | \pgfpathrectanglecorners{\pgfpoint{-\kvtcb@bbleft}{-\kvtcb@bbbottom}}% 334 | {\pgfpoint{\kvtcb@width+\kvtcb@bbright}{\tcb@height+\kvtcb@bbtop}}% 335 | } 336 | 337 | \def\tcb@setbb@toggle@forced{% 338 | \pgfpathrectanglecorners{\pgfpoint{-\kvtcb@bbright}{-\kvtcb@bbbottom}}% 339 | {\pgfpoint{\kvtcb@width+\kvtcb@bbleft}{\tcb@height+\kvtcb@bbtop}}% 340 | } 341 | 342 | \def\tcb@setbb@toggle@evenpage{% 343 | \ifodd\thepage\tcb@setbb@toggle@none\else\tcb@setbb@toggle@forced\fi% 344 | } 345 | 346 | \def\tcb@creategeonodes@false{} 347 | 348 | \def\tcb@drawcolorbox{% 349 | % floats 350 | \ifx\kvtcb@float\@empty% 351 | \newenvironment{tcb@float}{\kvtcb@beforebox}{\kvtcb@afterbox}% 352 | \else% 353 | \edef\float@start{\noexpand\@float{tcbfloat}[\kvtcb@float]}% 354 | \newenvironment{tcb@float}{\float@start}{\end@float}% 355 | \fi% 356 | \iftcb@hasLower% 357 | \iftcb@lowerignored\tcb@lowerspacefalse\else\tcb@lowerspacetrue\fi% 358 | \else\tcb@lowerspacefalse\fi% 359 | % computation of total height 360 | \setlength{\tcb@textdim}{\kvtcb@boxrule*2+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\ht\tcb@upperbox+\dp\tcb@upperbox}% 361 | \iftcb@hasTitle\addtolength{\tcb@textdim}{\kvtcb@boxrule+\kvtcb@boxsep*2+\ht\tcb@titlebox+\dp\tcb@titlebox}\fi% 362 | \iftcb@lowerspace% 363 | \addtolength{\tcb@textdim}{\kvtcb@boxsep*2+\kvtcb@middle*2+\ht\tcb@lowerbox+\dp\tcb@lowerbox}% 364 | \fi% 365 | \edef\tcb@natheight{\the\tcb@textdim}% 366 | \tcb@ch% 367 | \iftcb@hasTitle% 368 | \setlength{\tcb@textdim}{\tcb@height-\kvtcb@boxrule*3-\kvtcb@boxsep*2-\ht\tcb@titlebox-\dp\tcb@titlebox}% 369 | \edef\tcb@innerheight{\the\tcb@textdim}% 370 | \else% 371 | \setlength{\tcb@textdim}{\tcb@height-\kvtcb@boxrule*2}% 372 | \edef\tcb@innerheight{\the\tcb@textdim}% 373 | \fi% 374 | \begin{tcb@float}\begin{\kvtcb@graphenv}% 375 | \csname tcb@setbb@toggle@\kvtcb@bbtoggle\endcsname% 376 | \pgfusepath{use as bounding box}% 377 | \csname tcb@creategeonodes@\kvtcv@geonodes\endcsname% 378 | % fill frame 379 | \csname tcb@drawframe@\kvtcb@engine@frame\endcsname% 380 | \iftcb@hasTitle% 381 | \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname% 382 | \else% 383 | \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname% 384 | \fi% 385 | \iftcb@lowerspace% 386 | \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname% 387 | \fi% 388 | % set title 389 | \iftcb@hasTitle% 390 | \setlength{\tcb@textdim}{\tcb@height-\kvtcb@boxrule-\kvtcb@boxsep}% 391 | \pgftext[x=\kvtcb@boxrule+\kvtcb@boxsep+\kvtcb@lefttitle, 392 | y=\tcb@textdim,left,top]{\usebox{\tcb@titlebox}}% 393 | \fi% 394 | % draw upper box 395 | \csname tcb@dbox@\kvtcb@valign\endcsname{\kvtcb@boxrule+\kvtcb@boxsep+\kvtcb@leftupper}% 396 | {\tcb@innerheight+\kvtcb@boxrule-\kvtcb@boxsep-\kvtcb@top-\tcb@height@upper}% 397 | {\tcb@height@upper}{\tcb@upperbox}% 398 | % draw lower box 399 | \iftcb@hasLower\iftcb@lowervisible% 400 | \csname tcb@dbox@\kvtcb@valignlower\endcsname{\kvtcb@boxrule+\kvtcb@boxsep+\kvtcb@leftlower}% 401 | {\kvtcb@boxrule+\kvtcb@boxsep+\kvtcb@bottom}% 402 | {\tcb@height@lower}{\tcb@lowerbox}% 403 | \fi\fi% 404 | \end{\kvtcb@graphenv}\end{tcb@float}% 405 | } 406 | 407 | 408 | % verbatim output as in 'verbatim' 409 | 410 | \newwrite\tcb@out 411 | 412 | \def\tcbverbatimwrite#1{% 413 | \@bsphack 414 | \immediate\openout \tcb@out #1 415 | \let\do\@makeother\dospecials 416 | \catcode`\^^M\active \catcode`\^^I=12 417 | \def\verbatim@processline{% 418 | \immediate\write\tcb@out 419 | {\the\verbatim@line}}% 420 | \verbatim@start}%' 421 | 422 | 423 | \def\endtcbverbatimwrite{% 424 | \immediate\closeout\tcb@out 425 | \@esphack% 426 | } 427 | 428 | 429 | % saving of the lower box 430 | 431 | \def\tcb@endlowerverbatimanddraw{% 432 | \tcb@endlowerverbatim% 433 | \tcb@drawcolorbox% 434 | } 435 | 436 | \def\tcb@lowerverbatim{% 437 | \tcbverbatimwrite\kvtcb@savelowerto} 438 | 439 | \let\tcb@endlowerverbatim\endtcbverbatimwrite% 440 | 441 | 442 | % saving of the upper box 443 | 444 | \def\tcbwritetemp{% 445 | \begingroup% 446 | \tcbverbatimwrite\kvtcb@tempfile} 447 | 448 | \def\endtcbwritetemp{% 449 | \endtcbverbatimwrite% 450 | \endgroup% 451 | } 452 | 453 | \def\tcbusetemp{\input{\kvtcb@tempfile}} 454 | 455 | 456 | % libraries 457 | \def\tcb@optionlist{} 458 | 459 | \def\tcbuselibrary#1{\tcbset{library/.cd,#1}} 460 | 461 | \def\tcb@add@library#1#2{% 462 | \tcbset{library/#1/.code={\@ifundefined{tcblibrary@#1@loaded}{\input #2}{}}}% 463 | \DeclareOption{#1}{\edef\tcb@optionlist{\tcb@optionlist,#1}}% 464 | } 465 | 466 | \tcb@add@library{listings}{tcblistings.code.tex} 467 | \tcb@add@library{theorems}{tcbtheorems.code.tex} 468 | \tcb@add@library{documentation}{tcbdocumentation.code.tex} 469 | \tcb@add@library{skins}{tcbskins.code.tex} 470 | 471 | \ProcessOptions* 472 | \edef\tcb@temp{\noexpand\tcbuselibrary{\tcb@optionlist}} 473 | \tcb@temp 474 | --------------------------------------------------------------------------------