texlive[50931] Master: centeredline (27apr19)

commits+karl at tug.org commits+karl at tug.org
Fri May 3 00:30:48 CEST 2019


Revision: 50931
          http://tug.org/svn/texlive?view=revision&revision=50931
Author:   karl
Date:     2019-05-03 00:30:47 +0200 (Fri, 03 May 2019)
Log Message:
-----------
centeredline (27apr19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/centeredline/
    trunk/Master/texmf-dist/doc/latex/centeredline/README.md
    trunk/Master/texmf-dist/tex/latex/centeredline/
    trunk/Master/texmf-dist/tex/latex/centeredline/centeredline.sty
    trunk/Master/tlpkg/tlpsrc/centeredline.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/centeredline/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/centeredline/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/centeredline/README.md	2019-05-02 22:30:47 UTC (rev 50931)
@@ -0,0 +1,74 @@
+<!-- -->
+
+    Author:  Jean-Francois Burnol
+    Package: centeredline
+    Version: 1.0 (2019/04/27)
+    License: LPPL 1.3c
+    Copyright (C) 2019 Jean-Francois Burnol
+    <jfbu at free dot fr>
+
+# DESCRIPTION #
+
+After `\usepackage{centeredline}` you can use
+
+    \centeredline{....}
+
+to get contents centered, in a better way than with `\centerline`:
+
+1. `\verb` or other catcode changes are allowed,
+2. the centering (with respect to the surrounding text paragraph) will
+   be as expected if this all happens inside an item from a LaTeX list
+   environment,
+3. and material whose natural width exceeds the linewidth will get
+   properly centered too.
+
+The contents are executed in horizontal mode inside a group inside a
+`\hbox`.
+
+The macro itself maybe encountered in paragraph or in vertical mode. For
+example in vertical mode
+
+    \centeredline{\rule{\dimexpr-1cm+\paperwidth}{1pt}}
+    \centeredline{\rule{\dimexpr-1cm+\paperwidth}{1pt}}
+    \centeredline{\rule{\dimexpr-1cm+\paperwidth}{1pt}}
+
+will create horizontally centered on the page horizontal rules
+vertically separated by the baseline skip and ignoring the parskip.
+
+
+# HISTORY #
+
+I have used this macro since 2013 and it has served me well.
+
+I am making it public as is, without any re-thinking about whether it may
+have some limitations which I somehow did not encounter in my personal usage.
+Suggestions for improvements are welcome, and will be recorded although I do
+not expect to update the package anytime soon.
+
+
+# CHANGE LOG #
+
+- v1.0 (2019/04/27): First release.
+
+
+# LICENSE #
+
+This Work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License 1.3c.
+This version of this license is in
+
+> <http://www.latex-project.org/lppl/lppl-1-3c.txt>
+
+and the latest version of this license is in
+
+> <http://www.latex-project.org/lppl.txt>
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+The Author of this Work is:
+
+> Jean-Francois Burnol `<jfbu at free dot fr>`
+
+This Work consists of the file `centeredline.sty` and
+accompanying `README.md`.


Property changes on: trunk/Master/texmf-dist/doc/latex/centeredline/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/centeredline/centeredline.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/centeredline/centeredline.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/centeredline/centeredline.sty	2019-05-02 22:30:47 UTC (rev 50931)
@@ -0,0 +1,32 @@
+%% File: centeredline.sty
+%% Version: 1.0 (2019/04/27)
+%% License: LPPL 1.3c
+%% Copyright (C) 2019 Jean-Francois Burnol <jfbu at free dot fr>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{centeredline}[2019/04/27 v1.0 centering a line my way (JFB)]
+% \centeredline: OUR OWN LITTLE MACRO FOR CENTERING LINES
+%
+% 7 mars 2013
+% \ignorespaces added June 9, 2013
+%
+% This macro allows to conveniently center a line inside a paragraph and still
+% allow usage therein of \verb or other macros changing catcodes.
+%
+% It works nicely in list environments (as it uses \linewidth, not \hsize...;
+% maybe there is an even better LaTeX parameter to use, but I don't know
+% LaTeX2e that well enough and never typeset in two-column mode.)
+%
+% Note: \centeredline is scope limiting for assignments done during execution
+% of its argument.
+%
+\newcommand*\centeredline{%
+      \ifhmode \\\relax
+        \def\centeredline@@{\hss\egroup\hskip\z at skip\ignorespaces}%
+      \else
+        \def\centeredline@@{\hss\egroup}%
+      \fi
+      \afterassignment\centeredline@
+      \let\next=}%
+\def\centeredline@
+    {\hbox to \linewidth \bgroup \hss \bgroup \aftergroup\centeredline@@}%
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/centeredline/centeredline.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-05-02 22:29:13 UTC (rev 50930)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-05-02 22:30:47 UTC (rev 50931)
@@ -141,7 +141,8 @@
     cbcoptic cbfonts cbfonts-fd
     cc-pl ccaption ccfonts ccicons cclicenses
     cd cd-cover cdpbundl
-    cell cellprops cellspace celtic censor cesenaexam cfr-initials cfr-lm
+    cell cellprops cellspace celtic censor centeredline cesenaexam
+    cfr-initials cfr-lm
     changebar changelayout changelog changepage changes
     chappg chapterfolder charter
     chbibref cheatsheet checkcites checklistings chem-journal

Added: trunk/Master/tlpkg/tlpsrc/centeredline.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-05-02 22:29:13 UTC (rev 50930)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-05-02 22:30:47 UTC (rev 50931)
@@ -144,6 +144,7 @@
 depend cellprops
 depend cellspace
 depend censor
+depend centeredline
 depend changebar
 depend changelayout
 depend changelog



More information about the tex-live-commits mailing list