From 1bcb211e40d9f2777eaacd5845f6315e15d31089 Mon Sep 17 00:00:00 2001 From: Samuel Ortion Date: Wed, 17 Apr 2024 08:07:39 +0200 Subject: [PATCH] feat: Add some colors and title formatting - Hide links in glossary entries --- report.org | 2 +- report.pdf | 4 +-- sty/lamme2024.sty | 81 +++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 77 insertions(+), 10 deletions(-) diff --git a/report.org b/report.org index 3391403..2f92aff 100644 --- a/report.org +++ b/report.org @@ -33,7 +33,7 @@ | segment_duplcation | segment duplication | Long stretches of DNA sequences with high identity score | | retroduplication | retroduplication | Duplication of a gene through retro-transcription of its RNA transcript | | autopolyploidisation | autopolyploidisation | Polyploidisation within the same species | -| allopolyploidisation | allopolyploidisation | Polyploidisation with genetic material comming from a diverged species | +| allopolyploidisation | allopolyploidisation | Polyploidisation with genetic material coming from a diverged species | | polyspermy | polyspermy | Fertilization of an egg by more than one sperm | | segment_duplication | segment duplication | DNA sequences present in multiple locations within a genome that share high level of sequence identity | | subfunctionalization | subfunctionalization | Fate of a duplicate gene which gets a part of the original gene function, the function being shared among multiple duplicates | diff --git a/report.pdf b/report.pdf index ecc374f..2573e69 100644 --- a/report.pdf +++ b/report.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d87e7035c51051c9357085f06e80d00a175aee5b7d93370d117dd0250c51200c -size 180869 +oid sha256:a33b17a4dc21bd767ab98a233be1903c840c806cedb9a4ddc50a99e35a23b70a +size 185000 diff --git a/sty/lamme2024.sty b/sty/lamme2024.sty index 0c365ad..f814e80 100644 --- a/sty/lamme2024.sty +++ b/sty/lamme2024.sty @@ -12,9 +12,17 @@ \RequirePackage{float} \RequirePackage{caption} \RequirePackage{subcaption} -\RequirePackage{xcolor} \RequirePackage{csquotes} \RequirePackage[english]{babel} + +% Colors +\RequirePackage{xcolor} + \definecolor{lamme2024-blue}{HTML}{008682} + \colorlet{primary}{lamme2024-blue} + \colorlet{primaryLink}{primary!60!blue} + \colorlet{primaryCite}{red!70!primary} + + % Math \RequirePackage{amsmath} \RequirePackage{amsthm} @@ -47,7 +55,8 @@ \RequirePackage[ nameinlink, noabbrev -]{cleveref} + ]{cleveref} + \usepackage[ @@ -59,16 +68,41 @@ \setabbreviationstyle[acronym]{long-short} \usepackage{hyperref} +\hypersetup{ + colorlinks=true, + urlcolor=primaryLink, + linkcolor=primaryLink, + anchorcolor=primaryLink, + citecolor=primaryCite +} +\newcommand*{\glsplainhyperlink}[2]{% + \begingroup% + \hypersetup{hidelinks}% + \hyperlink{#1}{#2}% + \endgroup% + } + +\let\oldgls=\gls +\renewcommand{\gls}[1]{{\hypersetup{hidelinks}% + \oldgls{#1}}}% + +\let\oldGls=\Gls +\renewcommand{\Gls}[1]{{\hypersetup{hidelinks}% + \oldGls{#1}}}% + + +%\renewcommand*{\glstextformat}[1]{\begingroup\hypersetup{hidelinks}#1\endgroup} +%\renewcommand*{\glsdohyperlink}[2]{% +% {\hypersetup{hidelinks=true}\hyperlink{#1}{#2}}} +\renewcommand*{\glsentryfmt}{% + \hypersetup{hidelinks}\glshyperlink[\glsgenentryfmt]{\glslabel}% +} % Force text on right side, float on left side (does not work well) \usepackage{sty/floatlefttextright} \renewcommand\maketitle{\include{titlepage}} -\hypersetup{ - hidelinks -} - \renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} \renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}} @@ -82,4 +116,37 @@ \fi } -\usepackage{scrhack} + \usepackage{scrhack} +% From S. Ivanov hdr preamble +\iffalse +\titleformat{\chapter}[frame] +{\itshape\color{primary}} +{\filright + \normalsize + \enspace Chapter \thechapter\enspace} +{10mm} +{\fontsize{35}{20}\selectfont\normalfont\bfseries\filright\hspace{1ex}} +\titleformat{\section}{\Large\normalfont\bfseries\color{primary}}{\thesection \hspace{1ex}}{1ex}{} +\titleformat{\subsection}{\large\normalfont\bfseries\color{primary}}{\thesubsection \hspace{1ex}}{1ex}{} +\titleformat{\subsubsection}{\normalsize\normalfont\bfseries\color{primary}}{}{1ex}{} + +\newcommand{\changelocaltocdepth}[1]{% + \addtocontents{toc}{\protect\setcounter{tocdepth}{#1}}% + \setcounter{tocdepth}{#1}% +} +% Adapted to KOMA-Script (and to my preferences): +\renewcommand*{\sectionformat}{\thesection\filright\hspace{1ex}} +\addtokomafont{subsection}{\color{primary}} +\fi + +\usepackage{titlesec} +\titleformat{\chapter}[frame] +{\itshape\color{primary}} +{\filright + \normalsize + \enspace Chapter \thechapter\enspace} +{10mm} +{\fontsize{35}{20}\selectfont\normalfont\bfseries\filright\hspace{1ex}} +\titleformat{\section}{\Large\normalfont\bfseries\color{primary}}{\thesection \hspace{1ex}}{1ex}{} +\titleformat{\subsection}{\large\normalfont\bfseries\color{primary}}{\thesubsection \hspace{1ex}}{1ex}{} +\titleformat{\subsubsection}{\normalsize\normalfont\bfseries\color{primary}}{}{1ex}{}