| 1 |
%% |
| 2 |
%% This is file `listparskip_example.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% listparskip_code.dtx (with options: `example') |
| 8 |
%% |
| 9 |
%% This file is from version 1.0 of the free and open-source |
| 10 |
%% LaTeX package "listparskip," released December 2024. |
| 11 |
%% |
| 12 |
%% Copyright 2024 Conrad Kosowsky |
| 13 |
%% |
| 14 |
%% This file may be used, distributed, and modified under the |
| 15 |
%% terms of the LaTeX Public Project License, version 1.3c or |
| 16 |
%% any later version. The most recent version of this license |
| 17 |
%% is available online at |
| 18 |
%% |
| 19 |
%% https://www.latex-project.org/lppl/ |
| 20 |
%% |
| 21 |
%% This work has the LPPL status "maintained," and the current |
| 22 |
%% maintainer is the package author, Conrad Kosowsky. He can |
| 23 |
%% be reached at [email protected]. |
| 24 |
%% |
| 25 |
%% PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT |
| 26 |
%% ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF |
| 27 |
%% THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING: |
| 28 |
%% |
| 29 |
%% THERE IS NO WARRANTY FOR THE WORK. EXCEPT WHEN OTHERWISE |
| 30 |
%% STATED IN WRITING, THE COPYRIGHT HOLDER PROVIDES THE WORK |
| 31 |
%% `AS IS’, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
| 32 |
%% OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 33 |
%% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 34 |
%% PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE |
| 35 |
%% OF THE WORK IS WITH YOU. SHOULD THE WORK PROVE DEFECTIVE, |
| 36 |
%% YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR |
| 37 |
%% CORRECTION. |
| 38 |
%% |
| 39 |
%% IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED |
| 40 |
%% TO IN WRITING WILL THE COPYRIGHT HOLDER, OR ANY AUTHOR |
| 41 |
%% NAMED IN THE COMPONENTS OF THE WORK, OR ANY OTHER PARTY |
| 42 |
%% WHO MAY DISTRIBUTE AND/OR MODIFY THE WORK AS PERMITTED |
| 43 |
%% ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, |
| 44 |
%% SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT |
| 45 |
%% OF ANY USE OF THE WORK OR OUT OF INABILITY TO USE THE WORK |
| 46 |
%% (INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA, DATA BEING |
| 47 |
%% RENDERED INACCURATE, OR LOSSES SUSTAINED BY ANYONE AS A |
| 48 |
%% RESULT OF ANY FAILURE OF THE WORK TO OPERATE WITH ANY |
| 49 |
%% OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDER OR SAID |
| 50 |
%% AUTHOR OR SAID OTHER PARTY HAS BEEN ADVISED OF THE |
| 51 |
%% POSSIBILITY OF SUCH DAMAGES. |
| 52 |
%% |
| 53 |
%% For more information, see the LaTeX Project Public License. |
| 54 |
%% Derivative works based on this software may come with their |
| 55 |
%% own license or terms of use, and the package author is not |
| 56 |
%% responsible for any third-party software. |
| 57 |
%% |
| 58 |
%% Happy TeXing! |
| 59 |
%% |
| 60 |
\documentclass[12pt]{article} |
| 61 |
\usepackage[margin=72.27pt]{geometry} |
| 62 |
\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype} |
| 63 |
\usepackage{lipsum} |
| 64 |
\usepackage{multicol} |
| 65 |
\usepackage{enumitem} |
| 66 |
\setlist{parsep=0pt,partopsep=\medskipamount, |
| 67 |
topsep=\smallskipamount,itemsep=\smallskipamount} |
| 68 |
\usepackage{shortvrb} |
| 69 |
\MakeShortVerb{|} |
| 70 |
\parindent=0pt |
| 71 |
\makeatletter |
| 72 |
\begin{document} |
| 73 |
|
| 74 |
\def\documentname{Example} |
| 75 |
|
| 76 |
\newdimen\MacroIndent |
| 77 |
\input listparskip_heading.tex |
| 78 |
\baselineskip=14pt |
| 79 |
|
| 80 |
This document shows an example of \textsf{listparskip}. The left column uses standard \LaTeX\ spacing before and after the itemize and enumerate lists, and the right column shows the same text with \textsf{listparskip} spacing rules. Notice \textsf{listparskip} corrects the issues from the left column. |
| 81 |
\begin{multicols*}{2} |
| 82 |
\parskip\bigskipamount |
| 83 |
|
| 84 |
\lipsum[1][1] |
| 85 |
|
| 86 |
This paragraph has some bullet points in the middle of the paragraph. In this portion of the document, |\parskip| is set to |\bigskipamount|, and we see that |
| 87 |
\begin{itemize} |
| 88 |
\item \LaTeX\ inserts |\parskip| above the list |
| 89 |
\item Even though there is no |\par| between the paragraph and the itemize environment in the source code |
| 90 |
\item The same thing is true after the itemize |
| 91 |
\item It's especially salient when |\topsep| and |\itemsep| are |\smallskipamount| |
| 92 |
\end{itemize} |
| 93 |
Currently |\partopsep| is |\medskipamount|, but when there is no |\par| immediately before a list, \LaTeX\ does not insert |\partopsep| before or after the list environment. \hbox{This is true} |
| 94 |
\begin{enumerate} |
| 95 |
\item Despite the use of |\parskip|; and |
| 96 |
\item For the end of the list environment regardless of whether a |\par| follows the list, as is the case with this enumerate. |
| 97 |
\end{enumerate} |
| 98 |
|
| 99 |
\lipsum[1][2] |
| 100 |
|
| 101 |
\vfill\nointerlineskip\null |
| 102 |
\columnbreak |
| 103 |
|
| 104 |
\lipsum[1][1] |
| 105 |
|
| 106 |
This paragraph has some bullet points in the middle of the paragraph. In this portion of the document, |\parskip| is set to |\bigskipamount|, and we see that |
| 107 |
\begin{itemize} |
| 108 |
\vskip-\@outerparskip |
| 109 |
\vskip\z@ |
| 110 |
\item \LaTeX\ inserts |\parskip| above the list |
| 111 |
\item Even though there is no |\par| between the paragraph and the itemize environment in the source code |
| 112 |
\item The same thing is true after the itemize |
| 113 |
\item It's especially salient when |\topsep| and |\itemsep| are |\smallskipamount| |
| 114 |
\end{itemize} |
| 115 |
\vskip-\parskip |
| 116 |
Currently |\partopsep| is |\medskipamount|, but when there is no |\par| immediately before a list, \LaTeX\ does not insert |\partopsep| before or after the list environment. \hbox{This is true} |
| 117 |
\begin{enumerate} |
| 118 |
\vskip-\@outerparskip |
| 119 |
\vskip\z@ |
| 120 |
\item Despite the use of |\parskip|; and |
| 121 |
\item For the end of the list environment regardless of whether a |\par| follows the list, as is the case with this enumerate. |
| 122 |
\end{enumerate} |
| 123 |
\vskip\partopsep |
| 124 |
|
| 125 |
\lipsum[1][2] |
| 126 |
|
| 127 |
\end{multicols*} |
| 128 |
|
| 129 |
\end{document} |
| 130 |
\endinput |
| 131 |
%% |
| 132 |
%% End of file `listparskip_example.tex'. |