T-F-S / tcolorbox

A LaTeX package to create highly customizable colored boxes.
http://www.ctan.org/pkg/tcolorbox
LaTeX Project Public License v1.3c
213 stars 15 forks source link

Isolate `\tcbdocmarginnote` from `\tcbuselibrary{documentation}` #243

Closed JeffFessler closed 10 months ago

JeffFessler commented 10 months ago

This package is wonderful and I have found\tcbdocmarginnote to be very useful. But currently the only way to use it is to invoke \tcbuselibrary{documentation} which seems to have other side effects like changing the way hyperref links are colored. It is possible to provide a way to use \tcbdocmarginnote (or equivalent) without having to use the entire documentation library?

BTW, I tried to find the tex source code for it by searching the repo, but all I saw was places it is used, not where it is defined. https://github.com/search?q=repo%3AT-F-S%2Ftcolorbox%20tcbdocmarginnote Thanks!

muzimuzhi commented 10 months ago

\tcbdocmarginnote is just a styled tcolorbox wrapped in a \marginnote, and it's defined in tcbdocumentation.code.tex.

https://github.com/T-F-S/tcolorbox/blob/6d98db4263c612279cca47efde22d1ef8404e573/tex/latex/tcolorbox/tcbdocumentation.code.tex#L900-L907

JeffFessler commented 10 months ago

Oh gosh, I thought I had some margin placement issues with \marginnote that seemed to be resolved by using \tcbdocmarginnote but something else must have been the problem. I have reverted to using \marginnote. I see now that the github search had a "one more match" notation that I overlooked that shows the definition. Thanks so much - closing the issue.