What is Auto links?
The Enrichments tool has an advanced feature for finding and inserting links automatically. The automatic linking (Auto Links) functionality can automatically discover and generate links in your publication. This can be either links already embedded in your original PDF or from URL and email addresses in the text of the document.
Basic Usage - How to link embedded links, emails & urls?
The following steps will guide you through a general auto linking process to find any embedded links, emails and website addresses in your publication:
1) Click the Zmags Enrichments icon under My Publications or All Publications.
2) A new window opens and the first page of your Zmag is shown.
3) Go to Window > Auto links from the top menu
4) Fill in the following settings as desired:
- Search for: Enter a specific word, phrase, etc.
- Specific URL: URL for link applied to any results found by "Search for".
- Open link in: Choose where you would like the link to open when clicked. (This window, new window, etc.) This is also allows light box links to be created.
- Include PDF Links: Check this to add all links previously created in the PDF.
- Search for web links: Check this to search for URLs with the format http://www.domain_name.com/
If a URL does not start with http://, www, or both, it will not be picked up by "search for web links". For those, a regular expression must be used instead.
- Search for e-mails: Check this to search for emails with the format email@domain_name.com
- External Tooltip: A tooltip title for an external link
- Internal Tooltip: A tooltip title for an internal link
- Email Tooltip: A tooltip title for an email link
- Link Effect: The link effect you would like to use for your links
- Opacity: The transparency of the link on the page
- Link Color: The color of the link on the page
Finally, choose the page range you would like to search through and click 'Import Links'.
Advanced Usage - Regular Expressions
Regular expressions or "RegEx" are used to define a pattern which will match to various strings of text in a specific way. The Auto Linker is able to accept such an expression and apply links to the matching results. For example:
This expression will match three capital letters followed by two numbers. As such, ABC12, BER55, and ZZZ45 would all match. AB123, abc12, and ABC123 would not, however. While many valuable resources and tutorials are available online, we also provide our own additional RegEx examples here:
Regular Expression Examples
There are three sections of the Auto Linker which use regular expressions:
- External Links (Advanced): Create links to outside URLs in conjunction with 'Link'.
- Internal Links: Create links for all RegEx matches to a specific page in the publication.
- Product Links: Create product links matching product IDs found by RegEx.
External Links (Advanced): In addition to a regular expression, simply fill in the 'Link' you would like to be used to generate URLs. Simply use ##1## in the place where you want the matched text to appear. For example:
If you were using the RegEx from our example in the previous section, the text ABC12 would be given the following link:
Internal Links: Simply choose a page number from the drop-down menu, and all text matching the RegEx will be giving an internal link to that page. You will need to run the Auto Linker more than once with different RegEx or page ranges if you would like to do this for more than one different page number.
Product Links: Select whether to use the Zmags internal products database or an external site which the Zmag will be embedded in.