DDE 控制 TeXnicCenter

发布于 2024-10-17 13:00:36 字数 252 浏览 2 评论 0原文

我使用 TeXnicCenter for LaTeX,并希望使用 DDE 控件来轻松查看 pdf 版本。 Acrobat X 似乎更改了服务器名称,这造成了破坏。 我尝试了“AcroViewR10”或“acroviewR10”等组合,但仍然不起作用。

作为解决方法,使用命令行参数“%bm.pdf”是可行的,但我每次都需要在重新编译之前手动关闭pdf。因此,需要额外点击一下。

任何人都可以通过修复 DDE 或如何在重新编译时自动关闭 pdf 来解决问题吗?

I use TeXnicCenter for LaTeX and would like to have the DDE controls working to easily view the pdf versions. Acrobat X seems to have changed the servername and this is breaking things.
I tried "AcroViewR10" or "acroviewR10" and other combination, but still it does not work.

As a work around, using command line argument "%bm.pdf" works, but I manually need to close the pdf everytime before recompiling. So, it takes an extra click or so.

Can anyone give some insight to solve the problem either by fixing DDE or how to close the pdf automatically when it is recompiled?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

可遇━不可求 2024-10-24 13:00:36

事实上,Martyn 和 Adam Nellis 的回答解决了这个问题。非常感谢各位。我只是一步一步地写出来,以便其他人可以使用它。

第一步:Adobe ReaderX
在 Adob​​e Reader X 中,转到“编辑”>“首选项”>“常规”,然后取消选中“启动时启用保护模式”。

步骤2:TeXnic中心
转到构建->定义输出配置文件->选择“Latex 转 PDF”->查看器选项卡

2.1。对于“查看项目的输出”和“正向搜索”

  • 命令:[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • 服务器:AcroViewR10 主题:控制

2.2。对于“关闭文档”

  • 命令:[DocClose("%bm.pdf")]
  • 服务器:AcroViewR10 主题:control
    (即使您使用 Adob​​e Reader 11,也可以使用此选项)

Actually, the answers from Martyn and Adam Nellis solved this problem. Thanks a lot, folks. I am just putting it step by step, so someone else can use it.

Step1: Adobe ReaderX
In Adobe Reader X, go to Edit>Preferences>General and uncheck "Enable Protected Mode at startup".

Step2: TeXnicCenter
Go to Build->Define Output Profiles-> choose "Latex to PDF" -> Viewer tab

2.1. For "View Project's Output" & "Forward Search"

  • Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • Server: AcroViewR10 Topic: control

2.2. For "Close Document"

  • Command: [DocClose("%bm.pdf")]
  • Server: AcroViewR10 Topic: control
    (use this option even if you use Adobe Reader 11)
当爱已成负担 2024-10-24 13:00:36

对于使用 Acrobat X pro 的用户,服务器应为 AcroviewA10,可执行文件应为 Acrobat.exe

For those using Acrobat X pro, the server should be AcroviewA10 and the excecutable should be Acrobat.exe

尤怨 2024-10-24 13:00:36

对于较新版本的 Adob​​e [DocClose] 不再起作用。所以你必须进行更新。在 texnicCenter 中按 Alt+F7,转到“查看器”选项卡并相应地遵循示例(适用于带有 Adob​​e11 的 Win7):

在可执行路径中,您必须具有类似“C:\Program Files (x86)\Adobe\Reader 11.0\Reader\ AcroRd32.exe”

查看项目的输出>>>选择“命令行参数”并输入
命令“正向搜索”中的“%bm.pdf”

>>选择“命令行参数”并输入
命令中的“%bm.pdf”

最后*最重要的选项*
运行 (La)Tex 之前关闭文档 >>>选择“DDE”并输入
命令中的“[AppExit]”
服务器中的“AcroViewR11”
主题中的“控制”

For the newer version of Adobe [DocClose] doesn't work anymore. So you have to make updates. In texnicCenter hit Alt+F7, go to Viewer TAB and follow the example accordingly (works on Win7 with Adobe11):

in Executable path you have to have something like "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"

View Project's Output >>> Choose "command line argument" and enter
"%bm.pdf" in command

Forward Search >>> Choose "command line argument" and enter
"%bm.pdf" in command

And finally *THE MOST IMPORTANT OPTION*
Close Document Before Running (La)Tex >>> Choose "DDE" and enter
"[AppExit]" in command
"AcroViewR11" in Server
"control" in Topic

甜心 2024-10-24 13:00:36

我意识到这个问题有点老了,但我一直在努力解决这个问题(有一段时间没有使用TeXnicCenter,所以在升级Adobe时没有注意到问题),这个线程是唯一为我解决问题的线程。不过,我必须结合使用上述答案,所以我想我会记录对我有用的内容。

我使用的是 Windows Vista Business 版、TeXnicCenter 1.0 和 Adob​​e Reader 10.0

转到“构建”->“定义输出配置文件”->“构建”->“定义输出配置文件”。选择“Latex => PDF”

1) 在查看器选项卡中,将可执行文件位置更改为指向

C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe

2) 查看项目的输出:选择 DDE 命令并输入

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

3) 正向搜索:选择 DDE 命令并输入

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

4) 运行前关闭文档 ( La)TeX: 选择 DDE 命令并输入

[AppExit]
Server: arcroviewR10    Topic: Control

特别是,我需要做的是第 4 点,尽管搜索了一段时间,这是我找到将 DDE 命令切换到 [AppExit] 的建议的唯一地方,并且它有效对待。谢谢克劳迪娅!

我根本不需要更改 Adob​​e Reader 设置(即启动时它仍处于保护模式)。

I realise this question is a little old, but I have just been struggling with this problem (not used TeXnicCenter for a wile, so hadn't noticed the problems when upgrading Adobe) and this thread is the only one that solved the problem for me. I had to use a combination of the above answers, though, so I thought I would document what worked for me.

I am using Windows Vista Business edition, TeXnicCenter 1.0, and Adobe Reader 10.0

Go to Build->Define Output Profiles-> choose "Latex => PDF"

1) In the viewer tab, change the executable location to point to

C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe

2) View project's output: Select DDE command and enter

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

3) Forward search: Select DDE command and enter

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

4) Close document before running (La)TeX: Select DDE command and enter

[AppExit]
Server: arcroviewR10    Topic: Control

In particular, it was point 4 that I needed to do, and despite searching a while, this is the only place I have found advice to switch the DDE command to [AppExit] and it worked a treat. Thanks Claudia!

I have not needed to change the Adobe Reader settings at all (i.e. it is still in Protected Mode at Startup).

抱着落日 2024-10-24 13:00:36

我的设置是:

  • 可执行文件路径:C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe

对于“查看项目的输出”& “正向搜索”

  • 命令:[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • 服务器:AcroViewR10
  • 主题:控制

对于“关闭文档”

  • 命令:[DocClose("%bm.pdf") )]
  • 服务器:AcroViewR10
  • 主题:控制

这对我有用,除了两件事:

  1. 当 Acrobat Reader 关闭并且我按 F5 时,它将打开 Acrobat Reader,但不会打开文档,并且会显示错误消息。如果我关闭错误消息并再次按 F5(现在打开 Acrobat Reader),它将打开该文档。
  2. 当我按 F5 键并打开文档时,Acrobat Reader 不会成为顶部窗口(焦点仍位于 TexnicCenter)。

所以不是大问题,只是小烦恼。


编辑:

不确定它是否有区别,但在 Windows 注册表中键:

  • HKEY_CLASSES_ROOT\acrobat\shell\open\ddeexec\application
  • HKEY_LOCAL_MACHINE\SOFTWARE\Classes\acrobat\shell\open\ddeexec\application

两者的值都设置为“AcroviewR10” “(无引号)。

My settings are:

  • Path of Executable: C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe

For "View Project's Output" & "Forward Search"

  • Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • Server: AcroViewR10
  • Topic: control

For "Close document"

  • Command: [DocClose("%bm.pdf")]
  • Server: AcroViewR10
  • Topic: control

That works for me except for two things:

  1. When Acrobat Reader is closed and I press F5 it will open Acrobat Reader but will not open the document and will bring up an error message. If I close the error message and press F5 a second time (with Acrobat Reader now open) then it will open the document.
  2. When I press F5, and the document opens, Acrobat Reader does not become the top window (the focus stays with TexnicCenter).

So not major problems but just small annoyances.


Edit:

Not sure if it makes a difference but in the windows registry the keys:

  • HKEY_CLASSES_ROOT\acrobat\shell\open\ddeexec\application
  • HKEY_LOCAL_MACHINE\SOFTWARE\Classes\acrobat\shell\open\ddeexec\application

Both have values set to "AcroviewR10" (no quotes).

无需解释 2024-10-24 13:00:36

我使用 Acrobat Pro XI 并进行以下设置:

可执行文件路径:
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe(适用于 32 位版本)和
C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe(适用于 64 位版本)

查看项目的输出 & 正向搜索
“命令行参数”和“%bm.pdf”

关闭文档
“DDE”并在主题的服务器“控制”中的命令“AcroviewA11”中输入“[AppExit]”

I use Acrobat Pro XI and have the following settings:

Path of Executable:
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 32bit version) and
C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 64bit version)

View Project's Output & Forward Search
"command line argument" and "%bm.pdf"

Close document
"DDE" and enter "[AppExit]" in command "AcroviewA11" in Server "Control" in Topic

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文