LaTeX 中的文本参考 [英] References with text in LaTeX

查看:19
本文介绍了LaTeX 中的文本参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 LaTeX 中,您可以通过使用部分旁边的 label{} 然后使用 ef{} 创建引用来轻松引用部分.但是,引用仅包括节的编号,或带有 pageref{} 的页面.我想插入一个包含该部分文本的参考.

In LaTeX you can easily reference a section by using label{} next to a section and then ef{} to create the reference. However, the reference only includes the number of the section, or the page with pageref{}. I would like to insert a reference containing the text of the section.

例子:

section{My Section}
label{section:my}

This is a reference to Section~
ef{section:my}.

输出如下:

1. My Section

This is a reference to Section 1.

我想要:

This is a reference to 1. My Section.

推荐答案

看看这个wiki:LaTeX/标签和交叉引用:

hyperref 包自动包含 nameref 包和一个类似命名的命令.它插入与节名称相对应的文本,例如:

The hyperref package automatically includes the nameref package, and a similarly named command. It inserts text corresponding to the section name, for example:

section{MyFirstSection}
label{marker}
section{MySecondSection} In section 
ameref{marker} we defined...

这篇关于LaTeX 中的文本参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆