I need to set some text from a my own class file, on the left-hand side margin of a document for that I use the marginpar,Also content in the extreme left side should not overlap the contents on the right side of the margin, so it needs to be adjusted as per requirement. Can you please advise me how to go about it?

The following code is my class file

%cfoot{\ifnum\value{page} >1\newgeometry{left=19.8pc,right=3.5pc,top=5.9pc,textwidth=170mm}\thepage \else\fi}
  \let \footnote \thanks
  \hrule height \z@ 
    {\LARGE \color{yellow}\@title\par}%
    \vskip 1.5em 
      \lineskip .5em 
    \vskip 1em 
    {\large \@date}%
  \vskip 1.5em
Name :Kevin
Received:28 November2016 
Accepted: 4 December2016

The tex code is

\input /home/kevin/Desktop/script/tex/sample.cls
\title{Sample File}
\author[1]{Author A\thanks{A.A@university.edu}}
\author[1]{Author B\thanks{B.B@university.edu}}
\author[1]{Author C\thanks{C.C@university.edu}}
\author[2]{Author D\thanks{D.D@university.edu}}
\author[2]{Author E\thanks{E.E@university.edu}}
\affil[1]{Department of Computer Science, University}
\affil[2]{Department of Mechanical Engineering, University}

  • 4
    Where is the code? And have you tried \marginpar{<text to appear in the margins>}? – jon Mar 2 '17 at 4:38
  • You can't typeset anything in the class file, of course. You need to not typeset before \begin{document}. – cfr Mar 2 '17 at 5:07
  • @jon I use the code \begin{minipage}some text \end{minipage}. now i use the code \marginpar but how align the content also it appeared in separate page please help – Kevin Mar 2 '17 at 5:11
  • This question is more than unclear in its current state. The picture posted is just a screent from the wikibook. – Johannes_B Mar 2 '17 at 7:20
  • 2
    your question is completely unclear. You show an image of a table of contents which typically would be made by \tableofcontents but then ask a question about putting text in a margin (which would normally be \marginpar (but there doesn't seem to be any marginal text in the image) and something about minipage which does not seem to be related to the image at all. Please edit the question to have some tex code, and if it does the wrong thing, or gives an error, say what it does and what you want it to do, – David Carlisle Mar 2 '17 at 8:58

Your Answer

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

Browse other questions tagged or ask your own question.