Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

LyX (v2.03) uses refstyle for cross references. By default if you use the GUI to create a reference it produces source that looks like:

\tabref{label1}
\figref{label2}

which produces an output like "figure 1.1 and table 1.1".

What I want is the capitalised equivalent:

\Tabref{label1}
\Figref{label2}

Which will give "Figure 1.1 and Table 1.1".

Is there a switch or something to pass to the refstyle package to always do uppercase? Or do I have to manually enter the \Tabref each time?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

refstyle uses a config file refstyle.cfg. You can make a copy in your local texmf tree or in your working directory. Edit the contents of you local refstyle.cfg file. Depending on the language you are using (default is english) change the spesific \RS<language> command. For example \RSenglish

%%-- ENGLISH ------------------------------------
\newcommand\RSenglish{%
    \def\RSrngtxt{\space to~}%........... Range:     figures 5 to 6
    \def\RSlsttwotxt{\space and~}%....... List two:  figures 5 and 6
    \def\RSlsttxt{, and~}%............... List more: figures 5, 6, and 7
    \def\RSparttxt{Part~}%............... Part     lowercase singular
    \def\RSpartstxt{Parts~}%.............          lowercase plural
    \def\RSParttxt{Part~}%...............          uppercase singular (sentence start)
    \def\RSPartstxt{Parts~}%.............          uppercase plural   (sentence start)
    \def\RSappendixname{appendix~}%...... Appendix lowercase singular
    \def\RSappendicesname{appendices~}%..          lowercase plural
    \def\RSAppendixname{Appendix~}%......          uppercase singular (sentence start)
    \def\RSAppendicesname{Appendices~}%..          uppercase plural   (sentence start)
    \def\RSchaptername{chapter~}%........ Chapter  lowercase singular
    \def\RSchaptersname{chapters~}%......          lowercase plural
    \def\RSChaptername{Chapter~}%........          uppercase singular (sentence start)
    \def\RSChaptersname{Chapters~}%......          uppercase plural   (sentence start)
    \def\RSsectxt{section~}%............. Section  lowercase singular
    \def\RSsecstxt{sections~}%...........          lowercase plural
    \def\RSSectxt{Section~}%.............          uppercase singular (sentence start)
    \def\RSSecstxt{Sections~}%...........          uppercase plural   (sentence start)
    \def\RSeqtxt{equation~}%............. Equation lowercase singular
    \def\RSeqstxt{equations~}%...........          lowercase plural
    \def\RSEqtxt{Equation~}%.............          uppercase singular (sentence start)
    \def\RSEqstxt{Equations~}%...........          uppercase plural   (sentence start)
    \def\RSfigtxt{figure~}%.............. Figure   lowercase singular
    \def\RSfigstxt{figures~}%............          lowercase plural
    \def\RSFigtxt{Figure~}%..............          uppercase singular (sentence start)
    \def\RSFigstxt{Figures~}%............          uppercase plural   (sentence start)
    \def\RStabtxt{table~}%............... Table    lowercase singular
    \def\RStabstxt{tables~}%.............          lowercase plural
    \def\RSTabtxt{Table~}%...............          uppercase singular (sentence start)
    \def\RSTabstxt{Tables~}%.............          uppercase plural   (sentence start)
    \def\RSfootntxt{footnote~}%.......... Footnote lowercase singular
    \def\RSfootnstxt{footnotes~}%........          lowercase plural
    \def\RSFootntxt{Footnote~}%..........          uppercase singular (sentence start)
    \def\RSFootnstxt{Footnotes~}%........          uppercase plural   (sentence start)
}
share|improve this answer

Add the following code to the document preamble:

\renewcommand{\tabref}{\Tabref}
\renewcommand{\figref}{\Figref}

This might break \tabref and \figref if you want lowercase but it should capitalize all table and figure cross references.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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