Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question led to a new package:
scrjrnl

I'm searching for packages to write a daily devotional such as this one (Click "Search inside this book" and see in the end of the preview for example). I could not find a suitable package on the CTAN to do that.

I'm thinking that I could use a book or scrbook class and either redefine or encapsulate:

  • \chapter for each month, resetting a counter for every day;
  • \section for every day of the month, using and incrementing the counter.

What would be the best/easiest approach in this case?

  • Making a devotional class to replace book;
  • Writing macros to encapsulate \chapter and \section;
  • Redefining \chapter and \section or playing with definitions used inside \chapter and \section calls in book or scrbook;
  • Any other enlightened suggestion...

The usage I'm thinking about would look like this:

\documentclass{scrbook} % or \documentclass{devotional}
\begin{document}
\tableofcontents

\month{January} % Set counter for month of January
\day*{} % Set a new day -- January 1, do not list in toc
\begin{verse}{Genesis 3.4}
% contents of the verse
\end{verse}
% commentary
% commentary
\begin{prayer}
% contents of prayer
\end{prayer}

\day*{} % Set a new day -- January 2, do not list in toc
% day contents

% etc.
\end{document}
share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Before you think of implementation, spend some time thinking of the structural and semantic elements of the book. From the example, I would structure the document as follows:

Structure

-- Collection
---- Devotional
------ Title
------ EpigraphTop
------ EpigraphBottom
------ Body
--------- Quote
--------- text
------- PresentationDate

By abstracting the sectioning elements a collection can represent a month or a week, if you wish. A devotional can represent daily text as requested or weekly chunks.

Author Commands

The next step would be to design the author interface. I would aim for:

\collection{January}
    \devotional
    \epigraph{...}
    \epigraph{...}
    body............
    ................
    \Quote{}
    ..............
    .............
    \enddevotional

Implementation

Alias : Chapter -> Collection
        Section -> Devotional

I would use the basic book class and create a package to handle the code. Use TikZ to draw the fancy boxes and the month marker at the beginning of the month at the upper right hand part of the page.

One of the difficulties I see here, is to get the right amount of words to fit everything per page. If you know TeX well, you might decide to make the body, as one command that you can box, measure it and unbox it to assist you writing the book. A good text processor that can count words might also be helpful.

share|improve this answer
    
Thank you. I've never made a package, and my TeX skills are quite limited. I see this as an opportunity to learn quite a lot, although that's quite a big step forward for me... –  ℝaphink Apr 10 '11 at 20:49
    
@Raphink Go one step at a time. Don't worry too much about looks at the beginning. Rather focus on the write-up. Do incremental improvements, for example start defining the epigraphs first. Whatever you need it has already been covered around here. If you get stuck, post a question or come over to chat and ask it. Good luck. –  Yiannis Lazarides Apr 10 '11 at 21:14
    
Do you know a good tutorial to get started with that kind of package writing? –  ℝaphink Apr 10 '11 at 21:23
    
@Raphink Have a look at this tex.stackexchange.com/questions/tagged/package-writing –  Yiannis Lazarides Apr 10 '11 at 21:28
1  
@Raphink I wouldn't recommend Perl for this. It will make it more difficult. –  Yiannis Lazarides Apr 10 '11 at 21:38
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.