I know it affects it in general terms, but I'm trying to figure out some of the minutiae.
Magic damage is somehow affected by weapon damage, but it's not affected by stamina. So when we're talking "weapon damage" we're probably only talking about the base damage of the weapon (i.e., the number associated with the weapon before any mods are added to it).
So (arbitrary numbers, they mean nothing other than placeholders) a staff with a damage of 150 will increase your magic damage only so much, and a 2h sword with a damage of 200 will increase your magic damage more, and dual wielding two swords with damage of 160 will increase your magic damage even more than the 2h (though not by too much) because there are two of them.
OK, I get that part.
How do weapon skills factor into the mix? If you have a 2H sword and you put points in Heavy weapons, that raises your weapon damage, your 2h damage is raised by either 3% or 6%, depending on if you put in 1 or 2 points. Does that raise your magic damage? I guess it depends on whether the 3%/6% boost is applied to the base weapon damage or your overall weapon damage (base damage plus stamina, etc.) Does anyone know?