I want to create a cooking book. There I want to define for each receipe a thumbnail image. At the beginning of each chapter I want to show instead of a TOC a gallery of thumbnails of each subsection (the title of each receipe is in the subsection).

I have same very basic background in LaTeX programming, but here I do not know how to start.

The sections are groups of recipes defined as


The recipes titles itself are printed as


I could define a command according to the section and subsection level which stored the path of the image.

However how do I save this to the aux file, so that I can read it afterwards and how do I know the number of section and subsections in a chapter so that I could define a galleray on that basis?

  • Possibly related/starting point: Adding a per-chapter image along with group of entries in ToC
    – cmhughes
    Commented Jan 26, 2014 at 21:43
  • Not really. I am not convinced that a TOC is what I want. If so it would only be all items below a section or below a chapter. And I want a gallery, which means images in a tabular manner with 3 or 4 images per row. Therefore I assume that I need to program it from the start. Commented Jan 27, 2014 at 21:27
  • 2
    Ok, I think I have an idea of what you want. Could you put your snippets into a complete MWE so that folks have something concrete to start from. Perhaps you could add comments into your code to illustrate where you would like these galleries to appear
    – cmhughes
    Commented Jan 27, 2014 at 21:41
  • 1
    @MatthiasPospiech, have you considered creating an MWE for the community to work with? Commented Jul 28, 2014 at 1:06


Browse other questions tagged .