Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow declaring a symbol as “to be defined” #427

Open
juanmeleiro opened this issue May 28, 2024 · 1 comment
Open

Allow declaring a symbol as “to be defined” #427

juanmeleiro opened this issue May 28, 2024 · 1 comment
Assignees

Comments

@juanmeleiro
Copy link

Here's the intended use: when annotating some object (assertion, definition, etc), write it down as usual, refer to symbols using \sn even if they are not declared, and use semantic macros. When done with the paragraph (or some other reasonable unit of work), stop, look at the errors, and declare missing symbols as “to be defined” (TBD).

The TBD symbols should behave the same way as the usual ones, but show up in text in a different color (e.g., bright red). Also, allowing for this markup would enable future features like, e.g., counting TBD symbols, exporting a TODO list, etc.

I tried doing this on my own, but its hard to reconcile the two requirements that 1. I can use the symbols as if they were declared (and so later, when I declare them, I don't need to replace every use of them) and 2. that they show up differently in the output.

I figure a nice interface would be adding a flag tbd to the declaration commands:

\symdecl{foo}[tbd, …]
\symdef{bar}[tbd]{…}

A command such as \stexstyletbd could be provided and called when such declarations occur, or even \styexstyletbduse to be called when one of those semantic macros are used. One could, e.g., typeset an asterisk on the margin, add an editors note on missing definitions, etc.

Finally, how would that interface with MMT? I have no idea.

@Jazzpirate Jazzpirate self-assigned this Jun 5, 2024
@Jazzpirate
Copy link
Contributor

Notably, the IDE underlines symdecls/symdefs without a sdefinition already. For tex functionality, the obvious thing to do would be e.g. \NewDocumentCommand{symdecltodo}{m O{} m}{ \symdecl{#1}[#2] \marginnote{TODO: #3} }...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants