[Tex/LaTex] How to make marginenote text fully justified

marginnote

This MWE example, compiled with lualatex

\documentclass[11pt]{book}
\usepackage{blindtext}
\usepackage{marginnote}
\usepackage{showframe}
\usepackage[letterpaper,outer=1.8in,bindingoffset=6mm,top=1in,bottom=.85in]{geometry}
\begin{document}
\marginnote{\blindtext}
\Blindtext
\end{document}

gives

Mathematica graphics

I tried add this line before the command \renewcommand*{\raggedrightmarginnote}{\centering} and get this (still not fully justified )

Mathematica graphics

I tried the commands shown on page 2 of the documentation, but now I get an error

Mathematica graphics

MWE

\documentclass[11pt]{book}
\usepackage{blindtext}
\usepackage{marginnote}
\usepackage{showframe}

\begingroup
\makeatletter
\g@addto@macro\framed{%
\let\marginnoteleftadjust\FrameSep
\let\marginnoterightadjust\FrameSep
}
\endgroup

\usepackage[letterpaper,outer=1.8in,bindingoffset=6mm,top=1in,bottom=.85in]{geometry}
\begin{document}

\marginnote{\blindtext}
\Blindtext
\end{document}

error is

(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pdftex-def/pdftex.def))))
! Undefined control sequence.
<argument> \framed 

l.11 }

? 

I would have expected the side margin note to be fully justified by default as in the main text. How to fix this?

TL 2015, lualatex compiler.

https://www.ctan.org/pkg/marginnote

Update

Thanks for comments below. I tried one of the suggestions, but for somereason I get an error. May be I am doing something wrong. I am newbie in advanced Latex programming.

\documentclass[11pt]{book}
\usepackage{blindtext}
\usepackage{marginnote}
\usepackage{showframe}
\newcommand\mymarginnote[1]{\marginnote{\justify #1}}

\usepackage[letterpaper,outer=1.8in,bindingoffset=6mm,top=1in,bottom=.85in]{geometry}
\begin{document}
\mymarginnote{\blindtext}
\Blindtext
\end{document}

Compiled with lualatex

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(./foo.aux) (/usr/local/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
! Undefined control sequence.
<argument> ...te \strut \hspace {\z@ }\ignorespaces \justify 
                                                  \blindtext \endgraf \vss }...
l.10 \Blindtext

? 

Best Answer

I do not recommend to justify text in such a small note.

To justify the margin note you can use

\renewcommand\raggedrightmarginnote{}
\renewcommand\raggedleftmarginnote{}

But then you will get many overfull or underfull boxes:

enter image description here

Or you could use

\renewcommand\raggedrightmarginnote{\sloppy}
\renewcommand\raggedleftmarginnote{\sloppy}

Then you will get big gaps in your notes:

enter image description here

Code:

\documentclass[11pt]{book}
\usepackage{blindtext}
\usepackage{marginnote}
\renewcommand\raggedrightmarginnote{\sloppy}
\renewcommand\raggedleftmarginnote{\sloppy}
\usepackage{showframe}
\usepackage[letterpaper,outer=1.8in,bindingoffset=6mm,top=1in,bottom=.85in]{geometry}
\begin{document}
\marginnote{\blindtext}
\Blindtext\marginnote{\blindtext}
\end{document}

Off topic: An example with Comic Sans for Johannes_B ;-)

enter image description here

Related Question