How can I center a table or in my case a tikzpicture horizontally ignoring the margins? My tikzpicture is slightly too big causing it not to be centered properly(sticks into the right margin slightly too much but if properly centered it will be less)
I've tried
\makebox[\textwidth][c]{}
but I just get a bunch of errors.
Best Answer
Add
ampersand replacement=\&
to thetikzpicture
options and change every&
in yourtikzpicture
to\&
(See Section 17.5 Considerations Concerning Active Characters of thepgf
manual):If you want to have a caption, you can use a
minipage
and the\captionof
command from thecaption
orcapt-of
packages (you cannoy use a float inside a\makebox
):