Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: docs/language/dart.sty

Issue 646003002: Introduced hash valued location markers in the spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revised after 2nd review Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | docs/language/dartLangSpec.tex » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/language/dart.sty
diff --git a/docs/language/dart.sty b/docs/language/dart.sty
index 9f4db5ee5b06017daa58a2fd2f31d6c7bb01193a..7da3c7b194e89ea1cec094b0e65fb3d412385a63 100644
--- a/docs/language/dart.sty
+++ b/docs/language/dart.sty
@@ -113,3 +113,39 @@
}{
%\end{verbatim}
}
+
+
+% ----------------------------------------------------------------------
+% Support for hash valued Location Markers
+
+% very small font, to enable 33 char hash values in the margin
+\makeatletter
+\ifcase \@ptsize \relax% 10pt
+ \newcommand{\miniscule}{\@setfontsize\miniscule{2}{3}}% \tiny: 5/6
+\or% 11pt
+ \newcommand{\miniscule}{\@setfontsize\miniscule{3}{4}}% \tiny: 6/7
+\or% 12pt
+ \newcommand{\miniscule}{\@setfontsize\miniscule{3}{4}}% \tiny: 6/7
+\fi
+\makeatother
+
+% white: location markers should not create visual noise
+\definecolor{LMdim}{gray}{1.0}
+
+% insert location marker showing hash value of following paragraph
+\newcommand{\LMHash}[1]{%
+ \hspace{0pt}\marginpar{\raisebox{0.5ex}{\miniscule{\color{LMdim}#1}}}}
+
+% support convenient renewcommand
+\let\OriginalLMHash\LMHash
+
+% define a label, and show the associated logical location marker
+\newcommand{\LMLabel}[1]{%
+ \vspace{-\baselineskip}\hspace{0pt}\OriginalLMHash{\raisebox{10ex}{sec:#1}}%
+ \label{#1}}
+
+% dummy version of LMHash, always shows the same arbitrary hash value
+\renewcommand{\LMHash}[1]{\OriginalLMHash{ba01b04d58c8c4e259764498f823cc65}}
+
+% ----------------------------------------------------------------------
+
« no previous file with comments | « no previous file | docs/language/dartLangSpec.tex » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698