# [Tex/LaTex] How to cross reference theorem lemma etc as for example “Theorem 1” in LyX

cross-referencinglyxtheorems

I have loaded the theorem by type and theorem by type within Chapter (TIP for learner:add the first in order to add the second).

So I use theorem environment for different types: proposition, corollary, lemma etc.

I cannot find solution how to cross reference them in the format of "Proposition 1.1". The manual does not help either. Please provide a learner-friendly step-by-step guide! (For example, do I need to load anything to the default LyX first? Which LaTeX code has to be pasted etc? )

Urgent help needed as my thesis deadline is one week later!

The following shows why I got stuck:

1: Under corollary environment, I click right after the Corollary 1.1 and insert a label, LyX automatically shows "Under-the-same" in lable context, so I changed it into Corollary 1.3

2: I insert cross reference in the text as "formatted reference".

3: The cross reference result in PDF does not include "Corollary" caption, only 1.3:

Update: I just found that this normal under auto cross-references which is used by Classicthesis template, according to its explanation:

So I just want to know how to input the reference label manually so that it shows "Proposition 1.1" in color in PDF? Or the ultimate solution by changing LaTeX code in the config file it it is not too complex?

## UPDATE for learners

I just realized that I can change the style of crossreference in document->setting->pdf properties-> tick "customize hyperref options"->hyperlinks. You can delete the red frame or make them in color or without color!

You need to Insert>Label within your theorem or corollary. Let's say the label is cor:myprecious. It might be that autorefname hasn't been defined for these environments, so you'll have to add
\providecommand{\thmautorefname}{Theorem}

either to classicthesis-config.tex (say, around line 230) or your Document>Settings>Preamble You will then insert an autoreference either in a TeX box (ctrl-L) \autoref{cor:myprecious} or by using a custom inset as described in the manual (screenshot above)