Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. documentclass[a4paper,oneside]{memoir}
  2. usepackage{polyglossia}
  3. setdefaultlanguage{english}
  4. usepackage{catchfile}
  5.  
  6. % ----------------------------------------------------------------------------------------------------------
  7. newcommand*{showme}[1]{The value is #1.}
  8.  
  9. % ----------------------------------------------------------------------------------------------------------
  10. makeatletter%
  11. newdimenpr@Height%
  12.  
  13. newcommand{prRaise}[2]{%
  14. setlength{pr@Height}{f@size pt}%
  15. raisebox{#1pr@Height}{#2}%
  16. }%
  17.  
  18. makeatother%
  19.  
  20. % ----------------------------------------------------------------------------------------------------------
  21. defcxltxReadA{CatchFileEdef{cxltxR}{/tmp/CXLTXtempout.tex}{}}
  22. defcxltxReadB{CatchFileEdef{cxltxR}{/tmp/CXLTXtempout.tex}{}cxltxR}
  23.  
  24. % ----------------------------------------------------------------------------------------------------------
  25. begin{document}
  26.  
  27. showme{foobar}% => ”The value is foobar”.
  28.  
  29. showme{cxltxReadB}% => ”The value is -0.2 .”
  30.  
  31. showme{input{/tmp/CXLTXtempout}}% => ”The value is -0.2 .”
  32.  
  33. showme{immediateinput{/tmp/CXLTXtempout}}% => ”The value is -0.2 .”
  34.  
  35. AprRaise{-0.2}{B}C% => "ABC" with B lowered
  36.  
  37. AprRaise{-0.2 }{B}C% => "ABC" with B lowered (trailing space shouldn't be a problem)
  38.  
  39. % AprRaise{input{/tmp/CXLTXtempout}}{B}C% !!! => Missing number, treated as zero.
  40.  
  41. % AprRaise{immediateinput{/tmp/CXLTXtempout}}{B}% !!! => Missing number, treated as zero.
  42.  
  43. % AprRaise{cxltxReadB}{B}C% !!! => Missing number, treated as zero.
  44.  
  45. cxltxReadA AprRaise{cxltxR}{B}C%
  46.  
  47. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement