Generalmarginal notes outside the page

LaTeX specific issues not fitting into one of the other forums of this category.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

marginal notes outside the page

Post by warrence »

hi.
i have some trouble placing comments on the margin. for this i use

Code: Select all

\marginpar{my marginal comment}
in the preamble i'm using

Code: Select all

\geometry{outer=2.5cm,inner=2cm,top=1.5cm,bottom=3cm}
which causes that the comment is not placed properly but is half outside the page on even and odd pages (i'm using twoside-page mode). i thought that \geometry might cause this problem, so i removed it and added

Code: Select all

\setlength{\oddsidemargin}{2cm-1in}
\setlength{\evensidemargin}{2.5cm-1in}
\setlength{\textwidth}{16.5cm}
because this is what i found several times at google (1in is said to be some offset latex uses). this causes both margins to be about 2cm and 2.5cm (somehow not exactly, though) but the comments as well being far off the page (but well aligned to the text block). the trouble seems to be, that the space for the comment is much wider than the actual margin. but i don't know how to change this... maybe i'm just using the wrong command for placing marginal notes.
help would be much appreciated.

thanks a lot, warrence

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

marginal notes outside the page

Post by localghost »

You could try the marginnote package, which makes typesetting marginal notes a little bit easier.


Best regards
Thorsten¹
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

marginal notes outside the page

Post by warrence »

unfortunatly that does not work aswell. same problem.
just to be sure about what we talk i'll post the document:

Code: Select all

\documentclass[11pt, twoside, fleqn]{scrartcl}

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman, english]{babel}
\usepackage{marginnote}
\usepackage{geometry}

\geometry{outer=2.5cm,inner=2cm,top=1.5cm,bottom=3cm}

\begin{document}

asjaskgn \marginnote{sdgarh geaugheu rgser gu neri gergu erge rgierhg ruei ershrherh} agnkero ghs hgur guagiweghoa jglfksofnasgnfogjpg ag wrhgo agua gsjpg jaegi rwogjsgjiagprf<fd<ewewefa weuh fgwa gagg a  guahwigha igwuiagh wegi ghiwer ghawg w gagu uighuiarg.

\newpage

asjaskgn \marginnote{sdgarh geaugheu rgser gu neri gergu erge rgierhg ruei ershrherh} agnkero ghs hgur guagiweghoa jglfksofnasgnfogjpg ag wrhgo agua gsjpg jaegi rwogjsgjiagprf<fd<ewewefa weuh fgwa gagg a  guahwigha igwuiagh wegi ghiwer ghawg w gagu uighuiarg.

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

marginal notes outside the page

Post by Stefan Kottwitz »

Hi warrence,

set the marginparwidth with geometry

Code: Select all

\geometry{outer=2.5cm,inner=2cm,top=1.5cm,bottom=3cm, marginparwidth=1.9cm}
or directly

Code: Select all

\setlength{\marginparwidth}{1.9cm}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: marginal notes outside the page

Post by localghost »

At the moment I wonder what language shall be the default language of your document.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: marginal notes outside the page

Post by Stefan Kottwitz »

Hi Thorsten,

it's automatically the last language listed in the options, so it's english. But perhaps that was just a rhetoric question. :?
I would not be surprised if ngerman would be intended instead because I remember one user warrance using german version of software.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

marginal notes outside the page

Post by localghost »

Stefan_K wrote:[...] it's automatically the last language listed in the options, so it's english. But perhaps that was just a rhetoric question. :?
I would not be surprised if ngerman would be intended instead because I remember one user warrance using german version of software. [...]
I'm aware of the current settings. And yes, it was a rhetoric question. I hoped the answer would have come from warrence himself. If the answer is like I expect, the solution is obvious.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

marginal notes outside the page

Post by warrence »

hi, and thanks alot. it works with marginparwidth.
and regarding

Code: Select all

\usepackage[ngerman, english]{babel}
i'm using one header-file for several different type of latex-documents. some of them are english and some of them are german. normally i use this line together with

Code: Select all

\selectlanguage{ngerman}
and "english" respectively. i was just to lazy to add the line to this sample-document... :)
is that the answer you expected? ;)

btw, you don't have any idea where to get a list of measurements latex uses? "marginparwidth" for example. if i would have known, that there is something like "marginparwidth", i would have been able to guess the solution by myself, i think...

and thank you again ;)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

marginal notes outside the page

Post by gmedina »

You can use the layout package and its \layout command. A little example:

Code: Select all

\documentclass{book}
\usepackage{layout}

\begin{document}

\layout

\end{document} 
Last edited by gmedina on Tue May 06, 2008 10:30 pm, edited 1 time in total.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

marginal notes outside the page

Post by localghost »

warrence wrote:[..] is that the answer you expected? [...]
No, it's not. I thought that you erroneously wrote your text in German but with default language in English. This would have caused heavy difficulties in hyphenation. This head-word makes me suggest you the hyphenat package. Perhaps it can solve the problem.
Post Reply