profound-labs / wallcalendar

Wallcalendar LaTeX documentclass
Other
92 stars 24 forks source link

remove bleed on "photo and notes" calendar page #10

Closed norbusan closed 6 years ago

norbusan commented 6 years ago

The bleed is set for the photo, but affects also the Calendar page. Remove references to the bleed there.

I think that the bleed should not affect the Calendar page in this setup. I use a negative bleed to shrink photos to less then the full page size, but it affects the Calendar page.

The patch removes the bleed from the calendar page.

gambhiro commented 6 years ago

It is a graphical element that can be full-width, so it needs to account for bleed.

The calendar takes style options or can be redefined. When the calendar or its header has a full-width element than that needs to be bleeded over the edge.

For example a full-width rule under the day names, or a background bar with the names in white, or the whole calendar can have a background color, possibly overlaid on a photo with opacity... and so on.

norbusan commented 6 years ago

Ok, I see. So is then there a way to scale the Photo to something else then the full page size? I read through the code and didn't find an option.

I was thinking about either adding an option for scaling the image, or for adding separate bleed options to Photo and Calendar commands.

WDYT?

gambhiro commented 6 years ago

For a specific image handler, you could define it in you project preamble:

\pgfkeys{
  /put photo/.is family, /put photo,
  half size centered/.code = {%
    \def\@wall@photo@putPhoto##1{%
      \begin{minipage}[t][\calPaperHeight][b]{\calPaperWidth}%
        \centering
        \mbox{}\vfill

        \includegraphics[width=0.5\linewidth]{##1}%

        \vfill\mbox{}%
      \end{minipage}%
    }%
    \def\@wall@photo@setYOffset{}%
  },
}

And then specify it in the document body:

\MonthPage[layout=photo and notes, put photo=half size centered]{September}
norbusan commented 6 years ago

Thanks, this indeed works as expected.