All user content on Stack Exchange is licensed under Creative Commons Attribution-ShareAlike, which means anyone can reproduce the content as long as proper attribution is given and it is also distributed under the same CC BY-SA license.
The Stack Exchange Network Terms of Service says:
In the event that You post or otherwise use Subscriber Content outside of the Network or Services, with the exception of content entirely created by You, You agree that You will follow the attribution rules of the Creative Commons Attribution Share Alike license as follows:
a. You will ensure that any such use of Subscriber Content visually displays or otherwise indicates the source of the Subscriber Content as coming from the Stack Exchange Network. This requirement is satisfied with a discreet text blurb, or some other unobtrusive but clear visual indication.
b. You will ensure that any such Internet use of Subscriber Content includes a hyperlink directly to the original question on the source site on the Network (e.g., https://stackoverflow.com/questions/12345)
c. You will ensure that any such use of Subscriber Content visually display or otherwise clearly indicate the author names for every question and answer so used.
d. You will ensure that any such Internet use of Subscriber Content Hyperlink each author name directly back to his or her user profile page on the source site on the Network (e.g., https://stackoverflow.com/users/12345/username), directly to the Stack Exchange domain, in standard HTML (i.e. not through a Tinyurl or other such indirect hyperlink, form of obfuscation or redirection), without any “nofollow” command or any other such means of avoiding detection by search engines, and visible even with JavaScript disabled.
Let's say I'm going to compile an old fashioned dead-tree book of Stack Exchange Q&As. A few things aren't entirely clear to me from the TOS...
Point "b." and "d." both begin with "You will ensure that any such Internet use...", implying those points don't apply to non-internet usage; which — to me — means there is no need to provide URLs if reproducing that content in print. Is that really the case?
It's not clear to me if the text indicating Stack Exchange as the source required by point "a." would need to be included for every post reproduced or if a single statement — say, at the beginning of the book — would be sufficient?
Not including any URLs seems like not enough attribution to me, and re-stating Stack Exchange as the general source again and again seems like overkill.
Would the following be sufficient?;
Indicating Stack Exchange as the source of content along with a license statement (including a URL to the license) at the beginning of the book
Attributing Q&As with user names in the main text
Including an index of posts and author user names, both with URLs at the end of the book (although from my interpretation this isn't actually needed)