summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bxcalc/sample-bxcalc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/bxcalc/sample-bxcalc.tex')
-rw-r--r--macros/latex/contrib/bxcalc/sample-bxcalc.tex29
1 files changed, 29 insertions, 0 deletions
diff --git a/macros/latex/contrib/bxcalc/sample-bxcalc.tex b/macros/latex/contrib/bxcalc/sample-bxcalc.tex
new file mode 100644
index 0000000000..48ed148710
--- /dev/null
+++ b/macros/latex/contrib/bxcalc/sample-bxcalc.tex
@@ -0,0 +1,29 @@
+\documentclass[a4paper]{article}
+\usepackage{bxcalc}
+% Declares new units
+\newcalcunit{ls}{\baselineskip}
+\newcalcunit{tm}{0.05em}
+%
+\title{Sample document of \textsf{bxcalc}}
+\author{ZR}
+\date{}
+\begin{document}
+\maketitle
+
+\section{Example 1}
+
+\noindent
+The quick brown fox\\[1ex-1ls]% so line skip is 1ex
+jump\hspace{6tm}s\hspace{12tm}ov\hspace{2tm}er\\[1ex-1ls]
+\hspace*{3tm}t\hspace{4tm}he\hspace{9tm}lazy\hspace{4tm}dog.
+
+\section{Example 2}
+
+\noindent
+AAAAAAAAAAAAAAAAAAAA\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+AAAAAAAAAAAAAAAAAAAA
+
+\end{document}