Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
teckids-tex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Team PR
teckids-tex
Commits
4d4677a4
Verified
Commit
4d4677a4
authored
6 years ago
by
mirabilos
Committed by
mirabilos
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
move the check for protection to the first encountered macro level
alternatively, rewriting those to be expandable *might* help…
parent
bc05bc18
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unicodedomino.sty
+39
-30
39 additions, 30 deletions
unicodedomino.sty
with
39 additions
and
30 deletions
unicodedomino.sty
+
39
−
30
View file @
4d4677a4
...
...
@@ -28,7 +28,7 @@
% makes all UTF-8 available in listings.
\NeedsTeXFormat
{
LaTeX2e
}
%
\ProvidesPackage
{
unicodedomino
}
[2018/08/06 1.
5
Domino for unknown codepoints]
%
\ProvidesPackage
{
unicodedomino
}
[2018/08/06 1.
6
Domino for unknown codepoints]
%
\makeatletter
%
\ifx\numexpr\@
undefined
%
...
...
@@ -62,16 +62,31 @@
% collect octet tokens, trim them and pass them on to handler
\long\def\UTFviii
@two@octets#1#2
{
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\ifx\protect\@
typeset@protect
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\else
%
% protected, just write the original multibyte character
\string
#1
\string
#2
%
\fi
%
}
%
\long\def\UTFviii
@three@octets#1#2#3
{
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}
\unicodedomino
@last
{
\string
#3
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\ifx\protect\@
typeset@protect
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}
\unicodedomino
@last
{
\string
#3
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\else
%
% protected, just write the original multibyte character
\string
#1
\string
#2
\string
#3
%
\fi
%
}
%
\long\def\UTFviii
@four@octets#1#2#3#4
{
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}
\unicodedomino
@last
{
\string
#3
}
\unicodedomino
@last
{
\string
#4
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\ifx\protect\@
typeset@protect
%
\edef\unicodedomino
@tmp
{
#1
\unicodedomino
@last
{
\string
#2
}
\unicodedomino
@last
{
\string
#3
}
\unicodedomino
@last
{
\string
#4
}}
%
\expandafter\unicodedomino
@octets
\unicodedomino
@tmp
\empty
%
\else
%
% protected, just write the original multibyte character
\string
#1
\string
#2
\string
#3
\string
#4
%
\fi
%
}
%
% handle trimmed octets
...
...
@@ -81,32 +96,26 @@
% main handler
\def\UTFviii
@defined#1
{
%
\ifx\protect\@
typeset@protect
%
% not protected
\ifx
#1
\relax
%
% unknown character
\if\relax\expandafter\UTFviii
@checkseq
\string
#1
\empty\relax
%
% valid codepoint / multibyte sequence
\PackageWarning
{
inputenc
}{
%
Unicode character
\expandafter\UTFviii
@splitcsname
\string
#1
\relax\space
%
not set up for use
\MessageBreak
with LaTeX, replacing
%
}
%
% note: warning is the same as in utf8ienc.dtx v1.2d except
% with the string “, replacing” added at the end
\expandafter\unicodedomino
@domino
\string
#1
\relax
%
\else
%
% invalid multibyte character
\PackageError
{
inputenc
}{
Invalid UTF-8 byte sequence:
%
\expandafter\UTFviii
@splitseq
\string
#1
\relax
}
%
\UTFviii
@invalid@help
\fi
%
\ifx
#1
\relax
%
% unknown character
\if\relax\expandafter\UTFviii
@checkseq
\string
#1
\empty\relax
%
% valid codepoint / multibyte sequence
\PackageWarning
{
inputenc
}{
%
Unicode character
\expandafter\UTFviii
@splitcsname
\string
#1
\relax\space
%
not set up for use
\MessageBreak
with LaTeX, replacing
%
}
%
% note: warning is the same as in utf8ienc.dtx v1.2d except
% with the string “, replacing” added at the end
\expandafter\unicodedomino
@domino
\string
#1
\relax
%
\else
%
% known character, expand
\expandafter
#1
%
% invalid multibyte character
\PackageError
{
inputenc
}{
Invalid UTF-8 byte sequence:
%
\expandafter\UTFviii
@splitseq
\string
#1
\relax
}
%
\UTFviii
@invalid@help
\fi
%
\else
%
%
protected, just write the original multibyte
character
\expandafter
\@
gobblefour
\string
#1
%
%
known
character
, expand
\expandafter
#1
%
\fi
%
}
%
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment