ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Off-topic: Convert PDF to (Con/La)TeX
@ 2013-05-12 14:32 Xan
  2013-05-13  7:55 ` luigi scarso
  0 siblings, 1 reply; 4+ messages in thread
From: Xan @ 2013-05-12 14:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I just want to know if there is any tool to convert a pdf (generated by 
latex or context) to latex source or context source file. Does anyone 
have got an experience on that?

I'm thinking about two alternatives:
* libraries for reading like podofo and custom script for passing pdf 
context (text) to context commands
* pass pdf to jpg, and apply http://detexify.kirelabs.org/classify.html 
for passing to tex symbols.

For me it's vital to pass mathematical symbols like (\int) to tex symbol 
and not like utf-8 symbols.

Thanks  a lot,
Xan.

Note: pdf could be substitute for ps if you want ;-)

PS: Please CCme
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Off-topic: Convert PDF to (Con/La)TeX
  2013-05-12 14:32 Off-topic: Convert PDF to (Con/La)TeX Xan
@ 2013-05-13  7:55 ` luigi scarso
  2013-05-15 16:14   ` Xan
  0 siblings, 1 reply; 4+ messages in thread
From: luigi scarso @ 2013-05-13  7:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users, dxpublica


[-- Attachment #1.1: Type: text/plain, Size: 853 bytes --]

On Sun, May 12, 2013 at 4:32 PM, Xan <dxpublica@telefonica.net> wrote:

> Hi,
>
> I just want to know if there is any tool to convert a pdf (generated by
> latex or context) to latex source or context source file. Does anyone have
> got an experience on that?
>
> I'm thinking about two alternatives:
> * libraries for reading like podofo and custom script for passing pdf
> context (text) to context commands
> * pass pdf to jpg, and apply http://detexify.kirelabs.org/**classify.html<http://detexify.kirelabs.org/classify.html>for passing to tex symbols.
>
> For me it's vital to pass mathematical symbols like (\int) to tex symbol
> and not like utf-8 symbols.
>
> Thanks  a lot,
> Xan.
>
>
Have you seen the mudraw program of mupdf
http://www.mupdf.com/
?
It has a -t switch that outputs txt  and a -tt and -ttt switches that
output xml.

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1366 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Off-topic: Convert PDF to (Con/La)TeX
  2013-05-13  7:55 ` luigi scarso
@ 2013-05-15 16:14   ` Xan
  2013-05-15 16:18     ` luigi scarso
  0 siblings, 1 reply; 4+ messages in thread
From: Xan @ 2013-05-15 16:14 UTC (permalink / raw)
  To: luigi scarso; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1283 bytes --]

Al 13/05/13 09:55, En/na luigi scarso ha escrit:
>
>
>
> On Sun, May 12, 2013 at 4:32 PM, Xan <dxpublica@telefonica.net 
> <mailto:dxpublica@telefonica.net>> wrote:
>
>     Hi,
>
>     I just want to know if there is any tool to convert a pdf
>     (generated by latex or context) to latex source or context source
>     file. Does anyone have got an experience on that?
>
>     I'm thinking about two alternatives:
>     * libraries for reading like podofo and custom script for passing
>     pdf context (text) to context commands
>     * pass pdf to jpg, and apply
>     http://detexify.kirelabs.org/classify.html for passing to tex symbols.
>
>     For me it's vital to pass mathematical symbols like (\int) to tex
>     symbol and not like utf-8 symbols.
>
>     Thanks  a lot,
>     Xan.
>
>
> Have you seen the mudraw program of mupdf
> http://www.mupdf.com/
> ?
> It has a -t switch that outputs txt  and a -tt and -ttt switches that 
> output xml.
>
> -- 
> luigi
Thank you for answering and sorry for delay. I will check it, but I 
suspect that if I have

  $$\int_{i=1}^{\infty} x^2$$

in one latex document and it generates pdf, then mupdf -t of that 
document does not generate that formula, else "S i=1 x²".


Thanks,
Xan.

[-- Attachment #1.2: Type: text/html, Size: 2824 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Off-topic: Convert PDF to (Con/La)TeX
  2013-05-15 16:14   ` Xan
@ 2013-05-15 16:18     ` luigi scarso
  0 siblings, 0 replies; 4+ messages in thread
From: luigi scarso @ 2013-05-15 16:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3224 bytes --]

\starttext
$\int_{i=1}^{\infty} x^2$
\stoptext



$ mudraw -ttt test.pdf
<?xml version="1.0"?>
<document name="test.pdf">
warning: ignoring surrogate pair mapping in cmap
<page>
<block bbox="280.534 67.7741 286.392 84.595">
<line bbox="280.534 67.7741 286.392 84.595">
<span bbox="280.534 67.7741 286.392 84.595" font="LMRoman12-Regular"
size="11.9552">
<char bbox="280.534 67.7741 286.392 84.595" c="1"/>
</span>
</line>
</block>
<block bbox="75.4124 101.448 84.9435 156.849">
<line bbox="75.4124 101.448 84.9435 156.849">
<span bbox="75.4124 101.448 84.9435 156.849" font="LatinModernMath-Regular"
size="8.36861">
<char bbox="75.4124 101.448 84.9435 156.849" c="&#x221e;"/>
</span>
</line>
</block>
<block bbox="72.2341 100.779 80.1837 179.922">
<line bbox="72.2341 100.779 80.1837 179.922">
<span bbox="72.2341 100.779 80.1837 179.922" font="LatinModernMath-Regular"
size="11.9552">
<char bbox="72.2341 100.779 80.1837 179.922" c="&#x222b;"/>
</span>
</line>
</block>
<block bbox="68.8824 124.759 83.5355 180.159">
<line bbox="68.8824 124.759 83.5355 180.159">
<span bbox="68.8824 124.759 83.5355 180.159" font="LatinModernMath-Regular"
size="8.36861">
<char bbox="68.8824 124.759 70.5728 180.159" c="u"/>
<char bbox="70.5728 124.759 72.2631 180.159" c="&#xdc56;"/>
<char bbox="72.2633 124.759 78.7736 180.159" c="="/>
<char bbox="78.7741 124.759 83.5355 180.159" c="1"/>
</span>
</line>
</block>
<block bbox="87.513 100.785 99.7105 179.928">
<line bbox="87.513 100.785 99.7105 179.928">
<span bbox="87.513 100.785 94.3509 179.928" font="LatinModernMath-Regular"
size="11.9552">
<char bbox="87.513 100.785 94.3509 179.928" c="?"/>
</span>
<span bbox="94.9491 109.213 99.7105 164.614" font="LatinModernMath-Regular"
size="8.36861">
<char bbox="94.9491 109.213 99.7105 164.614" c="2"/>
</span>
</line>
</block>
</page>
</document>



On Wed, May 15, 2013 at 6:14 PM, Xan <dxpublica@telefonica.net> wrote:

>  Al 13/05/13 09:55, En/na luigi scarso ha escrit:
>
>
>
>
> On Sun, May 12, 2013 at 4:32 PM, Xan <dxpublica@telefonica.net> wrote:
>
>> Hi,
>>
>> I just want to know if there is any tool to convert a pdf (generated by
>> latex or context) to latex source or context source file. Does anyone have
>> got an experience on that?
>>
>> I'm thinking about two alternatives:
>> * libraries for reading like podofo and custom script for passing pdf
>> context (text) to context commands
>> * pass pdf to jpg, and apply http://detexify.kirelabs.org/classify.htmlfor passing to tex symbols.
>>
>> For me it's vital to pass mathematical symbols like (\int) to tex symbol
>> and not like utf-8 symbols.
>>
>> Thanks  a lot,
>> Xan.
>>
>>
>  Have you seen the mudraw program of mupdf
> http://www.mupdf.com/
> ?
>  It has a -t switch that outputs txt  and a -tt and -ttt switches that
> output xml.
>
> --
> luigi
>
> Thank you for answering and sorry for delay. I will check it, but I
> suspect that if I have
>
>  $$\int_{i=1}^{\infty} x^2$$
>
> in one latex document and it generates pdf, then mupdf -t of that document
> does not generate that formula, else "S i=1 x²".
>
>
> Thanks,
> Xan.
>



-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 5739 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-15 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12 14:32 Off-topic: Convert PDF to (Con/La)TeX Xan
2013-05-13  7:55 ` luigi scarso
2013-05-15 16:14   ` Xan
2013-05-15 16:18     ` luigi scarso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).