LyXProblem with bookmarks/fncychap and the Lyx-Appendix

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
philippoe
Posts: 1
Joined: Sun Oct 09, 2011 11:49 pm

Problem with bookmarks/fncychap and the Lyx-Appendix

Post by philippoe »

Hi everybody,

as probably normal I am beginning my stay @latex-community because I need your advice:) I am currently writing my thesis with Lyx 2.0. I am using

- fncychap [Sonny] for my chapter styles
- hypperref (actually through the Lyx option "PDF Properties") for bookmarks etc.
- the \appendix command (again through the Lyx option "Start Appendix here")

Now the problem is that these three wont work together. I can use fncychap and hypperref together, no problem. I get nice bookmarks then. But as soon as I include the appendix command, my bookmarks in the pdf get messed up such that I only see the bookmark for my first chapter. Interestingly, this bookmark for the first chapter has the bookmark for the second chapter as its last section bookmark! And this second chapter bookmark has the third chapter as its last section bookmark and so on and so on... Does this give you guys any hint? The TOC is not affected by the way, everything good there! Also, if I dont use fncychap but only use hypperref and appendix, then there are no problems (only that my document looks very bad.).

I've done some google research on this and it seems that the hyperref package has problems with some other packages, right? Is there anything known on the problematic mentioned above? I could not find anything like this ...

To give you something like a minimum working example, this is my main file (which includes the other files). If you need anything else please tell me!

Code: Select all

% Preview source code

%% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,chapterprefix,chapterwithprefixline,intoc]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=29mm,bmargin=32mm,lmargin=30mm,rmargin=27mm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{3}
\setlength{\parskip}{\bigskipamount}
\setlength{\parindent}{0pt}
\usepackage{color}
\usepackage{babel}
\usepackage{array}
\usepackage{longtable}
\usepackage{float}
\usepackage{units}
\usepackage{textcomp}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\onehalfspacing
\usepackage[unicode=true,pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=true,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{cite}
%\usepackage{scrpage2}
%\usepackage{scalefnt}
%\usepackage{lmodern}
\usepackage[Sonny]{fncychap}
\usepackage[rflt]{floatflt}
%\usepackage{notoccite}
\usepackage{titlesec}
\usepackage{colortbl}
\usepackage{color}
\usepackage{array}
\usepackage{nicefrac}
\usepackage[font={footnotesize},format=hang]{caption}
\usepackage{wrapfig}
\usepackage{tocvsec2}


%\usepackage[T1]{fontenc}

\lhead{Chapter \thesection}
\chead{}
\rhead{\leftmark}
\lfoot{ \chaptermark}
\cfoot{\thepage }
\rfoot{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}

\definecolor{lightgray}{gray}{0.8} 

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\hyphenation{this-is-a-test}

\makeatother

\begin{document}


\pagenumbering{roman}



\include{chaps/Abstract}

\tableofcontents
\thispagestyle{plain}



\listoffigures
\thispagestyle{plain}
\clearpage
\listoftables
\thispagestyle{plain}
\clearpage



\include{chaps/nomenclature}



\thispagestyle{plain}

\pagenumbering{arabic}
\setcounter{page}{1}

\include{chaps/01_Introduction}

\include{chaps/02_FundamentalsOfRoboticExploration}

\include{chaps/03_WheelToolDesign}

\include{chaps/04_RoverToolDesign}

\include{chaps/05_ExperimentalTesting}

\include{chaps/06_CorrelationReport}

\include{chaps/07_Summary}

\lhead{}

\bibliographystyle{plain}
\nocite{*}
\bibliography{bibliography}


\appendix
\include{chaps/appendix}
\end{document}

Cheers and thanks a lot!!
Philipp

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply