2

enter image description hereIn my document, marginpar always needs to be place in left side of the page, and I need to place chapter number and some element in that margin par width, for this I've tried with the below tags:

\documentclass{book}

\makeatletter

\usepackage[a4,center,cam,info,]{crop}

\setlength{\paperheight}{9truein}%
\setlength{\paperwidth}{7truein}%

\setlength\textwidth{30pc}
\setlength\textheight{40pc}

\setlength\marginparwidth{48\p@}%

\setlength\oddsidemargin{5pc}
\addtolength\oddsidemargin{-1in}    % subtract out the 1 inch driver margin
\addtolength\oddsidemargin{\marginparwidth}%
\addtolength\oddsidemargin{\marginparsep}%
\setlength\@tempdima{\paperwidth}
\addtolength\@tempdima{-\textwidth}
\addtolength\@tempdima{-5pc}
\setlength\evensidemargin{\@tempdima}
\addtolength\evensidemargin{-1in}

\@mparswitchfalse%
\reversemarginpar
\makeatother

\usepackage{showframe}

\begin{document}

Test

\clearpage

Trial

\end{document}

And the output came as marginpar at right side only, how can I change this into leftside for all pages? Please suggest...

1

You are using the commands in a wrong order. Changing

\@mparswitchfalse%
\reversemarginpar

into

\reversemarginpar
\@mparswitchfalse%

ensures that the correct margin is not changed anymore.

  • @TeXniician Thanks for your quick suggestion, but still the page setup looks like same. Please refer the screenshot for clarification... – MadyYuvi Dec 19 '18 at 11:04
  • @MadyYuvi Have you actually used a \marginpar? You will see that the content is added on the left side! – TeXnician Dec 19 '18 at 11:05
  • oops....sorry, yes, it's working fine, is there any possible to move the marginpar frame also to left side? Sorry for the confusion.... – MadyYuvi Dec 19 '18 at 11:13
  • @MadyYuvi I have no idea about the showframe package… – TeXnician Dec 19 '18 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.