diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/xhfill |
Initial commit
Diffstat (limited to 'macros/latex/contrib/xhfill')
-rw-r--r-- | macros/latex/contrib/xhfill/Changes | 5 | ||||
-rw-r--r-- | macros/latex/contrib/xhfill/Makefile | 34 | ||||
-rw-r--r-- | macros/latex/contrib/xhfill/xhfill-doc.pdf | bin | 0 -> 39331 bytes | |||
-rw-r--r-- | macros/latex/contrib/xhfill/xhfill-doc.tex | 103 | ||||
-rw-r--r-- | macros/latex/contrib/xhfill/xhfill.sty | 64 |
5 files changed, 206 insertions, 0 deletions
diff --git a/macros/latex/contrib/xhfill/Changes b/macros/latex/contrib/xhfill/Changes new file mode 100644 index 0000000000..c7f4541fb2 --- /dev/null +++ b/macros/latex/contrib/xhfill/Changes @@ -0,0 +1,5 @@ +xhfill.sty -------- + +1.01 2011-05-14 - use \xleaders instead of \leaders for \xdotfill +1.00 2011-05-13 initial CTAN version + diff --git a/macros/latex/contrib/xhfill/Makefile b/macros/latex/contrib/xhfill/Makefile new file mode 100644 index 0000000000..a897b5c733 --- /dev/null +++ b/macros/latex/contrib/xhfill/Makefile @@ -0,0 +1,34 @@ +# `Makefile' for `pst-3dplot.pdf', hv, 2007/03/17 + +.SUFFIXES : .tex .ltx pdf + +PACKAGE = xhfill + +MAIN = $(PACKAGE)-doc + +LATEX = pdflatex + +ARCHNAME = $(MAIN)-$(shell date +%y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile + +all : doc clean +doc: $(MAIN).pdf + +$(MAIN).pdf : $(MAIN).tex + $(LATEX) $< + if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi + if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi + $(LATEX) $< + +clean : + $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .bbl ) + $(RM) $(addprefix $(MAIN), .xcp) + +veryclean : clean + $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +# EOF diff --git a/macros/latex/contrib/xhfill/xhfill-doc.pdf b/macros/latex/contrib/xhfill/xhfill-doc.pdf Binary files differnew file mode 100644 index 0000000000..c983b56795 --- /dev/null +++ b/macros/latex/contrib/xhfill/xhfill-doc.pdf diff --git a/macros/latex/contrib/xhfill/xhfill-doc.tex b/macros/latex/contrib/xhfill/xhfill-doc.tex new file mode 100644 index 0000000000..709a836f6b --- /dev/null +++ b/macros/latex/contrib/xhfill/xhfill-doc.tex @@ -0,0 +1,103 @@ +%% $Id: xhfill-doc.tex 501 2011-05-14 09:41:09Z herbert $ +\documentclass[12pt]{article} +\usepackage[T1]{fontenc} +\usepackage[scaled=0.85]{beramono} +\usepackage{berasans} +\usepackage{beraserif} +\usepackage{xhfill} +\let\FileVersion\fileversion +\usepackage{listings} +\lstset{language=[LaTeX]TEX,basicstyle=\ttfamily\small,% + extendedchars=true,numbers=left,numberstyle=\tiny,% + xleftmargin=2em,breaklines=true} + +\newcommand{\xfill}[2][1ex]{{% + \dimen0=#2\advance\dimen0 by #1 + \leaders\hrule height \dimen0 depth -#1\hfill% +}} +\newcommand{\xfilll}[2][1ex]{% + \dimen0=#2\advance\dimen0 by #1% + \leaders\hrule height \dimen0 depth -#1\hfill% +} + +\begin{document} +\title{Package \texttt{xhfill}\\v\FileVersion} +\author{Herbert Vo\ss} +\date{\today} +\maketitle +blah\xfill{1pt}blub +\begin{lstlisting} +blah\xfill{1pt}blub +\end{lstlisting} + +blah\xfill{3pt}blub +\begin{lstlisting} +blah\xfill{3pt}blub +\end{lstlisting} + +blah\xfill[0pt]{4pt}blub +\begin{lstlisting} +blah\xfill[0pt]{4pt}blub +\end{lstlisting} + +blah\xfill[-12pt]{12pt}blub +\begin{lstlisting} +blah\xfill[-12pt]{12pt}blub +\end{lstlisting} + +blah\xfilll{1pt}blub +\begin{lstlisting} +blah\xfilll{1pt}blub +\end{lstlisting} +blah\xfilll{1pt}blub +\begin{lstlisting} +blah\xfilll{1pt}blub +\end{lstlisting} + +blah\xfilll[0pt]{4pt}blub +\begin{lstlisting} +blah\xfilll[0pt]{4pt}blub +\end{lstlisting} + +blah\xfilll[-12pt]{12pt}blub +\begin{lstlisting} +blah\xfilll[-12pt]{12pt}blub +\end{lstlisting} + +blah\xrfill{1pt}[blue]blub blah\xrfill{2pt}[cyan]blub +\begin{lstlisting} +blah\xrfill{1pt}[blue]blub blah\xrfill{2pt}[cyan]blub +\end{lstlisting} + +laber\xrfill[0pt]{4pt}[green]blub blub +\begin{lstlisting} +laber\xrfill[0pt]{4pt}[green]blub blub +\end{lstlisting} + +blah\xrfill[-1ex]{1pt}[red]blub +\begin{lstlisting} +blah\xrfill[-1ex]{1pt}[red]blub +\end{lstlisting} + +blah \xhrulefill{cyan}{1cm} blub +\begin{lstlisting} +blah \xhrulefill{cyan}{1cm} blub +\end{lstlisting} + +blah \xhrectanglefill{0.5cm}{1pt} blubber +\begin{lstlisting} +blah \xhrectanglefill{0.5cm}{1pt} blubber +\end{lstlisting} + +blah\xdotfill{1pt}[blue]blah\xdotfill{2pt}[red]blub +\begin{lstlisting} +blah\xdotfill{1pt}[blue]blah\xdotfill{2pt}[red]blub +\end{lstlisting} + + +\subsection*{The code} + +\lstinputlisting{xhfill.sty} + + +\end{document} diff --git a/macros/latex/contrib/xhfill/xhfill.sty b/macros/latex/contrib/xhfill/xhfill.sty new file mode 100644 index 0000000000..3d413f697d --- /dev/null +++ b/macros/latex/contrib/xhfill/xhfill.sty @@ -0,0 +1,64 @@ +%% $Id: xhfill.sty 500 2011-05-14 09:39:57Z herbert $ +%% +%% This is file `xhfill.sty', +%% +%% IMPORTANT NOTICE: +%% +%% Package `xhfill' +%% +%% Herbert Voss <hvoss _at_ tug.org> +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `xhfill' is a package for extended hfillrules +%% +%% Usage +%% \xhrulefill{blue}{5pt} +%% \xrfill[raise]{ruleheight}[color] +%% \xhrectanglefill{<height>}{<linewidth>} +%% \xhrectanglefill{1cm}{1pt} +% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{xcolor} +\RequirePackage{calc} +\RequirePackage{xspace} +\def\fileversion{1.01} +\def\filedate{2011/05/14} + +\ProvidesPackage{xhfill}[\filedate\ v \fileversion\ modify width and color of hrulefill] +% +\providecommand{\xhrulefill}[2]{% + \leavevmode\color{#1}\leaders\hrule height #2% + \hfill\color{black}\xspace} +% +\providecommand{\xhrectanglefill}[2]{% + \rule{#2}{#1}\kern-#2\kern.1pt% + \cleaders + \hbox to 1pt{% + \hss + \rlap{\rule{1.2pt}{#2}}% + \raisebox{#1-#2}{\rule{1.2pt}{#2}}% + \hss + }\hfill\kern.1pt\kern-#2\rule{#2}{#1}% + \xspace% +} +\def\xrfill{\@ifnextchar[{\@xrfilli}{\@xrfilli[1ex]}} +\def\@xrfilli[#1]#2{% + \@ifnextchar[{\@xrfillii[#1]{#2}}{\@xrfillii[#1]{#2}[black]}} +\def\@xrfillii[#1]#2[#3]{% + \leaders + \hbox{\raisebox{#1}{\color{#3}\rule{1.2pt}{#2}}}\hfill% + \color{black}} +% +\def\xdotfill{\@ifnextchar[{\@xdotfilli}{\@xdotfilli[0.5ex]}} +\def\@xdotfilli[#1]#2{% + \@ifnextchar[{\@xdotfillii[#1]{#2}}{\@xdotfillii[#1]{#2}[black]}} +\def\@xdotfillii[#1]#2[#3]{% + \xleaders + \hbox{\raisebox{#1}{\color{#3}\rule{1.2pt}{#2}\kern1.2pt}}\hfill% + \color{black}} + +\endinput |