It wasn´t my intention, to not provide an information. It is just, that I am a LaTeX noob and have only very few knowledge about it. Thats why I am using LyX.
Now, I deleted some comments and "chapter-includes" to build a minimal example.
here we go for the "template.tex"
Code: Select all
\NeedsTeXFormat{LaTeX2e}
\documentclass[a4paper, twoside, 11pt]{report}
\newif\ifmakeindex
\makeindextrue % generate index
%\makeindexfalse % don't generate index
\ifmakeindex
\usepackage{makeidx}
% Stichwortverzeichnis erstellen
\makeindex
\fi
\newif\ifenglish
\englishfalse % german document
\usepackage[margin=1cm,format=hang,font=small,labelfont=bf,textfont=sl]{caption}
\usepackage{subfigure}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
% Unterstuetzen von deutschen Umlauten
\usepackage{t1enc}
\usepackage{courier}
\usepackage{bibgerm}
\usepackage{cite}
\usepackage{fancyheadings}
\usepackage{float}\usepackage{verbatim}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{ifthen}
\usepackage{longtable}
\usepackage{varioref}
% Kommando \vref verweist mit Seitenzahl
\usepackage{readfile}
% ASCII-File einbinden mit
% \readit{fftdb.m}{\tt}
% 2. Argument (\tt) gibt zu benutzende Schriftart an
\usepackage{shapepar}
\usepackage{setspace}
\usepackage{colortbl}
\usepackage{color}
\usepackage{xcolor}
\usepackage{listings}
\lstloadlanguages{}
\lstloadlanguages{C,C++,Java,Matlab,HTML,TeX,XML}
\lstset{
frame=lines, %Umrandung (single|none|shadowbox|lines|bottomline|topline|leftline)
framerule=1pt, %Rahmenbreite
tabsize=4, %Anzahl der Zeichen für ein TAB
backgroundcolor=\color{lightgray}, %Hintergrundfarbe
emph={}, %hebt die angegebenen Wörter hervor
emphstyle=\underbar, %unterstreicht hervorgehobene Wörter
columns=fixed, %Zeichenabstand (fixed | flexible | fullflexible)
lineskip=0pt, %Zeilenabstand
basicstyle=\ttfamily,%\ttfamily,
identifierstyle=\color{black},
commentstyle=\color{darkgreen},
stringstyle=\color{viola},
keywordstyle=\color{darkblue},
ndkeywordstyle=\color{black},
showspaces=false,
showtabs=false,
numbers=none, %Zeilennummern (none|left|right)
%numbertype=\ttfamily,
breaklines=true,
captionpos=b,
extendedchars=false
}
\def\boxes{yes}
\newif\ifpdfout
\ifx\pdfoutput\undefined
\pdfoutfalse
\else
\pdfoutput=1
\pdfouttrue
\fi
\ifpdfout % compiling with pdflatex
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf, .png, .jpg}
\usepackage[pdftex,
bookmarks,
%colorlinks=false, % instead of colors, now boxes are used for links
colorlinks=true,
urlcolor=black, %blue,
linkcolor=black, %red, %normal internal links
citecolor=black, %green, %citation links
%pagebackref, %link from references back to page of citation
linktocpage,
% im Inhaltsverzeichnis Link auf Seitenzahl (sonst Probleme bei langen Zeilen)
%breaklinks = true, % für Links länger als 1 Zeile
%hypertexnames = false, % für Links zu Figures?
bookmarksopen, %open all bookmark folders
bookmarksnumbered, %use section numbers with bookmarks
pdfpagemode=UseOutlines, %show bookmarks
% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdfpagelabels
plainpages=false, % eigene Seitenanker für römische/arabische Seitenzahlen
pdfpagelabels, % im Abode Reader Seitenzahl als z.B. "iii (3 von 20)" anzeigen
% pdfstartview=FitH
pdfstartview=FitV
]{hyperref}
\pdfadjustspacing=1 %%% force LaTeX-like character spacing
\pdfcompresslevel=9
\pdfcatalog{
% Catalog dictionary of PDF output
} %end of \pdfcatalog
\else % compiling with latex
\usepackage[dvips]{graphicx}
% \usepackage{color}
\DeclareGraphicsExtensions{.eps}
\usepackage[
dvips,
bookmarks,
colorlinks=false, % for final paper without colors
% colorlinks=true,
linktocpage,
bookmarksopen, %open all bookmark folders
bookmarksnumbered, %use section numbers with bookmarks
pdfpagemode=UseOutlines, %show bookmarks
pdfstartview=FitV
]{hyperref}
% hyperrefs are active is the pdf file after conversion
\hypersetup{
pdfcreator = {LaTeX with hyperref package},
pdfproducer = {dvips + ps2pdf}
}
\fi
% ------------------------
\input{macros.tex}
\mathchardef\CommaOrdinary="013B
\mathchardef\CommaPunct ="613B
\mathcode`,="8000 % , im Math-Mode aktiv ("8000) machen
{\catcode`\,=\active
\gdef ,{\obeyspaces\futurelet\next\CommaCheck}}
\def\CommaCheck{\if\space\next\CommaPunct\else\CommaOrdinary\fi}
\input{layout.tex}
% Umdefinition der Bezeichner
\addto\captionsngerman{% Eigene Bezeichner: Abb. -> Bild, Tab.-> Tabelle
\renewcommand{\figurename}{Bild}%
\renewcommand{\tablename}{Tabelle}%
\renewcommand{\lstlistlistingname}{Quellcodeverzeichnis} % default: "Listings"
\renewcommand{\lstlistingname}{Quellcode} % default: "Listing"
}
\addto\captionsenglish{%
\renewcommand{\lstlistlistingname}{List of Sourcecodes} % default: "Listings"
\renewcommand{\lstlistingname}{Sourcecode} % default: "Listing"
}
\begin{document}
\include{colors}
\pagenumbering{roman}
\include{title}
\end{document}
Thanks for your code:
But it doesn´t work when importing this to LyX after deleting the lines you mentioned and saving the code to a fresh file i.e. "test.tex". The error LyX throws is the same as in my opening-post.
It seems, that LyX has problems with hyperlinks behind an image, hasn´t it?
- graphicx is used in this way
Code: Select all
\usepackage[dvips]{graphicx}
% (...)
\usepackage[pdftex]{graphicx}
Thanks