GeneralForward Search using the "TeXify => PDF" Profile

General information and discussion about TeXnicCenter
Post Reply
par
Posts: 7
Joined: Tue Jun 05, 2007 11:16 pm

Forward Search using the "TeXify => PDF" Profile

Post by par »

Hello Folks,

I am using the TeXify => PDF profile and in the profile definition, the fields pertaining to forward search contain some DDE commands. Still, when I build and View output, it always opens the first page of the pdf.

I have never used the forward search before, so, any info on how to make it work will be great!

Thanks!

--- Par.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
countbela666
Posts: 64
Joined: Thu Apr 26, 2007 2:44 pm

Forward Search using the "TeXify => PDF" Profile

Post by countbela666 »

Hi Par,

AFAIK this special feature only works with the full version of Adobe Acrobat, you won't get it to work using the Adobe Reader only.

But there actually are some hacks or workarounds to achieve a forward search with the Adobe Reader. The following workaround was posted by Heiko Oberdiek in de.comp.text.tex:

Include the following code in your preamble:

Code: Select all

\usepackage{zref-abspage}
\makeatletter
\newcommand*{\HERE}{%
  \zref@label{HERE}%
}
\AtBeginDocument{%
  \hypersetup{%
    pdfstartpage=\zref@extractdefault{HERE}{abspage}{1}%
  }%
}
\makeatother
\usepackage[pdfstartview=FitH]{hyperref}
Now put the command \HERE in the place where you want to get your PDF file opened, compile and enjoy ;).

Regards
Marcel
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
par
Posts: 7
Joined: Tue Jun 05, 2007 11:16 pm

Re: Forward Search using the "TeXify => PDF" Profile

Post by par »

Thanks for the info. However, it did not work and gave the error as follows:

! Undefined control sequence.
<argument> \sf@counterlist

l.412 \begin{document}

?

Any suggestions?
par
Posts: 7
Joined: Tue Jun 05, 2007 11:16 pm

Re: Forward Search using the "TeXify => PDF" Profile

Post by par »

By the way, how to make it work if I have access to full acrobat version 6? That will be great!
User avatar
countbela666
Posts: 64
Joined: Thu Apr 26, 2007 2:44 pm

Forward Search using the "TeXify => PDF" Profile

Post by countbela666 »

par wrote: However, it did not work and gave the error as follows:
! Undefined control sequence.
<argument> \sf@counterlist

l.412 \begin{document}

?

Any suggestions?
Could you provide a minimal working example reproducing this error? The following MWE works fine for me:

Code: Select all

\listfiles
\documentclass[english]{article}
\usepackage{babel,blindtext,zref-abspage}
\makeatletter
\newcommand*{\HERE}{%
  \zref@label{HERE}%
}
\AtBeginDocument{%
  \hypersetup{%
    pdfstartpage=\zref@extractdefault{HERE}{abspage}{1}%
  }%
}
\makeatother
\usepackage[pdfstartview=FitH]{hyperref}
\begin{document}
  \section{sec1}
  \blindtext[3]\clearpage
  \section{sec2}
  \blindtext[3]\HERE\clearpage
  \section{sec3}
  \blindtext[3]
\end{document}
Maybe you have a problem caused by outdated packages. This is the file list written to the LOG file by the \listfiles command on my system (last update of TeX files was yesterday):

Code: Select all

 *File List*
 article.cls    2005/09/16 v1.4f Standard LaTeX document class
  size10.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
   babel.sty    2005/05/21 v3.8g The Babel package
 bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration
 english.ldf    2005/03/30 v3.3o English support from the babel system
blindtext.sty    2006/11/21 V1.7 blindtext-Package
  xspace.sty    2006/05/08 v1.12 Space after command names (DPC,MH)
zref-abspage.sty    2007/05/28 v2.1 Module abspage for zref (HO)
zref-base.sty    2007/05/28 v2.1 Module base for zref (HO)
etexcmds.sty    2007/05/06 v1.0 Providing prefix for e-TeX command names (HO)
infwarerr.sty    2007/06/14 v1.1 Providing info/warning/message (HO)
 auxhook.sty    2006/04/06 v1.1 Hooks for auxiliary files (HO)
atbegshi.sty    2007/06/06 v1.5 At begin shipout hook (HO)
   ifpdf.sty    2006/02/20 v1.4 Provides the ifpdf switch (HO)
hyperref.sty    2007/06/14 v6.76i Hypertext links for LaTeX
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
 hycolor.sty    2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO
)
  pd1enc.def    2007/06/14 v6.76i Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2006/02/14 v1.1 MiKTeX 'hyperref' configuration
kvoptions.sty    2007/06/11 v2.7 Connects package keyval with LaTeX options (HO
)
     url.sty    2005/06/27  ver 3.2  Verb mode for urls, etc.
 hpdftex.def    2007/06/14 v6.76i Hyperref driver for pdfTeX
 nameref.sty    2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty    2006/02/20 v3.0 Data extraction from references (HO)
  latex2.out
  latex2.out
 ***********
Regards
Marcel

// EDIT:

your error must have something to do with the subfig package, as this is the only package known to me, which makes use of a \sf@counterlist command. Nevertheless I was as well unable to reproduce the error by including subfig.
Listen to me children of the night, beyond the doors of darkness you will find
a thousand worlds for you to see here, take my hand and follow me...
par
Posts: 7
Joined: Tue Jun 05, 2007 11:16 pm

Re: Forward Search using the "TeXify => PDF" Profile

Post by par »

Thanks Marcel! I will take a close look at your response and my code and see what I find.

--- Par.
Post Reply