Skip to content

Commit

Permalink
Quick attempt at fixing multicharacter identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
balacij committed Oct 17, 2021
1 parent 0ea1e82 commit 1cf33bb
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 191 deletions.
5 changes: 4 additions & 1 deletion code/drasil-printers/lib/Language/Drasil/TeX/Print.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ print :: PrintingInformation -> [LayoutObj] -> D
print sm = foldr (($+$) . (`lo` sm)) empty

------------------ Symbol ----------------------------

-- TODO: It seems that there's a disconnect with this function and
-- | Converts a symbol into a printable document form.
symbol :: LD.Symbol -> D
symbol (LD.Variable s) = pure $ text s
Expand Down Expand Up @@ -123,7 +125,8 @@ pExpr (Case ps) = mkEnv "cases" (cases ps)
pExpr (Mtx a) = mkEnv "bmatrix" (pMatrix a)
pExpr (Row [x]) = br $ pExpr x -- FIXME: Hack needed for symbols with multiple subscripts, etc.
pExpr (Row l) = foldl1 (<>) (map pExpr l)
pExpr (Ident s) = pure . text $ s
pExpr (Ident s@[_]) = pure . text $ s
pExpr (Ident s) = commandD "mathit" (pure $ text s)
pExpr (Label s) = command "text" s
pExpr (Spec s) = pure . text $ unPL $ L.special s
--pExpr (Gr g) = unPL $ greek g
Expand Down
54 changes: 32 additions & 22 deletions code/stable/glassbr/SRS/HTML/GlassBR_SRS.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

1 comment on commit 1cf33bb

@JacquesCarette
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. No PR yet?

Please sign in to comment.