bugGNU TeXmacs - Bugs: bug #60218, include LinkBack data in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #60218: include LinkBack data in "copy as image" pdf target

Submitter:  Peter Rapcan <peterrapcan>
Submitted:  Fri 12 Mar 2021 08:14:36 PM UTC
   
 
Category:  Conversion Priority:  5 - Normal
Item Group:  Wishlist Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  None Release: 
Fixed Release:  None Fixed Release: 
Keywords: 

Thu 01 Apr 2021 09:30:03 PM UTC, comment #5: 

I don't know how to rename the title.

According to the LaTeXit website, the source TeX expressions can be stored in pdf as well as in images (there via exif data, with the following warning by LaTeXit: "Every export format of LaTeXiT cannot embed the generating LaTeX code. As much as possible, prefer PDF. The TIFF, PNG and JPEG formats store the LaTeX data in the EXIF meta-data, but… these ones are often truncated when too big. Unless this limitation is dropped in the future, those formats won't allow further reopening.")

As far as linkback is concerned, I think in the case relevant to us it "only" provides mechanism to re-open e.g. pdf embedded linkback-compatible application it the source app like LaTeXit by doubleclicking the embedded object, then synchronize changes back to the linkback-compatible app etc.
I think the source data being stored inside e.g. pdf is independent from the rest of the above linkback functionality.

In any case, LaTeXit source code is available at https://www.chachatelier.fr/latexit/latexit-downloads.php?lang=en and is released under the CeCILL license (open source, GPL compatible); So we could basically try to identify and extract the relevant functionality from LaTeXit, replacing TeX with TeXmacs expressions. There is an xcodeproj in the source code, too.

Peter Rapcan <peterrapcan>
Thu 01 Apr 2021 08:24:32 PM UTC, comment #4: 

Maybe would be good to change the title of this wish item since I do not think LinkBack is a suitable option (also because is not available in other systems as far as I understand).

Massimiliano Gubinelli <mgubi>
Group administrator
Thu 01 Apr 2021 08:23:35 PM UTC, comment #3: 

I've added a section here:

https://texmacs.github.io/notes/docs/dev-notes.html

discussing possible improvements in this direction. There is certainly the possibility to augment the generated PDF file with a file attachment which include the whole document, or in case of a snippet, enough information to recreate it. As soon as we start to think about this, would be nice to have a mechanism to add arbitrary files to a PDF and also to a TeXmacs file, in this way data can be transferred together with the document. There is a related package in LaTeX (attachfile) and TeX Live install a command called "pdftosrc" which can extract embedded files from within a PDF.

Massimiliano Gubinelli <mgubi>
Group administrator
Thu 01 Apr 2021 07:23:16 PM UTC, comment #2: 

The list of apps is in the right column here: http://linkbackproject.org. The list is incomplete I think, as LaTeXit supports is but is not listed.

Anyway, I don't think the linkback (client-server) architecture/program is important for our use case (more so because the linkback project seems abandoned).

What is important is that the attached pdf from the clipboard contains the original LaTeXit source - probably in the form of a stream. Look at the file "Apple PDF pasteboard type.txt" or "com.adobe.pdf.txt".

Those are PDF-1.3 files that contain several streams. Moreover if you rename them to .pdf and drag and drop the pdf onto the LaTeXit.app, LaTeXit will recover the original TeX expression....

Peter Rapcan <peterrapcan>
Tue 16 Mar 2021 10:37:18 PM UTC, comment #1: 

It seems to be a technology independent of the PDF format, see http://linkbackproject.org
It is also not clear to me which applications really supports it since that webpage is not maintained since 2005. Do you know of applications currently able to use that information? It is not difficult to implement but will require specific code for Mac, maybe using the SDK provided in the link above.

Massimiliano Gubinelli <mgubi>
Group administrator
Fri 12 Mar 2021 08:14:36 PM UTC, original submission:  

On macos, e.g. LateXit can generate a PDF containing rendered mathematical symbols, together with so-called LinkBack data, which enables a supported application (like older versions of Keynote) to double click on the pdf image to open the underlying original latex source for editing back in the LateXit application.

This could also be made the case for TeXmacs "copy as image" feature with a PDF format target (perhaps also other format that support such kind of side-data)...

Probably it could work not only on macOS but also other platforms that have something like LinkBack functionality?

I am enclosing all data shown by the macOS ClipboardViewer application (https://developer.apple.com/library/archive/samplecode/ClipboardViewer/Introduction/Intro.html) in ASCII format, for the "align" format of the latex mathematical expression x^2+y^2 \leq z^2 .

Peter Rapcan <peterrapcan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #51049:  Archive@2.zip added by peterrapcan (636KiB - application/zip - I am enclosing all data shown by the macOS ClipboardViewer.app (https://developer.apple.com/library/archive/samplecode/ClipboardViewer/Introduction/Intro.html) in ASCII format, for the "align" format of the latex mathematical expression x^2+y^2 \leq z^2 .)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mgubi (Posted a comment)
  • -email is unavailable- added by peterrapcan
  • -email is unavailable- added by peterrapcan (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-12 peterrapcan Attached File- Added Archive@2.zip, #51049
        Carbon-Copy- Added peterrapcan

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code