Skip to content

Autocomplete entries for commands created by \newtcbox #3878

@muzimuzhi

Description

@muzimuzhi

Describe the feature and the current behavior/state

Commands created by tcolorbox macros \newtcbox, \NewTCBox, \newtcboxfit, \NeWTCBoxFit, and their \renew..., \Renew... variants always takes one more mandatory argument than what's specified. See also T-F-S/tcolorbox#300.

For example, \newtcbox\mybox{} defines \mybox{<box content>} and \NewTCBox\myboxB{o}{#1} defines \myboxB[<options>]{<box content>}.

That extra trailing mandatory argument is missing from auto-generated autocomplete entries.

\documentclass{article}
\usepackage{tcolorbox}
\newtcbox{\mybox}[1][]{}
\begin{document}
\mybox
\end{document}

image

Current entries (incomplete syntax): \mybox[opt. arg1], \mybox

Better entries (full syntax): \mybox[opt. arg1]{<box content>}, \mybox{<box content>}

Who will benefit with this feature?

tcolorbox users who define and use new \tcbox-like commands.

Any Other info

I understand it's a edge-case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions