Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Minimum working example of a bug in 'memoir.cls':
- % 'marginpar{<short comment>}' breaks 'sidebar{<multipage comments>}'
- % The bug is that the order of the lines in the sidebar is jumbled.
- documentclass[9pt,A4]{memoir}
- % --- header of the log file -----------------------------------------
- % This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017)
- % (preloaded format=pdflatex) restricted write18 enabled.
- % entering extended mode
- % (./memoir_bug_in_sidebar.tex
- % LaTeX2e <2017-04-15>
- % Babel <3.15> and hyphenation patterns for 84 language(s) loaded.
- % (/usr/local/texlive/2017/texmf-dist/tex/latex/memoir/memoir.cls
- % Document Class: memoir 2016/05/16 v3.7f configurable
- % book, report, article document class
- % --------------------------------------------------------------------
- % Note: no very evident errors are reported in log file ...
- % load packages
- RequirePackage{xcolor}
- RequirePackage{ragged2e}
- RequirePackage{calc}
- RequirePackage{lipsum}
- % --- begin memoir/sidebar/marginpar adjustments -------------
- % note: details of these appearance-options seemingly are
- % immaterial to the sidebar{...} wrap-bug
- % set and check the page dimensions
- % preparing for marginparwidth = 11em
- % sidebarwidth = 14em
- normalfont%
- setlrmarginsandblock{11em+1em+2cm}{14em+1em+2cm}{*}
- checkandfixthelayout
- % adjust the marginpar parameters
- marginparmargin{inner}
- setmarginnotes% {<hsep>}{<width>}{<push>}
- {1em}% specify <hsep> => marginparsep
- {spinemargin-1em-2cm}% specify <width> => marginparwidth
- {onelineskip}% specify <push> => marginparpush
- % adjust the sidebar parameters
- sidebarmargin{outer}
- setsidebars% {<hsep>}{<width>}{<vsep>}{<topsep>}{<font>}{<height>}
- {1em}% specify <hsep>
- {foremargin-1em-2cm}% specify <width> => sidebarwidth
- {onelineskip}% specify <vsep> => sidebarvsep
- {0pt}% specify <topsep> => sidebartopsep
- {sffamilyfootnotesize% specify the <font> parameters
- % BUG: the following 'color{...}' bleeds into the body
- color{blue}}% (optionally including a color)
- {textheight}% specify <height> => sidebarheight
- DeclareRobustCommand{sidebarform}{justifying}
- % --- end memoir/sidebar/marginpar adjustments -------------
- begin{document}
- textbf{This is the first paragraph of a
- multipage memoir-class document.}
- lipsum[2]%
- marginpar{
- Marginal comments like this one,
- when they comes textsc{before}
- a multipage sidebar,
- textsc{do not} induce a wrap-error.
- }
- lipsum[3]%
- sidebar{strictpagecheck%
- textbf{TEST: this sidebar paragraph should
- appear on page 1, at the top of the fore-margin.}
- par
- lipsum[2-11]
- par
- textbf{TEST: this sidebar paragraph should
- appear as the bottom-most fore-margin
- paragraph, as the final paragraph
- (namely the 12th paragraph)
- of a multipage sidebar.}
- }%
- lipsum[4]%
- marginpar{strictpagecheck%
- textsc{Alas}dots marginal
- comments like this one,
- that are specified textsc{after}
- a multipage sidebar,
- textsc{do} induce a wrap-error.
- }
- lipsum[5-8]%
- lipsum[9]%
- marginpar{strictpagecheck%
- textsc{Alas}dots this marginal
- comment too, appearing
- on the second page of
- a multipage sidebar,
- induces a wrap-error.
- }
- lipsum[10-19]
- textbf{This is the final body-text
- paragraph (namely the 20th paragraph)
- of a multipage document.}
- end{document}
- endininput
Add Comment
Please, Sign In to add comment