TransWikia.com

Derivative package: does it include square brackets with comment?

TeX - LaTeX Asked on October 1, 2021

This question is only an information on the derivative package.

enter image description here

Just a curiosity does it include square brackets (see the green arrows) where is it possibile to put a comment (see pag. 26 of the .pdf of the package)?
I remember that mathtools package have the commands underbracket and overbracket.

Are they same of mathtools or do have used another package the authors? I’m not asking kindly for any code.

One Answer

The source file of user manual derivative.pdf is derivative.tex. It uses a variant underbracket:

documentclass{article}
usepackage{mathtools}
usepackage{unicode-math} % this loads "Latin Modern Math" font, which changes the line width of underbracket
usepackage{xparse}

ExplSyntaxOn
DeclareDocumentCommand{low}{ O{0,0} m m }
{
    seq_set_from_clist:Nn l__low_seq {#1}
    
    mskip -seq_item:Nn l__low_seq {1} mu
    underbracket
    {
        mskip seq_item:Nn l__low_seq {1} mu
        vphantom{f}
        #2
        mskip seq_item:Nn l__low_seq {2} mu
    }
    sb{text{#3}}
    mskip -seq_item:Nn l__low_seq {2} mu
}
ExplSyntaxOff

begin{document}
    begin{equation*}
    low{
        low{
            low{4gg}{big} +
            low[2,2]{2ff}{low}
        }{long} +
        low{ 
            low[1,2]{4c}{big} +
            low[1,1]{3a}{low}
        }{short}
    }{positve} -
    low{
        low{
            low[3,3]{5ee}{big} -
            low[2,2]{3hh}{low}
        }{long} -
        low{
            low[1,1]{5d}{big} -
            low[2,2]{2b}{low}
        }{short}
    }{negative}
    end{equation*}
end{document}

enter image description here

Correct answer by muzimuzhi Z on October 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP