I want the first letter of the paragraph to be in uppercase.

Suppose that we have this sentence:

\cref{fig:moon} shows the color of the moon.

I want the output to look like this:

Fig. 1 shows the color of the moon.

Not like:

fig. 1 shows the color of the moon.

\includegraphics[scale=0.250]{moon color}
\captionof{figure}{Color of the moon} 
  • Do you want that option globally or just for that case? – current_user Aug 2 '18 at 13:56
  • 2
    Doesn't \Cref{fig:moon} do the job? – Bernard Aug 2 '18 at 13:58
  • No because I want to maintain the Fig.1 in blue color as it's used in elsevier latex . Also, I want to apply this MAJ option only for some Fig not for all figs and when I used \cref{fig:moon} we get Figure and I want Fig not Figure – kerdouj kardouj Aug 2 '18 at 14:14

There is an answer by @Werner to this question here. Since this is on stackoverflow and not here in Tex.SX, I shamelessly cite his answer, happy to delete it if someone manages to import this question to make it a duplicate:

This is clearly outlines in the cleveref documentation.

You can either use \Cref, or pass the package option capitalise:

enter image description here

See \cref{fig:myfigure} or \Cref{fig:myfigure}.
  \caption{Some figure}\label{fig:myfigure}

If you wish to customize the way \Cref prints (output Fig. rather than Figure), add

\Crefname{figure}{Fig.}{Figs.}% {<type>}{<singular>}{<plural>}
  • In fact there are two problems here : the first one when I capitalise I don't have the Fig.1 in blue color as it should be in elsevier template the second problem is when I capitalise all Figs are capitalised and I don't want this I want to capitalise only some Figs – kerdouj kardouj Aug 2 '18 at 14:07
  • @kerdoujkardouj Then you just have to change the creflabelformat as described in the package's documentation. – TeXnician Aug 2 '18 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.