Glossaries in TableOfContents with number - latex

The title basically explains it. I want to use the package glossaries and include a number in the table of contents, e. g. 8 Glossary instead of Glossary, This code achives this without a number:
description={Das Betriebssystem der meisten Smartphones.}
Im just using the default setup on Manjaro wit TexMaker.
Any idea?


Missing = inserted for \ifnum

I am using iopart template, and I do not know why get this error :
Missing = inserted for \ifnum. \begin
Missing number, treated as zero. \begin
I really appreciate any help
%\newcommand{\gguide}{{\it Preparing graphics for IOP Publishing journals}}
%Uncomment next line if AMS fonts required
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
\address{Department of}
\item[]November 2022
% Uncomment for keywords
\noindent{\it Keywords}: electronics
% Uncomment for Submitted to journal title message
% Uncomment if a separate title page is required
% For two-column output uncomment the next line and choose [10pt] rather than [12pt] in the \documentclass declaration
I tried to recreate this instance. It first asked for the missing iopart.cls documentclass. I could get that from a GitHub repository belonging to Tianjin University named "etgroup". You can simply find it by searching "iop latex template" in Github. After the second compilation, it asked for a class dependency named iopart10.clo(it's available in the same repository).
Finally, after the third compilation, I could get a PDF output(Please see the figure attached).
Solution: If you are using a local LaTeX IDE/Studio, I recommend updating the packages you are using. Sometimes there are conflicts between some packages but they usually resolve quickly by releasing an update and you might see that there was nothing wrong with your commands.
Alternatively, you may try using an online LaTeX editor. They always have the last version of the most common packages and are equipped with multiple LaTeX render engine types.

Augment latex citation with specific table (or figure) reference

How do I include a specific table within a latex citation, i.e., what's the syntax? In other words, I'd like to cite table 11.1 in the "Handbook of Hydrology" by David Maidment. In my BibTex text file, the reference is:
Author = {Maidment, David R},
Isbn = {0-07-039732-5},
Publisher = {McGraw-Hill},
Address = {New York, USA},
Title = {Handbook of Hydrology},
Year = {1993}}
and so in the tex file that invokes this reference, it's easy enough to add ...\citep{maidment1993}..., but if I want the output to also include table 11.1, as in "...(Table 1.1; Maidment, 1993)." and not merely "(Maidment, 1993)", how do I do that in the .tex file? I tried \citep{Table 11.1 maidment1993}, but not surprisingly, that doesn't work.
You can add the table as optional argument. For example with biblatex:
\cite[Table 11.1]{knuth:ct}

Bibtex saying empty bibliography when it is not empty

So I am trying to print my bibliography on my LaTex file and am having trouble. The package I am using is
\usepackage[backend=biber, style=alphabetic, sorting=ynt]{biblatex}
At the end of my document (still inside the document section though), I use \printbibliography and am being told "Empty bibliography on line 53" (that is the line that the \printbibliography is on). Inside of my bibliography I have this:
title={The traveling salesman problem},
author={J{\"u}nger, Michael and Reinelt, Gerhard and Rinaldi, Giovanni},
journal={Handbooks in operations research and management science},
Any ideas why my bibliography is not showing? I am using Overleaf btw.

LaTEX: changing the format of citation in References to list authors' last name first

It seems the format in the Reference section is a little off! Can you please show me how to format the citation to list authors' last name first?
Thanks all.
Here is the current form in the Reference section:
C. B. Grimmond, A. Isard, and J. Belding. Development and evaluation of
continuously weighing mini-lysimeters. Agricultural and Forest Meteorology,
62(3-4):205{218, 1992.
I use BibDesk to organize the citation database. Here is what I am using in the TeXstudio:
You can try to change the Bibtex Bibliography style to 'acm' or 'apalike'
Read more about other styles:

Inserting code in this LaTeX document with indentation

How do I insert code into a LaTeX document? Is there something like:
\begin{code}## Heading ##
The only thing that I really need is indentation and a fixed width font. Syntax highlighting could be nice although it is definitely not required.
Use listings package.
Simple configuration for LaTeX header (before \begin{document}):
You can change default language in the middle of document with \lstset{language=Java}.
Example of usage in the document:
import javax.swing.JApplet;
import java.awt.Graphics;
public class Hello extends JApplet {
public void paintComponent(Graphics g) {
g.drawString("Hello, world!", 65, 95);
Here's the result:
You could also use the verbatim environment
Here is how to add inline code:
You can add inline code with {\tt code } or \texttt{ code }. If you want to format the inline code, then it would be best to make your own command
Also, note that code blocks can be loaded from other files with
breaklines isn't required, but I find it useful. Be aware that you'll have to specify \usepackage{ listings } for this one.
Update: The listings package also includes the \lstinline command, which has the same syntax highlighting features as the \lstlisting and \lstinputlisting commands (see Cloudanger's answer for configuration details). As mentioned in a few other answers, there's also the minted package, which provides the \mintinline command. Like \lstinline, \mintinline provides the same syntax highlighting as a regular minted code block:
This is a sentence with \mintinline{python}{def inlineCode(a="ipsum)}
Specialized packages such as minted, which relies on Pygments to do the formatting, offer various advantages over the listings package. To quote from the minted manual,
Pygments provides far superior syntax highlighting compared to conventional packages. For example, listings basically only highlights strings, comments and keywords. Pygments, on the other hand, can be completely customized to highlight any token kind the source language might support. This might include special formatting sequences inside strings, numbers, different kinds of identifiers and exotic constructs such as HTML tags.
Minted, whether from GitHub or CTAN, the Comprehensive TeX Archive Network, works in Overleaf, TeX Live and MiKTeX.
It requires the installation of the Python package Pygments; this is explained in the documentation in either source above. Although Pygments brands itself as a Python syntax highlighter, Minted guarantees the coverage of hundreds of other languages.
\begin{minted}[mathescape, linenos]{python}
# Note: $\pi=\lim_{n\to\infty}\frac{P_n}{d}$
title = "Hello World"
sum = 0
for i in range(10):
sum += i
Use Minted.
It's a package that facilitates expressive syntax highlighting in LaTeX using the powerful Pygments library. The package also provides options to customize the highlighted source code output using fancyvrb.
It's much more evolved and customizable than any other package!
A very simple way if your code is in Python, where I didn't have to install a Python package, is the following:
The following is some Python code
# A comment
x = [5, 7, 10]
y = 0
for num in x:
y += num
which looks like:
Unfortunately, this only works for Python.
Since it wasn't yet mentioned here, it may be worth to add one more option, package spverbatim (no syntax highlighting):
Your code here
Also, if syntax highlighting is not required, package alltt:
Your code here
Use Pygments !