On 09/24/2015 04:26 PM, Sarah wrote:
Hi,

I've uploaded file that I've created while following the tutorial. Hopefully this will make my issue more clear to you all.

Yes, thanks, that is helpful.

So your file looks like:

   If you want to know more about this document, then see Section
   [Ref+Text:sec:About-This-Document], which can be found on page.

This is exactly what the tutorial says to do, but it is obviously ungrammatical. The "which can be found on page" part seems to be a leftover from a previous version. I've removed it for the next release. (Thanks!)

What happens with the "Ref+Text" type of cross-reference is that, if that section began on a different page from the one the cross-reference is on, then you will get something like "Section 2 on page 5" in the output. If, as in your case, it is on the same page, you just get "Section 2". This is a very cool aspect of how LaTeX works. It can figure out for you whether you need to put a page number. It will even do things like "Section 2 on the preceding page". Add some random text before the cross-reference to force it to the next page, and you can see for yourself.

If you actually did want it to read "which can be found on page 5", or whatever, then you could make the first cross-reference just have the format "<reference>" and then add another cross-reference after the word "page". The label would be the same, but the format would be "<page>". Alternatively, you could remove the words "on page" and use the format "On page <page>". Then you get as output "on page 5" or "on the preceding page" or even "on the current page", depending. Try it.

Richard

LyX Document

-Sarah

On 9/24/15 1:10 PM, Sarah wrote:
So sorry, I forgot to include in my original message that I'm working on a Mac machine. OS X 10.9.5

On 9/24/15 11:27 AM, Sarah wrote:
Hi,

I'm working through the LyX Tutorial and I've encountered a problem in Section 3.4.2: Your first cross-reference. I have followed the steps outlined in this section:

  * Applied the label "sec:About-This-Document" at the end of the
    title line for Section 2 of my document (as directed in Section
    3.4.1 in the tutorial)
  * Typed the suggested text, "If you want to know more about this
    document, then see Section, which can be found on page." within
    Section 2 of my document
  * Placed the cursor after the word "Section"
  * Used the Cross Reference toolbar button
  * Selected "<reference> on page <page>" from the "Format"
    drop-down menu in the Cross-reference dialog
  * Selected the label "sec:About-This-Document"


The reference label "Ref+Text: sec:About-This-Document" then appears after the word "Section" in my text. However, when I view the .pdf file, no page information is published. The sentence reads: "If you want to know more about this document, then see Section 2, which can be found on page." Information is published for the Section but not for the page.

Please let me know if you see an error in my steps. This particular format is not completely necessary for my needs, and I can fix the problem manually by including another cross-reference at the end of the word "page" and using the "<page>" format in the Cross-reference dialog, but I'd like to know whether I am creating the problem or the format contains a bug.

Thanks.
--
Sarah Davis



Reply via email to