Quantcast
Channel: \newcommand with arbitrary number of arguments - TeX - LaTeX Stack Exchange
Browsing all 3 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Answer by Mico for \newcommand with arbitrary number of arguments

I would like to suggest that you familiarize yourself with the cleveref package and its two main user macros: \cref and \crefrange. They make in unnecessary to define separate macros to cross-reference...

View Article



Image may be NSFW.
Clik here to view.

Answer by Ulrike Fischer for \newcommand with arbitrary number of arguments

\documentclass{article}\ExplSyntaxOn\NewDocumentCommand\figref{m} { \tl_if_blank:nF{#1} { \seq_set_from_clist:Nn \l_tmpa_seq {#1} \seq_set_map:NNn\l_tmpa_seq\l_tmpa_seq{\ref{##1}} \int_compare:nNnTF...

View Article

Image may be NSFW.
Clik here to view.

\newcommand with arbitrary number of arguments

I have a few convenience commands defined in my TeX document:\newcommand{\figref}[2][\ref]{Fig.~#1{#2}} % Figure\newcommand{\tabref}[2][\ref]{Table~#1{#2}} %...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images