I have had an idea for a year or two to write a book relating to the research I do. My specific field (in the mathematical sciences) is somewhat niche and no book currently exists that aggregates the big results into one place. Currently, all of the research is spread across multiple papers, journals and conferences.
I want to write a book about this topic so that future researchers can access basic definitions and results without having to hunt down individual papers. I don't want to write the book for fame/fortune since I recognize it would never be popular with more general audiences. I want to write it to improve my knowledge of the topic, to create a useful resource for others and (getting personal) to fulfill my dream of writing a book.
I have some original research on the topic and most of my current work revolves around the topic as well. But I've heard many people say that PhD candidates should focus on research instead of other pursuits like book-writing. Should I pursue this, or should I focus on research and leave the book for the future?