LyXAppendixA

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
riccardotrezzi
Posts: 8
Joined: Sat Jul 05, 2014 1:39 pm

AppendixA

Post by riccardotrezzi »

Hello,

I'm using Lyx 2.1.4 on a Mac (El capitan).

When I compile my PDF, everything works fine.
However, the hyperlinks to the Appendixes (I have more than one) show as "AppendixA", "AppendixB", etc.. rather than "Appendix A", "Appendix B", ..

In other words, there is no space between "Appendix" and the letter identifying the Appendix.

Any idea how to fix this?

Thanks,
RT

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: AppendixA

Post by Stefan Kottwitz »

Hi Riccardo,

can you post your document as LaTeX export from LyX, here as attachment? This way we can find the cause.

You can remove text content from the exported copy, so you don't need to show the real content. Just so that we can verify the problem.

Stefan
LaTeX.org admin
riccardotrezzi
Posts: 8
Joined: Sat Jul 05, 2014 1:39 pm

Re: AppendixA

Post by riccardotrezzi »

Hi Stefan,
Thanks for your reply.
Please find attached a minimal working file in which I reproduce (and explain) the issue.
The file comes in two formats (.tex and .lyx). I also attach the PDF for your convenience.
Thanks a lot!
Riccardo
Attachments
Appendix_issue.lyx
(3.4 KiB) Downloaded 421 times
Appendix_issue.pdf
(18.73 KiB) Downloaded 258 times
Appendix_issue.tex
(1.4 KiB) Downloaded 392 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

AppendixA

Post by Johannes_B »

Yet another example that journal classes are often badly designed.*
Add \def\appendixname{Appendix } into your preamble after loading package babel.

* Doesn't matter though, the journal staff will convert your document to conform to the journal rules.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
riccardotrezzi
Posts: 8
Joined: Sat Jul 05, 2014 1:39 pm

AppendixA

Post by riccardotrezzi »

Hi! Thanks for your reply.

I put it at the end of the preamble as you suggested but unfortunately it did not work.

In the preamble I have what follows:

Code: Select all

\makeatletter

\def\ps@pprintTitle{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \let\@oddfoot\@empty
  \let\@evenfoot\@oddfoot
}

\makeatother

\usepackage{bm}

\usepackage{pdflscape}

\usepackage{changepage}

\let\cleardoublepage\clearpage

\usepackage{hyperref}

\usepackage{colortbl}

\definecolor{halfgray}{gray}{0.95}

\def\appendixname{Appendix }
Any idea why this might not work?
Thanks!
RT
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

AppendixA

Post by Stefan Kottwitz »

Hi Riccardo!

Johannes' tipp works, but you should do it after the preamble:

Code: Select all

\begin{document}
\def\appendixname{Appendix } 
Or, after loading babel, or at the end of the document preamble (Menu: Document / Settings, Preamble):

Code: Select all

\addto\captionsenglish{%
  \renewcommand\appendixname{Appendix }%
}
It's because of the way babel works, it applies its own definitions at the beginning of the document, so it could otherwise override your own settings. Don't worry, things look complicated sometimes, but we can tell you usually how to work with it.

Stefan
LaTeX.org admin
riccardotrezzi
Posts: 8
Joined: Sat Jul 05, 2014 1:39 pm

Re: AppendixA

Post by riccardotrezzi »

Hi!
Thanks a lot! It works nicely.
Thanks again!
RT
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

AppendixA

Post by Stefan Kottwitz »

Hi Riccardo!

No problem. :-) Feel free to talk here about any LyX or LaTeX issue.

Just by the way, a comment. In LaTeX (and it should be the same in Word) we define styles for formatting. We don't apply physical formatting repeatedly within the document. For example here:

Code: Select all

\begin{center}
\textbf{\Huge{}Appendix }\label{part:Appendix}
\par\end{center}
You can do that, and it works. But, \textbf{\Huge...} should be part of a macro.That's good for consistent headings, and a single point of changes. Just a late evening talk about that everything in LaTeX is about styles and macros and a document is free of direct formatting. :-)

Stefan
LaTeX.org admin
riccardotrezzi
Posts: 8
Joined: Sat Jul 05, 2014 1:39 pm

Re: AppendixA

Post by riccardotrezzi »

Eheheheh,
Indeed! Thanks for the advice!
RT
Post Reply