plugin:fontsize
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:fontsize [2013-12-30 19:26] – [Discussion] 89.69.55.1 | plugin:fontsize [2024-12-23 03:57] (current) – [Discussion] 2601:85:c500:29ef:e981:1354:fb21:698 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : zydeco@namedfork.net | email : zydeco@namedfork.net | ||
type : syntax | type : syntax | ||
lastupdate : 2008-04-25 | lastupdate : 2008-04-25 | ||
- | compatible : >= 2005-07-01 | + | compatible : !Hogfather |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : style, typography | + | tags : |
- | downloadurl: | + | downloadurl: |
+ | bugtracker : | ||
+ | sourcerepo : | ||
+ | donationurl: | ||
+ | |||
+ | screenshot_img: | ||
---- | ---- | ||
- | |||
- | ^ Download | [[http:// | ||
===== Description ===== | ===== Description ===== | ||
+ | |||
This plugin allows to write text in different sizes. | This plugin allows to write text in different sizes. | ||
===== Syntax ===== | ===== Syntax ===== | ||
- | Enclose the text in '' | + | |
- | Add more #s or ,s to increase or decrease the size in steps of 20%. | + | Enclose the text in '' |
+ | |||
+ | Add more '' | ||
##this text is shown at 120% of the base size##, ###this is 140%### ####and this is 160%#### | ##this text is shown at 120% of the base size##, ###this is 140%### ####and this is 160%#### | ||
,,this is smaller, at 80%,, and ,,,this is at 60%,,, | ,,this is smaller, at 80%,, and ,,,this is at 60%,,, | ||
,,if I were to put a comma after a small text,,%%,%% I would need to enclose the comma in double percent signs | ,,if I were to put a comma after a small text,,%%,%% I would need to enclose the comma in double percent signs | ||
- | | ||
- | ##this text is shown at 120% of the base size##, ###this is 140%### ####and this is 160%#### | ||
- | ,,this is smaller, at 80%,, and ,,,this is at 60%,,, | ||
- | ,,if I were to put a comma after a small text,,%%,%% I would need to enclose the comma in double percent signs | ||
===== Source Code ===== | ===== Source Code ===== | ||
+ | |||
Create a directory '' | Create a directory '' | ||
- | <code php> | + | |
+ | < | ||
<?php | <?php | ||
/** | /** | ||
Line 43: | Line 47: | ||
* @author | * @author | ||
*/ | */ | ||
- | |||
- | if(!defined(' | ||
- | if(!defined(' | ||
- | require_once(DOKU_PLUGIN.' | ||
class syntax_plugin_fontsize extends DokuWiki_Syntax_Plugin { | class syntax_plugin_fontsize extends DokuWiki_Syntax_Plugin { | ||
Line 57: | Line 57: | ||
' | ' | ||
' | ' | ||
- | ' | + | ' |
); | ); | ||
} | } | ||
Line 74: | Line 74: | ||
} | } | ||
- | function handle($match, | + | function handle($match, |
switch ($state) { | switch ($state) { | ||
case DOKU_LEXER_ENTER: | case DOKU_LEXER_ENTER: | ||
Line 88: | Line 88: | ||
} | } | ||
- | function render($mode, | + | function render($mode, |
if ($mode == ' | if ($mode == ' | ||
list($state, | list($state, | ||
Line 107: | Line 107: | ||
//Setup VIM: ex: et ts=4 enc=utf-8 : | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
</ | </ | ||
+ | |||
===== Discussion ===== | ===== Discussion ===== | ||
Hi. Is is me or I can't get the system to recognize a link if it's put in smalltext? | Hi. Is is me or I can't get the system to recognize a link if it's put in smalltext? | ||
- | |||
< | < | ||
Line 156: | Line 156: | ||
------- | ------- | ||
Patching plugin works, thank you! | Patching plugin works, thank you! | ||
+ | |||
+ | -------- | ||
+ | |||
+ | I wanted to link to a larger text, like | ||
+ | |||
+ | < | ||
+ | [[fs|#### | ||
+ | </ | ||
+ | |||
+ | but the number-signs are not resolved. I tried adding the patch above in syntax.php, but it did not work. Outside of the links, it works fine. Any idea? | ||
+ | |||
+ | |||
+ | ---- | ||
+ | 24/06/2020 15:42:46 | ||
+ | Does not seems to work with HogFather 5.3 | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | 25/09/2020 08:05 | ||
+ | I fixed this plugin for usage with HogFather, shown below: | ||
+ | <file php fontsize-hogfather.patch> | ||
+ | +++ syntax.php | ||
+ | @@ -36,7 +36,7 @@ | ||
+ | | ||
+ | } | ||
+ | |||
+ | - | ||
+ | + | ||
+ | switch ($state) { | ||
+ | case DOKU_LEXER_ENTER: | ||
+ | if ($match{1} == '#' | ||
+ | @@ -50,7 +50,7 @@ | ||
+ | return array(); | ||
+ | } | ||
+ | |||
+ | - | ||
+ | + | ||
+ | if ($mode == ' | ||
+ | list($state, | ||
+ | switch ($state) { | ||
+ | </ | ||
+ | Apply using the following command: \\ '' | ||
+ | |||
+ | ---- | ||
+ | 2024-12-23 | ||
+ | |||
+ | This plugin does not work with " |
plugin/fontsize.1388428015.txt.gz · Last modified: by 89.69.55.1