Does it matter if someone intended to infringe a copyright?
With regard to direct infringement of a copyright, it does not matter if someone intended to infringe a copyright. Thus, even if you did not know that the book you were copying was protected by copyright, your lack of knowledge or intent would not be a defense in a lawsuit for copyright infringement (although it could affect the remedy and damages ultimately awarded to the copyright owner if the owner succeeds in the lawsuit).