I know that I can only accept one answer
Indeed you can, multiple accepted answers would seem to defeat the purpose of the green tick a bit.
What you could do if you really can't choose between them is democratise the process. You could leave it a few days and see if one collects more votes. That might suggest it was a little bit better explained or a little bit more preferable to a wider audience. Alternatively you could give the tick to the one with fewer votes in order to give it a bit of a signal boost and extra love.
Or you could simply give the tick to whoever got there first.
Or I suppose you could toss a coin.
Generally I'd be more inclined to award a tick for an answer which had a bit more explanation if that applies in your case. Or if the answer came with a screenshot showing the output. Or if the answer added an extra tip. Or maybe the code was simpler. Or, for me personally, I quite like a more primitive answer. Many wise and experienced people advocate the use of packages to do cool things and make your life easier. After all LaTeX is basically just a huge bundle of TeX macros and templates and presets and stuff. But I find an overly big preamble can be awkward, packages can clash, they can go obsolete, they can be updated and break. I quite like the answer that uses basic commands you can find in Leslie Lamport's book, possibly, I'll be honest, for no other reason than because I took the time to read that book and understand them well once :P Perhaps you will prefer an answer like this too, or perhaps you'd rather learn about a cool new package that can save you five or five dozen extra lines of code.