Last active
October 10, 2019 02:02
-
-
Save tkw1536/7ca89a875e854232ea82abafb6b5a3d7 to your computer and use it in GitHub Desktop.
Example for the new LaTeXML locators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% to make sure that the binding is loaded, compile this with: | |
% latexml --preload example.tex.ltxml example.tex --dest=example.xml | |
\begin{document} | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
Morbi non nisl metus. | |
\begin{quote} | |
Nunc efficitur, elit id accumsan iaculis, nisl mauris sodales sapien, in rutrum turpis neque finibus eros. | |
Duis gravida bibendum neque efficitur hendrerit. | |
Pellentesque eget odio efficitur, suscipit lorem at, aliquam est. | |
Integer odio quam, mollis sit amet dui et, consequat fermentum nisl. | |
\end{quote} | |
Quisque non cursus tellus. | |
Curabitur lobortis tellus varius pharetra condimentum. | |
Integer pulvinar sapien ligula, nec dignissim justo egestas et. | |
Pellentesque consectetur, lacus a elementum consectetur, sem quam lobortis nunc, in blandit nisl ligula sit amet ex. | |
Maecenas in dui vitae metus pellentesque vehicula. | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- CPERL -*- | |
package LaTeXML::Package::Pool; | |
use strict; | |
use warnings; | |
use LaTeXML::Package; | |
Tag('ltx:quote', afterClose => sub { | |
my ($document, $node, $box) = @_; | |
return unless $box; | |
$node->setAttribute('srcref', $box->getLocator->toAttribute); }); | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?latexml searchpaths="/Users/twiesing/tmp/exampkle"?> | |
<?latexml package="example.tex.ltxml"?> | |
<?latexml class="article"?> | |
<!-- %to make sure that the binding is loaded, compile this with: --><!-- %latexml __preload example.tex.ltxml example.tex __dest=example.xml --><?latexml RelaxNGSchema="LaTeXML"?> | |
<document xmlns="http://dlmf.nist.gov/LaTeXML"> | |
<resource src="LaTeXML.css" type="text/css"/> | |
<resource src="ltx-article.css" type="text/css"/> | |
<para xml:id="p1"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
Morbi non nisl metus.</p> | |
<quote srcref="example.tex#textrange(from=9;0,to=14;11)"> | |
<p>Nunc efficitur, elit id accumsan iaculis, nisl mauris sodales sapien, in rutrum turpis neque finibus eros. | |
Duis gravida bibendum neque efficitur hendrerit. | |
Pellentesque eget odio efficitur, suscipit lorem at, aliquam est. | |
Integer odio quam, mollis sit amet dui et, consequat fermentum nisl.</p> | |
</quote> | |
<p>Quisque non cursus tellus.</p> | |
</para> | |
<para xml:id="p2"> | |
<p>Curabitur lobortis tellus varius pharetra condimentum. | |
Integer pulvinar sapien ligula, nec dignissim justo egestas et. | |
Pellentesque consectetur, lacus a elementum consectetur, sem quam lobortis nunc, in blandit nisl ligula sit amet ex. | |
Maecenas in dui vitae metus pellentesque vehicula.</p> | |
</para> | |
</document> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment