hyperlink reference to bibliography

Everything related to our flagship word processor.
Post Reply
dlrodriguez
Posts: 9
Joined: 2020-10-22 13:36:34

hyperlink reference to bibliography

Post by dlrodriguez »

Is there a way to automatically set up hyperlinks (when output in a PDF) between the reference mark ("[2]" for instance) and the corresponding entry in the bibliography? This would be a bibliography built using Bookends.

Þorvarður
Posts: 346
Joined: 2012-12-19 05:02:52

Re: hyperlink reference to bibliography

Post by Þorvarður »

Hello David,
Assuming you are still using a style based on the AIAA citation style where every reference in the reference list (= bibliography) begins with a number enclosed in brackets
<https://www.aiaa.org/publications/journ ... and-format>

you should be able to do this if you select the whole bibliography and then bookmark the numbers.
To do that you can use these two lines:
[DELETED]

Next step is to cross-reference each numbered reference citation. I’m sure both steps can be united in a macro. The Macro Language Reference has many commands for bookmarks and cross-references, but I didn’t find any examples that show how to use them. :–(

Perhaps someone can help with a macro. I would really like to have such a macro …
Last edited by Þorvarður on 2021-06-20 01:11:30, edited 1 time in total.

dlrodriguez
Posts: 9
Joined: 2020-10-22 13:36:34

Re: hyperlink reference to bibliography

Post by dlrodriguez »

Interesting...I will give this a try. It's quicker than doing it manually, but still not fully automatic. Perhaps a macro could be written as you suggest. Thanks for your help!

Þorvarður
Posts: 346
Joined: 2012-12-19 05:02:52

Re: hyperlink reference to bibliography

Post by Þorvarður »

It's quicker than doing it manually, but still not fully automatic
Oops! In my test I used the Vancouver style which is similar to the AIAA style, but it has a slightly different bibliography format. Sorry about this mistake. Find All should look like this:
2.png
2.png (22.25 KiB) Viewed 2326 times

Code: Select all

# Ensure the bibliography is selected.
$textExpression = Read Selection

If $textExpression == ‘’
$proceed = Prompt “You need to select the bibliography first. Click now ‘OK’ and then select the bibliography.”, ‘’, ‘OK, I will.’
# The following sleep-trick is from Adrian
   While $textExpression == ‘’
      Sleep 1
      $textExpression = Read Selection
   End
End  
Find All @Text{(?<=\[)\d+?(?=\])}, 'Esa'
Insert:Bookmarks:Add Bookmark
This will automatically bookmark the numbers in the bibliography. Now we just need to automate the cross-references …
Last edited by Þorvarður on 2021-06-20 01:00:57, edited 1 time in total.

User avatar
phspaelti
Posts: 1201
Joined: 2007-02-07 00:58:12
Location: Japan

Re: hyperlink reference to bibliography

Post by phspaelti »

Hi Þorvarður, David,
I will post the approach to this problem over in the Macro thread.

You have since fixed the other issue, but I still wanted to point out one thing about Find/Replace: You seem to be fond of "Shortest 1+", but in fact this is really not necessary for such cases, and is in fact likely to lead you astray a lot of the time. [Any digit][1+]"bracket" and [Any digit][Shortest 1+]"bracket" will always find the same thing. Meanwhile [Any digit][1+] and [Any digit][Shortest 1+] will not. In fact [Any digit][Shortest 1+] will only match the same as [Any digit].

Anyhow I will post a discussion of the Cross-reference problem in the macro thread.
philip

nostrand
Posts: 7
Joined: 2016-05-11 08:59:21

Re: hyperlink reference to bibliography

Post by nostrand »

All of this talk about numbered bibliographic entries makes me nostalgic for LaTeX. LaTeX bibliographies allow you to use symbolic link names and resolves them to numbers when it typesets the article or book. (Knuth originally created TeX for his never complete book series.) It would be nice if Nisus made this sort of thing available to people without sacrificing the GUI interface.

While I am on my wish list, I wish that there were a way to purge Nisus of obsolete undo information and other behind the scenes clutter. I have a file which literally has years of this stuff lurking in the background. It takes several minutes to save a file to disk on a more or less brand new MacBook Pro (M1) with about 500GB of free disk space.

One of my files has grown to 1.8 GB despite having only 310,615 words.

Þorvarður
Posts: 346
Joined: 2012-12-19 05:02:52

Re: hyperlink reference to bibliography

Post by Þorvarður »

nostrand wrote:
2021-06-20 11:05:52
All of this talk about numbered bibliographic entries makes me nostalgic for LaTeX. LaTeX bibliographies allow you to use symbolic link names and resolves them to numbers when it typesets the article or book.
… and will a click on the reference symbol in the PDF then take you directly to the corresponding reference in the bibliography? That is what the original poster wants.

Actually, I don't understand your nostalgia for LaTeX. Why would we want to use symbolic link names and resolve them to numbers when the document is typeset???
Creating the numbers is not a problem. That’s done automatically by the reference manager (Bookends.)

I wish that there were a way to purge Nisus of obsolete undo information and other behind the scenes clutter. […] One of my files has grown to 1.8 GB despite having only 310,615 words. […] It takes several minutes to save a file to disk on a more or less brand new MacBook Pro (M1)
I'm convinced there is something fishy going on here. Most likely the file has got corrupted, somehow. Copy the text and save it in a new empty document. That will clean up everything. There is also a macro available to get ride of (invisible) gremlins which you might have got when you imported text from a browser or a PDF.

If the problem persists, please contact the support directly (under the Help menu), because what you describe is not a normal behavior. I just created a document with 530.000 words. It's 3.4 MB on disk and saving takes one or two seconds on an old MacBook Pro mid 2010.
Last edited by Þorvarður on 2021-06-22 08:28:55, edited 1 time in total.

Vanceone
Posts: 176
Joined: 2013-05-03 07:06:31

Re: hyperlink reference to bibliography

Post by Vanceone »

That kind of file size could happen with embedded images or PDFs. I know that I have a 133 page document, which, unfortunately, has about 80 of those pages as inserted PEFS (a sort of appendix). File size is about 24 MB (a pain to email!) and it takes about 10 seconds for an autosave. Maybe 15.

It's the images that are the issue. I wonder, actually, if I saved it as a RTFD if that would help, instead of a straight RTF file. RTF and embedded images are a nightmare, and if someone "phantom TIFFS" are lurking, that could easily explode a document.

Copy/pasting into a new document or Saving as a new file name shouldd, hopefully, cut the size way down. It would also get rid of any old undo states and revisions.

If neither work, then yes, Nisus needs to investigate because that's not normal. Even my 80 pages of inserted PDF's is only 25 megabytes, not a gigabyte size file.

User avatar
martin
Official Nisus Person
Posts: 4958
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: hyperlink reference to bibliography

Post by martin »

nostrand wrote:
2021-06-20 11:05:52
One of my files has grown to 1.8 GB despite having only 310,615 words.
This is highly unusual. I suspect that you have inserted very large images in your file, you have inadvertently enabled tracked changes, or both.

As a first step I would use the menu File > Image Analysis. From there you can click "Show Images" to see a list of all images in your document, sorted by data size (in bytes). This is the most common cause of unexpectedly large files. It occurs often enough that we have an FAQ dedicated to explaining large images.

After that you should look if the menu Tools > Track Changes > Track Changes is checkmarked. If so, you should disable it and accept all tracked changes in your file to clear out the change history.

Post Reply