Follow the steps in order for the best result.
Get the tomatoes ready: For tomatoes smaller than 3 inches, slice them into 1/4 inch pieces. If they're bigger than 3 inches, slice them into 1/4 inch pieces first, then cut those slices into quarters to fit in the jars.
In a big bowl, mix 3/4 cup of pickling lime with 3 quarts of cold water. Stir it well. Then, add the tomatoes, cover the bowl, and let it sit out for 8 hours or overnight.
The next day, drain the tomatoes and cover them with fresh cold water for an hour. Do this two more times, changing the water each time, so they soak in fresh water three times for an hour each. This is super important to get rid of all the lime so the tomatoes are acidic enough to can safely. DON'T SKIP ANY OF THE SOAKING STEPS. Drain the tomatoes and set them aside.
Take a quadruple layer of cheesecloth and make a spice bag. Tie up the celery seeds, cloves, allspice, mustard seeds, and cinnamon in it.
In a large pan or stock pot (at least 6 quarts), mix the vinegar, sugar, salt, spice bag, and diced ginger. Bring it to a boil, then add the drained tomatoes. Bring it back to a boil, then let it simmer over medium heat for 15 minutes, stirring now and then and pressing down on the tomatoes to keep them covered in the brine.
Pack the tomatoes into wide-mouth pint-sized canning jars, putting a slice or two of onion between some of the layers in each jar. Add about half a teaspoon of the ginger pieces to each jar, throwing away the rest of the ginger but saving the syrup.
Leave 1/2 inch of space at the top. Use a chopstick or another thin, non-metal tool to run around the sides of the jar to get rid of any air bubbles. Wipe the rims of the jars with a damp paper towel to clean off any syrup. Put the lids and bands on the jars, tightening the bands just until they're fingertip tight.
Process the jars in a boiling water bath for 10 minutes. Then, take them out and let them sit without moving them for at least 12 hours before checking if they're sealed. Letting them sit undisturbed is important because the sealing stuff on the lids is still cooling and hardening to complete the seal. While the jars cool, you'll hear a 'ping' sound from each jar—that's the jars completing the vacuum seal as the final air escapes. After 12 hours, take off the bands and check the lids. Press down in the center of each lid. If you can't push the lid down any further, the jar is sealed. If the lid flexes a bit and you can push it down, the jar didn't seal. You can either put the band back on and process it again for another 10 minutes, or just put it in the fridge and use it within 3 months.