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

前端 未结 3 979
深忆病人
深忆病人 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:45

    You can refer to sections by name:

    * Section One
    
    * Section Two
    
    * Links
      This is a number link: [[Section One]]
      This is a textual link: [[Section One][Some text for the link]]
    

    Here's the LaTeX output:

    \section{Section One}
    \label{sec:orgheadline1}
    
    \section{Section Two}
    \label{sec:orgheadline2}
    
    \section{Links}
    \label{sec:orgheadline3}
    This is a number link: \ref{sec:orgheadline1}
    This is a textual link: \hyperref[sec:orgheadline1]{Some text for the link}
    

提交回复
热议问题