Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
158 views1 page

22.6 Producing Tboxfit Commands: /tcboxfit /tcboxfit /tcb/savedelimiter 5 108

The document describes commands for producing tboxfit boxes in LaTeX. It defines the \DeclareTCBoxFit command which creates a new command based on \tcboxfit with the given name and arguments. It also describes the \NewTCBoxFit and \RenewTCBoxFit commands which operate similarly but create or redefine commands, and the \ProvideTCBoxFit command which only creates the command if it does not already exist. An example is given showing the definition and use of a \mybox command with various options.

Uploaded by

jimuso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views1 page

22.6 Producing Tboxfit Commands: /tcboxfit /tcboxfit /tcb/savedelimiter 5 108

The document describes commands for producing tboxfit boxes in LaTeX. It defines the \DeclareTCBoxFit command which creates a new command based on \tcboxfit with the given name and arguments. It also describes the \NewTCBoxFit and \RenewTCBoxFit commands which operate similarly but create or redefine commands, and the \ProvideTCBoxFit command which only creates the command if it does not already exist. An example is given showing the definition and use of a \mybox command with various options.

Uploaded by

jimuso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

22.

6 Producing tboxfit Commands

! The following commands need the fitting library to be included.

LIB
\DeclareTCBoxFit[hinit optionsi]{\hnamei}{hspecificationi}{hoptionsi}
Creates a new command \hnamei based on \tcboxfitÕ P. 411 . Basically, \DeclareTCBoxFit
operates like \DeclareDocumentCommand. This means, the new command \hnamei is con-
structed with the given argument hspecificationi. The hoptionsi are given to the underlying
\tcboxfitÕ P. 411 .
Note that /tcb/savedelimiterÕ P. 26 is set to the given hnamei automatically.
The hinit optionsi allow setting up automatic numbering, see Section 5 from page 108.
The new command is always created, irrespective of an already existing command with the
same name.

Nam dui ligula, fringilla a, euismod so-


dales, sollicitudin vel, wisi. Morbi auc-
tor lorem non justo. Nam lacus libero,
pretium at, lobortis vitae, ultricies et, tel-
lus. Donec aliquet, tortor sed accumsan
% \usepackage{lipsum} bibendum, erat ligula aliquet magna, vi-
tae ornare odio metus a mi. Morbi ac
orci et nisl hendrerit mollis. Suspendisse
ut massa. Cras nec ante. Pellentesque
\DeclareTCBoxFit{\mybox}{ O{} m !o } a nulla. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur
{colback=red!5!white, ridiculus mus. Aliquam tincidunt urna.
Nulla ullamcorper vestibulum turpis. Pel-

colframe=red!75!black, lentesque cursus luctus mauris.

width=#2,height=#2/3*2,
IfValueTF={#3}{height=#3}{}, Nam dui ligula, fringilla a, euismod
#1} sodales, sollicitudin vel, wisi. Morbi
auctor lorem non justo. Nam la-
cus libero, pretium at, lobortis vitae,
ultricies et, tellus. Donec aliquet,
\mybox[colback=yellow]{5cm}% tortor sed accumsan bibendum, erat
ligula aliquet magna, vitae ornare
{\lipsum[2]} odio metus a mi. Morbi ac orci et
nisl hendrerit mollis. Suspendisse
ut massa. Cras nec ante. Pellen-

\mybox[colback=yellow]{5cm}[4cm]{\lipsum[2]} tesque a nulla. Cum sociis natoque


penatibus et magnis dis parturient
montes, nascetur ridiculus mus. Ali-
quam tincidunt urna. Nulla ullamcor-
per vestibulum turpis. Pellentesque
cursus luctus mauris.

\NewTCBoxFit[hinit optionsi]{\hnamei}{hspecificationi}{hoptionsi}
Operates like \DeclareTCBoxFit, but based on \NewDocumentCommand instead of
\DeclareDocumentCommand. An error is issued if \hnamei has already been defined.
\RenewTCBoxFit[hinit optionsi]{\hnamei}{hspecificationi}{hoptionsi}
Operates like \DeclareTCBoxFit, but based on \RenewDocumentCommand instead of
\DeclareDocumentCommand. An existing command is redefined.
\ProvideTCBoxFit[hinit optionsi]{\hnamei}{hspecificationi}{hoptionsi}
Operates like \DeclareTCBoxFit, but based on \ProvideDocumentCommand instead of
\DeclareDocumentCommand. The command \hnamei is only created if it is not already
defined.

445

You might also like