Questions tagged [cross-reference]

a notation or direction at one place (as in a document or file) to pertinent information at another place

308 questions
592
votes
11 answers

Cross-reference (named anchor) in markdown

Is there markdown syntax for the equivalent of: Take me to pookie ... this is pookie
Synesso
  • 34,066
  • 32
  • 124
  • 194
187
votes
5 answers

What do the &,<<, * mean in this database.yml file?

Up until now I have only used database.yml with each parameter called out explicitly, in the file below it uses some characters I do not understand. What does each line and symbol(&,*,<<) mean, how do i read this file? development: &default …
OpenCoderX
  • 5,613
  • 7
  • 29
  • 58
125
votes
6 answers

Adding a cross-reference to a subheading or anchor in another page

How to insert a cross-reference in a reST/Sphinx page to either a sub-header or anchor in another page in the same documentation set?
Sue Walsh
  • 1,253
  • 2
  • 8
  • 6
110
votes
6 answers

How do I make a reference to a figure in markdown using pandoc?

I'm currently writing a document in markdown and I'd like to make a reference to an image from my text. this is my text, I want a reference to my image1 [here]. blablabla ![image1](img/image1.png) I want to do that reference because after…
Romain Piel
  • 10,535
  • 15
  • 67
  • 105
103
votes
5 answers

Is there YAML syntax for sharing part of a list or map?

So, I know I can do something like this: sitelist: &sites - www.foo.com - www.bar.com anotherlist: *sites And have sitelist and anotherlist both contain www.foo.com and www.bar.com. However, what I really want is for anotherlist to also…
Ben
  • 56,956
  • 19
  • 113
  • 151
63
votes
3 answers

knitr/rmarkdown/Latex: How to cross-reference figures and tables?

I'm trying to cross-reference figures and tables in a PDF produced with knitr/rmarkdown. There are some questions on SO and tex.stackexchange (here and here, for example), that suggest the way to do this inline is to add \ref{fig:my_fig}, where…
eipi10
  • 81,881
  • 20
  • 176
  • 248
36
votes
1 answer

Retaining inline code inside references in Sphinx

In Sphinx, if I have the following heading declaration: .. _somestuff: ``this is code``, this is not! ============================== It renders, like this:     this is code, this is not! Which is good, but, if I use the reference, e.g: Have a look…
tjm
  • 7,214
  • 2
  • 26
  • 48
24
votes
4 answers

Simple cross import in python

I want to separate code in different class and put them to different files. However those class are dependent on each other. main.py: from lib import A, B def main(): a = A() b = B() a.hello() b.hello() if __name__ == '__main__': …
ts_pati
  • 460
  • 1
  • 4
  • 8
18
votes
5 answers

XML - Referencing Other XML Files

I'm new to XML, so this may be a fairly easy question to answer. I was wondering if there is a standard way of referencing external XML files from within other XML files. Let me give an example. Say you have a file which defines a single object…
Scott
17
votes
1 answer

Can't use :ref: with a Label using Sphinx doc

I have a problem with using Sphinx-doc's :ref: role, I put a label above a paragraph and then I try to link to that label from another doc but inside the same project. The label I use in one document: .. _hal_1k_1p: And the ref I try to use to link…
Raiu
  • 175
  • 1
  • 1
  • 6
13
votes
4 answers

Referencing long names with Python Sphinx

I'm working on documentation for my Python module (using Sphinx and reST), and I'm finding that when cross-referencing other Python objects (modules, classes, functions, etc) the full object name ends up being incredibly long. Often it is longer…
12
votes
3 answers

What's the difference in behaviour between :func: and :meth: roles in Python Sphinx?

The Sphinx documentation at http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-python-objects says, :py:func: Reference a Python function; dotted names may be used. The role text needs not include trailing parentheses to enhance…
Lone Learner
  • 12,094
  • 14
  • 66
  • 159
11
votes
1 answer

Cross-referencing functions from other submodule in Documenter.jl

Given a module hierarchy like module A module B; function foo end; end module C """ bar(x) Like [`foo`](@ref), but more `bar`. """ function bar end end end How could I cross-reference foo…
Fengyang Wang
  • 11,061
  • 1
  • 33
  • 63
11
votes
6 answers

Excel structured reference table syntax

I try to avoid using Excel too much, but when I do I like using structured references as they seem a lot cleaner to write. If I create a table called "table1" with columns "col1" and "col2" how would I reference the first row in "col1" using a…
Michael
  • 145
  • 1
  • 2
  • 10
10
votes
3 answers

How to avoid circular dependency caused by type hinting of pointer attributes in python

Consider the two modules (in the same folder): firstly, person.py from typing import List from .pet import Pet class Person: def __init__(self, name: str): self.name = name self.pets = [] # type: List[Pet] def…
1
2 3
20 21