LaTeX forum ⇒ MiKTeX and proTeXtMiKTex 2.9 build pdf with no toc/hyperlinks Topic is solved

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
NikoKatich
Posts: 4
Joined: Mon Mar 28, 2016 1:57 pm

MiKTex 2.9 build pdf with no toc/hyperlinks

Postby NikoKatich » Mon Mar 28, 2016 2:17 pm

Hi there!

In texstudio pdf compilation works fine using pdflatex.
But if I run cmd and pdflatex.exe with the same parameters, output pdf appears without hyperlinks (TOC and all hyperlinks in document are absent).

In cmd (c:\Program Files\MiKTeX 2.9\miktex\bin\x64>) I use the following command:

  1. pdflatex.exe -synctex=1 -interaction=
  2. nonstopmode c:\test\1\2\test.tex -output-directory "C:\test\1\2"

I aslo try to run this command for several times, but the result is the same (pdf without toc and links).

In my preamble hyperlink support looks like:
  1. \usepackage[colorlinks,urlcolor=black,linkcolor=black,pagecolor=black]{hyperref}


I want to build my docs automatically using TeamCity, so I need some kind of command that can build the same document as texstudio that I use as editor.

What I'm doing wrong?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9088
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Mar 28, 2016 11:10 pm

Hi Niko,

welcome to the forum!

Perhaps execute pdflatex in the same directory as your document is.

Such as:

  1. cd c:\test\1\2
  2. c:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe -synctex=1 -interaction=
  3. nonstopmode test.tex


Stefan
Site admin

NikoKatich
Posts: 4
Joined: Mon Mar 28, 2016 1:57 pm

Postby NikoKatich » Tue Mar 29, 2016 9:49 am

Hi, Stefan!

Thanks so much for reply!
It works (copy pdflatex.exe to the folder with my project).

User avatar
Stefan Kottwitz
Site Admin
Posts: 9088
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Mar 29, 2016 10:11 am

Hi Niko,

it would be better to add the file path to the Windows path variable, so Windows would find the original pdflatex.exe. I just don't know how to explain this for Windows, as I use Linux and Mac OS. But if it works for you, fine. Just to mention it for the case somebody else reads it.

Keep in mind that an update of TeX, which may update pdflatex.exe, may need to copy it again over the old one.

Well, you could make a batch file (.bat) which calls the original pdflatex.exe with arguments. Or does the whole translation of this document like written here.

Stefan
Site admin

NikoKatich
Posts: 4
Joined: Mon Mar 28, 2016 1:57 pm

Postby NikoKatich » Tue Mar 29, 2016 10:30 am

Hi Stefan,
I've made a .bat file, that calls pdflatex.exe with all nessecary parameters.
Thanks again ;)


Return to “MiKTeX and proTeXt”

Who is online

Users browsing this forum: No registered users and 4 guests