From 1c39817dbba19c5ef1e95912dabb3805085871ac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Feb 2012 23:30:41 +0000 Subject: match_parens (20feb12) git-svn-id: svn://tug.org/texlive/trunk@25447 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/support/match_parens/Object.html | 129 +++++ Master/texmf-dist/doc/support/match_parens/README | 9 +- Master/texmf-dist/doc/support/match_parens/add.png | Bin 0 -> 733 bytes .../texmf-dist/doc/support/match_parens/brick.png | Bin 0 -> 452 bytes .../doc/support/match_parens/brick_link.png | Bin 0 -> 764 bytes Master/texmf-dist/doc/support/match_parens/bug.png | Bin 0 -> 774 bytes .../doc/support/match_parens/bullet_black.png | Bin 0 -> 211 bytes .../support/match_parens/bullet_toggle_minus.png | Bin 0 -> 207 bytes .../support/match_parens/bullet_toggle_plus.png | Bin 0 -> 209 bytes .../doc/support/match_parens/created.rid | 3 +- .../doc/support/match_parens/darkfish.js | 153 ++++++ .../texmf-dist/doc/support/match_parens/date.png | Bin 0 -> 626 bytes .../texmf-dist/doc/support/match_parens/delete.png | Bin 0 -> 715 bytes .../texmf-dist/doc/support/match_parens/find.png | Bin 0 -> 659 bytes .../doc/support/match_parens/fr_class_index.html | 26 - .../doc/support/match_parens/fr_file_index.html | 27 - .../doc/support/match_parens/fr_method_index.html | 26 - .../texmf-dist/doc/support/match_parens/index.html | 87 +++- .../texmf-dist/doc/support/match_parens/jquery.js | 18 + .../doc/support/match_parens/loadingAnimation.gif | Bin 0 -> 5886 bytes .../doc/support/match_parens/macFFBgHack.png | Bin 0 -> 207 bytes .../doc/support/match_parens/match_parens.html | 152 ------ .../doc/support/match_parens/navigation.js | 142 ++++++ .../doc/support/match_parens/package.png | Bin 0 -> 853 bytes .../doc/support/match_parens/page_green.png | Bin 0 -> 621 bytes .../doc/support/match_parens/page_white_text.png | Bin 0 -> 342 bytes .../doc/support/match_parens/page_white_width.png | Bin 0 -> 309 bytes .../texmf-dist/doc/support/match_parens/plugin.png | Bin 0 -> 591 bytes .../doc/support/match_parens/rdoc-style.css | 208 -------- .../texmf-dist/doc/support/match_parens/rdoc.css | 543 +++++++++++++++++++++ .../texmf-dist/doc/support/match_parens/ruby.png | Bin 0 -> 592 bytes .../texmf-dist/doc/support/match_parens/search.js | 94 ++++ .../doc/support/match_parens/search_index.js | 1 + .../doc/support/match_parens/searcher.js | 228 +++++++++ .../support/match_parens/table_of_contents.html | 46 ++ .../doc/support/match_parens/tag_blue.png | Bin 0 -> 1880 bytes .../doc/support/match_parens/tag_green.png | Bin 0 -> 613 bytes .../doc/support/match_parens/transparent.png | Bin 0 -> 97 bytes .../texmf-dist/doc/support/match_parens/wrench.png | Bin 0 -> 610 bytes .../doc/support/match_parens/wrench_orange.png | Bin 0 -> 584 bytes .../texmf-dist/doc/support/match_parens/zoom.png | Bin 0 -> 692 bytes 41 files changed, 1427 insertions(+), 465 deletions(-) create mode 100644 Master/texmf-dist/doc/support/match_parens/Object.html create mode 100644 Master/texmf-dist/doc/support/match_parens/add.png create mode 100644 Master/texmf-dist/doc/support/match_parens/brick.png create mode 100644 Master/texmf-dist/doc/support/match_parens/brick_link.png create mode 100644 Master/texmf-dist/doc/support/match_parens/bug.png create mode 100644 Master/texmf-dist/doc/support/match_parens/bullet_black.png create mode 100644 Master/texmf-dist/doc/support/match_parens/bullet_toggle_minus.png create mode 100644 Master/texmf-dist/doc/support/match_parens/bullet_toggle_plus.png create mode 100644 Master/texmf-dist/doc/support/match_parens/darkfish.js create mode 100644 Master/texmf-dist/doc/support/match_parens/date.png create mode 100644 Master/texmf-dist/doc/support/match_parens/delete.png create mode 100644 Master/texmf-dist/doc/support/match_parens/find.png delete mode 100644 Master/texmf-dist/doc/support/match_parens/fr_class_index.html delete mode 100644 Master/texmf-dist/doc/support/match_parens/fr_file_index.html delete mode 100644 Master/texmf-dist/doc/support/match_parens/fr_method_index.html create mode 100644 Master/texmf-dist/doc/support/match_parens/jquery.js create mode 100644 Master/texmf-dist/doc/support/match_parens/loadingAnimation.gif create mode 100644 Master/texmf-dist/doc/support/match_parens/macFFBgHack.png delete mode 100644 Master/texmf-dist/doc/support/match_parens/match_parens.html create mode 100644 Master/texmf-dist/doc/support/match_parens/navigation.js create mode 100644 Master/texmf-dist/doc/support/match_parens/package.png create mode 100644 Master/texmf-dist/doc/support/match_parens/page_green.png create mode 100644 Master/texmf-dist/doc/support/match_parens/page_white_text.png create mode 100644 Master/texmf-dist/doc/support/match_parens/page_white_width.png create mode 100644 Master/texmf-dist/doc/support/match_parens/plugin.png delete mode 100644 Master/texmf-dist/doc/support/match_parens/rdoc-style.css create mode 100644 Master/texmf-dist/doc/support/match_parens/rdoc.css create mode 100644 Master/texmf-dist/doc/support/match_parens/ruby.png create mode 100644 Master/texmf-dist/doc/support/match_parens/search.js create mode 100644 Master/texmf-dist/doc/support/match_parens/search_index.js create mode 100644 Master/texmf-dist/doc/support/match_parens/searcher.js create mode 100644 Master/texmf-dist/doc/support/match_parens/table_of_contents.html create mode 100644 Master/texmf-dist/doc/support/match_parens/tag_blue.png create mode 100644 Master/texmf-dist/doc/support/match_parens/tag_green.png create mode 100644 Master/texmf-dist/doc/support/match_parens/transparent.png create mode 100644 Master/texmf-dist/doc/support/match_parens/wrench.png create mode 100644 Master/texmf-dist/doc/support/match_parens/wrench_orange.png create mode 100644 Master/texmf-dist/doc/support/match_parens/zoom.png (limited to 'Master/texmf-dist/doc/support') diff --git a/Master/texmf-dist/doc/support/match_parens/Object.html b/Master/texmf-dist/doc/support/match_parens/Object.html new file mode 100644 index 00000000000..afd1ab5428e --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/Object.html @@ -0,0 +1,129 @@ + + + + + + +class Object - RDoc Documentation + + + + + + + + + + + + + + + + +
+

class Object

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
RELEASE + +
+ + +
+
+ + + + + + +
+ +
+ + + + diff --git a/Master/texmf-dist/doc/support/match_parens/README b/Master/texmf-dist/doc/support/match_parens/README index c1a90e6d5db..5f03bc8688a 100644 --- a/Master/texmf-dist/doc/support/match_parens/README +++ b/Master/texmf-dist/doc/support/match_parens/README @@ -1,4 +1,4 @@ -This is release 1.3 of the match_parens script +This is release 1.4 of the match_parens script LICENSE: GPL Short description: @@ -10,8 +10,9 @@ will normally be almost empty, but will clearly show any mismatches. (Just try the script on myself to see that the parenthesis starting this sentence will not appear to be matched at the end of the file. If you are looking at me in the vim editor, try -the command: +the command: :%!match_parens -:%!match_parens +major changes of release 1.4 relative to 1.3: +- adapted for ruby-1.9 -$Id: README,v 1.5 2011-07-30 09:29:02 wybo Exp $ +$Id: README,v 1.6 2012/02/20 13:28:30 wybo Exp $ diff --git a/Master/texmf-dist/doc/support/match_parens/add.png b/Master/texmf-dist/doc/support/match_parens/add.png new file mode 100644 index 00000000000..6332fefea4b Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/add.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/brick.png b/Master/texmf-dist/doc/support/match_parens/brick.png new file mode 100644 index 00000000000..7851cf34c94 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/brick.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/brick_link.png b/Master/texmf-dist/doc/support/match_parens/brick_link.png new file mode 100644 index 00000000000..9ebf013a23a Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/brick_link.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/bug.png b/Master/texmf-dist/doc/support/match_parens/bug.png new file mode 100644 index 00000000000..2d5fb90ec6e Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/bug.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/bullet_black.png b/Master/texmf-dist/doc/support/match_parens/bullet_black.png new file mode 100644 index 00000000000..57619706d10 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/bullet_black.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/bullet_toggle_minus.png b/Master/texmf-dist/doc/support/match_parens/bullet_toggle_minus.png new file mode 100644 index 00000000000..b47ce55f685 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/bullet_toggle_minus.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/bullet_toggle_plus.png b/Master/texmf-dist/doc/support/match_parens/bullet_toggle_plus.png new file mode 100644 index 00000000000..9ab4a89664e Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/bullet_toggle_plus.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/created.rid b/Master/texmf-dist/doc/support/match_parens/created.rid index 6fb2168692a..4e29f3cef93 100644 --- a/Master/texmf-dist/doc/support/match_parens/created.rid +++ b/Master/texmf-dist/doc/support/match_parens/created.rid @@ -1 +1,2 @@ -Sat, 30 Jul 2011 11:57:29 +0200 +Mon, 20 Feb 2012 14:33:59 +0100 +match_parens Mon, 20 Feb 2012 14:28:52 +0100 diff --git a/Master/texmf-dist/doc/support/match_parens/darkfish.js b/Master/texmf-dist/doc/support/match_parens/darkfish.js new file mode 100644 index 00000000000..4be722fac38 --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/darkfish.js @@ -0,0 +1,153 @@ +/** + * + * Darkfish Page Functions + * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ + * + * Author: Michael Granger + * + */ + +/* Provide console simulation for firebug-less environments */ +if (!("console" in window) || !("firebug" in console)) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +}; + + +/** + * Unwrap the first element that matches the given @expr@ from the targets and return them. + */ +$.fn.unwrap = function( expr ) { + return this.each( function() { + $(this).parents( expr ).eq( 0 ).after( this ).remove(); + }); +}; + + +function showSource( e ) { + var target = e.target; + var codeSections = $(target). + parents('.method-detail'). + find('.method-source-code'); + + $(target). + parents('.method-detail'). + find('.method-source-code'). + slideToggle(); +}; + +function hookSourceViews() { + $('.method-heading').click( showSource ); +}; + +function toggleDebuggingSection() { + $('.debugging-section').slideToggle(); +}; + +function hookDebuggingToggle() { + $('#debugging-toggle img').click( toggleDebuggingSection ); +}; + +function hookTableOfContentsToggle() { + $('.indexpage li .toc-toggle').each( function() { + $(this).click( function() { + $(this).toggleClass('open'); + }); + + var section = $(this).next(); + + $(this).click( function() { + section.slideToggle(); + }); + }); +} + +function hookSearch() { + var input = $('#search-field').eq(0); + var result = $('#search-results').eq(0); + $(result).show(); + + var search_section = $('#search-section').get(0); + $(search_section).show(); + + var search = new Search(search_data, input, result); + + search.renderItem = function(result) { + var li = document.createElement('li'); + var html = ''; + + // TODO add relative path to - - - - - - -
-

match_parens

- - - - - - - - - -
Path:match_parens -
Last Update:Sat Jul 30 11:31:24 +0200 2011
-
- - -
- - - -
- -
-

match_parens - find mismatches of parentheses, braces, (angle) brackets, in texts

-

Synopsis

-
-        match_parens [_filename_]
-
-

Description

-

-Mismatches of parentheses, braces, (angle) brackets, especially in TeX -sources which may be rich in those, may be difficult to trace. This little -script helps you by writing your text to standard output, after adding a -left margin to your text, which will normally be almost empty, but will -clearly show any mismatches. (Just try me on myself to see that the -parenthesis starting this sentence will not appear to be matched at the end -of the file. If you look at me in the vim editor, try the command :%!% -

-

Copyright

-

-Copyright (C) 2009 Wybo Dekker (wybo@dekkerdocumenten.nl) -

-

-This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General -Public License as published by the Free Software Foundation, either -version 3 of the License, or (at your option) any later version. -

-

-This program is distributed in the hope that it will be useful, but without -any warranty; without even the implied warranty of merchantability or -fitness for a particular purpose. See the GNU General Public License for more -details. -

-

-$Id: match_parens,v 1.7 2011-07-30 09:31:24 wybo Exp $ -

- -
- - -
- - -
- - - - -
- - -
-

Constants

- -
- - - - - - -
RELEASE=1.3
-
-
- - - - - - - - - -
- - - - - - \ No newline at end of file diff --git a/Master/texmf-dist/doc/support/match_parens/navigation.js b/Master/texmf-dist/doc/support/match_parens/navigation.js new file mode 100644 index 00000000000..e41268123ea --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/navigation.js @@ -0,0 +1,142 @@ +/* + * Navigation allows movement using the arrow keys through the search results. + * + * When using this library you will need to set scrollIntoView to the + * appropriate function for your layout. Use scrollInWindow if the container + * is not scrollable and scrollInElement if the container is a separate + * scrolling region. + */ +Navigation = new function() { + this.initNavigation = function() { + var _this = this; + + $(document).keydown(function(e) { + _this.onkeydown(e); + }).keyup(function(e) { + _this.onkeyup(e); + }); + + this.navigationActive = true; + } + + this.setNavigationActive = function(state) { + this.navigationActive = state; + this.clearMoveTimeout(); + } + + this.onkeyup = function(e) { + if (!this.navigationActive) return; + + switch(e.keyCode) { + case 37: //Event.KEY_LEFT: + case 38: //Event.KEY_UP: + case 39: //Event.KEY_RIGHT: + case 40: //Event.KEY_DOWN: + this.clearMoveTimeout(); + break; + } + } + + this.onkeydown = function(e) { + if (!this.navigationActive) return; + switch(e.keyCode) { + case 37: //Event.KEY_LEFT: + if (this.moveLeft()) e.preventDefault(); + break; + case 38: //Event.KEY_UP: + if (e.keyCode == 38 || e.ctrlKey) { + if (this.moveUp()) e.preventDefault(); + this.startMoveTimeout(false); + } + break; + case 39: //Event.KEY_RIGHT: + if (this.moveRight()) e.preventDefault(); + break; + case 40: //Event.KEY_DOWN: + if (e.keyCode == 40 || e.ctrlKey) { + if (this.moveDown()) e.preventDefault(); + this.startMoveTimeout(true); + } + break; + case 13: //Event.KEY_RETURN: + if (this.$current) + e.preventDefault(); + this.select(this.$current); + break; + } + if (e.ctrlKey && e.shiftKey) this.select(this.$current); + } + + this.clearMoveTimeout = function() { + clearTimeout(this.moveTimeout); + this.moveTimeout = null; + } + + this.startMoveTimeout = function(isDown) { + if (!$.browser.mozilla && !$.browser.opera) return; + if (this.moveTimeout) this.clearMoveTimeout(); + var _this = this; + + var go = function() { + if (!_this.moveTimeout) return; + _this[isDown ? 'moveDown' : 'moveUp'](); + _this.moveTimout = setTimeout(go, 100); + } + this.moveTimeout = setTimeout(go, 200); + } + + this.moveRight = function() { + } + + this.moveLeft = function() { + } + + this.move = function(isDown) { + } + + this.moveUp = function() { + return this.move(false); + } + + this.moveDown = function() { + return this.move(true); + } + + /* + * Scrolls to the given element in the scrollable element view. + */ + this.scrollInElement = function(element, view) { + var offset, viewHeight, viewScroll, height; + offset = element.offsetTop; + height = element.offsetHeight; + viewHeight = view.offsetHeight; + viewScroll = view.scrollTop; + + if (offset - viewScroll + height > viewHeight) { + view.scrollTop = offset - viewHeight + height; + } + if (offset < viewScroll) { + view.scrollTop = offset; + } + } + + /* + * Scrolls to the given element in the window. The second argument is + * ignored + */ + this.scrollInWindow = function(element, ignored) { + var offset, viewHeight, viewScroll, height; + offset = element.offsetTop; + height = element.offsetHeight; + viewHeight = window.innerHeight; + viewScroll = window.scrollY; + + if (offset - viewScroll + height > viewHeight) { + window.scrollTo(window.scrollX, offset - viewHeight + height); + } + if (offset < viewScroll) { + window.scrollTo(window.scrollX, offset); + } + } +} + diff --git a/Master/texmf-dist/doc/support/match_parens/package.png b/Master/texmf-dist/doc/support/match_parens/package.png new file mode 100644 index 00000000000..da3c2a2d74b Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/package.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/page_green.png b/Master/texmf-dist/doc/support/match_parens/page_green.png new file mode 100644 index 00000000000..de8e003f9fb Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/page_green.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/page_white_text.png b/Master/texmf-dist/doc/support/match_parens/page_white_text.png new file mode 100644 index 00000000000..813f712f726 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/page_white_text.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/page_white_width.png b/Master/texmf-dist/doc/support/match_parens/page_white_width.png new file mode 100644 index 00000000000..1eb880947dd Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/page_white_width.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/plugin.png b/Master/texmf-dist/doc/support/match_parens/plugin.png new file mode 100644 index 00000000000..6187b15aec0 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/plugin.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/rdoc-style.css b/Master/texmf-dist/doc/support/match_parens/rdoc-style.css deleted file mode 100644 index 6653aedfa7a..00000000000 --- a/Master/texmf-dist/doc/support/match_parens/rdoc-style.css +++ /dev/null @@ -1,208 +0,0 @@ - -body { - font-family: DejaVu Serif,Comic Sans MS,serif; - font-size: 90%; - margin: 0; - margin-left: 40px; - padding: 0; - background: white; -} - -h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; } -h1 { font-size: 150%; } -h2,h3,h4 { margin-top: 1em; } - -a { background: #eef; color: #039; text-decoration: none; } -a:hover { background: #039; color: #eef; } - -/* Override the base stylesheet's Anchor inside a table cell */ -td > a { - background: transparent; - color: #039; - text-decoration: none; -} - -/* and inside a section title */ -.section-title > a { - background: transparent; - color: #eee; - text-decoration: none; -} - -/* === Structural elements =================================== */ - -div#index { - margin: 0; - margin-left: -40px; - padding: 0; - font-size: 90%; -} - - -div#index a { - margin-left: 0.7em; -} - -div#index .section-bar { - margin-left: 0px; - padding-left: 0.7em; - background: #ccc; - font-size: small; -} - - -div#classHeader, div#fileHeader { - width: auto; - color: white; - padding: 0.5em 1.5em 0.5em 1.5em; - margin: 0; - margin-left: -40px; - border-bottom: 3px solid #006; -} - -div#classHeader a, div#fileHeader a { - background: inherit; - color: white; -} - -div#classHeader td, div#fileHeader td { - background: inherit; - color: white; -} - - -div#fileHeader { - background: #057; -} - -div#classHeader { - background: #048; -} - - -.class-name-in-header { - font-size: 180%; - font-weight: bold; -} - - -div#bodyContent { - padding: 0 1.5em 0 1.5em; -} - -div#description { - padding: 0.5em 1.5em; - background: #efefef; - border: 1px dotted #999; -} - -div#description h1,h2,h3,h4,h5,h6 { - color: #125;; - background: transparent; -} - -div#validator-badges { - text-align: center; -} -div#validator-badges img { border: 0; } - -div#copyright { - color: #333; - background: #efefef; - font: 0.75em sans-serif; - margin-top: 5em; - margin-bottom: 0; - padding: 0.5em 2em; -} - - -/* === Classes =================================== */ - -table.header-table { - color: white; - font-size: small; -} - -.type-note { - font-size: small; - color: #DEDEDE; -} - -.xxsection-bar { - background: #eee; - color: #333; - padding: 3px; -} - -.section-bar { - color: #333; - border-bottom: 1px solid #999; - margin-left: -20px; -} - - -.section-title { - background: #79a; - color: #eee; - padding: 3px; - margin-top: 2em; - margin-left: -30px; - border: 1px solid #999; -} - -.top-aligned-row { vertical-align: top } -.bottom-aligned-row { vertical-align: bottom } - -/* --- Context section classes ----------------------- */ - -.context-row { } -.context-item-name { font-family: monospace; font-weight: bold; color: black; } -.context-item-value { font-size: small; color: #448; } -.context-item-desc { color: #333; padding-left: 2em; } - -/* --- Method classes -------------------------- */ -.method-detail { - background: #efefef; - padding: 0; - margin-top: 0.5em; - margin-bottom: 1em; - border: 1px dotted #ccc; -} -.method-heading { - color: black; - background: #ccc; - border-bottom: 1px solid #666; - padding: 0.2em 0.5em 0 0.5em; -} -.method-signature { color: black; background: inherit; } -.method-name { font-weight: bold; } -.method-args { font-style: italic; } -.method-description { padding: 0 0.5em 0 0.5em; } - -/* --- Source code sections -------------------- */ - -a.source-toggle { font-size: 90%; } -div.method-source-code { - background: #262626; - color: #ffdead; - margin: 1em; - padding: 0.5em; - border: 1px dashed #999; - overflow: hidden; -} - -div.method-source-code pre { color: #ffdead; overflow: hidden; } - -/* --- Ruby keyword styles --------------------- */ - -.standalone-code { background: #221111; color: #ffdead; overflow: hidden; } - -.ruby-constant { color: #7fffd4; background: transparent; } -.ruby-keyword { color: #00ffff; background: transparent; } -.ruby-ivar { color: #eedd82; background: transparent; } -.ruby-operator { color: #00ffee; background: transparent; } -.ruby-identifier { color: #ffdead; background: transparent; } -.ruby-node { color: #ffa07a; background: transparent; } -.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } -.ruby-regexp { color: #ffa07a; background: transparent; } -.ruby-value { color: #7fffd4; background: transparent; } \ No newline at end of file diff --git a/Master/texmf-dist/doc/support/match_parens/rdoc.css b/Master/texmf-dist/doc/support/match_parens/rdoc.css new file mode 100644 index 00000000000..755b5464de5 --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/rdoc.css @@ -0,0 +1,543 @@ +/* + * "Darkfish" Rdoc CSS + * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ + * + * Author: Michael Granger + * + */ + +/* Base Green is: #6C8C22 */ + +* { padding: 0; margin: 0; } + +body { + background: #efefef; + font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; + margin-left: 40px; +} +body.file-popup { + font-size: 90%; + margin-left: 0; +} + +h1 { + font-size: 300%; + text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; + color: #6C8C22; +} +h2,h3,h4 { margin-top: 1.5em; } + +:link, +:visited { + color: #6C8C22; + text-decoration: none; +} +:link:hover, +:visited:hover { + border-bottom: 1px dotted #6C8C22; +} + +pre { + background: #ddd; + padding: 0.5em 0; +} + +/* @group Generic Classes */ + +.initially-hidden { + display: none; +} + +#search-field { + width: 98%; + background: #eee; + border: none; + height: 1.5em; + -webkit-border-radius: 4px; +} +#search-field:focus { + background: #f1edba; +} +#search-field:-moz-placeholder, +#search-field::-webkit-input-placeholder { + font-weight: bold; + color: #666; +} + +.missing-docs { + font-size: 120%; + background: white url(images/wrench_orange.png) no-repeat 4px center; + color: #ccc; + line-height: 2em; + border: 1px solid #d00; + opacity: 1; + padding-left: 20px; + text-indent: 24px; + letter-spacing: 3px; + font-weight: bold; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; +} + +.target-section { + border: 2px solid #dcce90; + border-left-width: 8px; + padding: 0 1em; + background: #fff3c2; +} + +/* @end */ + +/* @group Index Page, Standalone file pages */ +.indexpage ul { + line-height: 160%; + list-style: none; +} +.indexpage ul :link, +.indexpage ul :visited { + font-size: 16px; +} + +.indexpage li { + padding-left: 20px; +} + +.indexpage ul > li { + background: url(images/bullet_black.png) no-repeat left 4px; +} +.indexpage li.method { + background: url(images/plugin.png) no-repeat left 4px; +} +.indexpage li.module { + background: url(images/package.png) no-repeat left 4px; +} +.indexpage li.class { + background: url(images/ruby.png) no-repeat left 4px; +} +.indexpage li.file { + background: url(images/page_white_text.png) no-repeat left 4px; +} +.indexpage li li { + background: url(images/tag_blue.png) no-repeat left 4px; +} +.indexpage li .toc-toggle { + width: 16px; + height: 16px; + background: url(images/add.png) no-repeat; +} + +.indexpage li .toc-toggle.open { + background: url(images/delete.png) no-repeat; +} + +/* @end */ + +/* @group Top-Level Structure */ + +#metadata { + float: left; + width: 260px; +} + +#documentation { + margin: 2em 1em 5em 300px; + min-width: 340px; +} + +#validator-badges { + clear: both; + margin: 1em 1em 2em; + font-size: smaller; +} + +/* @end */ + +/* @group Metadata Section */ +#metadata .section { + background-color: #dedede; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #aaa; + margin: 0 8px 8px; + font-size: 90%; + overflow: hidden; +} +#metadata h3.section-header { + margin: 0; + padding: 2px 8px; + background: #ccc; + color: #666; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-bottom: 1px solid #aaa; +} +#metadata #home-section h3.section-header { + border-bottom: 0; +} + +#metadata ul, +#metadata dl, +#metadata p { + padding: 8px; + list-style: none; +} + +#file-metadata { + margin-top: 2em; +} + +#file-metadata ul { + padding-left: 28px; + list-style-image: url(images/page_green.png); +} + +dl.svninfo { + color: #666; + margin: 0; +} +dl.svninfo dt { + font-weight: bold; +} + +ul.link-list li { + white-space: nowrap; +} +ul.link-list .type { + font-size: 8px; + text-transform: uppercase; + color: white; + background: #969696; + padding: 2px 4px; + -webkit-border-radius: 5px; +} + +/* @end */ + +/* @group Class Metadata Section */ +#class-metadata { + margin-top: 2em; +} +/* @end */ + +/* @group Project Metadata Section */ +#project-metadata { + margin-top: 2em; +} + +#project-metadata .section { + border: 1px solid #aaa; +} +#project-metadata h3.section-header { + border-bottom: 1px solid #aaa; + position: relative; +} + +#project-metadata form { + color: #777; + background: #ccc; +} + +/* @end */ + +/* @group Documentation Section */ +.description { + font-size: 100%; + color: #333; +} + +.description p { + margin: 1em 0.4em; +} + +.description li p { + margin: 0; +} + +.description ol, +.description ul { + margin-left: 1.5em; +} +.description ol li, +.description ul li { + line-height: 1.4em; +} + +.note-list { + margin: 8px 0; +} + +.label-list { + margin: 8px 1.5em; + border: 1px solid #ccc; +} +.description .label-list { + font-size: 14px; +} + +.note-list dt { + font-weight: bold; +} +.note-list dd { + padding: 0 12px; +} + +.label-list dt { + padding: 2px 4px; + font-weight: bold; + background: #ddd; +} +.label-list dd { + padding: 2px 12px; +} +.label-list dd + dt, +.note-list dd + dt { + margin-top: 0.7em; +} + +#documentation .section { + font-size: 90%; +} + +#documentation h2.section-header { + margin-top: 1em; + padding: 0.25em 0.5em; + background: #ccc; + color: #333; + font-size: 175%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +.documentation-section-title { + position: relative; +} +.documentation-section-title .section-click-top { + position: absolute; + top: 6px; + right: 12px; + font-size: 10px; + color: #9b9877; + visibility: hidden; + padding-right: 0.5px; +} + +.documentation-section-title:hover .section-click-top { + visibility: visible; +} + +#documentation h3.section-header { + margin-top: 1em; + padding: 0.25em 0.5em; + background-color: #dedede; + color: #333; + font-size: 150%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +#constants-list > dl, +#attributes-list > dl { + margin: 1em 0 2em; + border: 0; +} +#constants-list > dl dt, +#attributes-list > dl dt { + padding-left: 0; + font-weight: bold; + font-family: Monaco, "Andale Mono"; + background: inherit; +} +#constants-list > dl dt a, +#attributes-list > dl dt a { + color: inherit; +} +#constants-list > dl dd, +#attributes-list > dl dd { + margin: 0 0 1em 0; + padding: 0; + color: #666; +} + +.documentation-section h2 { + position: relative; +} + +.documentation-section h2 a { + position: absolute; + top: 8px; + right: 10px; + font-size: 12px; + color: #9b9877; + visibility: hidden; +} + +.documentation-section h2:hover a { + visibility: visible; +} + +/* @group Method Details */ + +#documentation .method-source-code { + display: none; +} + +#documentation .method-detail { + margin: 0.5em 0; + padding: 0.5em 0; + cursor: pointer; +} +#documentation .method-detail:hover { + background-color: #f1edba; +} +#documentation .method-heading { + position: relative; + padding: 2px 4px 0 20px; + font-size: 125%; + font-weight: bold; + color: #333; + background: url(images/brick.png) no-repeat left bottom; +} +#documentation .method-heading :link, +#documentation .method-heading :visited { + color: inherit; +} +#documentation .method-click-advice { + position: absolute; + top: 2px; + right: 5px; + font-size: 10px; + color: #9b9877; + visibility: hidden; + padding-right: 20px; + line-height: 20px; + background: url(images/zoom.png) no-repeat right top; +} +#documentation .method-heading:hover .method-click-advice { + visibility: visible; +} + +#documentation .method-alias .method-heading { + color: #666; + background: url(images/brick_link.png) no-repeat left bottom; +} + +#documentation .method-description, +#documentation .aliases { + margin: 0 20px; + color: #666; +} + +#documentation .method-description p, +#documentation .aliases p { + line-height: 1.2em; +} + +#documentation .aliases { + padding-top: 4px; + font-style: italic; + cursor: default; +} +#documentation .method-description p { + margin-bottom: 0.5em; +} +#documentation .method-description ul { + margin-left: 1.5em; +} +pre { + margin: 0.5em 0; +} + +#documentation .attribute-method-heading { + background: url(images/tag_green.png) no-repeat left bottom; +} +#documentation #attribute-method-details .method-detail:hover { + background-color: transparent; + cursor: default; +} +#documentation .attribute-access-type { + font-size: 60%; + text-transform: uppercase; + vertical-align: super; + padding: 0 2px; +} +/* @end */ + +/* @end */ + +/* @group Source Code */ + +pre { + overflow: auto; + background: #262626; + color: white; + border: 1px dashed #999; + padding: 0.5em; +} + +.description pre { + margin: 0 0.4em; +} + +.ruby-constant { color: #7fffd4; background: transparent; } +.ruby-keyword { color: #00ffff; background: transparent; } +.ruby-ivar { color: #eedd82; background: transparent; } +.ruby-operator { color: #00ffee; background: transparent; } +.ruby-identifier { color: #ffdead; background: transparent; } +.ruby-node { color: #ffa07a; background: transparent; } +.ruby-comment { color: #dc0000; font-weight: bold; background: transparent; } +.ruby-regexp { color: #ffa07a; background: transparent; } +.ruby-value { color: #7fffd4; background: transparent; } + +/* @end */ + + +/* @group search results */ +#search-results h1 { + font-size: 1em; + font-weight: normal; + text-shadow: none; +} + +#search-results .current { + background: #ccc; + border-bottom: 1px solid transparent; +} + +#search-results li { + list-style: none; + border-bottom: 1px solid #aaa; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + margin-bottom: 0.5em; +} + +#search-results li:last-child { + border-bottom: none; + margin-bottom: 0; +} + +#search-results li p { + padding: 0; + margin: 0.5em; +} + +#search-results .search-namespace { + font-weight: bold; +} + +#search-results li em { + background: yellow; + font-style: normal; +} + +#search-results pre { + margin: 0.5em; +} + +/* @end */ + diff --git a/Master/texmf-dist/doc/support/match_parens/ruby.png b/Master/texmf-dist/doc/support/match_parens/ruby.png new file mode 100644 index 00000000000..f763a168807 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/ruby.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/search.js b/Master/texmf-dist/doc/support/match_parens/search.js new file mode 100644 index 00000000000..dbdfdcbc4cb --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/search.js @@ -0,0 +1,94 @@ +Search = function(data, input, result) { + this.data = data; + this.$input = $(input); + this.$result = $(result); + + this.$current = null; + this.$view = this.$result.parent(); + this.searcher = new Searcher(data.index); + this.init(); +} + +Search.prototype = $.extend({}, Navigation, new function() { + var suid = 1; + + this.init = function() { + var _this = this; + var observer = function() { + _this.search(_this.$input[0].value); + }; + this.$input.keyup(observer); + this.$input.click(observer); // mac's clear field + + this.searcher.ready(function(results, isLast) { + _this.addResults(results, isLast); + }) + + this.initNavigation(); + this.setNavigationActive(false); + } + + this.search = function(value, selectFirstMatch) { + value = jQuery.trim(value).toLowerCase(); + if (value) { + this.setNavigationActive(true); + } else { + this.setNavigationActive(false); + } + + if (value == '') { + this.lastQuery = value; + this.$result.empty(); + this.setNavigationActive(false); + } else if (value != this.lastQuery) { + this.lastQuery = value; + this.firstRun = true; + this.searcher.find(value); + } + } + + this.addResults = function(results, isLast) { + var target = this.$result.get(0); + if (this.firstRun && (results.length > 0 || isLast)) { + this.$current = null; + this.$result.empty(); + } + + for (var i=0, l = results.length; i < l; i++) { + target.appendChild(this.renderItem.call(this, results[i])); + }; + + if (this.firstRun && results.length > 0) { + this.firstRun = false; + this.$current = $(target.firstChild); + this.$current.addClass('current'); + } + if (jQuery.browser.msie) this.$element[0].className += ''; + } + + this.move = function(isDown) { + if (!this.$current) return; + var $next = this.$current[isDown ? 'next' : 'prev'](); + if ($next.length) { + this.$current.removeClass('current'); + $next.addClass('current'); + this.scrollIntoView($next[0], this.$view[0]); + this.$current = $next; + } + return true; + } + + this.hlt = function(html) { + return this.escapeHTML(html). + replace(/\u0001/g, ''). + replace(/\u0002/g, ''); + } + + this.escapeHTML = function(html) { + return html.replace(/[&<>]/g, function(c) { + return '&#' + c.charCodeAt(0) + ';'; + }); + } + +}); + diff --git a/Master/texmf-dist/doc/support/match_parens/search_index.js b/Master/texmf-dist/doc/support/match_parens/search_index.js new file mode 100644 index 00000000000..2e33cf2f89d --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/search_index.js @@ -0,0 +1 @@ +var search_data = {"index":{"searchIndex":["object"],"longSearchIndex":["object"],"info":[["Object","","Object.html","",""]]}} \ No newline at end of file diff --git a/Master/texmf-dist/doc/support/match_parens/searcher.js b/Master/texmf-dist/doc/support/match_parens/searcher.js new file mode 100644 index 00000000000..f854b541d03 --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/searcher.js @@ -0,0 +1,228 @@ +Searcher = function(data) { + this.data = data; + this.handlers = []; +} + +Searcher.prototype = new function() { + // search is performed in chunks of 1000 for non-blocking user input + var CHUNK_SIZE = 1000; + // do not try to find more than 100 results + var MAX_RESULTS = 100; + var huid = 1; + var suid = 1; + var runs = 0; + + this.find = function(query) { + var queries = splitQuery(query); + var regexps = buildRegexps(queries); + var highlighters = buildHilighters(queries); + var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++}; + var _this = this; + + this.currentSuid = state.n; + + if (!query) return; + + var run = function() { + // stop current search thread if new search started + if (state.n != _this.currentSuid) return; + + var results = + performSearch(_this.data, regexps, queries, highlighters, state); + var hasMore = (state.limit > 0 && state.pass < 4); + + triggerResults.call(_this, results, !hasMore); + if (hasMore) { + setTimeout(run, 2); + } + runs++; + }; + runs = 0; + + // start search thread + run(); + } + + /* ----- Events ------ */ + this.ready = function(fn) { + fn.huid = huid; + this.handlers.push(fn); + } + + /* ----- Utilities ------ */ + function splitQuery(query) { + return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) { + return string.match(/\S/) + }); + } + + function buildRegexps(queries) { + return jQuery.map(queries, function(query) { + return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i') + }); + } + + function buildHilighters(queries) { + return jQuery.map(queries, function(query) { + return jQuery.map(query.split(''), function(l, i) { + return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2); + }).join(''); + }); + } + + // function longMatchRegexp(index, longIndex, regexps) { + // for (var i = regexps.length - 1; i >= 0; i--){ + // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; + // }; + // return true; + // } + + + /* ----- Mathchers ------ */ + + /* + * This record matches if the index starts with queries[0] and the record + * matches all of the regexps + */ + function matchPassBeginning(index, longIndex, queries, regexps) { + if (index.indexOf(queries[0]) != 0) return false; + for (var i=1, l = regexps.length; i < l; i++) { + if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) + return false; + }; + return true; + } + + /* + * This record matches if the longIndex starts with queries[0] and the + * longIndex matches all of the regexps + */ + function matchPassLongIndex(index, longIndex, queries, regexps) { + if (longIndex.indexOf(queries[0]) != 0) return false; + for (var i=1, l = regexps.length; i < l; i++) { + if (!longIndex.match(regexps[i])) + return false; + }; + return true; + } + + /* + * This record matches if the index contains queries[0] and the record + * matches all of the regexps + */ + function matchPassContains(index, longIndex, queries, regexps) { + if (index.indexOf(queries[0]) == -1) return false; + for (var i=1, l = regexps.length; i < l; i++) { + if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) + return false; + }; + return true; + } + + /* + * This record matches if regexps[0] matches the index and the record + * matches all of the regexps + */ + function matchPassRegexp(index, longIndex, queries, regexps) { + if (!index.match(regexps[0])) return false; + for (var i=1, l = regexps.length; i < l; i++) { + if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) + return false; + }; + return true; + } + + + /* ----- Highlighters ------ */ + function highlightRegexp(info, queries, regexps, highlighters) { + var result = createResult(info); + for (var i=0, l = regexps.length; i < l; i++) { + result.title = result.title.replace(regexps[i], highlighters[i]); + result.namespace = result.namespace.replace(regexps[i], highlighters[i]); + }; + return result; + } + + function hltSubstring(string, pos, length) { + return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length); + } + + function highlightQuery(info, queries, regexps, highlighters) { + var result = createResult(info); + var pos = 0; + var lcTitle = result.title.toLowerCase(); + + pos = lcTitle.indexOf(queries[0]); + if (pos != -1) { + result.title = hltSubstring(result.title, pos, queries[0].length); + } + + result.namespace = result.namespace.replace(regexps[0], highlighters[0]); + for (var i=1, l = regexps.length; i < l; i++) { + result.title = result.title.replace(regexps[i], highlighters[i]); + result.namespace = result.namespace.replace(regexps[i], highlighters[i]); + }; + return result; + } + + function createResult(info) { + var result = {}; + result.title = info[0]; + result.namespace = info[1]; + result.path = info[2]; + result.params = info[3]; + result.snippet = info[4]; + return result; + } + + /* ----- Searching ------ */ + function performSearch(data, regexps, queries, highlighters, state) { + var searchIndex = data.searchIndex; + var longSearchIndex = data.longSearchIndex; + var info = data.info; + var result = []; + var i = state.from; + var l = searchIndex.length; + var togo = CHUNK_SIZE; + var matchFunc, hltFunc; + + while (state.pass < 4 && state.limit > 0 && togo > 0) { + if (state.pass == 0) { + matchFunc = matchPassBeginning; + hltFunc = highlightQuery; + } else if (state.pass == 1) { + matchFunc = matchPassLongIndex; + hltFunc = highlightQuery; + } else if (state.pass == 2) { + matchFunc = matchPassContains; + hltFunc = highlightQuery; + } else if (state.pass == 3) { + matchFunc = matchPassRegexp; + hltFunc = highlightRegexp; + } + + for (; togo > 0 && i < l && state.limit > 0; i++, togo--) { + if (info[i].n == state.n) continue; + if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) { + info[i].n = state.n; + result.push(hltFunc(info[i], queries, regexps, highlighters)); + state.limit--; + } + }; + if (searchIndex.length <= i) { + state.pass++; + i = state.from = 0; + } else { + state.from = i; + } + } + return result; + } + + function triggerResults(results, isLast) { + jQuery.each(this.handlers, function(i, fn) { + fn.call(this, results, isLast) + }) + } +} + diff --git a/Master/texmf-dist/doc/support/match_parens/table_of_contents.html b/Master/texmf-dist/doc/support/match_parens/table_of_contents.html new file mode 100644 index 00000000000..7b8d3955384 --- /dev/null +++ b/Master/texmf-dist/doc/support/match_parens/table_of_contents.html @@ -0,0 +1,46 @@ + + + + + + +Table of Contents - RDoc Documentation + + + + + + + + + + + + + + +

Table of Contents - RDoc Documentation

+ + +

Classes/Modules

+ + +

Methods

+
    + +
+ + + + diff --git a/Master/texmf-dist/doc/support/match_parens/tag_blue.png b/Master/texmf-dist/doc/support/match_parens/tag_blue.png new file mode 100644 index 00000000000..3f02b5f8f8b Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/tag_blue.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/tag_green.png b/Master/texmf-dist/doc/support/match_parens/tag_green.png new file mode 100644 index 00000000000..83ec984bd73 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/tag_green.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/transparent.png b/Master/texmf-dist/doc/support/match_parens/transparent.png new file mode 100644 index 00000000000..d665e179efd Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/transparent.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/wrench.png b/Master/texmf-dist/doc/support/match_parens/wrench.png new file mode 100644 index 00000000000..5c8213fef5a Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/wrench.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/wrench_orange.png b/Master/texmf-dist/doc/support/match_parens/wrench_orange.png new file mode 100644 index 00000000000..565a9330e0a Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/wrench_orange.png differ diff --git a/Master/texmf-dist/doc/support/match_parens/zoom.png b/Master/texmf-dist/doc/support/match_parens/zoom.png new file mode 100644 index 00000000000..908612e3945 Binary files /dev/null and b/Master/texmf-dist/doc/support/match_parens/zoom.png differ -- cgit v1.2.3