GeneralHow to set headings and floats in/outside the left margin

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sveinse
Posts: 2
Joined: Wed Feb 20, 2008 1:15 pm

How to set headings and floats in/outside the left margin

Post by sveinse »

I want to create a layout where the page looks like this:

Code: Select all

_______________________________________
1 Header
      Lorem ipsum dolor sit amet, cons-
      ectetuer adipiscing elit. Quisque
      nunc justo, tristique nec,   pul-
      vinar luctus, auctor auctor, sem.
1.1 Subsection
      Maecenas a nisl. Mauris sed quam.
_______________________________________
In summary the body should be 50mm from the left edge and 30mm from the left. The headers and the section headers should be set symmetric, 30mm from each edge. I've arranged the margins using:

Code: Select all

% Page margins
\RequirePackage[paper=a4paper,margin=30mm,marginparwidth=20mm-\marginparsep,includeall,asymmetric,reversemp]{geometry}
% Extend headers 20mm to left
\fancyhfoffset[L]{20mm}
There are three related issues I would like to resolve. All of these are about moving the left margin 20mm to the left:

1. How to create an environment that moves the left margin 20mm to the left. I've going to use this for the first page, where the left and right margins should be symmetric.
2. How to place (figure) floats symmetric on the page (move the left margin 20mm to the left).
3. How to set chapters, sections and such to the left margin edge (again move left margin 20mm to left)

Does anyone have an idea of how to achieve this?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sveinse
Posts: 2
Joined: Wed Feb 20, 2008 1:15 pm

How to set headings and floats in/outside the left margin

Post by sveinse »

OK, let me answer myself. It seems this works:

Code: Select all

\newcommand{\lskip}{\leftskip -20mm}
\newenvironment{fullmargin}{
     \begingroup
     \lskip
}{\endgroup}
This works in text and in figure environments -- unless you refrain from using \centering inside an environment. I fix centering on title page by doing:

Code: Select all

\hfill{}Centertext\hfill
The only remaining issue is the placement of the section headers.
Post Reply