emacs:使用标签导航多文件乳胶文档
我发现 Emacs 标签 是一个非常有用的导航功能源代码可以位于不同的文件中。由于我的一些 LaTeX 文档非常长并且有很多 \include
,我认为在 LaTeX 中使用 Emacs 标签功能会是一件好事(有时我花了太多时间尝试例如,找到某个小节)。 Reftex 有一个很好的功能,由命令 reftex-toc
提供,可用于多文件文档,但我的印象是,使用 find-tag 更容易找到某些未知部分(除非有人能说服我)否则)。
但是,至少根据我的经验,命令 ctags -e
无法正确解析我的一些 .tex 文件(例如,某些现有部分不可用),并且当我尝试使用时,情况会变得更糟具有多文件乳胶文档(即具有许多\include
)。所以我有以下问题:您是否使用标签功能来导航多文件 LaTeX 文档?你有类似的问题吗?如果有的话,你会使用任何 hack 吗?最后一个问题:bibtex 文件怎么样?您知道如何在 bibtex 文件中使用标签功能吗?
如果您认为 Emacs 提供了更好的方法来浏览 LaTeX 多文件文档,也请分享:-)
干杯!
I find Emacs tags a very useful feature to navigate through source code that can be in different files. Since some of my documents in LaTeX are very long and with many \include
's, I thought it would be a nice thing to use the Emacs tags feature with LaTeX (sometimes I spend too much time trying to find a certain subsection, for instance). Reftex has a nice feature provided by the command reftex-toc
with works with multifile documents, but I have the impression that it's easier to locate some unknown section with find-tag instead (unless if someone can convince me otherwise).
However, at least in my experience, the command ctags -e
does not parse some of my .tex files correctly (e.g., some existing sections are not available), and things get worse with I try to use with multifile latex documents (i.e., with many \include
's). So I have the following questions: do you use the tags feature to navigate multifile LaTeX documents? Do you have similar problems and, if you do, do you use any hack? And the last question: what about bibtex files? Do you know of a way of using the tags feature with bibtex files?
And if you think that Emacs provides better ways to navigate through LaTeX muiltifile docs, please also share :-)
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 reftex-toc。这很棒,特别是对于报告或论文等长文档。但是,如果我正在写一篇较短的论文(或格式奇怪的论文),
reftex-toc
可能不会削减它,或者它可能太慢(Cc = 是在键盘上打字有点尴尬),在极少数情况下,我使用名为ido-goto-symbol
的 hack,我在 emacswiki 上找到了。不过,不适用于多文件文档。总之,我认为 reftex-toc 是处理大型文档的方法。如果您正在寻找难以导航到的标题,则可能值得重组文档。
I use
reftex-toc
. It's great, especially for long documents such as a report or a thesis. But if I'm writing a shorter paper (or a strangely formatted paper),reftex-toc
might not cut it, or it might be too slow (C-c = is a bit awkward to type on my keyboard), and in those rare situations, I use a hack calledido-goto-symbol
, which I found somewhere on emacswiki. Not good for multifile documents, tho.In summary, I think
reftex-toc
is the way to go for large documents. If you are looking for headers that are hard to navigate to otherwise, it might be worth to restructure the document.您可以通过键入以下内容获得所有部分的大纲菜单:
另外,来自 AucTeX 备忘单< /a>,其中列出的最后 5 个命令与导航有关:
AucTeX 也支持多个文件。
You can get an outline menu of all your sections by typing:
Also, from the AucTeX cheat sheet, where the last 5 commands listed pertain to navigation:
AucTeX supports multiple files, too.