LaTeX中带有文字的引用 [英] References with text in LaTeX

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

问题描述

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

In LaTeX you can easily reference a section by using \label{} next to a section and then \ref{} 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~\ref{section:my}.

输出如下:

1. My Section

This is a reference to Section 1.

我想拥有:

This is a reference to 1. My Section.

推荐答案

看看这个Wiki:

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 \nameref{marker} we defined...

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

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