How can I reference a section by number in org-mode export?

前端 未结 3 987
深忆病人
深忆病人 2021-02-07 08:20

I\'m working in org-mode and trying to generate a link to reference a section by its number, not its title.

* Section One
:PROPERTIES:
:CUSTOM_ID: sec:one
:END:
         


        
3条回答
  •  不思量自难忘°
    2021-02-07 08:55

    Tom Regner's approach works, however, you don't have to use dedicated target, you can still use custom_id link, but without a description. Like this:

    * Section One
    :PROPERTIES:
    :CUSTOM_ID: sec:one
    :END:
    
    * Section Two
    You can reference Section One with [[#sec:one]] but NOT
    [[#sec:one][Section One]], i.e., the link without description
    will get you the actual section number (1).
    

提交回复
热议问题