Hot answers tagged margins
9
This only works for simple cases, but could be extended and generalised a bit.
\documentclass{article}
\makeatletter
\def\a{Cat dog goat sheep pig rabbit cow kangeroo. }
\def\b{One two three four five six. }
\def\c{\a\a\b\a\b\b\a\a\a\a\b\b\a\b}
\def\d{\c\par\a\b\c\par\b\b\b\b\b\b\par}
\def\e{\par\d\d\b\b\b\b\b\d\a\a\a\a\a\a\a\d}
\def\shp#1{%
...
8
There is a "design comprimise" in package lscape (in other packages it would be called "design flaw" ;-), of course). Environment landscape only rotates \textheight and \textwidth remains unchanged. However package geometry expects unchanged values, thus it gets surprised with \textheight having the old value of \textwidth.
The following example fixes this ...
7
In the absence of a better answer, here is my attempt.
Some comments on my approach.
I used the examples on Vincent Zoonekynd's webpage as a starting point.
I set the ((sub)sub)section number in a box of a specific width, and then the ((sub)sub)section title to the right of it. Normally, there's just a \quad of horizontal space between the two, but ...
6
Playing with \leftskip and \rightskip helps. Negative values allow to write into the margins. Because applies inside the columns, the distance between the columns must be increased by the same amount. The new environment wideparcolumns therefore fixes the value for parameter distance.
\documentclass{article}
\usepackage{parcolumns}
\usepackage{lipsum}
...
6
I do not think, it makes much sense to use an overlarge height of the titlepage's header for the whole document. Nonetheless the question is interesting in general.
Package fancyhdr already updates \headheight or \footskip, if the header or footer is too large. The following example stores the latest values of these dimension registers at the end of the ...
6
You can use a \makebox for each row of subfigures (change the lengths to suit your needs):
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{figure}
\makebox[\linewidth][c]{%
\begin{subfigure}[b]{.6\textwidth}
\centering
\includegraphics[width=.95\textwidth]{image1}
...
6
Here's a possibility using the background package (change the settings according to your needs). Using \AddLabels the tabs are activated; \RemoveLabels deactivates the tabs:
\documentclass[openany]{scrbook}
\usepackage[contents={},opacity=1,scale=1,color=black]{background}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{tikzpagenodes}
...
4
By default, if you use width=<length>, PGFPlots makes some rather strong assumptions about the size the labels will take up (even if the subplots don't have any) when setting the lengths. You can get a much more predictable result if you use scale only axis, width=1/5*\textwidth, and then adjust that length to compensate for the axis label.
However, ...
4
If you want a mark in your text, you have several approaches.
Use \textsuperscript{(1)}, as mentioned by Werner
Use mathmode (not my favorite solution, but works as well).
I don't know if applies, but a mark could also be an emphasize... so you can use \emph{word}.
For the margins, I wasn't sure what do you want, so I also have two possible answers:
...
4
Here's my take with the listings package. The code below defines a new environment via \lstnewenvironment that saves the listing in a box and then typesets it in a \marginpar (or \marginnote if you like):
\documentclass{article}
\usepackage[marginparwidth=5cm,includemp,showframe]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
...
4
The following solution can be used as a starting point.
Let me start with some new keys.
The example defines some new keys for mdframed:
quotelinewidth -- Set the line width of the quote line
quoteleveldistance -- Set the distance between quoted lines if more than 1 quote levels are used
quotelevel -- Set the level of the quotation
Coincident the ...
3
It's a sneaky one: the t option doesn't push everything right to the top, it sets \beamer@frametopskip to 0.2cm plus 0.5\paperheight. (0.2cm are pretty exactly the 5.69pt you observe).
Adding
\makeatletter
\define@key{beamerframe}{t}[true]{% top
\beamer@frametopskip=0pt %<-- was: .2cm plus .5\paperheight\relax%
\beamer@framebottomskip=0pt plus ...
3
With fancyvrb you can use an environment form:
\documentclass{article}
\usepackage[marginparwidth=5cm,includemp]{geometry}
\usepackage{marginnote,fancyvrb,xcolor}
\usepackage{lipsum}
\newsavebox{\marginlistingbox}
\newenvironment{marginlisting}
{\fvset{tabsize=3,frame=leftline,framerule=2mm,rulecolor=\color{black!20}}%
...
3
You don't need wrapfig for this. Just build a sequence of boxes. For the margins I used 1cm at all sides, adjust to suit.
\documentclass{article}
\usepackage[margin=1cm,showframe]{geometry}
\usepackage{hyperref,graphicx,anyfontsize, color, amsmath}
\usepackage[usenames,dvipsnames]{xcolor}
\begin{document}
\noindent\begin{picture}(65,65)
...
3
That line is just an artifact of the viewer.
Declare an invisible frame to the left (and to the right) and use the desired value for framesep.
An example:
\documentclass{article}
\usepackage{listings}
\usepackage{color}
\begin{document}
\definecolor{light-gray}{gray}{0.95}
\lstset{columns=fullflexible, basicstyle=\ttfamily,
...
2
You have two \tabcolsep too many. With
\multicolumn{2}{p{\textwidth-2\tabcolsep}}
you get the required width. Load the calc package. Note that multicol is not required, it is used for different purposes (text in two or more columns). I left draft to show that the overfull box message you get is not due to the background color, but to something in the ...
2
Maybe (your code commented from time to time to see the differences):
\documentclass[12pt]{article}
\usepackage{moresize}
\usepackage{fullpage}
\usepackage[defaultsans]{droidsans}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\overfullrule5pt
\begin{document}
%\begin{table}
%\begin{tabular}{l r l}
%\Huge{White H. Love-Tiger} & ...
2
Since you're using the geometry package, you can set the \headheight using that. To set the initial value, use
\usepackage[...other options...,headheight=<length>]{geometry}
and to change it on successive pages, use
\newgeometry{headheight=<new value>}
However, all of the other options will also have to be given again in \newgeometry.
For ...
2
The default page layout of the tufte-book document class has about a 57 pt outer margin for A4 paper and a 62 pt outer margin for US letter paper. (For reference, 1 inch is 72.27 pt.)
To ensure that no marginal material falls within an inch of the edge of the page, we need to do two things: adjust the page layout slightly and make sure that the figures and ...
2
In April 2002, the web site of the Koma project, Markus Kohm himself presents both commented code for chapter-thumbs, complemented by a pdf as output.
According to him, it should work with every class with \chapter{}-environment and is based on scrpage2. While xcolor allows coloured backgrounds, graphicx provides rotation of the entries to be printed. In ...
1
You can use \vadjust to place the markers in the margin as follows:
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\parindent0pt % no paragraph indentation
\newcommand*{\lparind}{\leavevmode\vadjust{\llap{\textcolor{gray}{\raisebox{0.5ex}[0pt][0pt]{\footnotesize \P\quad}}}}}
\newcommand*{\rparind}{\leavevmode\vadjust{\hbox to ...
1
A couple of tricks will show that the dimensions you want can be obtained with the geometry package: two horizontal rules are visible at the top and at the bottom, at the page margins. In the final version, add also heightrounded to the setting of geometry; this will change a bit the top and bottom margin, but by a negligible amount.
\documentclass{article}
...
1
So in the end I went with the fancyvrb solution as John Wickerson pointed out. It seems that for small code snippets to be used in margins it's quite useful (although there's no keywording feature that I know of)
% set options globally
\fvset{tabsize=3,frame=leftline,framerule=2mm,rulecolor=\color{black!20}}
% define and save
\begin{SaveVerbatim}{name}
...
1
Aren't. Without 12pt and \Huge is also OK, but less visible.
\documentclass[12pt]{standalone}%
\begin{document}%
\Huge
O%
\end{document}%
(Sorry that not as a comment, but i don't know, how to add a picture there).
1
You can get the size right in Excel before saving to PDF - see my answer on superuser, copied below for convenience:
To avoid the "crop the PDF" step mentioned in several answers (on superuser), you can put the chart on its own Worksheet with an appropriate paper size and zero margins. E.g. in Windows Excel 2007:
Select chart, from pop-up menu choose Move ...
1
In case you want to correct the right margin of note pages in "plain" style:
\makeatletter
\defbeamertemplate{note page}{plain2}
{
\vskip.25em
\nointerlineskip
\begin{minipage}{\textwidth} % this is an addition
\insertnote
\end{minipage} % this is an addition
}
\makeatother
\setbeamertemplate{note page}[plain2]
\setbeameroption{show ...
Only top voted, non community-wiki answers of a minimum length are eligible

