/usr/share/perl5/LaTeXML/Package/soul.sty.ltxml is in latexml 0.8.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | # -*- mode: Perl -*-
# /=====================================================================\ #
# | soul | #
# | Implementation for LaTeXML | #
# |=====================================================================| #
# | Part of LaTeXML: | #
# | Public domain software, produced as part of work done by the | #
# | United States Government & not subject to copyright in the US. | #
# |---------------------------------------------------------------------| #
# | Bruce Miller <bruce.miller@nist.gov> #_# | #
# | http://dlmf.nist.gov/LaTeXML/ (o o) | #
# \=========================================================ooo==U==ooo=/ #
package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;
#**********************************************************************
# Space-Out and UnderLine package
# Shouldn't actually require color,
# but not sure how to make things work without it...
#RequirePackage('color');
#======================================================================
# letterspacing
DefPrimitive('\sodef DefToken {} {Dimension}{Dimension}{Dimension}', sub {
my ($stomach, $cs, $font, $letterspace, $innerspace, $outerspace) = @_;
my $name = ToString($cs); $name =~ s/^\\//;
DefConstructorI($cs, '{}',
"<ltx:text cssstyle='letter-spacing:#spacing;' _noautoclose='1'>#1</ltx:text>",
properties => { spacing => $letterspace->pxValue . 'px' },
bounded => 1, beforeDigest => sub { Digest($font); });
return; });
RawTeX(<<'EoTeX');
\sodef\textso{}{0.25em}{0.65em}{.55em}
\sodef\sloppyword{}{0em}{.33em}{.33em}
EoTeX
DefMacro('\resetso', '\sodef\so{}{0.25em}{0.65em}{.55em}');
#======================================================================
# We'll make do simply with small caps (same as \textsc)
# and leave any fine-typesetting to the user agent
DefMacro('\capsfont', '\scshape');
RawTeX(<<'EoTeX');
\sodef\textcaps{\capsfont}{0.28em}{0.37em}{.37em}
EoTeX
# Ignore the rest of this...
# This defines spacing to use for particular fonts(?)
DefMacro('\capsdef {} {Dimension}{Dimension}{Dimension}', undef);
DefMacro('\capssave{}', undef);
DefMacro('\capsselect{}', undef);
DefMacro('\capsreset', undef);
#======================================================================
# Support for working with or without the color package loaded.
sub getSOULcolor {
my ($name) = @_;
if (LookupValue('color.sty.ltxml_loaded')) {
if (my $color = ToString(LookupValue($name))) {
return ParseColor(undef, $color); } } }
#======================================================================
# underline
# (should set framecolor from \setulcolor)
DefConstructor('\textul{}',
"<ltx:text framed='underline' framecolor='#framecolor'_noautoclose='1'>#1</ltx:text>",
properties => { framecolor => sub { getSOULcolor('soul_ul_color'); } });
# Customizing underlines
DefPrimitive('\setulcolor{}', sub { AssignValue(soul_ul_color => ToString($_[1])); });
DefMacro('\setul{Dimension}{Dimension}', undef);
DefMacro('\resetul', undef);
DefMacro('\setuldepth{}', undef);
DefMacro('\setuloverlap{Dimension}', undef);
#======================================================================
# strike-out
# Hmm... Ideally, this would be framed=linethrough (or something), which in css=>text-decoration
# but then how to make framecolor end up as text-decoration-color?
DefConstructor('\textst{}',
"<ltx:text cssstyle='text-decoration:line-through; text-decoration-color:#framecolor'_noautoclose='1'>#1</ltx:text>",
properties => { framecolor => sub { getSOULcolor('soul_strike_color'); } });
# Customizing strikeout
DefPrimitive('\setstcolor{}', sub { AssignValue(soul_strike_color => $_[1]); });
#======================================================================
# highlighting (use highlight color (background?), if loaded, else underline)
DefMacro('\texthl', '\@ifpackageloaded{color}{\lx@texthl@color}{\textul}');
DefConstructor('\lx@texthl@color{}',
"<ltx:text _noautoclose='1'>#1</ltx:text>",
bounded => 1, beforeDigest => sub { MergeFont(background => getSOULcolor('soul_hl_color')); });
# Customizing highlight
AssignValue(soul_hl_color => 'yellow');
DefPrimitive('\sethlcolor{}', sub { AssignValue(soul_hl_color => $_[1]); });
#======================================================================
Let('\so', '\textso');
Let('\caps', '\textcaps');
Let('\ul', '\textul');
Let('\st', '\textst');
Let('\hl', '\texthl');
#======================================================================
# ignorable commands?
DefMacro('\soulomit{}', '#1');
# record an accent
DefMacro('\soulaccent{}', undef);
# register a command
DefMacro('\soulregister{}{}', undef);
Let('\soulfont', '\soulregister');
1;
|