Okay, so I want to make an enviroment, preferably using tikz, that looks like this, which I made with paint (and I like to use black squares for my qed symbol):
Okay, that qed symbol and last line are supposed to match up.
Anyways, I tried doing this with tikz, and I'm having a bit of a hard time. Plus, I don't know how to turn these into environments. I also don't know how to use the "theorem" counter based on section/chapter, etc.
Couple details though, this sort of thing should be a style of its own. That is, I want to input what gets replaced into the word where "theorem" is, like in amsthm package I can go
\newtheoremstyle{<command name>}{<box name>}
where I can let "box name" be theorem, corollary, etc.
I want however, to be able to choose 3 different colours:
- The colour for the box, ie. red in this case.
- The colour for the theorem, in this case a tint of blue.
- The colour for the proof, in this case something like "red!25" or something.
Third, I also don't know how to do optional arguments. That is, if the name for the theorem isn't there, I want it to look something like htis instead, that is: no line next to theorem.
I especially prefer the use of tikz given that I understand tikz code slightly, though I am slightly not great at it.
I've never used mdframed so Idk if a code in that would help. But if you do wish to use mdframed, please provide as much details as possible about what each bit in the code means.
But to summarize, I want
A code for the name and options. It should look something along the lines of this:
\newboxstyle{theorem}{Theorem}{chapter}{red}{blue}{red!30}
A separate code for when I give it a name vs when I don't. I prefer it to be similar to the code used for theorems in amsthm package or something. Not the same, as I want its proof environment to be inside the second box.
Any assistance in any portion of the code will help. It's fine if a full code with every detail isn't given to me. Help on any of the following would be great:
- Tikz code for such a theorem box.
- The environment construction for any one of the two styles of boxes. (ie. The text should be inside an ienvironment instead of a node.)
- How to provide optional arguments for codes and how to change the code based on the optional arguments. (Though this, I can figure out from other questions.)
I know the full thing may be a bit too much, but any help would be useful! Thanks!