1

I'm working in Windows 10 using TexStudio on TexLive 2018 distro.
I'm writing my bachelor final thesis and I need to use a document class defined by my academic department. I have a .cls file named "Tptesi2.cls" and my .tex file starts with \documentclass[a4paper,oneside]{Tptesi2}.
The problem is that when I bring the mouse pointer on "Tptesi2", TexStudio show a little box that says

Class: Tptesi2 (non trovato)

that in italian means "class not found". The document is compiled with a warning

destination with the same identifier (name{page.i}) has been already used, duplicate ignored \relax l.91 \cleardoublepage [1

and it looks ok, but unfortunately I can't be sure of it because I don't have a thesis sample with this document class.
I gave a look to the folder C:\texlive\2018\tex\latex and I found many folders containing .cls files corresponding to document classes that are recognized by TexStudio, so I create a folder with the same "Tptesi2" and I put the file in it.
But this approach didn't work, so I tried to follow the steps described in Where do I place my own .sty or .cls files, to make them available to all my .tex files? but also in this way I didn't solved the problem. I'm missing some configuration on TexStudio or I put the file in the wrong folder, or both?

EDIT

TexStudio continues to show the same message, but I noticed that right clicking on the class name, left clicking on "show documentantion" the docs are showed correcly.

Jul10
  • 111
  • 2
    You can safely ignore this message from texstudio. If latex would not find the documentclass you would get a ton of error messages in the .log file and no sensible output. Actually I get this toltip for every documentclass, even for the standard latex classes. – samcarter_is_at_topanswers.xyz Sep 07 '18 at 20:50
  • 1
    About the warning you get: this looks as if the same name is used for multiples labels. You should check this to make sure all the cross references go to the correct location. – samcarter_is_at_topanswers.xyz Sep 07 '18 at 20:54
  • 2
    It would be better to place your .cls file not in C:\texlive\2018\tex\latex, otherwise it might be removed when you upgrade your tex distribution. – samcarter_is_at_topanswers.xyz Sep 07 '18 at 20:55
  • Thanks for the replies @samcarter. About the multiple labels, I should check if a package is loaded both in the.cls file and my .tex file,right? – Jul10 Sep 07 '18 at 21:01
  • The warning is not about packages. Check in your document if you use two \label with the same name, e.g. two times \lable{foo} – samcarter_is_at_topanswers.xyz Sep 07 '18 at 21:06
  • If you cannot find the source of the warning, you could try to trim your document down to a minimal working example (MWE) that still produces the warning and we can probably help you. – samcarter_is_at_topanswers.xyz Sep 07 '18 at 21:09
  • Maybe there's something like \setcounter{page}{1} that resets page number back to 1 in your document. That's usually the case when such warnings show up. (for example, if you had wanted the cover page to be page i, but also your first chapter to be on page 1.) – Troy Sep 08 '18 at 00:13
  • @Troy exactly, intoduction pages are counted using roman numbers, instead in all other chapters pages are numbered using arabic numbers. Can I ignore this warning or should I fix it? And how? – Jul10 Sep 08 '18 at 08:21
  • 1
    @HJuls2 You can ignore it. But if it really bothers you, pass pageanchor=false when loading the hyperref package in your preamble. Or if hyperref is loaded inside Tptesi2.cls, you may try PassOptionsToPackage{pageanchor=false}{hyperref} before \documentclass{Tptesi2} in your .tex file. – Troy Sep 08 '18 at 13:46
  • @Troy Thank you very much, for now I'm going to accept your first advice ignoring the warning, because I have only a little experience with Latex, I'll consider to fix in a later time. – Jul10 Sep 08 '18 at 13:53
  • 4
    I'm voting to close this question as solved in comments. – Troy Nov 28 '18 at 05:17

0 Answers0