Peel the zest from the limes with a vegetable peeler, avoiding as much of the white pith as possible. Slice the zest strips very thinly at an angle to make strips about 1/16 inch wide by 3/4 inch long-you'll need about 1 cup zest. Put the zest in a 3- or 4-quart saucepan and add water to cover. Simmer over medium-high heat for 5 minutes, drain well, and return the zest to the pan.
Juice the limes, combine the juice with enough water to total 4 cups, and add to the zest. Coarsely chop the remaining pith and fruit, put in the center of a 12-inch square of cheesecloth, and tie with butcher's twine to make a sachet. Put the sachet in the pan and bring to a boil over high heat. Cover the pan with the lid ajar and adjust the heat as necessary to simmer very gently for 1 hour.
Put a small ceramic plate in the freezer. Remove the pan from the heat. Remove the sachet with a pair of tongs, squeezing as much liquid as possible back into the pan, and discard the sachet.
Bring the mixture to a boil over medium-high heat and add the sugar. Reduce the heat to a simmer and cook, stirring frequently, for 10 minutes. Remove the pan from the heat and spoon about a teaspoon of the liquid onto the cold plate. Freeze for 1 minute, remove from the freezer, and drag your finger through the liquid; it should be thick enough to leave a distinct line on the plate. If the marmalade is too thin, simmer for 5 more minutes and repeat the freezer test. Repeat as needed until the proper consistency has been reached. Off the heat, stir in the tequila. If canning the marmalade, follow the canning instructions below. If you'll be storing the marmalade in the refrigerator, transfer it to heatproof storage containers, let cool to room temperature, and then refrigerate.
To can the marmalade:
Transfer the hot marmalade to clean, hot canning jars, leaving 1/2 inch of headspace in each jar, and wipe the edges clean with a paper towel. Screw the lids on tightly..
Put the jars in a large pot of water fitted with a rack insert. The water should completely cover the jars by at least 2 inches. Return the jars to the pot of water and make sure the water covers them by at least 2 inches. Boil, covered, for 10 minutes. Use tongs to remove the jars; let them cool undisturbed on the counter. You should hear a popping sound as the jars cool, indicating that the vacuum seals have worked.
The marmalade will keep in the refrigerator for up to 1 month. For longer storage at room temperature, can the marmalade.