4

I am writing my thesis and I face a problem with the appendices.

My code is below:

   \documentclass[12pt]{book}

    % package to activate greek language - the sequence languages appear below is IMPORTANT!!!
    \usepackage[greek,english]{babel}
    \usepackage{varioref}
    %\usepackage{hyperref}
    \usepackage{float}
    \usepackage{multirow}
    % package to handle graphics
    \usepackage{graphicx}
    \graphicspath{{images/}}
    % package to handle multiple figures in a minipage
    \usepackage{subfigure}
    % package to extend math capabilities
    \usepackage{amsmath,amssymb,isotope}
    \usepackage[version=3]{mhchem}
    %package to activate XeTeX font manager
    \usepackage{fontspec}
    \usepackage[titletoc]{appendix}

    % DOCUMENT LAYOUT
    \usepackage{geometry} 
    \geometry{a4paper, textwidth=5.5in, textheight=8.5in, headheight= 15pt, marginparsep=7pt, marginparwidth=.6in}
    %\geometry{a4paper}
    \setlength\parindent{8mm}
    \setlength\parskip{5mm}

    % FONTS
    \usepackage{xunicode}
    \usepackage{xltxtra}
    \usepackage{xcolor}
    \defaultfontfeatures{Mapping=tex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode
    %\setromanfont [Ligatures={Common}, BoldFont={GFS Artemisia Bold}, ItalicFont={Gentium Italic}]{Gentium}
    %\setmonofont[Scale=0.8]{Monaco} 
    \setmainfont{Times New Roman} % You can set your main font here.

    % ---- CUSTOM AMPERSAND
    \newcommand{\amper}{{\fontspec[Scale=.95]{Gentium Italic}\selectfont\itshape\&}}

    % package to handle line spacing
    \usepackage{setspace}

    % HEADINGS
    \usepackage{sectsty} 
    \usepackage[normalem]{ulem} 
    \sectionfont{\rmfamily\mdseries\upshape\Large}
    \subsectionfont{\rmfamily\bfseries\upshape\normalsize} 
    \subsubsectionfont{\rmfamily\mdseries\upshape\normalsize} 

    % PDF SETUP
    % ---- FILL IN HERE THE DOC TITLE AND AUTHOR
    \usepackage[unicode, driverfallback=dvipdfmx, bookmarks, colorlinks, breaklinks, pdftitle={Theo J. Mertzimekis - A thesis template for UoA students},pdfauthor={tmertzi}]{hyperref}  
    \hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue} 

    % package for fancy style headers and footers
    \usepackage{fancybox}


    % redefine bullet symbols and section style
    \renewcommand\thesection{\arabic{section}.}
    \renewcommand{\labelitemi}{$\blacktriangleright$}
    \renewcommand{\labelitemii}{$\bullet$}

    \newcommand{\itemcheck}{\item[\checkmark]}
    \newcommand{\itembullet}{\item[$\bullet$]}
    \newcommand{\itemdiamond}{\item[$\diamond$]}
    \newcommand{\itemtriangleright}{\item[$\triangleright$]}
    \newcommand{\itemcirc}{\item[$\circ$]}
    \newcommand{\itemsquare}{\item[$\square$]}

    % change captions especially for greek language - if the document is in ENGLISH, they should vanish
    \addto\captionsenglish{%
      \renewcommand\prefacename{Πρόλογος}%
      \renewcommand\refname{Αναφορές}%
      \renewcommand\abstractname{Περίληψη}%
      \renewcommand\bibname{Βιβλιογραφία}%
      \renewcommand\chaptername{Κεφάλαιο}%
      \renewcommand\appendixname{Παράρτημα}%
      \renewcommand\contentsname{Περιεχόμενα}%
      \renewcommand\listfigurename{Κατάλογος Σχημάτων}%
      \renewcommand\listtablename{Κατάλογος Πινάκων}%
      \renewcommand\indexname{Ευρετήριο}%
      \renewcommand\figurename{Σχήμα}%
      \renewcommand\tablename{Πίνακας}%
      \renewcommand\partname{Μέρος}%
      \renewcommand\enclname{Συνημμένα}%
      \renewcommand\ccname{Κοινοποίηση}%
      \renewcommand\headtoname{Προς}%
      \renewcommand\pagename{Σελίδα}%
      \renewcommand\seename{βλέπε}%
      \renewcommand\alsoname{βλέπε επίσης}%
      \renewcommand\proofname{Απόδειξη}%
      \renewcommand\glossaryname{Γλωσσάρι}%
      }

    \usepackage{xgreek}

    \usepackage{csquotes}
    \usepackage[backref=true,backend=biber,style=authoryear]{biblatex}
    \addbibresource{bibliography.bib}

    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}
    \fancyhead[LE,RO]{\leftmark}
    \cfoot{\thepage}
    \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}

    \usepackage{afterpage}

    \newcommand\blankpage{%
        \null
        \thispagestyle{empty}%
        %\addtocounter{page}{-1}%
        \newpage}

    %%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%

    \begin{document}

    \setlanguage{greek} %% this is to activate greek hyphenation
    \chapter{Introduction}
    \chapter{Related Work}
    ...

    \begin{appendices}
        \chapter{Μοντέλο}
    \end{appendices}
\end{document}

The result is:

enter image description here

Does anyone know why this box is appeared next to letter A and how can I remove it?

sissythem
  • 151
  • 1
    Welcome to TeX.SE! – Mensch Apr 02 '19 at 20:13
  • Welcome again: Could you please edit your question? The end document is missing. – Sebastiano Apr 02 '19 at 20:27
  • 1
    Thank you both! I have updated the question – sissythem Apr 02 '19 at 20:30
  • 2
    I think the issue here is the usage of package xgreek and package appendix. Without it I do not get your box (I get an apostroph instead your box). Can you explain me what xgreek does for you? Why do you change the english words to be greek instead of using language greek as main language? Do you need english in your document or do you only use it in the bibliography? – Mensch Apr 02 '19 at 21:16
  • I need to use both greek and english languages in the thesis (e.g. I will use english terms) so I need to switch between these languages, but this package was included in the university's template. When you say to use greek as main language you mean in babel? I believe that without the xgreek package I should write the command to select a language each time I need to switch between those two. – sissythem Apr 03 '19 at 06:57

1 Answers1

1

I have removed the below commands:

  • \usepackage{xgreek}, which is causing the problem
  • \setlanguage{greek}

The box now is removed from the appendix whithout affecting the switching between English and Greek languages.

Mensch
  • 65,388
sissythem
  • 151