Risposte nei forum create
-
AutoreRisposte
-
::
Ho provato ad aggiornare con`
@inbook{26,
author = {Serpe, Annarosa},
editor={Gómez Chova, L. and López Martinez, A. and Candel Torres, I.},
location={Valencia, Spain},
year = {2018},
pages = {3477–3485},
title = {Geometry of design in high school – an example of teaching with GeoGebra},
booktitle={INTED2018, Proceedings 12th International Technology, Education and Development Conference},
doi={10.21125/inted.2018.0668},
}@inbook{27,
author = {Serpe, Annarosa},
editor={Sergeyev, Y. and Kvasov, D.},
publisher={Springer, Cham},
year = {2020},
pages = {3477–3485},
title = {A Computational Approach with MATLAB Software for Nonlinear Equation Roots Finding in High School Maths},
booktitle={Numeri-cal Computations: Theory and Algorithms. NUMTA 2019. Lecture Notes in Computer Science, vol 11973},
doi={10.1007/978-3-030-39081-5_40},
}@inbook{28,
author = {Serpe, Annarosa and Frassia, Maria Giovanna},
editor={Magazù, S.},
year = {2018},
pages = {77–96},
title = {Legacy and Influence in Mathematics and Physics with Educational Technology: A Laboratory Example},
booktitle = {New Trends in Physics Education Research},
Publisher={Nova Science Publishers},
isbn = {978-1-53613-894-8},
}@inbook{29,
author = {Serpe, Annarosa and Frassia, Maria Giovanna},
editor={Sergeyev Y. and Kvasov D.},
year = {2020},
title = {Task Mathematical Modelling Design in a Dynamic Geometry Environment: Archimedean Spiral’s Algorithm},
booktitle = {Numerical Computations: Theory and Algorithms. NUMTA 2019. Lecture Notes in Computer Science, vol. 11973},
Publisher={Springer, Cham},
doi = {10.1007/978-3-030-39081-5_41},
}
`Però non mostra le modifiche … anzi … se faccio PDFLatex -> Bibtex -> PdfLatex -> PdfLatex e Compilazione rapida, scompaiono tutti i riferimenti bibliografici!!
::
Il massimo che sono riuscito a fare è questo, ma non riesco a stampare la bibliografia!`
\begin{filecontents}[overwrite]{\jobname.bib}@book{rossi:2009,
author = {Mario Rossi Campano},
title = {Storia della tipografia},
publisher = {Editori Capitolini},
location = {Roma},
year = {2009}}@inbook{archimede:1,
author={Archimedes},
editor={Heath, Thomas L.Editor},
DATE={2009},
location={Cambridge},
series={Cambridge Library Collection – Mathematics},
title={On Spirals},
DOI={10.1017/CBO9780511695124.014},
booktitle={The Works of Archimedes: Edited in Modern Notation with Introductory Chapters},
publisher={Cambridge University Press},
pages={151–-188},
collection={Cambridge Library Collection – Mathematics},
}@inbook{2,
author={Balacheff, N. and Kaput, J. J.},
title={Computer – Based Learning Environments in Mathematics},
DOI={10.1007/978-94-009-1465-0_14},
booktitle={International Handbook of Mathematics Education. Kluwer International Handbooks of Education},
publisher={Springer, Dordrecht},
editor={Bishop, A.J. and Clements, K. and Keitel, C. and Kilpatrick, J. and Laborde C.},
year={1996},
}@ARTICLE{3,
AUTHOR = {{Barozzi da Vignola }, Jacopo},
DATE = {1562},
TITLE = {Rule of the Five Orders of Architecture},
NOTE={Retrieved from:\\ http://architectura.cesr.univ-tours.fr/Traite/Auteur/Vignole.asp?param= (Figure Tavola XX).\\Retrieved from: https://warburg.sas.ac.uk/pdf/cnh1330b2215241.pdf}},
location={Roma},
}@inbook{6,
author={Costabile, F.A. and Serpe, A.},
title={Archimedes in secondary schools: a teaching proposal for the math curriculum},
DOI={1007/978-90-481-9091-1_36},
booktitle={The Genius of Archimedes – 23 Centuries of Influence on Mathematics, Science and Engineering. History of Mechanism and Machine Science vol.11},
pages={479–491},
publisher={Springer, Dordrecht},
editor={Paipetis, S. and Ceccarelli, M.},
year={2010},
}@book{7,
author = {Collins, H.},
title={Dictionary Mathematics},
date = {2009},
publisher = {Glasgow: Harper Collins},
}@BOOK{8,
AUTHOR = {Dick, T. P. and Hollebrands, K. F.},
PUBLISHER = {Reston, VA: NCTM},
DATE = {2011},
TITLE = {Focus on high school mathematics: Technology to support reasoning and sense making},
}@BOOK{9,
AUTHOR = {Drijvers, P. and Ball, L. and Barzel, B. and Heid, M.K. and Cao, Y. and Maschietto, M.},
PUBLISHER = {ITS. Springer, Cham},
DATE = {2016},
DOI={10.1007/978-3-319-33666-4},
TITLE = {Uses of Technology in Lower Secondary Mathematics Education},
}@article{10,
author = {English, L. D.},
year = {2016},
title = {STEM education K-12: perspectives on integration},
volume = {3},
journal = {International Journal of STEM Education},
doi = {10.1186/s40594-016-0036-1},
}@INBOOK{11,
AUTHOR = {English, L. D.},
EDITOR = {Makar, K. and Dole, S. and Visnovska, J. and Goos, M. and Bennison, A. and Fry, K.},
LOCATION = {Singapore},
PUBLISHER = {Singapore: Springer},
BOOKTITLE = {Research in mathematics education in Australasia 2012–2015},
DATE = {2016},
PAGES = {353–371},
TITLE = {Advancing mathematics education research within a STEM environment},
DOI={10.1007/978-981-10-1419-2_17},
}@INBOOK{12,
AUTHOR = {Fitzallen, N.},
EDITOR = {Marshman, M.},
LOCATION = {Sydney},
PUBLISHER = {Sydney: MERGA},
BOOKTITLE = {Mathematics education in the margins. Proceedings of the 38th annual confer-ence of the Mathematics Education Research Group of Australasia},
DATE = {2015},
PAGES = {237–-244},
TITLE = {TEM education: What does mathematics have to offer?},
DOI={10.1007/978-981-10-1419-2_17},
}@article{13,
author = {Frassia, Maria Giovanna and Serpe, Annarosa},
year = {2017},
pages = {411–418},
title = {Learning Geometry Through Mathematical Modelling: An Example With Geogebra},
volume = {2017},
journal = {Turkish Online Journal of Educational Technology},
}@BOOK{14,
AUTHOR = {Heath, T. L. and Heiberg, J. L.},
PUBLISHER = {The University Press},
DATE = {1908},
TITLE = {The thirteen books of Euclid's Elements Books 3-9 (Vol. 2).},
pages={24,32,88},
}@BOOK{15,
AUTHOR = {Hynes, M. and Portsmore, M. and Dare, E. and Milto, E. and Rogers, C. and Hammer, D.},
PUBLISHER = {The University Press},
DATE = {2011},
TITLE = {Infusing engineering design into high school STEM courses.},
NOTE={Retrieved from the National Center for Engineering and Technology Education},
}@article{16,
author = {Kilgore, Deborah and Sattler, Brook and Turns, Jennifer},
year = {2013},
pages = {807–826},
title = {From fragmentation to continuity: Engineering students making sense of experience through the development of a professional portfolio},
volume = {38},
journal = {Studies in Higher Education},
doi = {10.1080/03075079.2011.610501},
}@article{17,
author = {Li, Yeping},
year = {2014},
title = {A platform to promote STEM education and research worldwide},
volume = {1},
journal = {International Journal of STEM Education},
doi = {10.1186/2196-7822-1-1},
}@article{18,
author = {Li, Yeping},
year = {2018},
title = {Promoting the Development of Interdisciplinary Research in STEM Education},
volume = {1},
journal = {Journal for STEM Education Research},
doi = {10.1007/s41979-018-0009-z},
}@article{19,
author = {Li, Yeping and Schoenfeld, Alan},
year = {2019},
eid = {44 [13 pages]},
title = {Problematizing teaching and learning mathematics as “given” in STEM education},
volume = {6},
journal = {International Journal of STEM Education},
doi = {10.1186/s40594-019-0197-9},
}@BOOK{20,
AUTHOR = {Loria, G.},
PUBLISHER = {Hoepli, Milano},
DATE = {1935},
TITLE = {Metodi matematici-Essenza-Tecniche-Applicazioni},
}@article{21,
author = {Maass, Katja and Geiger, Vince and Romero Ariza, Marta and Goos, Merrilyn},
year = {2019},
month = {10},
pages = {1–16},
title = {The Role of Mathematics in interdisciplinary STEM education},
volume = {51},
journal = {ZDM},
doi = {10.1007/s11858-019-01100-5},
}@BOOK{22,
AUTHOR = {McCallum, W.},
DATE = {2018},
TITLE = {Sense-making and making sense},
url={https://blogs.ams.org/matheducation/2018/12/05/sense-making-and-making-sense/},
NOTE={Retrieved on October 1, 2019},
}@book{23,
author = {Monge, Gaspard},
year = {1798},
title = {Géométrie Descriptive. Leçons données aux écoles normales l'an III de la République},
}@book{24,
author = {Recht, R.},
year = {2001},
title = {Il disegno d’architettura: origini e funzioni},
publisher={Milano: Jaka Book},
}@inbook{25,
author = {Schoenfeld, Alan},
editor={Grouws, D.A.},
publisher={Macmillan},
year = {1992},
pages = {334–370},
title = {Learning to think mathematically: Problem solving, metacognition, and sense making in mathematics},
booktitle={NCTM Handbook of research on mathematics teaching and learning},
}@inbook{26,
author = {Serpe, Annarosa},
editor={Gómez Chova, L. and López Martinez, A. and Candel Torres, I.},
location={Valencia, Spain},
year = {2018},
pages = {3477–3485},
title = {Geometry of design in high school – an example of teaching with GeoGebra},
booktitle={INTED2018, Proceedings 12th International Technology, Education and Development Conference},
doi={10.21125/inted.2018.0668},
}@inbook{27,
author = {Serpe, Annarosa},
editor={Sergeyev, Y. and Kvasov, D.},
publisher={Springer, Cham},
year = {2020},
pages = {3477–3485},
title = {A Computational Approach with MATLAB Software for Nonlinear Equation Roots Finding in High School Maths},
booktitle={Numeri-cal Computations: Theory and Algorithms. NUMTA 2019. Lecture Notes in Computer Science, vol 11973},
doi={10.1007/978-3-030-39081-5_40},
}@inbook{28,
author = {Serpe, Annarosa and Frassia, Maria Giovanna},
editor={Magazù, S.},
year = {2018},
pages = {77–96},
title = {Legacy and Influence in Mathematics and Physics with Educational Technology: A Laboratory Example},
booktitle = {New Trends in Physics Education Research},
Publisher={Nova Science Publishers},
isbn = {978-1-53613-894-8},
}@inbook{29,
author = {Serpe, A. and Frassia, M.G.},
editor={Sergeyev Y. and Kvasov D.},
year = {2020},
title = {Task Mathematical Modelling Design in a Dynamic Geometry Environment: Archimedean Spiral’s Algorithm},
booktitle = {Numerical Computations: Theory and Algorithms. NUMTA 2019. Lecture Notes in Computer Science, vol. 11973},
Publisher={Springer, Cham},
doi = {10.1007/978-3-030-39081-5_41},
}@inproceedings{30,
title={The Interdisciplinary Curriculum: A Literary Review and a Manual for Administrators and Teachers},
author={Smith, Jaimie and Karr – Kidwell, P. J.},
year={2000},
publisher={ERIC},
}@inbook{31,
author = {Stillman, G. A. and Blum, W. and Biembengut, M. S.},
editor={Sergeyev Y. and Kvasov D.},
year = {2015},
title = {Cultural, social, cognitive and research influences on mathematical modelling education.},
booktitle = {Mathematical Modelling in Education Research and Practice},
Publisher={Springer, Cham},
pages={1–32},
doi = {10.1007/978-3-319-18272-8_1},
isbn={978-3-319-18272-8},
}@book{32,
author = {Tsupros, N. and Kohler, R. and Hallinen, J.},
year = {2009},
title = {TEM education: A project to identify the missing components. Intermediate Unit 1: Center for STEM Education and Leonard Gelfand Center for Service Learning and Outreach},
publisher={Carnegie Mellon University, Pennsylvania},
}@book{33,
author={Vitruvius},
place={Cambridge},
title={Vitruvius: 'Ten Books on Architecture'},
DOI={10.1017/CBO9780511840951},
publisher={Cambridge University Press},
editor={Rowland, Ingrid D. and Howe, Thomas Noble},
year={1999},
note={translated by Ingrid D. Rowland, with commentary by others},}@article{34,
author = {Voogt, Joke and Pareja Roblin, Natalie},
year = {2012},
number = {3},
pages = {299–321},
title = {A comparative analysis of international frameworks for 21 st century competences: Implications for national curriculum policies},
volume = {44},
journal = {Journal of Curriculum Studies},
doi = {10.1080/00220272.2012.668938},
}@article{35,
author = {Wang, Hui-Hui and Moore, Tamara J. and Roehrig, Gillian H. and Park, Mi Sun},
year = {2011},
number = {2},
volume = {1},
title = {STEM Integration: Teacher Perceptions and Practice},
journaltitle={Journal of Pre-College Engineering Education Research (J-PEER)},
doi={10.5703/1288284314636},
}@book{6a,
author = {Collins, H.},
title={Dictionary Mathematics},
year = {2009},
publisher = {Glasgow: Harper Collins},
}\end{filecontents}
\documentclass{book}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\textcite{rossi:2009}
\\
\textcite{archimede:1}
%\\
%\printbibliography\begin{refcontext}[sorting=nyt]
%\printbibliography
%
% Print list of papers cited in the main text
\printbibliography[heading=bibliography,title={References},category=cited]
%
% Print list of papers NOT cited in the main text
\printbibliography[title={Uncited references},notcategory=cited]
%
\end{refcontext}\end{document}
`
::
Faccio prima a caricare la cartella perchè non riesco a suddividere nulla del file (credo incasinato) e non riesco a creare l’esempio minimo::
Su overleaf non ho caricato peloritana, ma ho provato a usare dei codici compilabili che mi inseriscono parole arabe all’interno di testo normale in italiano o in inglese.Forse è proprio questo “peloritana” che mi crea problemi con l’arabo …
Non esiste un modo per inserire oggetti “esterni” (o alieni) nel testo, così da evitare che li riconosca come lingua ma solo come caratteri o simboli esterni?
::
Grazie per la veloce e celere risposta OldClaudio.La mia esigenza è quella di inserire delle parole arabe nel testo. Non devo scrivere interi documenti, solo dei termini (saranno una decina in tutto) in tutto il documento. I termini sono Ingegnere (e a fianco devo metterci l’origine araba del termine).
Nulla di “complicato” a prima vista ma sto impazzendo! Ho provato con XeLaTeX e LuaLaTeX, ma niente.
Ho provato varie soluzioni trovate on line … su Overleaf funzionano, ma sul mio file no.Avevo anche pensato di usare un “trucco”, ossia di usare un’altra lingua per parti del testo, ma non ha funzionato …
PS: inoltre se provo a compilare il documento con “compilazione rapida” non ho problemi (pur non facendo modifiche). Se, invece, uso XeLaTeX senza modifiche ho errori con il file .sty
::
Ho MiKTeX completo e aggiornato su windows 10.Copio e incollo il codice main.tex e ho il file .cls
Faccio sia compilazione rapida che tutte le altre compilazioni.Ogni volta un errore diverso:
– compilazione rapida: ! Text line contains an invalid character.
l.2175 \bgroup\nohyphenation#1\egroup
^200b}}
A funny symbol that I can’t read has just been input.
(ad una riga neanche esistente)– exlatex: ! Package pdfx Error: CreationDate is not properly supported;
PDF validation may fail..
See the pdfx package documentation for explanation.
Type Hfor immediate help. – luatex: ! String contains an invalid utf-8 sequence.
l.91 \mailaddress{
Ådddréssss, Street, 00000 Cóuntuntry}
A funny symbol that I can’t read has just been (re)read.
Just continue, I’ll change it to 0xFFFD.
::
Un codice simile è questo:`
\documentclass[svgnames]{report}
\usepackage{tikz}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=LightSkyBlue] (0,0) rectangle
(\paperwidth,3cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=MidnightBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt}\begin{document}
\tableofcontents
\chapter{Introduction}
Text
\chapter{Main}
\section{Section}
Text
\begin{thebibliography}{99}
\bibitem{Test} test reference
\end{thebibliography}
\end{document}
`Si potrebbe inserire al posto del colore azzurrino un’ìmmagine? così ci metto quella che uso io.
Sarebbe tutto più semplice no? ovviamente considerando che è più alta e non un bordino
::
Non ha molto senso sostituire il corpo del documento con quello che hai scritto.
Il mio codice funziona perché è tutto così … se si va a stravolgere è normale che non funziona … ci ho pensato anche io.L’errore sarà nei comandi TiKZ … che, come dico, non conosco, ho usato, copiato e incollato e non riesco a imparare a un giorno dalla consegna della tesina…
Quello che posso chiedervi, a questo punto, per aggirare l’ostacolo è: si può creare , con un codice meno farraginoso (e più corto), lo stesso effetto grafico che ottengo nel mio?
::
Forse non mi sono spiegata: il problema non dipende dagli input, che importano i capitoli. Ho specificato quello perchè non posso passarvi i capitoli del file. Basta che inseriate del testo lipsum, fittizio.Ho aggiornato il file
`
\documentclass[12pt,a4paper,oneside]{book}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[sfdefault]{roboto}\linespread{1.55}
\usepackage{layaureo}
\usepackage{tikz}
\graphicspath{{Pictures/}}
\usepackage{graphicx}\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{booktabs}\usepackage{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{64,141,146} % Define the orange color used for highlighting throughout the book\usepackage[style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor=ocre,
linktoc=all
}\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot[CO,CE]{\thepage}%—————————————————————————————-
% SECTION NUMBERING IN THE MARGIN
%—————————————————————————————-\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{-4ex \@plus -1ex \@minus -.4ex}
{1ex \@plus.2ex }
{\normalfont\large\sffamily\bfseries}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
{-3ex \@plus -0.1ex \@minus -.4ex}
{0.5ex \@plus.2ex }
{\normalfont\sffamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
{-2ex \@plus -0.1ex \@minus -.2ex}
{.2ex \@plus.2ex }
{\normalfont\small\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
{-2ex \@plus-.2ex \@minus .2ex}
{.1ex}
{\normalfont\small\sffamily\bfseries}}%—————————————————————————————-
% PART HEADINGS
%—————————————————————————————-% Numbered part in the table of contents
\newcommand{\@mypartnumtocformat}[2]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!20}{\strut\parbox[c][.7cm]{\ecart}{\color{ocre!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}%
}% Unnumbered part in the table of contents
\newcommand{\@myparttocformat}[1]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}%
}\newlength\esp
\setlength\esp{4pt}
\newlength\ecart
\setlength\ecart{1.2cm-\esp}
\newcommand{\thepartimage}{}%
\newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ —\ #1}}
\else%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
\startcontents%
\markboth{}{}%
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north] at (4cm,-3.25cm){\color{ocre!40}\fontsize{220}{100}\sffamily\bfseries\thepart};
\node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
\printcontents{l}{0}{\setcounter{tocdepth}{1}}% The depth to which the Part mini table of contents displays headings; 0 for chapters only, 1 for chapters and sections and 2 for chapters, sections and subsections
}};
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
\end{tikzpicture}};
\end{tikzpicture}}%
\@endpart}
\def\@spart#1{%
\startcontents%
\phantomsection
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
\end{tikzpicture}};
\end{tikzpicture}}
\addcontentsline{toc}{part}{\texorpdfstring{%
\setlength\fboxsep{0pt}%
\noindent\protect\colorbox{ocre!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}%—————————————————————————————-
% CHAPTER HEADINGS
%—————————————————————————————-% A switch to conditionally include a picture, implemented by Christian Hupfer
\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\else
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}%——————————————-
\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother%—————————————————————————————-
% END CUSTOMIZATION STRUCTURE
%—————————————————————————————-\begin{document}
\chapterimage{prova2.pdf} % Table of contents heading image
\frontmatter
\tableofcontents
\pagestyle{plain}
\chapterimage{prova.pdf} % Chapter heading image
\input{capitoli/scopeandpurpose}
\addcontentsline{toc}{chapter}{Scope and purpose}
\let\cleardoublepage\clearpage
\input{capitoli/finalnote}
\addcontentsline{toc}{chapter}{finalnote}\mainmatter
\let\cleardoublepage\clearpage
\input{capitoli/capitolo1}
\addcontentsline{toc}{chapter}{Chiropractic}
\let\cleardoublepage\clearpage
\input{capitoli/capitolo2}
\addcontentsline{toc}{chapter}{MSK Conditions and Chiropractic}
\input{capitoli/capitolo3}
\addcontentsline{toc}{chapter}{MSK Conditions and Neonatal Pain}
\input{capitoli/capitolo4}
\addcontentsline{toc}{chapter}{Breastfeeding Introduction}
\input{capitoli/capitolo5}
\input{capitoli/capitolo6}
\input{capitoli/summary}
\input{capitoli/acknowledgements}\input{capitoli/bibliografia}
\end{document}
Ora ho tolto i numeri ai capitoli, sto cercando di farlo con tutti.
Non riesco, tuttavia, a cambiare il colore del titolo del capitolo, che vorrei verde (o ocre, come l'ho definito).
Non so dove mettere le mani con TiKZ
`
::
Questo è il codice minimo compilabile`
\documentclass[12pt,a4paper,oneside]{book}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage[sfdefault]{roboto}\linespread{1.55}
\usepackage{layaureo}
\usepackage{tikz}
\graphicspath{{Pictures/}}
\usepackage{graphicx}\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{booktabs}\usepackage{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{64,141,146} % Define the orange color used for highlighting throughout the book\usepackage[style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor=ocre,
linktoc=all
}\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot[CO,CE]{\thepage}%—————————————————————————————-
% SECTION NUMBERING IN THE MARGIN
%—————————————————————————————-\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{-4ex \@plus -1ex \@minus -.4ex}
{1ex \@plus.2ex }
{\normalfont\large\sffamily\bfseries}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
{-3ex \@plus -0.1ex \@minus -.4ex}
{0.5ex \@plus.2ex }
{\normalfont\sffamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
{-2ex \@plus -0.1ex \@minus -.2ex}
{.2ex \@plus.2ex }
{\normalfont\small\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
{-2ex \@plus-.2ex \@minus .2ex}
{.1ex}
{\normalfont\small\sffamily\bfseries}}%—————————————————————————————-
% PART HEADINGS
%—————————————————————————————-% Numbered part in the table of contents
\newcommand{\@mypartnumtocformat}[2]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!20}{\strut\parbox[c][.7cm]{\ecart}{\color{ocre!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}%
}% Unnumbered part in the table of contents
\newcommand{\@myparttocformat}[1]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}%
}\newlength\esp
\setlength\esp{4pt}
\newlength\ecart
\setlength\ecart{1.2cm-\esp}
\newcommand{\thepartimage}{}%
\newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ —\ #1}}
\else%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
\startcontents%
\markboth{}{}%
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north] at (4cm,-3.25cm){\color{ocre!40}\fontsize{220}{100}\sffamily\bfseries\thepart};
\node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
\printcontents{l}{0}{\setcounter{tocdepth}{1}}% The depth to which the Part mini table of contents displays headings; 0 for chapters only, 1 for chapters and sections and 2 for chapters, sections and subsections
}};
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
\end{tikzpicture}};
\end{tikzpicture}}%
\@endpart}
\def\@spart#1{%
\startcontents%
\phantomsection
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
\end{tikzpicture}};
\end{tikzpicture}}
\addcontentsline{toc}{part}{\texorpdfstring{%
\setlength\fboxsep{0pt}%
\noindent\protect\colorbox{ocre!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}%—————————————————————————————-
% CHAPTER HEADINGS
%—————————————————————————————-% A switch to conditionally include a picture, implemented by Christian Hupfer
\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\else
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}%——————————————-
\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother%—————————————————————————————-
% END CUSTOMIZATION STRUCTURE
%—————————————————————————————-\begin{document}
\chapterimage{chapter_head_1.pdf} % Table of contents heading image
\frontmatter
\tableofcontents
\pagestyle{plain}
\chapterimage{prova.pdf} % Chapter heading image
\input{capitoli/introduzione}
\let\cleardoublepage\clearpage
\input{capitoli/finalnote}\mainmatter
\let\cleardoublepage\clearpage
\input{capitoli/capitolo1}
\let\cleardoublepage\clearpage
\input{capitoli/capitolo2}
\input{capitoli/capitolo3}
\input{capitoli/capitolo4}
\input{capitoli/capitolo5}
\input{capitoli/capitolo6}
\input{capitoli/summary}
\input{capitoli/acknowledgements}\input{capitoli/bibliografia}
\end{document}
`
Basta togliere gli input e si ottiene un file che si compila.
Qui sono riuscita a mettere i numeri di pagina e a togliere la pagina bianca tra i vari capitoli.
Mi interessa:
– colorare di verde la scritta dei capitoli
– togliere il numero al capitolo e inserirlo nella TOC (la procedura classica genera errore – mancanza di \item)
::
File Struttura`
%—————————————————————————————-
% HEADERS AND FOOTERS
%—————————————————————————————-\usepackage{fancyhdr} % Required for header and footer configuration
\pagestyle{fancy} % Enable the custom headers and footers
\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}} % Styling for the current chapter in the header
\renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}} % Styling for the current section in the header\fancyhf{} % Clear default headers and footers
\fancyhead[LE,RO]{\sffamily\normalsize\thepage} % Styling for the page number in the header
\fancyhead[LO]{\rightmark} % Print the nearest section name on the left side of odd pages
\fancyhead[RE]{\leftmark} % Print the current chapter name on the right side of even pages
%\fancyfoot[C]{\thepage} % Uncomment to include a footer\renewcommand{\headrulewidth}{0.5pt} % Thickness of the rule under the header
\fancypagestyle{plain}{% Style for when a plain pagestyle is specified
\fancyhead{}\renewcommand{\headrulewidth}{0pt}%
}% Removes the header from odd empty pages at the end of chapters
\makeatletter
\renewcommand{\cleardoublepage}{
\clearpage\ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\fi}%—————————————————————————————-
% THEOREM STYLES
%—————————————————————————————-\usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc
\newcommand{\intoo}[2]{\mathopen{]}#1\,;#2\mathclose{[}}
\newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}}
\newcommand{\intff}[2]{\mathopen{[}#1\,;#2\mathclose{]}}
\renewcommand{\qedsymbol}{$\blacksquare$}
\newtheorem{notation}{Notation}[chapter]% Boxed/framed environments
\newtheoremstyle{ocrenumbox}% Theorem style name
{0pt}% Space above
{0pt}% Space below
{\normalfont}% Body font
{}% Indent amount
{\small\bf\sffamily\color{ocre}}% Theorem head font
{\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}—\nobreakspace#3.}} % Optional theorem note\newtheoremstyle{blacknumex}% Theorem style name
{5pt}% Space above
{5pt}% Space below
{\normalfont}% Body font
{} % Indent amount
{\small\bf\sffamily}% Theorem head font
{\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries—\nobreakspace#3.}}% Optional theorem note\newtheoremstyle{blacknumbox} % Theorem style name
{0pt}% Space above
{0pt}% Space below
{\normalfont}% Body font
{}% Indent amount
{\small\bf\sffamily}% Theorem head font
{\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\sffamily\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries—\nobreakspace#3.}}% Optional theorem note% Non-boxed/non-framed environments
\newtheoremstyle{ocrenum}% Theorem style name
{5pt}% Space above
{5pt}% Space below
{\normalfont}% Body font
{}% Indent amount
{\small\bf\sffamily\color{ocre}}% Theorem head font
{\;}% Punctuation after theorem head
{0.25em}% Space after theorem head
{\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}—\nobreakspace#3.}} % Optional theorem note
\makeatother% Defines the theorem text style for each type of theorem to one of the three styles above
\newcounter{dummy}
\numberwithin{dummy}{section}
\theoremstyle{ocrenumbox}
\newtheorem{theoremeT}[dummy]{Theorem}
\newtheorem{problem}{Problem}[chapter]
\newtheorem{exerciseT}{Exercise}[chapter]
\theoremstyle{blacknumex}
\newtheorem{exampleT}{Example}[chapter]
\theoremstyle{blacknumbox}
\newtheorem{vocabulary}{Vocabulary}[chapter]
\newtheorem{definitionT}{Definition}[section]
\newtheorem{corollaryT}[dummy]{Corollary}
\theoremstyle{ocrenum}
\newtheorem{proposition}[dummy]{Proposition}%—————————————————————————————-
% REMARK ENVIRONMENT
%—————————————————————————————-\newenvironment{remark}{\par\vspace{10pt}\small % Vertical white space above the remark and smaller font size
\begin{list}{}{
\leftmargin=35pt % Indentation on the left
\rightmargin=25pt}\item\ignorespaces % Indentation on the right
\makebox[-2.5pt]{\begin{tikzpicture}[overlay]
\node[draw=ocre!60,line width=1pt,circle,fill=ocre!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-15pt,0pt){\textcolor{ocre}{R}};\end{tikzpicture}} % Orange R in a circle
\advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark%—————————————————————————————-
% SECTION NUMBERING IN THE MARGIN
%—————————————————————————————-\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{-4ex \@plus -1ex \@minus -.4ex}
{1ex \@plus.2ex }
{\normalfont\large\sffamily\bfseries}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
{-3ex \@plus -0.1ex \@minus -.4ex}
{0.5ex \@plus.2ex }
{\normalfont\sffamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
{-2ex \@plus -0.1ex \@minus -.2ex}
{.2ex \@plus.2ex }
{\normalfont\small\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
{-2ex \@plus-.2ex \@minus .2ex}
{.1ex}
{\normalfont\small\sffamily\bfseries}}%—————————————————————————————-
% PART HEADINGS
%—————————————————————————————-% Numbered part in the table of contents
\newcommand{\@mypartnumtocformat}[2]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!20}{\strut\parbox[c][.7cm]{\ecart}{\color{ocre!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}%
}% Unnumbered part in the table of contents
\newcommand{\@myparttocformat}[1]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}%
}\newlength\esp
\setlength\esp{4pt}
\newlength\ecart
\setlength\ecart{1.2cm-\esp}
\newcommand{\thepartimage}{}%
\newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ —\ #1}}
\else%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
\startcontents%
\markboth{}{}%
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north] at (4cm,-3.25cm){\color{ocre!40}\fontsize{220}{100}\sffamily\bfseries\thepart};
\node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
\printcontents{l}{0}{\setcounter{tocdepth}{1}}% The depth to which the Part mini table of contents displays headings; 0 for chapters only, 1 for chapters and sections and 2 for chapters, sections and subsections
}};
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
\end{tikzpicture}};
\end{tikzpicture}}%
\@endpart}
\def\@spart#1{%
\startcontents%
\phantomsection
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
\end{tikzpicture}};
\end{tikzpicture}}
\addcontentsline{toc}{part}{\texorpdfstring{%
\setlength\fboxsep{0pt}%
\noindent\protect\colorbox{ocre!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}%—————————————————————————————-
% CHAPTER HEADINGS
%—————————————————————————————-% A switch to conditionally include a picture, implemented by Christian Hupfer
\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\else
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}%——————————————-
\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother%—————————————————————————————-
% LINKS
%—————————————————————————————-\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor=ocre,bookmarks=true,bookmarksopen=false}\usepackage{bookmark}
\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}`
File main
`
\documentclass[12pt,a4paper,oneside]{book}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage[sfdefault]{roboto}\linespread{1.55}
\usepackage{layaureo}
\usepackage{tikz}
\graphicspath{{Pictures/}}
\usepackage{graphicx}\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{booktabs}\usepackage{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{64,141,146} % Define the orange color used for highlighting throughout the book\usepackage[style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\input{structure.tex}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor=ocre,
linktoc=all
}\begin{document}
\chapterimage{chapter_head_1.pdf} % Table of contents heading image
\tableofcontents
\pagestyle{plain}
\frontmatter
\chapterimage{prova.pdf} % Chapter heading image
\input{capitoli/introduzione}
\input{capitoli/finalnote}\mainmatter
\input{capitoli/capitolo1}
\input{capitoli/capitolo2}
\input{capitoli/capitolo3}
\input{capitoli/capitolo4}
\input{capitoli/capitolo5}
\input{capitoli/capitolo6}
\input{capitoli/summary}
\input{capitoli/acknowledgements}\input{capitoli/bibliografia}
\end{document}
`
-
AutoreRisposte