On Mon, Jul 18, 2011 at 3:47 AM, Uwe Stöhr <[email protected]> wrote:
> Am 17.07.2011 21:33, schrieb trss: > > > But you can also automatize the reference name. How to do this is >>> explained >>> in sec. 3.4.2 "Automatic Reference Naming" of the EmbeddedObjects manual >>> that you find in LyX's Help menu. >>> >>> Okay. Took a look but the post >> http://permalink.gmane.org/**gmane.editors.lyx.general/**70031<http://permalink.gmane.org/gmane.editors.lyx.general/70031>says >> that the >> "Formatted Reference" is a better way. I might go with your suggestion >> though since I'm running out of time. Thanks. >> > > Automatic reference names should work fine. I'm the author of the thesis > template and will have a look what it wrong with it the next days. But I > also wrote my thesis using this template and could use automatic reference > naming without problems. > > I just got it figured. The automatic reference naming works fine. It only doesn't work for <reference> on page <page> or I haven't figured out how to make that happen. I tried noobish things like: \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} \AtBeginDocument{\renewcommand{\ref}[2]{\mbox{\autoref{#1#2}}}} which failed to work no doubt. I thought it would be like the overloading concept in programming languages. :P There was also a problem with section, subsection, subsubsection, paragraph and subparagrah being named with a small letter by default by the author of autoref. This creates problems when they appear at the beginning of the sentence. This problem is addressed in http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing#The_hyperref_package_and_.5Cautoref.7B.7Dand I used that suggestion to get the following which finally works for me. \AtBeginDocument{\renewcommand{\ref}[1]{\def\sectionautorefname{Section}\def\subsectionautorefname{Subsection}\def\subsubsectionautorefname{Subsection}\def\paragraphautorefname{Paragraph}\def\subparagraphautorefname{Subparagraph}\mbox{\autoref{#1}}}} Of course avoiding usage of <reference> on page <page>. Thanks -- trss
