I put alexander and margarets name into ancestry and it came up with a one world tree that gave the names of his siblings.
Oh dear
Ancestry is not proof!
Please don't ever believe anything you find in an online family tree. Use it as a pointer to research, but make sure to track down and view all the relevant original documents for yourself. Many trees are fine, but unfortunately there are also many which are pure fantasy driven by wishful thinking.
Also, in Scotland in the 18th century it was the exception rather than the rule for a wedding ceremony to be held in the church building. If a document you have found says the marriage was in St Andrews and St Leonards, this just means it was in the
parish of St Andrews and St Leonards in Fife, not necessarily in the church.
You can view the originals of the children's baptisms at
www.scotlandspeople.gov.uk at modest cost - the index there lists 9 between 1765 and 1790, one in Fife in 1775 and the rest in Midlothian. If the baptism records include details of witnesses, these may give a clue to the parents' families.
There is a Mackie-Doig marriage in St Andrews and St Leonards in 1761, but the couple are James and Mary. I have come across Mary being written by mistake for Margaret, usually via the abbreviation Marg mistranscribed as Mary, but it would take a throughly muddled parish clerk to write James instead of Alexander, so the probability is that this is a different couple.