2

If I want to use the marginpar command, how to control its position? Namely, the marginnote appear either on the left or on the right. And I want to control the width of the box and the innersep inside the box, as well as the distance L of the box and the edge of the paper. Sometimes the distance L is negative. In the following picture, L is out of the edge. And if I want to pan up the note distance S, what is the comment? Notice here we set the command only for a particular paragraph, not setting for the whole document.

\documentclass{amsart} \usepackage{lipsum} \begin{document} \lipsum[1]\marginpar{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \end{document} 

enter image description here How to control the W and L here? enter image description here

3
  • 5
    Please add a compilable test document so we can see which class etc. you use Commented Jul 11 at 15:23
  • 3
    Did you look at the geometry package? Commented Jul 11 at 15:40
  • 2
    The W can be determined via \marginparwidth. But maybe you should consider using the marginnote package, that gives you more options to customize your margins. Commented Jul 11 at 16:35

1 Answer 1

2

It is possible to determine W and L via the geometry package. An MWE could look like this

\documentclass{amsart} \usepackage{lipsum} \usepackage[marginparwidth=2cm]{geometry} \begin{document} \lipsum[1]\marginpar{ABC DEF GHI JKL MNO PQR STU VWX YZ} \end{document} 

The marginparwidth option sets the length W (here 2 cm). This means that L can be set indirectly via the side margins, e.g. with the total option in the geometry pack; like this:

\usepackage[marginparwidth=2cm,total={13cm, 18cm}]{geometry} 

Now you'd have a page with a text that is 13 cm in width and 18 cm in length, with margin notes that are in a box of 2 cm width. Beyond this 2 cm margin notes box is L.

4
  • If the size of the marginparwidth goes beyond the width of the page, how to fix it? I mean L may be negative and it could happen. Commented Jul 19 at 0:51
  • I don't think, that I really get what you mean, but I try an answer: If the marginparwidth (W) goes beyond the page, you have to set either the marginparwidth or the textwidth lower. I don't see an option with a "negative L", but maybe I just don't get it. Commented Jul 19 at 5:50
  • See tex.stackexchange.com/questions/748107 here, the line "Some part of the marginnote disappear, how to fix it?" Commented Jul 19 at 6:06
  • The linked thread shows also a solution to your problem using the ragged2e package and dismissing the \text command; see tex.stackexchange.com/a/748108/144952 . In my opinion, this means, you have to set the right textwidth (via total option) and marginwidth (via marginparwidth option) and let your text stay in these boxes (!), e.g. with ragged text or hyphenation. Commented Jul 19 at 6:40

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.