LaTeXML

 view release on metacpan or  search on metacpan

lib/LaTeXML/Common/Config.pm  view on Meta::CPAN

 --nopost                forbids followup post-processing
 --validate, --novalidate Enables (the default) or disables
                         validation of the source xml.
 --omitdoctype           omits the Doctype declaration,
 --noomitdoctype         disables the omission (the default)
 --numbersections        enables (the default) the inclusion of
                         section numbers in titles, crossrefs.
 --nonumbersections      disables the above
 --timestamp             provides a timestamp (typically a time and date)
                         to be embedded in the comments
 --embed                 requests an embeddable XHTML snippet
                         (requires: --post,--profile=fragment)
                         DEPRECATED: Use --whatsout=fragment
                         TODO: Remove completely
 --stylesheet            specifies a stylesheet,
                         to be used by the post-processor.
 --css=cssfile           adds a css stylesheet to html/xhtml
                         (can be repeated)
 --nodefaultresources    disables processing built-in resources
 --javascript=jsfile     adds a link to a javascript file into
                         html/html5/xhtml (can be repeated)

lib/LaTeXML/Common/Config.pm  view on Meta::CPAN


=item C<--sitedirectory=>I<dir>

Specifies the base directory of the overall web site.
Pathnames in the database are stored in a form relative
to this directory to make it more portable.

=item C<--embed>

TODO: Deprecated, use --whatsout=fragment
Requests an embeddable XHTML div (requires: --post --format=xhtml),
    respectively the top division of the document's body.
    Caveat: This experimental mode is enabled only for fragment profile and post-processed
    documents (to XHTML).

=back


=head2 Math Options

These options specify how math should be converted into other formats.

lib/LaTeXML/Common/Model/RelaxNG.pm  view on Meta::CPAN

    Debug("" . (' ' x (2 * $level)) . $item); }
  return; }

#======================================================================
# Generate TeX documentation for a Schema
#======================================================================
# The svg schema can only just barely be read in and recognized,
# but it is structured in a way that makes a joke of our attempt at automatic documentation
my $SKIP_SVG   = 1;    # [CONFIGURABLE?]
my $SKIP_ARIA  = 1;
my $SKIP_XHTML = 1;

sub documentModules {
  my ($self) = @_;
  my $docs = "";
  $$self{defined_patterns} = {};
  foreach my $module (@{ $$self{modules} }) {
    my ($op, $name, @content) = @$module;
    next if $SKIP_SVG && $name =~ /:svg:/;                        # !!!!
    $name =~ s/^urn:x-LaTeXML:RelaxNG://;                         # Remove the urn part.
    $docs = join("\n", $docs,

lib/LaTeXML/Common/Model/RelaxNG.pm  view on Meta::CPAN

    else {
      Warn('unexpected', $op, undef, "RelaxNG->toTeX: Unrecognized item $op");
      return "[$op: " . join(', ', map { $self->toTeX($_) } @data) . "]"; } }
  else {
    return cleanTeX($object); } }

sub toTeX_ref {
  my ($self, $op, $name) = @_;
  if (my $el = $$self{elementdefs}{$name}) {
    $el = cleanTeXName($el);
    return ($SKIP_XHTML && ($el eq 'xhtml:*') ? '\texttt{xhtml:*}' : "\\elementref{$el}"); }
  elsif ($name =~ /_(?:attributes|model)$/) {
    return $self->toTeX($$self{defs}{$name}); }
  else {
    $name =~ s/^\w+://;    # Strip off qualifier!!!! (watch for clash in docs?)
    return ($SKIP_SVG && ($name eq 'svg') ? '\texttt{svg:svg}'
      : "\\patternref{" . cleanTeX($name) . "}"); } }

sub toTeX_def {
  my ($self, $combiner, $name, @data) = @_;
  my $qname = $name;

lib/LaTeXML/Common/Model/RelaxNG.pm  view on Meta::CPAN

    if ((defined $$self{defined_patterns}{$name}) && ($$self{defined_patterns}{$name} > 0)) { # Already been defined???
      return ''; }
    else {
      $$self{defined_patterns}{$name} = 1;
      return "\\patterndef{$name}{$docs}{$body}\n"; } } }

sub toTeX_element {
  my ($self, $name, @data) = @_;
  my $qname = $name;
  $name =~ s/^ltx://;
  return "" if $SKIP_XHTML && ($name eq 'xhtml:*');
  $name = cleanTeXName($name);
  my ($docs, @spec)    = $self->toTeXExtractDocs(@data);
  my ($attr, $content) = $self->toTeXBody(@spec);
  $content = "\\typename{empty}" unless $content;
  # Shorten display for element-specific attributes & model, ASSUMING they immediately folllow!
  my $body = $attr;
  $body .= '\item[\textit{Content}:] ' . $content if $content;
  if (my $ename = $$self{elementreversedefs}{$qname}) {
    if (my $uses = $self->getSymbolUses($ename)) {
      $body .= '\item[\textit{Used by}:] ' . $uses; } }

lib/LaTeXML/resources/XSLT/LaTeXML-common.xsl  view on Meta::CPAN


  <!-- What version of RDFa to generate. [Set to "1.0" for broken behaviour] -->
  <xsl:param name="RDFA_VERSION"></xsl:param>

  <!-- Whether to use Namespaces in the generated xml/xhtml/...-->
  <xsl:param name="USE_NAMESPACES">true</xsl:param>

  <!-- Whether to use HTML5 constructs in the generated html. -->
  <xsl:param name="USE_HTML5"></xsl:param>

  <!-- The XHTML namespace -->
  <xsl:param name="XHTML_NAMESPACE">http://www.w3.org/1999/xhtml</xsl:param>

  <!-- Whether to use xml:id instead of plain ole id;
       Not sure if we ever should; probably depends on embedded schema, as well? -->
  <xsl:param name="USE_XMLID"></xsl:param>

  <!-- The namespace to use on html elements (typically XHTML_NAMESPACE or none) -->
  <xsl:param name="html_ns">
    <xsl:value-of select="f:if($USE_NAMESPACES,$XHTML_NAMESPACE,'')"/>
  </xsl:param>

lib/LaTeXML/resources/XSLT/LaTeXML-xhtml.xsl  view on Meta::CPAN

<xsl:stylesheet
    version     = "1.0"
    xmlns:xsl   = "http://www.w3.org/1999/XSL/Transform"
    xmlns:ltx   = "http://dlmf.nist.gov/LaTeXML"
    exclude-result-prefixes = "ltx">

  <!-- Include all LaTeXML to xhtml modules -->
  <xsl:import href="LaTeXML-all-xhtml.xsl"/>

  <xsl:output method="xml"
              doctype-public = "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
              doctype-system = "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"
              media-type     = 'application/xhtml+xml'
              encoding       = 'utf-8'/>

  <!-- Note: If you want namespace prefixes (eg. for MathML & SVG),
       Redefine the root template ("/") and add prefixed namespace declarations
       (eg.xmlns:m="http://www.w3.org/1998/Math/MathML") -->

</xsl:stylesheet>

t/daemon/formats/citation.xml  view on Meta::CPAN

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<title>References</title>
<!--Generated by LaTeXML (version TEST) http://dlmf.nist.gov/LaTeXML/.-->

</head>
<body>
<div class="ltx_page_main">
<div class="ltx_page_content">

t/daemon/formats/citationraw.xml  view on Meta::CPAN

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<title>References</title>
<!--Generated by LaTeXML (version TEST) http://dlmf.nist.gov/LaTeXML/.-->

</head>
<body>
<div class="ltx_page_main">
<div class="ltx_page_content">

t/daemon/formats/mixedmath.xml  view on Meta::CPAN

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<title>Untitled Document</title>
<!--Generated by LaTeXML (version TEST) http://dlmf.nist.gov/LaTeXML/.-->

</head>
<body>
<div class="ltx_page_main">
<div class="ltx_page_content">



( run in 1.497 second using v1.01-cache-2.11-cpan-49f99fa48dc )