Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ENH Partial support for \skewchar

Parse \skewchar and pass it up
  • Loading branch information...
commit 1c488ccbb8fe39cf562a14ea560cf77befb72ad2 1 parent fd647a7
@luispedro authored
Showing with 15 additions and 0 deletions.
  1. +1 −0  ChangeLog
  2. +14 −0 hex/Macros.lhs
View
1  ChangeLog
@@ -3,6 +3,7 @@ Version 0.0.6+
* Almost complete register implementation (for \count, \dimen, & \skip)
* Implement \ifcase
* Support many cases of \the
+ * Partial support for \skewchar
Version 0.0.6 2012-06-30 by luispedro
* Refactor Macros/Tokens to emphasise Monadic interface
View
14 hex/Macros.lhs
@@ -153,6 +153,7 @@ data Command =
| OutputfontCommand (FontDef,FontInfo)
| SelectfontCommand Integer (FontDef,FontInfo)
| SetMathFontCommand Integer (FontDef,FontInfo) Integer E.MathFontStyle
+ | SetSkewChar Integer Integer
| MathCodeCommand Char Integer Integer Char
| DelCodeCommand Char (Char,Integer) (Char,Integer)
| SfCodeCommand Char Integer
@@ -195,6 +196,7 @@ instance Show Command where
show MathShiftCommand = "<$>"
show (SelectfontCommand _ _) = "<selectfont>"
show (SetMathFontCommand _ _ _ _) = "<setmathfontcommand>"
+ show (SetSkewChar f v) = concat ["<setskewchar(",show f,")=",show v]
show (MathCodeCommand c mathtype fam val) = concat ["<mathcode(", [c], "): (", show mathtype, ",", show fam, ", ", [val], ")>"]
show (DelCodeCommand c (sval,sfam) (bval,bfam)) = concat ["<delcode(", [c], "): (", show sval, ",", show sfam, ", ", show bval, ":", show bfam, ")>"]
show (SfCodeCommand c sfval) = concat ["<sfcode(", [c], "): (", show sfval, ")>"]
@@ -1182,6 +1184,18 @@ process1 (ControlSequence "\\font") = do
internalCommandM (LoadfontHCommand fname)
\end{code}
+Setting the skewchar is made with a special command. Note that skewchar is
+always global:
+\begin{code}
+process1 (ControlSequence "\\skewchar") = do
+ f <- readENumberOrCountM
+ lookupCount f $ \font -> do
+ maybeeqM
+ val <- readENumberOrCountM
+ lookupCount val $ \v ->
+ tell1 (SetSkewChar font v)
+\end{code}
+
Setting the math fonts is done at another level, so we just collect the
information and pass it down.
Please sign in to comment.
Something went wrong with that request. Please try again.