Here are a few more tips for dairy-free recipes:

— Try using silken tofu to make cheesecake or cream pies. The silken variety is soft and easy to blend.

— If altering a recipe that uses buttermilk, remember that buttermilk has a higher acid content than conventional milk and most nondairy milks. Acid combined with leavening creates light baked goods. To ensure good rising, add a bit of an acid to the milk. Costigan likes the flavor of apple cider vinegar with chocolate desserts, and adds some to most of her recipes to improve the texture. Lemon juice will also work.

The important thing during the holidays is not to look at making recipes gluten-free or dairy-free as deprivation. Use good quality ingredients, such as the best dark chocolate you can find.

“Desserts are a treat. Make them well, and they will satisfy you, and it lets you have something that tastes good,” Costigan says.

If you want to add some new recipes to your holiday repertoire, here are some that have classic holiday flavors, plus a gluten-free flour blend that can be used in all kinds of baking.

Tradition is a big part of holiday baking. Grandma’s fruitcake, Dad’s coconut cake, decorating sugar cookies with the kids — food memories are powerful this time of year.

But what happens when those cherished family treats run up against family members who have converted to dairy-free or gluten-free diets? Often, they get shelved.

There are many sources today for recipes that meet the needs of those diets, but they may not carry the warm memories as cake and cookie recipes that go back for generations.

If you want to make family favorites accessible to everyone, the growth in gluten- and dairy-free diets has led to more and better products on the shelves to help you do it.

However, there is more to adjusting recipes than simply switching products, because baking is chemistry. For results that won’t disappoint, we’re going to have to science the heck out of this.

SUBSTITUTING GLUTEN-FREE FLOURS

The gluten in wheat flour performs many functions, says Peter Reinhart, an instructor at Johnson & Wales in Charlotte, N.C., and the James Beard Award-winning author of several baking books. Substitutes such as rice, garbanzo bean or nut flours have many differences from wheat flours that affect the texture, appearance and taste of baked goods.

“You can’t just replace it one-for-one. It doesn’t work that way,” he says.

Reinhart explored the issue in his book “The Joy of Gluten-Free, Sugar-Free Baking” and found that a blend of non-wheat flours worked better than using one kind alone. Also, a starch, such as tapioca starch or potato starch, must be added to provide rich flavor to the results.

He prefers nut flours, such as pecan flour which he grinds himself, to the other flours. Of course, those with nut sensitivities should avoid nut flours.

“Definitely use a combination of flours for a better result,” Reinhart says. “It will taste different from wheat flour, but a combination gives better flavor.”

The food science nerds at America’s Test Kitchen discovered the same thing. In the “How Can it Be Gluten Free Cookbook” by the minds at ATK (who are the same ones behind Cook’s Illustrated magazine), they offer suggestions for converting recipes:

— Reduce the butter and oil. Gluten-free flours don’t absorb liquid fat as easily as wheat flour, which can result in greasy cookies. To add richness, replace some of the liquid fats with cream cheese or sour cream.

— Because gluten-free flours contain less protein, you may need to add a bit more leavening to obtain light results.

— Adding nonfat dry milk to the flour will help with browning. It will also help hold moisture and raise the protein level of gluten-free flours, which are usually lower in protein than wheat flour.

— Add a little more non-fat liquid to prevent gritty texture. Also, letting the batter or dough rest for 30 minutes or so before baking will give the flour time to absorb the liquid. Additional liquid may mean a bit longer baking time.

— Add a small amount of a binder to the flours to keep doughs from falling apart and muffins from being too crumbly. Powdered psyllium husk works well in yeasted doughs, which is why Reinhart prefers it. (It is available online and with the vitamins at Whole Foods stores.) America’s Test Kitchen says xanthan gum or guar gum works better in other types of baking, such as cakes, brownies and pie crust. You won’t need much — start with ¼ teaspoon of xanthan or guar gum for an average batch and increase if the resulting texture is poor.

REPLACING THE DAIRY

Many nondairy milks are widely available today — cashew, almond, soy, rice, coconut, oat, hemp. However, anyone who is sensitive to nuts should not use nut milks.

Several dairy-free butter substitutes are available, and coconut oil has been used in Asian cooking for centuries.

But simply exchanging a nondairy milk one-for-one for the buttermilk in Mom’s poundcake may not provide the best results because of differences in protein and fat levels, and flavor. Butter substitutes have a variety of flavors, and some aren’t suitable for baking, so read labels carefully.

Fran Costigan has written several books on vegan baking, including, “Vegan Chocolate: Unapologetically Luscious and Decadent Dairy-Free Desserts.” She teaches vegan baking in Manhattan, was trained as a pastry chef at the New York Restaurant School and worked in several restaurants. Her preferred nondairy milk is almond, followed by a coconut milk beverage (not the canned coconut milk) if baking for those with nut allergies.

Soy milk has the most protein of all nondairy milks, at a level approaching cow’s milk.

To replace cream, Costigan uses homemade cashew cream or canned full-fat coconut milk, both of which have good fat levels. To get the cream from the coconut milk, Costigan says to place a can in the refrigerator overnight. Open the can, skim the solid layer of cream from the top and use it in baking or to make whipped cream. Save the thin liquid in the can for other uses.

Costigan says that sometimes manufacturers include additives to keep coconut milk from separating, so purchase two different brands to see which works best. Cans labeled “cream of coconut” are not the same thing. They have sugar added and are primarily used for cocktails.

Costigan avoids butter substitutes.

“I considered margarine an inferior product as a baker, so when I started trying this, I looked for a liquid fat. I found that a neutral-tasting oil worked fine. My preference is a mild-tasting extra-virgin olive oil,” she says.

Since using olive oil instead of butter means swapping a liquid for a solid, compensate in the recipe by using less oil than the butter. According to the “Food Lover’s Companion,” if the recipe calls for 1 cup of butter, use 7/8 cup of oil as a starting point.

Coconut oil works in some cases — Costigan uses it in a nut pie crust. But because coconut oil is solid at room temperature, it can quickly solidify if melted and added to batters, such as pancake batter.

———

AMERICA’S TEST KITCHEN GLUTEN-FREE FLOUR BLEND

Be sure to use potato starch, not potato flour. America’s Test Kitchen recommends adding a small amount of a binder, such as xanthan gum, to the mix as you use it.

4 1/2 cups plus 1/3 cup (24 ounces) white rice flour

1 2/3 cups (7 1/2 ounces ) brown rice flour

1 1/3 cups (7 ounces) potato starch

3/4 cup (3 ounces ) tapioca starch

3 tablespoons (3/4 ounce) nonfat milk powder

Whisk all ingredients together in a large bowl until well combined. Transfer to an airtight container and refrigerate for up to 3 months.

Yield: 42 ounces (about 9 1/3 cups)

VEGAN CHOCOLATE COCONUT WHIPPED CREAM CAKE

Fran Costigan says the components for this dairy-free chocolate version of a coconut cake need to be made ahead, which means the cake is actually quite easy as long as you plan your active time. From “Vegan Chocolate: Unapologetically Luscious and Decadent Dairy-Free Desserts,” by Fran Costigan (Running Press, 2013). Below are some notes on the recipe and the game plan:

Notes:

— Any neutral oil will do, but if you use melted coconut oil, it is important to have all the ingredients at room temperature or the coconut oil will solidify when mixed with the other liquids. If that does happen, set the bowl of liquid ingredients over a saucepan of barely simmering water. Stir until the chunks of oil liquefy.

— The canned coconut milk for the filling and frosting need to be refrigerated at least 24 hours and preferably two days before starting the first component.

— It is perfectly fine to use 2 cups all-purpose flour and eliminate the whole-wheat pastry flour.

Suggested game plan:

— Toast the coconut; cool to room temperature and refrigerate in a container for up to 1 month.

— Make the cake; cool and refrigerate up to a day in advance, or freeze for up to 1 month.

— Make Chocolate Coconut Ganache Glaze; let set at room temperature until thickened, about 30 minutes, or refrigerate up to 5 days ahead. (Warm over a water bath until the now-solid ganache is pourable.)

— Make Chocolate Coconut Whipped Cream; refrigerate overnight.

— Assemble the cake and refrigerate 2 hours before serving (or up to overnight).

Make the cake

2 /3 cup plus 6 tablespoons unsweetened dried shredded coconut, divided

1 1/2 cups all-purpose flour

1/2 cup whole-wheat pastry flour

1/4 cup granulated sugar

2 1/2 tablespoons coconut sugar, ground in a blender until powdered

1 1/4 teaspoons aluminum-free baking powder

1 1/4 teaspoons baking soda

1/2 teaspoon fine sea salt

3 /4 cup plus 2 tablespoons pure maple syrup, Grade B or dark amber, at room temperature

3 /4 cup coconut milk, at room temperature

1/3 cup coconut oil, melted

1 tablespoon pure vanilla extract

2 teaspoons apple cider vinegar

1 recipe Chocolate Coconut Ganache Glaze, recipe follows

1 recipe Chocolate Coconut Whipped Cream, recipe follows

Position a rack in the middle of the oven and preheat to 300 degrees.

Toast the coconut: Spread the shredded coconut on a parchment-lined rimmed baking sheet and bake until golden brown, stirring once or twice. If the coconut is browning faster around the edges, remove the pan from the oven and stir the darker coconut into the center. Remove from the oven and cool on a wire rack.

Increase the oven temperature to 350 degrees. Oil the sides and bottoms of two 8-inch round cake pans and line the bottoms with parchment paper circles or paper cut to fit. Do not oil the paper.

Place a wire mesh strainer over a medium bowl. Add the all-purpose flour, whole wheat pastry flour, granulated sugar, coconut sugar, baking powder, baking soda and salt to the strainer, and stir with a whisk to sift the ingredients into the bowl. (If any small bits remain in the strainer, add them to the mixture in the bowl.) Whisk to aerate the mixture.

Whisk the maple syrup, coconut milk, oil, vanilla and vinegar in a separate medium bowl until completely combined. Pour into the dry mixture and whisk until the batter is smooth.

Stir 2/3 cup of the shredded coconut into the batter and then divide the batter evenly between the 2 pans. Rotate the pans to level the batter and tap them lightly on the counter to eliminate air bubbles.

Bake on the middle rack for 22 to 23 minutes or until the tops of the cakes are light golden-brown, the sides have started to pull away from the pans, and a wooden toothpick or skewer inserted in the center of the cakes comes out clean or with only a few moist crumbs.

Set the cakes on wire racks. After 5 minutes, run a thin knife around the sides of each cake to release the sides from the pan. Invert each cake onto a rack. Remove the pans and carefully peel off the parchment paper. Invert again right-side up on a rack and cool completely. (It is fine to cool the cakes bottom-side up if you don’t have another rack.)

When the cakes are completely cool, slide a 9-inch cardboard circle under each one. Wrap the layers with plastic wrap and refrigerate for about 1 hour or until cold before assembling the cake. The wrapped cakes can be refrigerated overnight or frozen for up to 2 months. To freeze, slip the wrapped cakes into a zipper-lock bag and seal, or over-wrap the plastic-wrapped cakes in foil. Defrost unwrapped.

Assemble the cake:

Use a long serrated knife to level the top layer, if it is domed. (Save the excess cake for snacking.)

Place one of the layers, still on the board, on a cake plate or decorating turntable. Tuck strips of parchment paper or waxed paper under the outside edge of the cake.

Spread the layer with 5 tablespoons of the Chocolate Coconut Ganache Glaze. Wait a few minutes for the ganache to set (or refrigerate briefly), then spread with about 3/4 cup of the Chocolate Coconut Whipped Cream. Sprinkle 2 tablespoons toasted coconut over the cream.

Remove the cake board from the other layer and place top-side up on the cake. Press down lightly. Spread with another 5 tablespoons of the ganache. When the ganache is set, spread about 3/4 cup of the whipped cream on top of the cake, swirling as you go. Use more if you like, or reserve the remaining cream for snacking.

Frost the sides and top with remaining ganache. Sprinkle some of the remaining toasted coconut on the top and sides of the cake. Refrigerate the cake for at least 1 hour, or until ready to serve.

For the neatest slices, cut the cake when it is cold, but wait 10 to 15 minutes for the cake to come to room temperature before serving.

Yield: One (9-Inch) Two-Layer Coconut Cake.

CHOCOLATE COCONUT GANACHE GLAZE

Since canned full-fat coconut milk is so thick, it is essential that the chocolate be chopped so fine that it is almost powdered. This can be done in a food processor. Be sure to stir the coconut milk until it is thoroughly mixed before heating. Refrigerate up to a day ahead in a covered container or freeze for up to 1 month. From “Vegan Chocolate: Unapologetically Luscious and Decadent Dairy-Free Desserts,” by Fran Costigan (Running Press, 2013).

8 ounces dark chocolate (68 to 72 percent), finely chopped

1 1/2 cups plus 1 tablespoon canned unsweetened full-fat coconut milk, well-stirred, more as needed to adjust final consistency (do not use light)

1/4 cup coconut sugar or granulated sugar

Pinch fine sea salt

1 teaspoon pure vanilla extract

Add the chocolate to a heatproof bowl and set aside while you heat the milk.

Pour the milk into a small saucepan. Add the sugar and salt. Cook over medium heat, whisking a few times to a low boil. Immediately remove the saucepan from the heat.

Pour the hot milk over the chopped chocolate all at once. Rotate the bowl so the chocolate is completely submerged. Cover the bowl with a plate and let stand undisturbed for 4 minutes.

Add the vanilla and whisk from the center out only until smooth and glossy.

Keep the bowl of ganache at room temperature while you test the consistency. Dip a teaspoon into the ganache, set the coated spoon on a small plate, and refrigerate for 10 to 15 minutes. After chilling, the ganache on the spoon should be smooth and firm, but should still taste creamy. It is unlikely, but if the glaze is too firm, add an additional tablespoon of room temperature milk, and repeat the test. Add a second tablespoon if needed.

Allow the ganache to thicken at room temperature for 20 to 30 minutes, until it coats a spoon thickly with minimal dripping, but still remains pourable. Stir a few times from the sides into the center.

Yield: about 2 cups.

CHOCOLATE COCONUT WHIPPED CREAM

The whipped cream can be made three days ahead and refrigerated in a covered container. Skip the chocolate altogether for a vanilla version. From “Vegan Chocolate: Unapologetically Luscious and Decadent Dairy-Free Desserts,” by Fran Costigan (Running Press, 2013).

1 can (13.5 to 14 ounces) unsweetened full-fat coconut milk (do not use light), refrigerated unopened, upright for at least 24 hours (2 days is better)

2 ounces unsweetened chocolate, or substitute 75 to 85 percent, finely chopped

2 cups confectioners’ sugar, sifted twice if organic, divided

1/4 teaspoon guar gum, divided

1 teaspoon pure vanilla extract

Refrigerate the electric mixer bowl, or a metal bowl large enough to whip the cream, and the whisk beater.

Open the can of coconut milk directly from the refrigerator. With a spoon, scoop out only the solid part of the coconut milk (the cream) and place it in the chilled bowl. Reserve 3 tablespoons of the thinner liquid coconut milk that remains in the can. (Refrigerate the rest for using as a liquid in desserts and smoothies.) Refrigerate the cream in the bowl while you melt the chocolate in the reserved milk.

Combine the reserved liquid coconut milk and chocolate in a small saucepan. Warm over the lowest heat until the chocolate is almost completely melted. Immediately remove the saucepan from the heat and stir until the chocolate is melted. Set the saucepan in a larger saucepan of very hot water to keep the melted chocolate from solidifying.

Remove the bowl of coconut cream from the refrigerator. Add 1 cup of the sifted confectioners’ sugar and 1/8 teaspoon guar gum to the cream. Whip the cream on low speed for 1 minute using the chilled whisk attachment of your mixer. Increase the speed to high and beat for 1 minute. Turn off the mixer and clean the sides of bowl.

Add another 1/2 cup of the confectioners’ sugar and the remaining 1/8 teaspoon of guar gum to the cream, and beat for 1 minute, starting on low and increasing the speed to high. Add the remaining 1/2 cup of confectioners’ sugar and the vanilla and beat for another minute, starting on low and increasing the speed to high. The cream will be thickened.

When the melted chocolate is no longer warm, fold it gently into the whipped cream with a silicone spatula.

Refrigerate the cream in a covered container until set, about 4 hours or overnight. If the cream is too firm, stir vigorously or add a little of the extra liquid coconut milk.

Yield: about 2 cups.

NATIVITY COOKIES

This recipe from Peter Reinhart is sugar-free as well as gluten-free. The recipe tester found liquid stevia at Whole Foods.

Cooking spray

2 1/4 cups (9 ounces) almond flour

1 cup (3.25 ounces) chopped walnuts or pecans

1 teaspoon ground cinnamon

1/4 teaspoon ground allspice

1/4 teaspoon salt

1/2 teaspoon baking soda

3/4 cup unsalted butter, melted, or your favorite butter substitute

1 large egg

1 tablespoon vanilla extract

2 teaspoons almond extract

1/4 teaspoon orange oil or 1 teaspoon orange extract

1 1/4 teaspoons liquid stevia

Preheat the oven to 350 degrees. Prepare an 13-by-18-inch sheet pan by covering the surface with baking parchment or a silicon baking pad. Lightly mist the surface with vegetable spray oil.

In a bowl, whisk together all the dry ingredients. In a separate bowl, whisk together all the liquid ingredients. Add all the liquid ingredients to the dry and mix with a large spoon (or with the paddle attachment on medium-low speed in an electric mixer) and continue to mix for 1 minute, or until all ingredients are thoroughly combined to make a thick batter.

Drop one teaspoon of dough at a time onto the prepared cookie sheet to make 24 small, evenly spaced cookies. With wet fingers, pat down the top of each cookie to make a round patty. Place the pan on the center shelf of the preheated oven and bake for 10 minutes. Rotate the pan and bake for an additional 9 to 10 minutes, or until the cookies are firm and begin turning a rich golden brown. Remove the pan from the oven and transfer the cookies to a cooling rack. Cool for at least 10 minutes before serving.

Note: If your oven produces a lot of bottom heat, you may need to slip another pan under the baking pan (aka, double panning) when you rotate the cookies to protect against burning the bottoms of the cookies. If the oven is convection you probably won’t need to use a second pan.

Yield: 24 cookies.