Math & SciencePassing options to commands

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Vaite
Posts: 2
Joined: Thu Oct 12, 2023 12:19 am

Passing options to commands

Post by Vaite »

Have two commands that take an argument. Would like to enhance the capability to take an option to apply any of the various ceiling sizes (`\bigl`, `Bigl`, `\biggl`, `\Biggl`).

Code: Select all

   \documentclass[a4paper,12pt]{article}
    \usepackage{xcolor}
    
    \ExplSyntaxOn
    
    \NewDocumentCommand \ceil {m}
      { \lceil #1 \rceil }
    
    \NewDocumentCommand \ceilbig {m}
      { \Bigl \lceil #1 \Bigr \rceil }
    
    \ExplSyntaxOff
    
    \begin{document}
    
    \ceil{x}
    
    \end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply