MiKTeX and proTeXtMiKTex 2.9 build pdf with no toc/hyperlinks

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

MiKTex 2.9 build pdf with no toc/hyperlinks

Post by NikoKatich »

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:

Code: Select all

pdflatex.exe -synctex=1 -interaction=
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:

Code: Select all

\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?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

MiKTex 2.9 build pdf with no toc/hyperlinks

Post by Stefan Kottwitz »

Hi Niko,

welcome to the forum!

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

Such as:

Code: Select all

cd c:\test\1\2
c:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe -synctex=1 -interaction=
nonstopmode test.tex
Stefan
LaTeX.org admin
NikoKatich
Posts: 4
Joined: Mon Mar 28, 2016 1:57 pm

Re: MiKTex 2.9 build pdf with no toc/hyperlinks

Post by NikoKatich »

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: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: MiKTex 2.9 build pdf with no toc/hyperlinks

Post by Stefan Kottwitz »

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
LaTeX.org admin
NikoKatich
Posts: 4
Joined: Mon Mar 28, 2016 1:57 pm

Re: MiKTex 2.9 build pdf with no toc/hyperlinks

Post by NikoKatich »

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