1

I use clean thesis, when I change my language all my fonts turned from helvetica to default Latex font. Now I have changed some code and almost all fonts changed except Header, title and simple document text. Its is very weird about simple text, because text in tables are changed also a bold text is changed to helvetica as wanted. Maybe you could help me?

    \documentclass[%
        paper=A4,                   % paper size --> A4 is default in Germany
        twoside=true,               % onesite or twoside printing
        openright,                  % doublepage cleaning ends up right side
        parskip=full,               % spacing value / method for paragraphs
        chapterprefix=true,         % prefix for chapter marks
        12pt,                       % font size
        headings=normal,            % size of headings
        bibliography=totoc,         % include bib in toc
        listof=totoc,               % include listof entries in toc
        titlepage=on,               % own page for each title page
        captions=tableabove,        % display table captions above the float env
        draft=false,                % value for draft version
    ]{scrreprt}%

    %\listfiles

    \usepackage{polyglossia} % babel-lithuaninan is not adapted to xelatex
    \setdefaultlanguage{lithuanian}
    \usepackage{tabularx}
    \usepackage{colortbl}
    \usepackage{listings}
    \usepackage{tcolorbox}
    \usepackage[                    % clean thesis style
        figuresep=colon,%
        sansserif=false,%
        hangfigurecaption=false,%
        hangsection=true,%
        hangsubsection=true,%
        colorize=full,%
        colortheme=bluemagenta,%
        bibsys=biber,%
        bibfile=bib-refs,%
        bibstyle=alphabetic,%
    ]{cleanthesis}

    %
    %reset font encoding after cleanthesis:}
    \usepackage[EU1]{fontenc}
    \renewcommand{\familydefault}{\sfdefault}
    %
    %redefined
    \renewcommand{\helv}{\sffamily\fontsize{9}{11}\selectfont}
    \renewcommand{\book}{\rmfamily\fontseries{m}\fontsize{11}{13}\selectfont}
    \renewcommand{\tgherosfont}{\sffamily\selectfont}


    \begin{document}

    \renewcaptionname{lithuanian}{\figurename}{Pav.}
    \renewcaptionname{lithuanian}{\tablename}{Lent.}

    \chapter{hello}

    \section{ą,ę,ė,įš,šį}

    ą,ę,ė,į,č,š,ų,ū.

\end{document}

Thanks in advance.

  • 2
    Use fontspec and \setmainfont{TeX Gyre Heros}. – Johannes_B Apr 26 '16 at 8:23
  • @Johannes_B I can't use fontspec, because of my language settings. But setmainfont changed my simple text, thank you! But my title and header is still default latex font. If i change to fontspec my title and headers change font, but not simple text :) Why this is happening? – Satnam Apr 26 '16 at 8:35
  • Sorry, i thought those font commands in your example where yours. They are not, they are the product of some thought process of the original author of clean thesis. That template (aong other strange things) assumes that pdflatex is used at all times. I hate templates. – Johannes_B May 3 '16 at 9:45
  • Opended an issue github.com/derric/cleanthesis/issues/55 – Johannes_B May 3 '16 at 9:51
3

I love templates, i don't hate them. I really do. Templates are the best thing in the world. Always a reason for anger and amusement.

\documentclass{scrreprt}%
\usepackage{cleanthesis}
\usepackage{fontspec}
\setmainfont{TeX Gyre Heros}
%\addtokomafont{chapter}{\fontspec{TeX Gyre Heros}}
\renewcommand{\helv}{\fontspec{TeX Gyre Heros}\fontsize{9}{11}\selectfont}
\renewcommand{\book}{\fontspec{bookman}\fontsize{11}{13}\selectfont}
\renewcommand{\tgherosfont}{\fontspec{TeX Gyre Heros}}
\renewcommand{\thesischapterfont}{\color{ctcolorblack}\huge\fontspec{TeX Gyre Heros}}
\usepackage{blindtext}
\begin{document}
\chapter{Walzing Wombat}
\blindtext
\end{document}

You gotta appreciate the clear separation of the semantics. It is lovely. For a special treat, try the example with report instead of a KOMA class.

Providing a template is nothing for starters. You can get a quite huge user base quickly and they will find bugs. So a little advice to all wanting to write up a nice template: Don't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.