Generalhyperref problem with bibtex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

hyperref problem with bibtex

Post by faca »

Hello, I'm writing a paper to submit to a journal. The journal has its template, then I'm using it.

Here the template https://we.tl/t-WYkrn4wm4O

In the tex file, I substituted

Code: Select all

\begin{thebibliography}

by

Code: Select all

\bibliographystyle{ieeetr}
\bibliography{sample}
to use bibtex.
It works, but if I include

Code: Select all

\usepackage{hyperref}
I get the errors
1.
Missing number, treated as zero.

<to be read again>
s
l.1 \begin{thebibliography}{10}

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

2.

Code: Select all

Illegal unit of measure (pt inserted).

<to be read again> 
                   s
l.1 \begin{thebibliography}{10}
                               
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
3.

Code: Select all

Undefined control sequence.

The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.

 Learn more
\MakeUppercase ...ppercaseUnsupportedInPdfStrings 
                                                  
l.1 \begin{thebibliography}{10}
                               
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
even if in my tex file I don't have anymore

Code: Select all

\begin{thebibliography}
because I'm using bibtex.
Do you know how to fix ?

Recommended reading 2024:

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

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

faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

hyperref problem with bibtex

Post by faca »

anyone please?
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

hyperref problem with bibtex

Post by Ijon Tichy »

I've not loaded the template from the external link, because it would need JavaScript and for security reasons JavaScript is deactivated for most sites here.

Without Infominimal working example I can only tell you, that the bbl files generated by bibtex also contain a thebibliography environment. So you still have thebibliography using \bibliography{…} and error messages about it could happen.

BTW: Because you are using a journal template you could and maybe should ask the journal editor or maintainer of the template, if using ieeetr.bst and hyperref is OK and how they can be combined with the template. The community is not really responsible for proprietary templates.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
faca
Posts: 5
Joined: Mon Dec 27, 2021 9:44 am

hyperref problem with bibtex

Post by faca »

Ijon Tichy wrote:I've not loaded the template from the external link, because it would need JavaScript and for security reasons JavaScript is deactivated for most sites here.

Without Infominimal working example I can only tell you, that the bbl files generated by bibtex also contain a thebibliography environment. So you still have thebibliography using \bibliography{…} and error messages about it could happen.

BTW: Because you are using a journal template you could and maybe should ask the journal editor or maintainer of the template, if using ieeetr.bst and hyperref is OK and how they can be combined with the template. The community is not really responsible for proprietary templates.
Hello, if it can help, this is the project on overleaf https://www.overleaf.com/read/cwdsfhhpzhtk
Anyway, I will ask to the journal
abulgher
Posts: 1
Joined: Tue Feb 21, 2023 5:37 pm

hyperref problem with bibtex

Post by abulgher »

I got to this post, just to discover that I'm also having the same issue with hyperref and bibtex using the Cimento C template.

Have you found a solution meanwhile?

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

hyperref problem with bibtex

Post by MjK »

First of all, please note, I've used the Overleaf link.

I cannot recommend this template. The class has several issues with potentially unwanted spaced. The class uses \usepackage instead of \RequirePackage (which is indeed only a convention inside classes, but the recommendation in the clsguide is a strong one) etc. The template also always warns about combination of package caption with a not supported class, which should at least be explained. Better would be, if the maintainer would upload it to CTAN and contact the caption author to avoid the compatibility warning. I cannot find any license information. So it is not free and nobody but the maintainer can fix issues. (It is also not multilingual, but maybe this isn't a problem in this case.) The README.varenna cannot be loaded to the Overleaf editor, so it can be read only after downloading it etc. Naming it, e.g., README.txt (or making a README.md) would be better.

However, the main problem with the class and activating hyperref is it's redefinition of \@startsection, \@sect and \@ssect. These are incompatible with hyperref and result in a \setlength{\Hy@SectionHShift}{section}. As everybody should be able to realize, this is obviously wrong. So the class is incompatible with hyperref. And because the thebibliography definition uses the class' definition of \@startsection the error happens there.

A simple Infominimal working example to produce the error would be:

Code: Select all

\documentclass{cimento}
\usepackage{hyperref}
\begin{document}
\section*{Test}
\end{document}
So, if you want to use cimento class with hyperref you have to ask the class maintainer for fixing this issue. Contact information can be found in cimento.cls. But don't expect to much. The class has not been revised for more than 20 years! So maybe it is completely unsupported, in which case it also should not be used any longer.
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.
JohnLeite
Posts: 1
Joined: Mon Mar 06, 2023 2:03 pm

hyperref problem with bibtex

Post by JohnLeite »

Thanks for the solution. You made my day :)
Overall, if you want to guarantee that your Turkish translations visit https://pickwriters.com/turkish-translation-services here You can rely on their experience and resources to ensure that your documents are precisely translated and delivered on time.
Post Reply