How do I substitute almond flour for all purpose flour? I am trying to make a few cookie recipes and want to reduce their carb content and make it suitable for a low carb consuming person. Most of the cookie recipes call for all purpose flour.
In one of the recipes which specifically knead the dough with butter and no moisture (so as not to form gluten) I substituted almond flour 1:1 but haven't had great results (the dough is crumbly, cant be rolled, etc). Even 1.5:1 and still was the same. I added a pinch of xanthan gum and was able to get the dough to bind. However I wanted to ask here how people have gone about replacing all purpose flour with almond flour.
My next attempt is going to include some Vital Wheat Gluten along with the almond flour.
Edit: I have used Erythritol(powdered) as a sweetener.
One of the sample recipes :

from https://www.archanaskitchen.com/shrewsbury-cookies-recipe-butter-cookies
The other one is a video recipe : https://www.youtube.com/watch?v=aU4U0M8JZG8&amp;ab_channel=CookingShooking - I did mention my findings to the chef in the comments - but he's clearly a big enough celebrity to ignore a novice such as me.
There is no general replacement. Almond flour has very little in common with all-purpose flour, and behaves very differently in baking.
Your idea of adding gluten is very interesting - many flourless recipes are actually made with the intent to be gluten-free, which is a very difficult restriction to work around. It is certainly something to have in your toolbox.
However, you cannot just find some kind of mixture which will behave as a good substitute in different circumstances. Rather, you will have to redesign each recipe separately, and some things (e.g. laminated dough) may not be possible at all. For others, you would probably need to learn what the flour's role is in each, and experiment how to match it well - here, food science books will be helpful. It is quite an interesting project!