I'm using the memoir document class to typeset a book for my math class. However, when I type the section
Code: Select all
\section{Κανόνας \textlatin{DeL' Hospital}}
Κανόνας DeL' Hospital
in the header of the current chapter it gets printed as
I'm presenting the entire preamble since in a vanilla document I cannot reproduce the problem , although in the header of the vanilla I don't get that weird symbol but I got ' either.
Code: Select all
\documentclass[11pt, a4paper]{memoir}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\renewcommand\qedsymbol{$\blacklozenge$}
\usepackage[shortlabels]{enumitem}
\usepackage{cancel}
\usepackage{bigints}
\usepackage[most]{tcolorbox}
\usepackage[utf8]{inputenc}
\usepackage[english, greek]{babel}
\usepackage{multicol}
%chapter style ( Bringhurst chapter style)
\usepackage[T1]{fontenc}
% not then font used by Bringhurst, but anyway:
\usepackage{libertine}
% we want to letterspace uppercased words and those in small caps, so:
\usepackage{microtype}
% the chapter style:
\usepackage{xcoffins,xcolor}
\NewCoffin\main
\NewCoffin\titleline
\NewCoffin\chapternumber
\makechapterstyle{Bringhurst}{%
\renewcommand*\chapterheadstart{}
\renewcommand*\printchaptername{}
\renewcommand*\chapternamenum{}
\renewcommand*\afterchapternum{}
% numbered chapters:
\renewcommand*\printchapternum{%
\SetHorizontalCoffin\chapternumber{%
\textcolor{black!10}{\thechapter}%
}%
\ScaleCoffin\chapternumber{8}{8}%
}
% unnumbered chapters:
\renewcommand*\printchapternonum{\SetHorizontalCoffin\chapternumber{}}
\renewcommand*\printchaptertitle[1]{%
\memRTLraggedright\normalfont\large\MakeUppercase{\textls[75]{##1}}}
\renewcommand*\afterchaptertitle{%
\vskip.5\onelineskip
\SetHorizontalCoffin\titleline{\color{black!50}\rule{\linewidth}{1.5pt}}%
\JoinCoffins\main\titleline
\JoinCoffins*\main\chapternumber(\textwidth+\marginparsep,-4\baselineskip)%
\TypesetCoffin\main
\vskip\onelineskip
}
}
\chapterstyle{Bringhurst}
% sections and subsections:
\setsecnumformat{\normalfont\csname the#1\endcsname\quad}
\setsecnumdepth{subsection}
\setcounter{secnumdepth}{2}
\maxtocdepth{subsection}
%tcolorbox
\usepackage{tcolorbox}
%tikz & pgf
\usepackage{pgf,tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepackage{tkz-tab}
\usetikzlibrary{fit, shapes,snakes,arrows,intersections, backgrounds,calc, trees, hobby}
\usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}
\usetikzlibrary{positioning}
\tikzset{point/.style={circle,draw=black,inner sep=0pt,minimum size=3pt}}
\usetikzlibrary{datavisualization.formats.functions}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
\node[shape=circle, fill=cyan!20!,draw,inner sep=2pt] (char) {#1};}}
%horizontal nested sets for numbers
\newcommand\drawnestedsets[4]{
% initial position
\def\position{#1}
% number of sets
\def\nbsets{#2}
% list of sets
\def\listofnestedsets{#3}
% reversed list of colors
\def\reversedlistofcolors{#4}
% position and draw labels of sets
\coordinate (circle-0) at (#1);
\coordinate (set-0) at (#1);
\foreach \set [count=\c] in \listofnestedsets {
\pgfmathtruncatemacro{\cminusone}{\c - 1}
% label of current set (below previous nested set)
\node[right=3pt of circle-\cminusone,inner sep=0]
(set-\c) {$\mathbb{\set}$};
% current set (fit current label and previous set)
\node[ellipse,inner sep=0,fit=(circle-\cminusone)(set-\c)]
(circle-\c) {};
}
% draw and fill sets in reverse order
\begin{scope}[on background layer]
\foreach \col[count=\c] in \reversedlistofcolors {
\pgfmathtruncatemacro{\invc}{\nbsets-\c}
\pgfmathtruncatemacro{\invcplusone}{\invc+1}
\node[ellipse,draw,fill=\col,inner sep=0,
fit=(circle-\invc)(set-\invcplusone)] {};
}
\end{scope}
}
%labeling figures
\usepackage{caption}
\usepackage{float}
%fontawesome
\usepackage{fontawesome}
\renewcommand{\thefootnote}{\faBullhorn}
%custom commands / environments
\newtheorem*{sol}{Λύση}
\renewcommand{\thepage}{\roman{page}}%
\newtheorem{example}{Παράδειγμα}
\DeclareSymbolFont{eulargesymbols}{U}{zeuex}{m}{n}
\DeclareMathSymbol{\intop}{\mathop}{eulargesymbols}{"52}
%remove chapter enumeration in equations
\usepackage{chngcntr}
\counterwithout{equation}{chapter}
%true or false boxes
\usepackage{tabularx}
\newcounter{abc}
\renewcommand{\theabc}{\stepcounter{abc}\alph{abc}}
\newcommand{\answerbox}{\fbox{\phantom{M}}}
%floor function
\usepackage{pgfplots}
\tikzset{
declare function={Floor(\x)=round(\x-0.5);},
declare function={Ceil(\x)=round(\x+0.5);}
}
\makeatletter
\long\def\ifnodedefined#1#2#3{%
\@ifundefined{pgf@sh@ns@#1}{#3}{#2}%
}
\newif\iffirstmarker
\firstmarkertrue
\pgfplotsset{
discontinuous/.style={
scatter,
options/.style={},
execute at end plot visualization={\global\firstmarkertrue},
scatter/@pre marker code/.code={
\iffirstmarker
\global\firstmarkerfalse
\else
\ifnodedefined{marker}{
\pgfpointdiff{\pgfpointanchor{marker}{center}}%
{\pgfpoint{0}{0}}%
\ifdim\pgf@y>0pt
\tikzset{options/.style={mark=*}}
\draw [densely dashed] (marker-|0,0) -- (0,0);
\draw plot [mark=*,mark options={fill=white}] coordinates {(marker-|0,0)};
\else
\ifdim\pgf@y<0pt
\tikzset{options/.style={mark=*,fill=white}}
\draw [densely dashed] (marker-|0,0) -- (0,0);
\draw plot [mark=*] coordinates {(marker-|0,0)};
\else
\tikzset{options/.style={mark=none}}
\fi
\fi
}{
\tikzset{options/.style={mark=none}}
}
\fi
\coordinate (marker) at (0,0);
\begin{scope}[options]
},
scatter/@post marker code/.code={\end{scope}}
}
}
%complete gibberish
\usetikzlibrary{shadows.blur}
\usepackage{titletoc}
\usepackage{calc}
\definecolor{yourcolor}{HTML}{008bb2}
%define new chapter style (just for a nicer look)
\makechapterstyle{mystyle}{%
\chapterstyle{default}
\renewcommand*{\chapnumfont}{\normalfont\Huge\sffamily\bfseries}
\renewcommand*{\chaptitlefont}{\normalfont\huge\sffamily\itshape\color{yourcolor}}
\settowidth{\chapindent}{\chapnumfont 111}
\renewcommand*{\chapterheadstart}{}
\renewcommand*{\chapnamefont}{\hfill\color{yourcolor}\normalfont\Huge\sffamily\bfseries}
\renewcommand*{\printchapternum}{%
\begin{tikzpicture}[baseline={([yshift=-.6ex]current bounding box.center)}]
\node[fill=yourcolor,circle,text=white] {\thechapter};
\end{tikzpicture}\\[1ex]
\hrule height 1.5pt}
\renewcommand*{\printchaptertitle}[1]{%
{\chaptitlefont ##1}}
}
%use new chapter style
\chapterstyle{mystyle}
%command to print the acutal minitoc
\newcommand{\printmyminitoc}{\noindent\hspace{-2cm}\begin{tikzpicture}
\node[rounded corners,align=left,fill=yourcolor, blur shadow={shadow blur steps=5}, inner sep=5mm]{%
\color{white}%
\begin{minipage}{8cm}%minipage trick
\printcontents[chapters]{}{1}{}
\end{minipage}};
\end{tikzpicture}}
%plot of Weierstrass function
\makeatletter
\pgfmathdeclarefunction{weierstrass}{4}{%
\pgfmathfloattofixed@{#4}%
\afterassignment\pgfmath@x%
\expandafter\c@pgfmath@counta\pgfmathresult pt\relax%
\pgfmathfloatcreate{1}{0.0}{0}%
\let\pgfmathfloat@loc@TMPr=\pgfmathresult
\pgfmathfloatpi@%
\let\pgfmathfloat@loc@TMPp=\pgfmathresult%
\edef\pgfmathfloat@loc@TMPx{#1}%
\edef\pgfmathfloat@loc@TMPa{#2}%
\edef\pgfmathfloat@loc@TMPb{#3}%
\pgfmathloop
\ifnum\c@pgfmath@counta>-1\relax%
\pgfmathfloatparsenumber{\the\c@pgfmath@counta}%
\let\pgfmathfloat@loc@TMPn=\pgfmathresult%
\pgfmathpow{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPn}%
\let\pgfmathfloat@loc@TMPe=\pgfmathresult%
\pgfmathpow{\pgfmathfloat@loc@TMPb}{\pgfmathfloat@loc@TMPn}%
\pgfmathmultiply{\pgfmathresult}{\pgfmathfloat@loc@TMPp}%
\pgfmathmultiply{\pgfmathresult}{\pgfmathfloat@loc@TMPx}%
\pgfmathdeg{\pgfmathresult}%
\pgfmathcos{\pgfmathresult}%
\pgfmathmultiply{\pgfmathresult}{\pgfmathfloat@loc@TMPe}%
\pgfmathadd{\pgfmathresult}{\pgfmathfloat@loc@TMPr}%
\let\pgfmathfloat@loc@TMPr=\pgfmathresult
\advance\c@pgfmath@counta by-1\relax%
\repeatpgfmathloop%
}
\begin{document}
\section{Κανόνας \textlatin{DeL' Hospital}}
\end{document}