/usr/share/perl5/LaTeXML/Package/floatflt.sty.ltxml is in latexml 0.8.1-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 | # -*- mode: Perl -*-
# /=====================================================================\ #
# | floatflt | #
# | 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. | #
# |---------------------------------------------------------------------| #
# | Thanks to the arXMLiv group for initial implementation | #
# | http://arxmliv.kwarc.info/ | #
# | Released to the Public Domain | #
# |---------------------------------------------------------------------| #
# | 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;
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# \begin{floatingfigure}[pos]{width} ... \end{figure}
# pos = rflt to the right, lflt to the left, v to the outer edge, p to the inner
# Since we know nothing about pages, we'll treat v=r, p=l...
AssignValue(floatfltpos => 'v');
DeclareOption('rflt', sub { AssignValue(floatfltpos => 'r'); });
DeclareOption('lflt', sub { AssignValue(floatfltpos => 'l'); });
DeclareOption('pflt', sub { AssignValue(floatfltpos => 'p'); });
DeclareOption('vflt', sub { AssignValue(floatfltpos => 'v'); });
DefEnvironment('{floatingfigure}[]{Dimension}',
"<ltx:figure refnum='#refnum' frefnum='#frefnum' rrefnum='#rrefnum' xml:id='#id' float='#float' width='#pctwidth'>"
. "#body"
. "</ltx:figure>",
beforeDigest => sub { DefMacroI('\@captype', undef, 'figure'); },
afterDigest => sub { RescueCaptionCounters('figure', $_[1]); },
properties => sub {
(float => (ToString($_[1] || LookupValue('floatfltpos')) =~ /^(v|r)/ ? 'right' : 'left'),
pctwidth => toPercent($_[2])); });
DefEnvironment('{floatingtable}[]{Dimension}',
"<ltx:table refnum='#refnum' frefnum='#frefnum' rrefnum='#rrefnum' xml:id='#id' float='#float' width='#pctwidth'>"
. "#body"
. "</ltx:table>",
beforeDigest => sub { DefMacroI('\@captype', undef, 'table'); },
afterDigest => sub { RescueCaptionCounters('table', $_[1]); },
properties => sub {
(float => (ToString($_[1] || LookupValue('floatfltpos')) =~ /^(v|r)/ ? 'right' : 'left'),
pctwidth => toPercent($_[2])); });
sub toPercent {
my ($dimen) = @_;
return int(100 * $dimen->valueOf / LookupValue('\textwidth')->valueOf) . '%'; }
DefMacro('\fltitem[]{}', '\item {#2}');
DefMacro('\fltditem[]{}{}', '\item[#2] {#3}');
DefMacro('\initfloatingfigs', ''); # ?????
#======================================================================
DefMacro('\dofigtest', '');
DefMacro('\dotabtest', '');
DefMacro('\tryfig', '');
DefMacro('\trytab', '');
DefMacro('\figinsert', '');
DefMacro('\tabinsert', '');
DefMacro('\dohang', '');
DefMacro('\dohangt', '');
DefRegister('\figbox' => Box());
DefRegister('\tabbox' => Box());
DefRegister('\pagebox' => Box());
DefRegister('\ffigcount' => Number(0));
DefRegister('\ftabcount' => Number(0));
DefRegister('\fftest' => Number(0));
DefRegister('\hangcount' => Number(0));
DefRegister('\nosuccesstryfig' => Number(0));
DefRegister('\nosuccesstrytab' => Number(0));
DefRegister('\figgutter' => Dimension('1pc'));
DefRegister('\tabgutter' => Dimension('1pc'));
DefRegister('\htdone' => Number(0));
DefRegister('\pageht' => Dimension('0pt'));
DefRegister('\startpageht' => Dimension('0pt'));
DefRegister('\tabbredd' => Dimension('0pt'));
DefRegister('\floatfltwidth' => Dimension('0pt'));
DefRegister('\fltitemwidth' => Dimension('0pt'));
DefRegister('\outputpretest' => Tokens());
RawTeX(<<'EoTeX');
\newif\iftryingfig \tryingfigfalse
\newif\iftryingtab \tryingtabfalse
\newif\ifdoingfig \doingfigfalse
\newif\ifdoingtab \doingtabfalse
\newif\iffigprocessing \figprocessingfalse
\newif\iftabprocessing \tabprocessingfalse
\newif\ifpageafterfig \pageafterfigfalse
\newif\ifpageaftertab \pageaftertabfalse
\newif\ifoddpages
\newif\ifoutput
EoTeX
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1;
|