mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
Added tooltips to category links in types and in the image map.
This commit is contained in:
@@ -10,10 +10,14 @@ main = do
|
|||||||
let isLatex = case xx of
|
let isLatex = case xx of
|
||||||
"-tex":_ -> True
|
"-tex":_ -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
|
cs1 <- getCats commonAPI
|
||||||
|
cs2 <- getCats catAPI
|
||||||
|
let cs = sortCats (cs1 ++ cs2)
|
||||||
writeFile synopsis "GF Resource Grammar Library: Synopsis"
|
writeFile synopsis "GF Resource Grammar Library: Synopsis"
|
||||||
append "Aarne Ranta"
|
append "Aarne Ranta"
|
||||||
space
|
space
|
||||||
append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
|
append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
|
||||||
|
delimit $ addToolTips cs
|
||||||
include "synopsis-intro.txt"
|
include "synopsis-intro.txt"
|
||||||
title "Categories"
|
title "Categories"
|
||||||
space
|
space
|
||||||
@@ -24,9 +28,6 @@ main = do
|
|||||||
append "==A hierarchic view==\n"
|
append "==A hierarchic view==\n"
|
||||||
include "categories-intro.txt"
|
include "categories-intro.txt"
|
||||||
append "==Explanations==\n"
|
append "==Explanations==\n"
|
||||||
cs1 <- getCats commonAPI
|
|
||||||
cs2 <- getCats catAPI
|
|
||||||
let cs = sortCats (cs1 ++ cs2)
|
|
||||||
delimit $ mkCatTable isLatex cs
|
delimit $ mkCatTable isLatex cs
|
||||||
space
|
space
|
||||||
title "Syntax Rules"
|
title "Syntax Rules"
|
||||||
@@ -55,6 +56,10 @@ main = do
|
|||||||
system $ "txt2tags -t" ++ format ++ " --toc " ++ synopsis
|
system $ "txt2tags -t" ++ format ++ " --toc " ++ synopsis
|
||||||
if isLatex then (system $ "pdflatex synopsis.tex") >> return () else return ()
|
if isLatex then (system $ "pdflatex synopsis.tex") >> return () else return ()
|
||||||
|
|
||||||
|
addToolTips :: Cats -> [String]
|
||||||
|
addToolTips = map f
|
||||||
|
where f (n,e,_) = "%!postproc(html): '(?i)(HREF=\"#" ++ n ++ "\")( TITLE=\"[^\"]*\")?' '\\1 TITLE=\"" ++ e' ++ "\"'"
|
||||||
|
where e' = n ++ if null e then "" else " - " ++ e
|
||||||
|
|
||||||
getCats :: FilePath -> IO Cats
|
getCats :: FilePath -> IO Cats
|
||||||
getCats file = do
|
getCats file = do
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user