Can I attach/embed a file to a Latex document and hyperlink it to a word for saving purposes? - latex

I am trying to attach a .condarc file to my Latex journal as an installation guide. I want users for my workshop to click on a hyperlink and be able to save/download the file. Is this possible through Latex in general? What about on Overleaf?
I've looked all over the place, however there seem to only be file specific packages.
I tried using the embedfile and attachfile packages. Here's an example of what I did:
\usepackage{embedfile}
\embedfile[
desc={Source of Package 'embedfile'}
]{.condarc }
I did the above because I thought the first step is to get the file embedded somewhere, anywhere. Then I could reference the file in later steps.
Thank you for any guidance!

If you use a pdf viewer that supports attachments (e.g. adobe reader) the following example using the attachfile package will attach the .codarc file to the pdf and produce a text link that will prompt the user for future action:
\documentclass{article}
\usepackage{attachfile}
\begin{document}
test \textattachfile[color=1 0 0]{.codarc}{.codarc}
\end{document}
(please be aware that even if a pdf viewer might be technically equipped to open such embedded files, users may have this feature disabled due to security concerns)
Instead of attaching the file, one could also host it somewhere on the internet and put a link into the pdf. This will work for a much larger variety of pdf viewers.
\documentclass{article}
\usepackage{hyperref}
\begin{document}
test
\href{https://raw.githubusercontent.com/samcarter/tikzducks/master/LICENSE.txt}{LICENSE.txt}
\end{document}

Related

how to submit a latex article to pattern recognition letters journal

the available upload options are
and what i uploaded are
but what i get is not a pdf file after submission, but it's latex tags, it is similar to:
what am i missing? i've uploaded all .sty, .bst, .bib, .tex, .png files in the folder:
How about reading the Guide for Authors on the Elsevier website and/or the prletters-template-with-authorship.pdf file you have there?
Upload only the .tex files and the figures, and include the .bbl directly into the .tex file (typically these submission systems like that better).
Finally, from your screenshot it seems that the journal submission system does not like .pngs. You should convert them to TIFF or EPS (or any other standard format) that is suggested in the submission information to authors.
Hi to all finally i submitted successfully by the following order
don't forget to upload the Highlights as a separate file

Latex generated pdf unreadable

Of late, I have observed that pdf generated by latex files are unreadable in certain email browsers (when previewing the attachment in Outlook) as well as the printed hard copy especially math symbols like inner products, integral etc overlap with each other making the file ugly and unreadable. Surprisingly the same file looks perfectly fine when viewed using the ShareLatex built-in pdf browser as well as the desktop version of Adobe Reader.
ShareLatex documentation suggest switching the PDF viewer from built-in to native. Upon changing to native, even the browser version had unreadable characters.
[https://www.sharelatex.com/learn/Kb/Changing_PDF_viewer]
So, I would like to know if there is better way to compile the tex file in Sharelatex so that its readable across platforms and in print.
Most of the "pdf generation from tex" related issues posted on StackOverflow point out problems with viewing images. As such the pdf files I am generating don't contain any images.
Thanks in advance !
AFAIK there's not a single build-in PDF viewer (browser, e-mail client, ...) that works well. But what you could test is if \usepackage{lmodern} makes things better ...

Generating a nice web documentation from .pdf or .tex

I wrote a documentation for an application in LaTex, and was wondering what the best way to display in a webpage. I can just convert it to HTML, but I'm wondering if there's a better way with all the nice css styling done automatically as in other web documentations.
I'm looking for something like Sphinx, but never used it, so not sure if it's a good solution to a document already made in .tex/.pdf
Here's what I did, (thx #Blender)
Exported the Latex file to html using tex4ht (texmaker) and used pandoc to convert the html file to reStructuresText, and edited that .rst to fit the specifications of sphinx. This was needed since I wanted to break the latex file to few different HTML files.
Then used sphinx to generate the PDF file. I think I'm going to keep writing in .rst, so it's easy to convert both to HTML, and PDF.
Adding the answer so anyone having the same problem will get some ideas.

LaTeX: Are there any web frontends available?

As of now the workflow is something like, I import an SVN or a CVS repository and then compile a document locally on my machine to get either a ps or a pdf file. But I was wondering if there is a Web front-end to do all the stuff, like for instance, an editor using which you can edit the file online and then download just the pdf file by compiling it?
Any suggestions?
http://www.scribtex.com/pages/index
http://code.google.com/p/latex-lab/
latex-lab will build on top of the google apps editor base...
scribtex is hosted only it looks like.
Another to add to the list is TeXonWeb.
If you mean online LaTeX compilers, then there are two I know of - at baywifi.com (to PDF) and at ScienceSoft (to several formats). Haven't seen any full editors, though.
There is a CMS based on Latex out there at www.osreviews.net.
The best site I found to produce PDF from LaTeX online is PC Shows.
Verbosus offers an Online LaTeX Editor that supports PDF preview, HTTPS, syntax highlighting, code completion, templates, etc. (Additionally it offers an editor for Octave/Matlab)
This is less of a web-based interface than a simple drag-and-drop cgi script that converts latex syntax to a graphic... www.forkosh.com/mimetex.html
latex-online is a simple open source web service that compiles latex sources/public git repos and returns pdf's. It has both a simplistic web front-end and a command-line tool for interacting with the service - you might find it interesting.
One rather new possibility is https://texlive.net/
You can either interactively edit your documents or you can pass your document via the url to it. E.g. a simple hello world document can be constructed as
https://texlive.net/run?%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cbegin%7Bdocument%7D%0AHello%20world!%0A%5Cend%7Bdocument%7D

Search Words in pdf files

Is it possible to search "words" in pdf files with delphi?
I have code with which I can search in many others files like (exe, dll, txt) but it doesn't work with pdf files.
It depends on the structure of the specific PDF.
If the pdf is made of images (scanned pages) then you have to OCR each image and build a full text index inside the PDF. (To see if its image based, open it with notepad and look for obj tags full of random chars). There are a few utilities and apps that do this kind of work for you, CVision PDF Compressor is one that I have used before.
If the pdf is a standard PDF, then you should be able to open it like any other text file and search for the words.
Here is page that will detail some of the structure of a PDF. This a SO post for the same.
The components/libraries mentioned in the answer to this question should do what you need.
I'm just working on a project that does this. The method I use is to convert the PDF file to plain text (with pdftotext.exe) and create an index on the resulting text. We do the same with word and other office files, works pretty good!
Searching directly into pdf files from Delphi (without external app) is more difficult I think. If you find anything, please update here as I would also be very interested in that!
One option I have used is to use Microsoft's ifilter technology, this is used by windows desktop search and many other products such as sharepoint and SQL server full-text search.
It supports almost any office/office-like file format, even dwg, msg, pdf, and files in zip/rar archives.
The easiest way to use it is to run FiltDump.exe on any files you have, and index the text output.
To know about the filters installed on your PC, you can use ifilter explorer.
Wikipedia has some links on its ifilters page.
Quick PDF Library's GetPageText function can give you the words from a PDF as well as the page number and the co-ordinates of those words - sometimes useful for highlighting.
PDF is not just a binary representation. Think of it as a tree of objects, where an object node has some metadata and some content information. Some of these objects have string data, some don't. Some of these are even encrypted, and some are compressed. So, there's very little chance your string finder will work on any arbitrary PDF.

Resources