How to compare func type of content?

Usually when you want to do this, you are overcomplicating something. It is rare when you need this, only if you are parsing some user document for your package that work on raw content. So you shouldn’t work with all this unless you are sure that there is no other choice, which depending on your experience, can require another person to know for sure.

There are content functions and basic types, for types you would use type() and for content you would use .func(). Some content functions are not public because you are not supposed to use them. These are styled, context and sequence:

#let styled = text(red)[].func()
#let context-func = (context { }).func()
#let sequence = [].func()

Also, please use an appropriate language identifier for the code block. If you want to write in code mode, use typc, in math — use typm.

1 Like