Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more wow effect to the rule example #48

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions content/examples/rule.sil
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,30 @@
\use[module=packages.rules]
\use[module=packages.raiselower]
\font[size=14pt]
S\glue[width=-0.1en]\raise[height=-0.5ex]{\font[size=9pt]{I}}\glue[width=-0.1en]L\glue[width=-0.4en]\raise[height=0.5ex]{\font[size=7pt]{E}}
comes with a number of packages which provide additional functionality.

A box: \raise[height=1ex]{\hrule[width=3em, height=0.4pt]} here.
“Rules” are rectangular ink blobs that can be be used to create a variety of effects.

\fullrule

Simple rectangular boxes are easy. QED \hrule[height=1ex, width=1ex]

\noindent\hfill\raise[height=0.5ex]{\hrule[width=25%lw, height=0.4pt]}\hfill

One can also underline \underline{content} or strike \strikethrough{content}.
These can be nested and can span multiple lines as paragraphs are line-wrapped:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. \underline{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor}. \strikethrough{Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.} Duis semper. Duis arcu massa, \underline{scelerisque \strikethrough{vita} vitae}, consequat in, pretium a, enim.

\noindent\hfill\raise[height=0.5ex]{\hrule[width=25%lw, height=0.4pt]}\hfill

Rule “fills” stretch to the available width of the line.

Placeholder for some input: \hrulefill[position=underline].

\medskip
Obviously, the following example is just for the Wow! factor.
There are many ways to display a glider from Conway’s Game of Life, and this one is certainly not the most efficient and elegant!

\noindent\hrulefill[raise=9pt, thickness=1pt]\glue[width=2pt]\rebox[height=20pt]{\hrule[height=5pt, width=5pt]\glue[width=1pt]\hrule[height=5pt, width=5pt]\glue[width=1pt]\hrule[height=5pt, width=5pt]\glue[width=-5pt]\raise[height=6pt]{\hrule[height=5pt, width=5pt]}%
\glue[width=-11pt]\raise[height=12pt]{\hrule[height=5pt, width=5pt]}}\glue[width=9pt]\hrulefill[raise=9pt, thickness=1pt]

Test \underline{underlining several words}.
\end{document}
Loading