summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-10 22:12:28 +0000
committerKarl Berry <karl@freefriends.org>2019-12-10 22:12:28 +0000
commit888b283a7447bcaa50e7a6a939da99e98643d3dc (patch)
treef61f7b284bb0b470c50d09244e3118c778c74355 /Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty
parent398e5c1995421dfef41ebb7e433d5906cb6258d4 (diff)
listingsutf8 split from oberdiek (10dec19)
git-svn-id: svn://tug.org/texlive/trunk@53083 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty')
-rw-r--r--Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty193
1 files changed, 193 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty b/Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty
new file mode 100644
index 00000000000..749a9a41c37
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/listingsutf8/listingsutf8.sty
@@ -0,0 +1,193 @@
+%%
+%% This is file `listingsutf8.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listingsutf8.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Project: listingsutf8
+%% Version: 2019/12/09 v1.4
+%%
+%% Copyright (C)
+%% 2007, 2011 Heiko Oberdiek
+%% 2016-2019 Oberdiek Package Support Group
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% https://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.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/listingsutf8/issues
+%%
+%%
+%% This work consists of the main source file listingsutf8.dtx
+%% and the derived files
+%% listingsutf8.sty, listingsutf8.pdf, listingsutf8.ins, listingsutf8.drv,
+%% listingsutf8-test1.tex, listingsutf8-test2.tex,
+%% listingsutf8-test3.tex, listingsutf8-test4.tex,
+%% listingsutf8-test5.tex.
+%%
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname lstU@AtEnd\endcsname{%
+ \endlinechar=\the\endlinechar\relax
+ \catcode13=\the\catcode13\relax
+ \catcode32=\the\catcode32\relax
+ \catcode35=\the\catcode35\relax
+ \catcode61=\the\catcode61\relax
+ \catcode64=\the\catcode64\relax
+ \catcode123=\the\catcode123\relax
+ \catcode125=\the\catcode125\relax
+ }%
+ }%
+\x\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\lstU@AtEnd{%
+ \lstU@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{10}{12}% ^^J
+\TMP@EnsureCode{33}{12}% !
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{94}{7}% ^ (superscript)
+\TMP@EnsureCode{95}{8}% _ (subscript)
+\TMP@EnsureCode{96}{12}% `
+\TMP@EnsureCode{124}{12}% |
+\TMP@EnsureCode{126}{13}% ~ (active)
+\edef\lstU@AtEnd{\lstU@AtEnd\noexpand\endinput}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{listingsutf8}%
+ [2019/12/09 v1.4 Allow UTF-8 in listings input (HO)]
+\DeclareOption*{%
+ \PassOptionsToPackage\CurrentOption{listings}%
+}
+\ProcessOptions*
+\RequirePackage{listings}[2002/04/01]
+\AtBeginDocument{%
+ \@ifundefined{inputencoding}{%
+ \RequirePackage{inputenc}%
+ }{}%
+}
+\RequirePackage{pdftexcmds}[2011/04/22]
+\def\lstU@temp#1#2{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname #1\endcsname\relax
+ \PackageWarningNoLine{listingsutf8}{%
+ Package loading is aborted because of missing %
+ \@backslashchar#1.\MessageBreak
+ #2%
+ }%
+ \expandafter\lstU@AtEnd
+ \fi
+}
+\lstU@temp{scantokens}{It is provided by e-TeX}%
+\lstU@temp{pdf@unescapehex}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filedump}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filesize}{It is provided by pdfTeX >= 1.30}%
+\RequirePackage{stringenc}[2010/03/01]
+\newif\iflstU@utfviii
+\def\lstU@inputenc#1{%
+ \expandafter\lstU@@inputenc#1utf8/utf8/\@nil
+}
+\def\lstU@@inputenc#1utf8/#2utf8/#3\@nil{%
+ \ifx\\#1\\%
+ \lstU@utfviiitrue
+ \def\lst@inputenc{#2}%
+ \else
+ \lstU@utfviiifalse
+ \fi
+}
+\lst@Key{inputencoding}\relax{%
+ \def\lst@inputenc{#1}%
+ \lstU@inputenc{#1}%
+}
+\def\lstU@input#1{%
+ \iflstU@utfviii
+ \edef\lstU@text{%
+ \pdf@unescapehex{%
+ \pdf@filedump{0}{\pdf@filesize{#1}}{#1}%
+ }%
+ }%
+ \lstU@CRLFtoLF\lstU@text
+ \StringEncodingConvert\lstU@text\lstU@text{utf8}\lst@inputenc
+ \def\lstU@temp{%
+ \scantokens\expandafter{\lstU@text}%
+ }%
+ \else
+ \def\lstU@temp{%
+ \input{#1}%
+ }%
+ \fi
+ \lstU@temp
+}
+\begingroup
+ \endlinechar=-1 %
+ \@makeother\^^J %
+ \@makeother\^^M %
+ \gdef\lstU@CRLFtoLF#1{%
+ \edef#1{%
+ \expandafter\lstU@CRLFtoLF@aux#1^^M^^J\@nil
+ }%
+ }%
+ \gdef\lstU@CRLFtoLF@aux#1^^M^^J#2\@nil{%
+ #1%
+ \ifx\relax#2\relax
+ \@car
+ \fi
+ ^^J%
+ \lstU@CRLFtoLF@aux#2\@nil
+ }%
+\endgroup %
+\def\lstU@temp#1\def\lst@next#2#3\@nil{%
+ \def\lst@InputListing##1{%
+ #1%
+ \def\lst@next{\lstU@input{##1}}%
+ #3%
+ }%
+}
+\expandafter\lstU@temp\lst@InputListing{#1}\@nil
+\lstU@AtEnd%
+%% \section{Installation}
+\endinput
+%%
+%% End of file `listingsutf8.sty'.