# To create links to filenames in Pandoc Tables

I am working for better note taking and note using. I asked Textmate if there is a possibility to have links for filenames in LaTeX editing. They proposed the following approach

Nothing like this is built into the grammar. But I could foresee something like this being possible depending on being able to recognize file links in the grammar. Once recognized you could create a command to open the current link.

Code example

\documentclass{article}
\begin{document}
arrhythmia_table.pdf
Screenshot_123 43 4.png
\end{document}


where I want to be able to detect the filename, search it in my filesystem (later; first file from the current folder) and add it to the current grammar. So by clicking the filename when holding etc function button should open the appropriate document.

How can you recognize links in grammar/structure?

## Pandoc table for Sources and Their Content

We could probably use here some sort of Table structure for the easy parsing like in Pandoc. Such that you compile these tables after edits. Probably, it is possible to make links to filesystem to these filenames and to the objects in Calibre.

Pandoc table of filenames in different locations

-----------------------------------------------------------------------------------------------------------------------------------------------
Author      Topic                               ID
----------- ----------------------------------- -----------------------------------------------------------------------------------------------
uni         Instructions                        Anaerobic infections.pdf

Doherty     Inflammation                        Calibre:9780071590877

Stewens     Skin and Soft tissue management     Practice Guidelines for the Diagnosis and Management of Skin and Soft-Tissue Infections.pdf
-----------------------------------------------------------------------------------------------------------------------------------------------

Table: Anaerobic surgical infection forms.


The PATH can be the same as the current location of the tex -document. To make a link only for a search in Finder/other Desktop search would be enough too. This should be possible.

I have actually the book also in Kindle but I have not found any support for it in this approach. I think the open-source Calibre is a possibility. I opened a discussion about this possibility here which Calibre community informs to be their developer forum.

How can you deal with sources and content in different locations?

• there you have filenames in free text so the latex grammar (which doesn't really exist) isn't relevant, the latex syntax would only be relevant to recognising filenames if you had \includegraphics{"Screenshot_123 43 4.png"} or \input{myfile} etc, where you could teach your editor about file based latex commands. For input as you show with filenames in free text, I don't think latex syntax is involved at all, you would just need to program a regexp search in your editor. If you allow spaces in filenames as there I don't see how it is possible in general. – David Carlisle May 18 '15 at 11:02
• @DavidCarlisle Thank you for your comment! I added a suggestion about how this approach could be easier to approach. Assume the content is in Pandoc table. To pass everything under ID to specific programs or to Desktop Search would be enough. However, I am not sure if this is supported or not. – Léo Léopold Hertz 준영 May 18 '15 at 15:47