Capabilities for navigating my trove of LyX documents

Paul A. Rubin parubin73 at gmail.com
Tue Nov 5 16:51:41 UTC 2019


On 11/5/19 11:47 AM, David Mertens wrote:
> On Tue, Nov 5, 2019 at 10:22 AM Paul A. Rubin <parubin73 at gmail.com 
> <mailto:parubin73 at gmail.com>> wrote:
>
>     On 11/5/19 8:15 AM, David Mertens wrote:
>>     Hello Paul, list,
>>
>>     Thank you for your ideas. The batch file/bash script for keeping
>>     a set of tabs coherent is an excellent idea!
>>
>>     Unfortunately, the bookmarks suggestion won't work for me. Most
>>     of my notebooks have figures generated by analysis scripts
>>     (usually PNG these days). When LyX opens a symbolic link, it will
>>     look for relative paths relative to the symbolic link's
>>     directory. I use relative paths all over the place because I
>>     synchronize my notebooks across two different machines with
>>     different usernames, and thus different full paths. If I use
>>     relative figure filenames, LyX can find the figures whether I
>>     open them on my laptop of the lab machine, but that would break
>>     bookmarking.
>>
>>     Note: I tried using a tilde to represent the home directory for
>>     figures, something like "~/projects/2019/.../some-figure.png".
>>     This works in LyX, but the way it works is that LyX replaces the
>>     tilde with my current user's home directory as soon as I close
>>     the Graphics dialog. If LyX kept the tilde in the path to the
>>     file, I would be able to express "absolute" paths across my two
>>     different users.
>>
>>     Upon further reflection, I feel like at least some fraction of
>>     this behaviour could be implemented use lyxpipe if lyxpipe could
>>     speak to all open sessions. For example, if there were a
>>     command-line option to give the LyX session a name, then I could
>>     use the batch-file trick to save tabs *and* associate a name with
>>     the session. I could then implement a third-party GUI program
>>     that handles bookmarked notebooks and could speak to the
>>     different sessions as needed.
>>
>>     David
>>
>>     On Sat, Nov 2, 2019 at 4:49 PM Paul A. Rubin <parubin73 at gmail.com
>>     <mailto:parubin73 at gmail.com>> wrote:
>>
>>         On 11/2/19 12:04 PM, David Mertens wrote:
>>>         Hello everyone,
>>>
>>>         After years of using LyX for research notebooks, I find
>>>         myself these days working with sets of documents much like I
>>>         have sets of tabs in my browser. I would really, really like
>>>         to be able to open up sets of documents just like I can open
>>>         up sets of tabs in a browser, and I would also really like
>>>         to be able to bookmark documents much like I can bookmark
>>>         web pages. Finally, it would be really nice if I could embed
>>>         LyX links to other documents to refer to previous
>>>         calculations or experimental results, so that I could click
>>>         on it and LyX would open the document in a new tab. This
>>>         would really, really facilitate my scholarly work.
>>>
>>>         Apart from the bookmarking, most of these are "solved" by
>>>         opening multiple LyX sessions with the tabs I need, then
>>>         never restarting my laptop for weeks on end. However, when
>>>         my laptop inadvertently loses power, all of that "state" is
>>>         lost and I have to recreate it from scratch.
>>>
>>>         I have looked into implementing some of these ideas with
>>>         lyxpipe programming, but as I said I use multiple LyX
>>>         sessions for different kinds of work: one research project,
>>>         another research project, one class, and another class all
>>>         need their own tab sets, so they go in different sessions.
>>>         lyxpipe can only talk with the first LyX process that starts.
>>>
>>>         As far as I can tell, LyX does not have any of these
>>>         capabilities and lyxpipe is not the way to implement them.
>>>         Am I wrong? If I wanted to implement them, what is the most
>>>         sensible way to do so? Is there an extension mechanism for
>>>         this kind of thing besides lyxpipe? Finally, what are the
>>>         tools that others use to organize large collections of
>>>         notebook-ish files?
>>>
>>>         Thanks!
>>>         David
>>>
>>>         P.S. I am not (yet) subscribed to the user list, so I'd
>>>         appreciate if replies included my email address explicitly.
>>>         Thanks!
>>

>>>         At least part of this is fairly easy to implement.
>>
>>         Opening sets of documents: You can set up a one-line batch
>>         file to open a particular bunch of documents. Omitting the
>>         path info for brevity, "lyx file1.lyx file2.lyx ..." will
>>         open all the files listed in one LyX window. Similarly, "lyx
>>         *.lyx" will open all the .lyx files in the directory where
>>         the command is being run (at least on Linux, but I imagine
>>         also on MacOS and Windows).
>>
>>         Bookmarks: LyX lets you open files from a list of recently
>>         opened ones. If that's not sufficient, one possibility is to
>>         create a folder (directory) someplace for "bookmarks". In
>>         that folder, put a link to each file you would like to
>>         bookmark. (On Linux, this is known as a symlink. Windows and,
>>         I assume, MacOS also support symlinks.) You can optionally go
>>         to Tools > Preferences > Paths and change your "Working
>>         directory" path to that folder, which means LyX will always
>>         default to that folder when you are opening a file. (You can
>>         still navigate to other documents using the file chooser.)
>>
>>         Paul
>>
>>
>>
>     For the bookmarking thing, what about creating a folder with
>     symlinks to the working directories of your various notebooks and
>     making that the "Working directory" in preferences? To open a
>     document, you would click File > Open, double-click the link to
>     the directory for the "bookmarked" project, then open the file
>     there. Does that still cause relative link problems?
>
>     Paul
>
>     PS: For list purposes, bottom posting is preferred.
>
>
> Ah, the Law of Indirection 
> <https://en.wikipedia.org/wiki/David_Wheeler_(computer_scientist)#Quotes>. 
> Of course! You are correct, this would solve the bookmark problem. The 
> only issue, which isn't really an issue, is that I don't think LyX is 
> smart enough to reuse cached images. But having a working bookmark 
> system is well worth a few extra CPU cycles.
>
> Thanks!
>
> P.S. Why does Gmail's default behavior make bottom-posting such a pain?
>
It's designed for people with short attention spans, who wouldn't make 
it to the bottom if any significant scrolling was involved.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20191105/e6ef1020/attachment.html>


More information about the lyx-users mailing list