LaTeX forum ⇒ Graphics, Figures & TablesCreating a toc of items mixing figures & images

Information and discussion about graphics, figures & tables in LaTeX documents.
erwann
Posts: 72
Joined: Thu Aug 25, 2016 2:24 am

Creating a toc of items mixing figures & images

Postby erwann » Tue Aug 28, 2018 3:49 am

I need to list in a document enclosed items that are comprised of pdf's and images, in a certain order. The way I have approached this, is to use floats with option H[ere] for the images, and includepdf for the pdfs, and newlistof to list the items. In any case, I'm unable to get the page numbers right, and don’t how to change the ‘level’ from ‘section’ to a custom name. Other imperfections mentioned in the code. Also, someone may know of a better approach altogether.

PS: Foo.pdf is a one page pdf

  1. \documentclass{article}
  2. \usepackage{tocloft}
  3. \usepackage{keyfloat}
  4. \usepackage{pdfpages}
  5. \usepackage{xparse}
  6.  
  7. \newcommand{\listenclosedname}{List of enclosed items}
  8. \newlistof[chapter]{enclosed}{encl}{\listenclosedname}
  9.  
  10. \NewDocumentCommand{\enclosedlabel}
  11. {}
  12. {
  13. %\protect something? TODO
  14. E{\small NCL.} \theenclosed.
  15. }
  16.  
  17. \NewDocumentCommand{\addenclosed}
  18. {m}
  19. {
  20. \stepcounter{enclosed}
  21. \addcontentsline{encl}{enclosed}
  22. {
  23. %TODO: Replace
  24. E{\small NCL.} \theenclosed.
  25. % with:
  26. % % \enclosedlabel
  27. #1
  28. }
  29. }
  30.  
  31. \begin{document}
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3901
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Aug 28, 2018 6:16 am

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests