TransWikia.com

beamer xparse: optional argument - changing order

TeX - LaTeX Asked by ingli on August 28, 2020

Following https://stackoverflow.com/questions/1812214/latex-optional-arguments I am trying to produce a command that prints a text and optionally sends an argument to a command (well, a time code within the beamer class context).

NewDocumentCommandmytimecode{ g  m }{%
{   
    IfNoValueTF {#1}
        {%without optional argument
            note{#2}
      }
        {%with optional argument
            note<{#1}>{#2}
        }%
   }%
}

So that in a beamer slide’s comment I can point to a time code for myself:

 mytimecode{3:30}

or show that only on two slides, e.g.

mytimecode{1-2}{3:30}

would be a more meaningful syntax/order.

So, how could the required NewDocumentCommand look like?

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