Graphics, Figures & TablesPhotos and list of photos

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Piotr
Posts: 7
Joined: Sun Aug 14, 2022 1:30 pm

Photos and list of photos

Post by Piotr »

Hello everyone,
I have a question. In my work, apart from drawings, I also have photos. I know that a list of drawings is created with the command \listoffigures, but is it possible to number them separately and create a list for photos?

Regards
Last edited by Piotr on Sun Aug 14, 2022 2:08 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

Photos and list of photos

Post by MjK »

Yes. There are several packages, that provide creation of additional floats. See, e.g., the remarkbox environment example in section 15.6 of the KOMA-Script manual. Table 15.3 also lists a comparison of commands, counters etc. related to figures and the new environment. So it should be very easy to create something like a photo environment similar to the given example. Alternatively see, e.g. package newfloat.

If you need more help, please show a Infominimal working example (and please mark it correctly as CODE—not as MWE).
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
Piotr
Posts: 7
Joined: Sun Aug 14, 2022 1:30 pm

Photos and list of photos

Post by Piotr »

Hi,
Thank you very much for your help and targeting KOMA-script. Currently, I have managed to create appropriate captions for photos and numbering for chapters. The only thing I can't deal with is the "Undefined control sequence" error I get in LaTeX when compiling the code:

Code: Select all

\DeclareTOCStyleEntry [%
    numwidth = 1 em%
] {tocline} {chapter}
I would like to change the value of numwidth. Without what I wrote above, everything compiles, that is (a piece of code):

Code: Select all

\documentclass[a4paper]{mwrep}
\usepackage {tocbasic}


\DeclareNewTOC [%
type = remarkbox,%
types = remarkboxes,%
float,%
floattype = 4,%
name = Remark,%
listname = {List of Remarks}%] {lor}
\setuptoc {lor} {chapteratlist}

\newcommand*{\listofremarkboxes}{\listoftoc {lor}}
For submitting the document, I use the mwrep class, which is intended for writing documents in Polish.
User avatar
MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

Photos and list of photos

Post by MjK »

MjK wrote:If you need more help, please show a Infominimal working example
not only a code snippet. See the link for more information.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
Piotr
Posts: 7
Joined: Sun Aug 14, 2022 1:30 pm

Photos and list of photos

Post by Piotr »

After recently updating packages I am getting the following error:
Undefined control sequence \@nnil->\@nil l. 37 ^^I]{lor}
. Does anyone know what could be the cause?

Code: Select all

\documentclass[twoside,11pt,a4paper, openright]{mwrep}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{fontspec}					
\usepackage[titles]{tocloft}
\usepackage{polski} 
\usepackage[left=3 cm, right=2 cm, bottom=2.5cm, top=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{url}
\usepackage{array}
\usepackage{tabularx}
\usepackage{ltxtable}	
\usepackage{multirow}
\usepackage{pdfpages}
\usepackage{longtable}
\usepackage{tabularray}
\usepackage{tabu}
\usepackage{rotating}		
\usepackage{threeparttable} 
\usepackage{textgreek}      

\usepackage{upgreek}		
\usepackage{fancyvrb}								
\usepackage{fancyhdr}			
\usepackage{float}		
\usepackage{tocbasic}

\DeclareNewTOC[%
		counterwithin=chapter,%
		type=remarkbox,%
		types=remarkboxes,%
		float,%
		floattype=4,%
		name=Fot.,%
		listname={List of photos},%
		indent=0%
	]{lor}
\setuptoc{lor}{chapteratlist}	
\makeatletter
	\renewcommand\@dotsep{.}
\makeatother

%\DeclareTOCStyleEntry[numwidth=2em]{tocline}{chapter}

\newcommand*{\listofphotos}{\listoftoc{lor}}

\theoremstyle{definition}

\newcommand*{\defeq}{\stackrel{\text{def}}{=}}



\RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}
		{{fontsize=\tiny}, frame=lines, framesep=1em}

\usepackage{amsmath}

\usepackage[font=small, justification=centerlast, width=\textwidth, labelsep=period]{caption}

\makeatletter
\renewcommand{\@biblabel}[1]{[#1]\hfill}
\makeatother

\renewcommand*{\figurename}{Pic.}
\renewcommand*{\tablename}{Tab.}


\setcounter{secnumdepth}{3}		
\renewcommand{\cftchapleader}{\bfseries\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftchapdotsep}{\cftdotsep}
\renewcommand{\cftdotsep}{0.1}
\setlength{\cftfigindent}{0pt}
\setlength{\cfttabindent}{0pt}


\begin{document}
	\tableofcontents
	\include{Summary}
	\include{Symbols}
	\include{Introduction}
	\include{Chapter_I}
	\include{Chapter_II}
	\include{End}
	\include{Bibliography}
	\listoftables
	\listoffigures
	\listofphotos

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Photos and list of photos

Post by Stefan Kottwitz »

Hi Pjotr,

there's a unit missing in line 36; simply write indent=0pt.

Stefan
LaTeX.org admin
Piotr
Posts: 7
Joined: Sun Aug 14, 2022 1:30 pm

Photos and list of photos

Post by Piotr »

Stefan Kottwitz wrote:Hi Pjotr,

there's a unit missing in line 36; simply write indent=0pt.

Stefan
It works. Thank you very much :) !
Piotr
Posts: 7
Joined: Sun Aug 14, 2022 1:30 pm

Photos and list of photos

Post by Piotr »

Another problem occurred to me. Does anyone know how to add prefix before a number in the list? I would like the text from the parameter name in commanmd \DeclareNewTOC to appear in the list. The idea is to add a short text before the item number in the list - the same as in the content of the work. I mean a command analogous to those used when listing figures (and tables):
\renewcommand\cftfigpresnum{Fig.}
\addtolength\cftfignumwidth{15 pt}
\renewcommand\cftfigaftersnum{.}
Or where to look for information on how to do it?
Post Reply