Hot answers tagged

4

A common misunderstanding is that figures or tables have to be placed in an environment of the same name to let them float away. They can be placed in situ (given enough space is available), just dropping the figure or table environment. If a caption is needed (the \label command in the MWE is useless without \caption, then \captionof by the caption package ...


3

You have the color macro improperly grouped. That is, you close the group (with a right brace }) immediately after changing the color, rather than after painting the \rule. \documentclass[a4paper, 10 pt, oneside, final]{scrartcl} \usepackage[left=4.6cm, right=0.75cm, top=0.5cm, bottom=0.5cm]{geometry} \usepackage{soul} \usepackage{scrpage2} ...


3

You could add the following instructions to the document's preamble (after loading the setspace package): \usepackage{sectsty} \allsectionsfont{\singlespacing} A full MWE (minimum working example): \documentclass[12pt,oneside]{book} \usepackage{lipsum} % for filler text \usepackage{setspace} \doublespacing \usepackage{sectsty} ...


2

A related question has a solution for section headings using the titlesec package. However, if this answer is copied and naïvely modified for chapter headings, it will result in a ! Package titlesec Error: Not allowed in 'easy' settings error. The error arises because the titlesec package works a little differently with chapters than it does sections. An ...


2

This is largely what I said in the comments. I left a few things "in" but commented out along with meta-comments of my own trying to explain why. I hope all's clear. (If not, let me know.) \documentclass[12pt,a4paper,twoside]{report} \usepackage[top=2.54cm, bottom=2.54cm, left=2.54cm, right=2.54cm]{geometry} \usepackage{sectsty} % section font size ...


2

Since \chapter uses \thispagestyle{plain}, the \fancypagestyle{plain} redefinition must disable the \fancyhead[RO,LE]{...} from fancy style, i.e. say \fancyhead{} in \fancypagestyle{plain}{...}. \documentclass{book} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\sectionmark}[1]{\markboth{#1}{}} % set the \leftmark \fancyhf{} \fancyhead{} ...


2

Not sure if I am misunderstanding the question, but there is no problem with redefining the format of section headings within the body of the document. Here I do it with \section, but you can do the same for chapters, parts etc. The headings after the redefinition will take the new format (until you redefine again). I am just using tcolorbox as an example ...


1

You can change the value of the counter tocdepth mid-document, writing it to the ToC at the appropriate spot. This allows you to vary what shows and what doesn't show. \documentclass{report} \begin{document} \tableofcontents \chapter{This chapter is listed in the contents page} \section{So are all its sections} \subsection{--- and subsections!} ...


1

Here's a solution that uses the [h!] position specifier to direct LaTeX to make the figure environment non-floating. Of course, this method won't work if there's not enough space remaining in the column to actually insert the two side-by-side images and their captions. Instead of absolute widths for the minipages and images, I'd use relative widths, e.g., ...


1

Issuing \color{white} inside a group doesn't really do anything. I'd suggest defining a section rule colour (say) secrulecolor which you can adjust to suit your needs: \documentclass{scrartcl} \usepackage{titlesec} \usepackage{xcolor} \definecolor{myblue}{RGB}{0,25,102} % Title format \colorlet{secrulecolor}{black}% Default rule colour ...



Only top voted, non community-wiki answers of a minimum length are eligible