summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xurl/doc/xurl.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/xurl/doc/xurl.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/xurl/doc/xurl.tex')
-rw-r--r--macros/latex/contrib/xurl/doc/xurl.tex123
1 files changed, 123 insertions, 0 deletions
diff --git a/macros/latex/contrib/xurl/doc/xurl.tex b/macros/latex/contrib/xurl/doc/xurl.tex
new file mode 100644
index 0000000000..856b1f4f14
--- /dev/null
+++ b/macros/latex/contrib/xurl/doc/xurl.tex
@@ -0,0 +1,123 @@
+%% $Id: xurl.tex 876 2018-12-23 10:26:11Z herbert $
+%
+\listfiles\setcounter{errorcontextlines}{100}
+\RequirePackage{filecontents}
+\begin{filecontents*}{\jobname.bib}
+@online{asdf,
+ sortname={BSI},label={BSI},
+ organization={BSI (Bundesamt für Sicherheit in der Informationstechnik)},
+ title={Angaben des BSI für die Algorithmenkataloge der Vorjahre, Empfehlungen zur Wahl der Schlüssellängen},
+ date={2016},
+ url={https://www.bundesnetzagentur.de/DE/Service-Funktionen/ElektronischeVertrauensdienste/HinweiseEmpfehlungen/Empfehlungen/Empfehlungen_node.html},
+}
+\end{filecontents*}
+\documentclass[paper=a4,fontsize=11pt,DIV=14,parskip=half-,
+ captions=tableabove,twoside=on]{scrartcl}
+\usepackage{fontspec}
+%\usepackage[%usefilenames,
+% TT={Scale=0.88,FakeStretch=0.9},
+% SS={Scale=0.9},
+% RM={Scale=0.9},
+% DefaultFeatures={Ligatures=TeX}]{lucida-otf} % support opentype math fonts
+\setmainfont{AccanthisADFStdNo3}[
+ UprightFont =*-Regular,
+ BoldFont =*-Bold,
+ ItalicFont =*-Italic,
+ BoldItalicFont=*-BoldItalic,
+ RawFeature = -rlig,
+]
+\setsansfont{GilliusADF}[
+ UprightFont =*-Regular,
+ BoldFont =*-Bold,
+ ItalicFont =*-Italic,
+ BoldItalicFont=*-BoldItalic,
+ RawFeature = -rlig,
+]
+\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]
+
+\usepackage[english]{babel}
+\usepackage{scrlayer-scrpage}
+\automark[section]{section}
+\automark*[subsection]{}
+\pagestyle{scrheadings}
+
+\usepackage{biblatex}
+\addbibresource{\jobname.bib}
+
+%\usepackage{selnolig}
+%\nolig{oe}{o|e}
+
+\usepackage{xurl}
+\title{Package \texttt{xurl}}
+\author{Herbert Voß\thanks{herbert@dante.de}}
+\begin{document}
+\maketitle
+
+\section{How it works}
+Package xurl loads package url by default and defines
+possible url breaks for all alphanumerical characters
+and \verb|= / . : * - ~ ' "|
+
+All arguments which are valid for url can be used.
+It will be passed to package url. xurl itself has no
+special optional argument. For more information read
+the documentation of package url.
+
+
+\noindent
+\frame{\begin{minipage}{0.5\linewidth}
+\noindent
+some text \url{very-long-url-very-long-url-very-long-url-very-long-url-very-long-url-}
+and another url: \url{https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url/10419?noredirect=1#comment1021887_10419}
+\end{minipage}}
+
+\noindent
+\frame{\begin{minipage}{0.75\linewidth}
+\noindent
+some text \url{very-long-url-very-long-url-very-long-url-very-long-url-very-long-url-}
+and another url: \url{https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url/10419?noredirect=1#comment1021887_10419}
+\end{minipage}}
+
+
+
+\noindent
+\frame{\begin{minipage}{\dimexpr\linewidth-2\fboxrule}
+\noindent
+some text \url{iszv://dsf.tqsdatmdtdls.ctm/cudfsdvqfqll-ocd/bdcbcfqlf-lcclldh/cbsntwgqke-esbptb-vvylhy/zkhqnqidf-obedbacpf-lzlal-pxaccqa-gwki.lfof/}
+and another url: \url{koff://osb.ccdngagkkg.raa/qrkxzvi/dxfsiaa/xidf-lata-dgdqmhp-uoxdl-vst-vcsbhl-aisdsasih-skl-aezb-fhixvyy-qqlachd-achhfc-koe-xgfqp-iyplcu-1.696884}
+\end{minipage}}
+
+\section{Using \texttt{biblatex}}
+Package \texttt{biblatex} has it's own url handling. If you want the the same behaviour as \texttt{xurl} has, you have to
+set
+
+\begin{verbatim}
+\setcounter{biburllcpenalty}{100}
+\setcounter{biburlucpenalty}{200}
+\setcounter{biburlnumpenalty}{100}
+\end{verbatim}
+
+However, if you load \texttt{xurl} \emph{after} \texttt{biblatex} then it is done
+by default. Compare the following bibliographies. IF you do not want that \texttt{xurl}
+should set these counters, then load the package \emph{before} \texttt{biblatex} or
+use the optional argument \texttt{nobiblatex}:
+
+\begin{verbatim}
+\usepackage[...]{biblatex}
+\usepackage[nobiblatex]{xurl}
+\end{verbatim}
+
+\nocite{*}
+
+\printbibliography[title={With urlbreaks}]
+
+\setcounter{biburllcpenalty}{0}
+\setcounter{biburlucpenalty}{0}
+\setcounter{biburlnumpenalty}{0}
+
+\printbibliography[title={xurl with option nobiblatex}]
+
+\end{document}
+
+
+