LaTeX forum ⇒ Graphics, Figures & TablesWrapping Issue in Legrand Orange Book

Information and discussion about graphics, figures & tables in LaTeX documents.
Deliriyum
Posts: 2
Joined: Fri Oct 13, 2017 5:50 pm

Wrapping Issue in Legrand Orange Book

Postby Deliriyum » Fri Oct 13, 2017 6:04 pm

Hey Guys!

Well I'm "new" to LaTeX, Since I didn't code in LaTeX for a while.. Yes, you read well, I'm using the most used template on the internet of LaTeX named "Legrand Orange Book". However, I'm having an issue that I can't figure out. I truly hope that you can help me out. So, I'm trying to wrap text in a figure but it doesn't work, as shown in image. I'm leaving the structure.tex file, because I think the problem is from there, since it might code the page layout not allowing "wrap text code". All I want is to wrap the text from the first paragraph in the Image, but can't do.. Thanks a lot guys!

PROBLEM

https://imgur.com/xCW0vsM


MAIN.TEX SAMPLE
  1. \chapter{Roverway}
  2.  
  3. \section{O que é o Roverway?}\index{O que é o Roverway?}
  4.  
  5. \begin{wrapfigure}{R}{5cm}
  6. \centering
  7. \includegraphics[width=0.3\textwidth]{Roverwaylogo.png}
  8. \end{wrapfigure}
  9.  
  10. \section{Os opostos atraem-se}\index{Os opostos atraem-se}
  11. A edição do 2018 de Roverway centra-se no desenvolvimento pessoal dos participantes como parte de seu papel na sociedade.
  12.  
  13. (...)
  14.  
  15. Vamos nos aproximar em um debate aberto e honesto.
  16.  
  17. \section{Objetivos Educacionais}\index{Objetivos Educacionais}
  18.  
  19. Os jovens da Europa enfrentam uma sociedade em mudança.
  20.  
  21. (...)
  22.  
  23. Os objetivos educacionais da Roverway que ajudam a juventude de hoje a superar seus desafios em nossa sociedade são:


STRUCTURE.TEX FILE
  1. %----------------------------------------------------------------------------------------
  2. % VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS
  3. %----------------------------------------------------------------------------------------
  4.  
  5. \usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry} % Page margins
  6.  
  7. \usepackage{graphicx} % Required for including pictures
  8. \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored
  9.  
  10. \usepackage{wrapfig}
  11.  
  12. \usepackage{lipsum} % Inserts dummy text
  13.  
  14. \usepackage{tikz} % Required for drawing custom shapes
  15.  
  16. \usepackage[english]{babel} % English language/hyphenation
  17.  
  18. \usepackage{enumitem} % Customize lists
  19. \setlist{nolistsep} % Reduce spacing between bullet points and numbered lists
  20.  
  21. \usepackage{booktabs} % Required for nicer horizontal rules in tables
  22.  
  23. \usepackage{xcolor} % Required for specifying colors by name
  24. \definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book
  25.  
  26. %----------------------------------------------------------------------------------------
  27. % FONTS
  28. %----------------------------------------------------------------------------------------
  29.  
  30. \usepackage{avant} % Use the Avantgarde font for headings
  31. %\usepackage{times} % Use the Times font for headings
  32. \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts
  33.  
  34. \usepackage{microtype} % Slightly tweak font spacing for aesthetics
  35. \usepackage[utf8]{inputenc} % Required for including letters with accents
  36. \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
  37.  
  38. %----------------------------------------------------------------------------------------
  39. % BIBLIOGRAPHY AND INDEX
  40. %----------------------------------------------------------------------------------------
  41.  
  42. \usepackage[style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
  43. \addbibresource{bibliography.bib} % BibTeX bibliography file
  44. \defbibheading{bibempty}{}
  45.  
  46. \usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
  47. \usepackage{makeidx} % Required to make an index
  48. \makeindex % Tells LaTeX to create the files required for indexing
  49.  
  50. %----------------------------------------------------------------------------------------
  51. % MAIN TABLE OF CONTENTS
  52. %----------------------------------------------------------------------------------------
  53.  
  54. \usepackage{titletoc} % Required for manipulating the table of contents
  55.  
  56. \contentsmargin{0cm} % Removes the default margin
  57.  
  58. % Part text styling
  59. \titlecontents{part}[0cm]
  60. {\addvspace{20pt}\centering\large\bfseries}
  61. {}
  62. {}
  63. {}
  64.  
  65. % Chapter text styling
  66. \titlecontents{chapter}[1.25cm] % Indentation
  67. {\addvspace{12pt}\large\sffamily\bfseries} % Spacing and font options for chapters
  68. {\color{ocre!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Chapter number
  69. {\color{ocre}}
  70. {\color{ocre!60}\normalsize\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number
  71.  
  72. % Section text styling
  73. \titlecontents{section}[1.25cm] % Indentation
  74. {\addvspace{3pt}\sffamily\bfseries} % Spacing and font options for sections
  75. {\contentslabel[\thecontentslabel]{1.25cm}} % Section number
  76. {}
  77. {\hfill\color{black}\thecontentspage} % Page number
  78. []
  79.  
  80. % Subsection text styling
  81. \titlecontents{subsection}[1.25cm] % Indentation
  82. {\addvspace{1pt}\sffamily\small} % Spacing and font options for subsections
  83. {\contentslabel[\thecontentslabel]{1.25cm}} % Subsection number
  84. {}
  85. {\ \titlerule*[.5pc]{.}\;\thecontentspage} % Page number
  86. []
  87.  
  88. % List of figures
  89. \titlecontents{figure}[0em]
  90. {\addvspace{-5pt}\sffamily}
  91. {\thecontentslabel\hspace*{1em}}
  92. {}
  93. {\ \titlerule*[.5pc]{.}\;\thecontentspage}
  94. []
  95.  
  96. % List of tables
  97. \titlecontents{table}[0em]
  98. {\addvspace{-5pt}\sffamily}
  99. {\thecontentslabel\hspace*{1em}}
  100. {}
  101. {\ \titlerule*[.5pc]{.}\;\thecontentspage}
  102. []
  103.  
  104. %----------------------------------------------------------------------------------------
  105. % MINI TABLE OF CONTENTS IN PART HEADS
  106. %----------------------------------------------------------------------------------------
  107.  
  108. % Chapter text styling
  109. \titlecontents{lchapter}[0em] % Indenting
  110. {\addvspace{15pt}\large\sffamily\bfseries} % Spacing and font options for chapters
  111. {\color{ocre}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Chapter number
  112. {}
  113. {\color{ocre}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number
  114.  
  115. % Section text styling
  116. \titlecontents{lsection}[0em] % Indenting
  117. {\sffamily\small} % Spacing and font options for sections
  118. {\contentslabel[\thecontentslabel]{1.25cm}} % Section number
  119. {}
  120. {}
  121.  
  122. % Subsection text styling
  123. \titlecontents{lsubsection}[.5em] % Indentation
  124. {\normalfont\footnotesize\sffamily} % Font settings
  125. {}
  126. {}
  127. {}
  128.  
  129. %----------------------------------------------------------------------------------------
  130. % PAGE HEADERS
  131. %----------------------------------------------------------------------------------------
  132.  
  133. \usepackage{fancyhdr} % Required for header and footer configuration
  134.  
  135. \pagestyle{fancy}
  136. \renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}} % Chapter text font settings
  137. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}} % Section text font settings
  138. \fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\thepage} % Font setting for the page number in the header
  139. \fancyhead[LO]{\rightmark} % Print the nearest section name on the left side of odd pages
  140. \fancyhead[RE]{\leftmark} % Print the current chapter name on the right side of even pages
  141. \renewcommand{\headrulewidth}{0.5pt} % Width of the rule under the header
  142. \addtolength{\headheight}{2.5pt} % Increase the spacing around the header slightly
  143. \renewcommand{\footrulewidth}{0pt} % Removes the rule in the footer
  144. \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} % Style for when a plain pagestyle is specified
  145.  
  146. % Removes the header from odd empty pages at the end of chapters
  147. \makeatletter
  148. \renewcommand{\cleardoublepage}{
  149. \clearpage\ifodd\c@page\else
  150. \hbox{}
  151. \vspace*{\fill}
  152. \thispagestyle{empty}
  153. \newpage
  154. \fi}
  155.  
  156. %----------------------------------------------------------------------------------------
  157. % THEOREM STYLES
  158. %----------------------------------------------------------------------------------------
  159.  
  160. \usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc
  161.  
  162. \newcommand{\intoo}[2]{\mathopen{]}#1\,;#2\mathclose{[}}
  163. \newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}}
  164. \newcommand{\intff}[2]{\mathopen{[}#1\,;#2\mathclose{]}}
  165. \newtheorem{notation}{Notation}[chapter]
  166.  
  167. % Boxed/framed environments
  168. \newtheoremstyle{ocrenumbox}% % Theorem style name
  169. {0pt}% Space above
  170. {0pt}% Space below
  171. {\normalfont}% % Body font
  172. {}% Indent amount
  173. {\small\bf\sffamily\color{ocre}}% % Theorem head font
  174. {\;}% Punctuation after theorem head
  175. {0.25em}% Space after theorem head
  176. {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  177. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
  178. \renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square
  179.  
  180. \newtheoremstyle{blacknumex}% Theorem style name
  181. {5pt}% Space above
  182. {5pt}% Space below
  183. {\normalfont}% Body font
  184. {} % Indent amount
  185. {\small\bf\sffamily}% Theorem head font
  186. {\;}% Punctuation after theorem head
  187. {0.25em}% Space after theorem head
  188. {\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  189. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
  190.  
  191. \newtheoremstyle{blacknumbox} % Theorem style name
  192. {0pt}% Space above
  193. {0pt}% Space below
  194. {\normalfont}% Body font
  195. {}% Indent amount
  196. {\small\bf\sffamily}% Theorem head font
  197. {\;}% Punctuation after theorem head
  198. {0.25em}% Space after theorem head
  199. {\small\sffamily\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  200. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
  201.  
  202. % Non-boxed/non-framed environments
  203. \newtheoremstyle{ocrenum}% % Theorem style name
  204. {5pt}% Space above
  205. {5pt}% Space below
  206. {\normalfont}% % Body font
  207. {}% Indent amount
  208. {\small\bf\sffamily\color{ocre}}% % Theorem head font
  209. {\;}% Punctuation after theorem head
  210. {0.25em}% Space after theorem head
  211. {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  212. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
  213. \renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square
  214. \makeatother
  215.  
  216. % Defines the theorem text style for each type of theorem to one of the three styles above
  217. \newcounter{dummy}
  218. \numberwithin{dummy}{section}
  219. \theoremstyle{ocrenumbox}
  220. \newtheorem{theoremeT}[dummy]{Theorem}
  221. \newtheorem{problem}{Problem}[chapter]
  222. \newtheorem{exerciseT}{Exercise}[chapter]
  223. \theoremstyle{blacknumex}
  224. \newtheorem{exampleT}{Example}[chapter]
  225. \theoremstyle{blacknumbox}
  226. \newtheorem{vocabulary}{Vocabulary}[chapter]
  227. \newtheorem{definitionT}{Definition}[section]
  228. \newtheorem{corollaryT}[dummy]{Corollary}
  229. \theoremstyle{ocrenum}
  230. \newtheorem{proposition}[dummy]{Proposition}
  231.  
  232. %----------------------------------------------------------------------------------------
  233. % DEFINITION OF COLORED BOXES
  234. %----------------------------------------------------------------------------------------
  235.  
  236. \RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes
  237.  
  238. % Theorem box
  239. \newmdenv[skipabove=7pt,
  240. skipbelow=7pt,
  241. backgroundcolor=black!5,
  242. linecolor=ocre,
  243. innerleftmargin=5pt,
  244. innerrightmargin=5pt,
  245. innertopmargin=5pt,
  246. leftmargin=0cm,
  247. rightmargin=0cm,
  248. innerbottommargin=5pt]{tBox}
  249.  
  250. % Exercise box
  251. \newmdenv[skipabove=7pt,
  252. skipbelow=7pt,
  253. rightline=false,
  254. leftline=true,
  255. topline=false,
  256. bottomline=false,
  257. backgroundcolor=ocre!10,
  258. linecolor=ocre,
  259. innerleftmargin=5pt,
  260. innerrightmargin=5pt,
  261. innertopmargin=5pt,
  262. innerbottommargin=5pt,
  263. leftmargin=0cm,
  264. rightmargin=0cm,
  265. linewidth=4pt]{eBox}
  266.  
  267. % Definition box
  268. \newmdenv[skipabove=7pt,
  269. skipbelow=7pt,
  270. rightline=false,
  271. leftline=true,
  272. topline=false,
  273. bottomline=false,
  274. linecolor=ocre,
  275. innerleftmargin=5pt,
  276. innerrightmargin=5pt,
  277. innertopmargin=0pt,
  278. leftmargin=0cm,
  279. rightmargin=0cm,
  280. linewidth=4pt,
  281. innerbottommargin=0pt]{dBox}
  282.  
  283. % Corollary box
  284. \newmdenv[skipabove=7pt,
  285. skipbelow=7pt,
  286. rightline=false,
  287. leftline=true,
  288. topline=false,
  289. bottomline=false,
  290. linecolor=gray,
  291. backgroundcolor=black!5,
  292. innerleftmargin=5pt,
  293. innerrightmargin=5pt,
  294. innertopmargin=5pt,
  295. leftmargin=0cm,
  296. rightmargin=0cm,
  297. linewidth=4pt,
  298. innerbottommargin=5pt]{cBox}
  299.  
  300. % Creates an environment for each type of theorem and assigns it a theorem text style from the "Theorem Styles" section above and a colored box from above
  301. \newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}}
  302. \newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{exerciseT}\end{eBox}}
  303. \newenvironment{definition}{\begin{dBox}\begin{definitionT}}{\end{definitionT}\end{dBox}}
  304. \newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}
  305. \newenvironment{corollary}{\begin{cBox}\begin{corollaryT}}{\end{corollaryT}\end{cBox}}
  306.  
  307. %----------------------------------------------------------------------------------------
  308. % REMARK ENVIRONMENT
  309. %----------------------------------------------------------------------------------------
  310.  
  311. \newenvironment{remark}{\par\vspace{10pt}\small % Vertical white space above the remark and smaller font size
  312. \begin{list}{}{
  313. \leftmargin=35pt % Indentation on the left
  314. \rightmargin=25pt}\item\ignorespaces % Indentation on the right
  315. \makebox[-2.5pt]{\begin{tikzpicture}[overlay]
  316. \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
  317. \advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark
  318.  
  319. %----------------------------------------------------------------------------------------
  320. % SECTION NUMBERING IN THE MARGIN
  321. %----------------------------------------------------------------------------------------
  322.  
  323. \makeatletter
  324. \renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
  325. \renewcommand{\section}{\@startsection{section}{1}{\z@}
  326. {-4ex \@plus -1ex \@minus -.4ex}
  327. {1ex \@plus.2ex }
  328. {\normalfont\large\sffamily\bfseries}}
  329. \renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
  330. {-3ex \@plus -0.1ex \@minus -.4ex}
  331. {0.5ex \@plus.2ex }
  332. {\normalfont\sffamily\bfseries}}
  333. \renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
  334. {-2ex \@plus -0.1ex \@minus -.2ex}
  335. {.2ex \@plus.2ex }
  336. {\normalfont\small\sffamily\bfseries}}
  337. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
  338. {-2ex \@plus-.2ex \@minus .2ex}
  339. {.1ex}
  340. {\normalfont\small\sffamily\bfseries}}
  341.  
  342. %----------------------------------------------------------------------------------------
  343. % PART HEADINGS
  344. %----------------------------------------------------------------------------------------
  345.  
  346. % numbered part in the table of contents
  347. \newcommand{\@mypartnumtocformat}[2]{%
  348. \setlength\fboxsep{0pt}%
  349. \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}}}%
  350. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  351. % unnumbered part in the table of contents
  352. \newcommand{\@myparttocformat}[1]{%
  353. \setlength\fboxsep{0pt}%
  354. \noindent\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}}%
  355. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  356. \newlength\esp
  357. \setlength\esp{4pt}
  358. \newlength\ecart
  359. \setlength\ecart{1.2cm-\esp}
  360. \newcommand{\thepartimage}{}%
  361. \newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
  362. \def\@part[#1]#2{%
  363. \ifnum \c@secnumdepth >-2\relax%
  364. \refstepcounter{part}%
  365. \addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}
  366. \else%
  367. \addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
  368. \fi%
  369. \startcontents%
  370. \markboth{}{}%
  371. {\thispagestyle{empty}%
  372. \begin{tikzpicture}[remember picture,overlay]%
  373. \node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
  374. \fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
  375. \node[anchor=north] at (4cm,-3.25cm){\color{ocre!40}\fontsize{220}{100}\sffamily\bfseries\thepart};
  376. \node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
  377. \printcontents{l}{0}{\setcounter{tocdepth}{1}}%
  378. }};
  379. \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
  380. \end{tikzpicture}};
  381. \end{tikzpicture}}%
  382. \@endpart}
  383. \def\@spart#1{%
  384. \startcontents%
  385. \phantomsection
  386. {\thispagestyle{empty}%
  387. \begin{tikzpicture}[remember picture,overlay]%
  388. \node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
  389. \fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
  390. \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
  391. \end{tikzpicture}};
  392. \end{tikzpicture}}
  393. \addcontentsline{toc}{part}{\texorpdfstring{%
  394. \setlength\fboxsep{0pt}%
  395. \noindent\protect\colorbox{ocre!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
  396. \@endpart}
  397. \def\@endpart{\vfil\newpage
  398. \if@twoside
  399. \if@openright
  400. \null
  401. \thispagestyle{empty}%
  402. \newpage
  403. \fi
  404. \fi
  405. \if@tempswa
  406. \twocolumn
  407. \fi}
  408.  
  409. %----------------------------------------------------------------------------------------
  410. % CHAPTER HEADINGS
  411. %----------------------------------------------------------------------------------------
  412.  
  413. % A switch to conditionally include a picture, implemented by Christian Hupfer
  414. \newif\ifusechapterimage
  415. \usechapterimagetrue
  416. \newcommand{\thechapterimage}{}%
  417. \newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
  418. \newcommand{\autodot}{.}
  419. \def\@makechapterhead#1{%
  420. {\parindent \z@ \raggedright \normalfont
  421. \ifnum \c@secnumdepth >\m@ne
  422. \if@mainmatter
  423. \begin{tikzpicture}[remember picture,overlay]
  424. \node at (current page.north west)
  425. {\begin{tikzpicture}[remember picture,overlay]
  426. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  427. \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]{}};
  428. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
  429. \end{tikzpicture}};
  430. \end{tikzpicture}
  431. \else
  432. \begin{tikzpicture}[remember picture,overlay]
  433. \node at (current page.north west)
  434. {\begin{tikzpicture}[remember picture,overlay]
  435. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  436. \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]{}};
  437. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
  438. \end{tikzpicture}};
  439. \end{tikzpicture}
  440. \fi\fi\par\vspace*{270\p@}}}
  441.  
  442. %-------------------------------------------
  443.  
  444. \def\@makeschapterhead#1{%
  445. \begin{tikzpicture}[remember picture,overlay]
  446. \node at (current page.north west)
  447. {\begin{tikzpicture}[remember picture,overlay]
  448. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  449. \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]{}};
  450. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
  451. \end{tikzpicture}};
  452. \end{tikzpicture}
  453. \par\vspace*{270\p@}}
  454. \makeatother
  455.  
  456. %----------------------------------------------------------------------------------------
  457. % HYPERLINKS IN THE DOCUMENTS
  458. %----------------------------------------------------------------------------------------
  459.  
  460. \usepackage{hyperref}
  461. \usepackage{bookmark}
  462. \bookmarksetup{
  463. open,
  464. numbered,
  465. addtohook={%
  466. \ifnum\bookmarkget{level}=0 % chapter
  467. \bookmarksetup{bold}%
  468. \fi
  469. \ifnum\bookmarkget{level}=-1 % part
  470. \bookmarksetup{color=ocre,bold}%
  471. \fi
  472. }
  473. }

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8523
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sat Oct 14, 2017 12:51 am

Welcome to the forum!

Does this happen if you try wrapping in a simple document? Such as here:

  1. \documentclass{book}
  2. \usepackage[demo]{graphicx}
  3. \usepackage{wrapfig}
  4. \usepackage{blindtext}
  5. \begin{document}
  6. \chapter{Roverway}
  7. \section{O que é o Roverway?}\index{O que é o Roverway?}
  8. \begin{wrapfigure}{R}{5cm}
  9. \centering
  10. \includegraphics[width=0.3\textwidth]{Roverwaylogo.png}
  11. \end{wrapfigure}
  12. \section{Os opostos atraem-se}\index{Os opostos atraem-se}
  13. \blindtext
  14. \section{Objetivos Educacionais}\index{Objetivos Educacionais}
  15. \blindtext
  16. \end{document}

This works fine, with your wrapfigure code. Can you also post the Roverwaylogo.png file as attachment here? The attachment link is below the text edit field, when writing a post.

Stefan
Site admin

Deliriyum
Posts: 2
Joined: Fri Oct 13, 2017 5:50 pm

Postby Deliriyum » Sat Oct 14, 2017 5:00 am

Stefan,

Thanks a lot for the fast reply. Infornately it didn't work.. As you can see in the output, which I send together with the logo in attachments as requested. Once again, I'm really thankful !
Attachments
Roverwaylogo.png
Roverwaylogo.png (47.71 KiB) Viewed 205 times
main.pdf
(55.78 KiB) Downloaded 4 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8523
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sat Oct 14, 2017 7:24 am

Hi,

I downloaded the template, put your structure.tex in and your code in main.tex and I don't see an issue:

roverway.png
roverway.png (243.02 KiB) Viewed 200 times


Perhaps there is something else that you did not post, or the code you posted is not enough to verify that issue.

Stefan
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests