How was Catalonia was joined to Spain?
Here is a nice summary of Catalonias history.
http://thisisspain.info/catalonia/history-of-catalonia/