DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:anchor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:anchor [2021-01-10 17:34] – similar to the Wrap Plugin Aleksandrplugin:anchor [2024-02-11 03:39] (current) zioth
Line 6: Line 6:
 email      : elifenton@this_is_not_a_real_email.fake email      : elifenton@this_is_not_a_real_email.fake
 type       : syntax type       : syntax
-lastupdate : 2018-12-20 +lastupdate : 2024-02-10 
-compatible : 2010-11-07, 2011-05-25, Angua, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Frusterick Manners, Greebo, Hogfather+compatible : 2010-11-07, 2011-05-25, Angua, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos
 depends    :  depends    : 
 conflicts  conflicts 
Line 39: Line 39:
 **anchor_name** is an arbitrary name of your choosing. It must begin with a letter, and must be lowercase. **anchor_name** is an arbitrary name of your choosing. It must begin with a letter, and must be lowercase.
  
-**text**, if provided, is a block of text that the anchor will wrap in HTML. It's not all that useful.+**text**, if provided, is a block of text that the anchor will wrap in HTML. It's not all that useful, unless your template adds space or other decoration to empty anchor tagsIt's also optional, so this is also valid: 
 + 
 +<code> 
 +{{anchor:anchor_name}} 
 +</code> 
 To link to an anchor from within DokuWiki: To link to an anchor from within DokuWiki:
  
Line 61: Line 66:
 ===== Discussion ===== ===== Discussion =====
  
 +==== Gratuitous newline ====
 +
 +The plugin inserts an unwanted newline after the anchor tag. But I want to create a glossary page with anchored entries of the form:\\
 +**term** -- definition
 +
 +It looks like the [[:plugin:bookmark|Bookmark]] plugin will serve my purpose.
 ==== Case sensitivity is not compatible with DW ==== ==== Case sensitivity is not compatible with DW ====
 While using anchor I found that you have to type the anchor_name in all lowercase letters to be compatible with the DW internal link mechanics, which converts the letters of a link to lowercase. While using anchor I found that you have to type the anchor_name in all lowercase letters to be compatible with the DW internal link mechanics, which converts the letters of a link to lowercase.
Line 85: Line 96:
 Great!! \\ Great!! \\
 //ViForEver 20140207// //ViForEver 20140207//
 +
 +==== Needs the colon even with no text ====
 +Note that even if you don't provide the optional text for the anchor you still need the colon following the anchor name, otherwise the plugin will error.
 +
 +UPDATE: This has been fixed (2023-08-14)
 +
 +Very handy little plugin!
 +//2023/06/30 jon p// 
  
 ===== Old Discussion ===== ===== Old Discussion =====
plugin/anchor.1610296474.txt.gz · Last modified: 2021-01-10 17:34 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki