| 1 |
\documentclass[onedown-examples]{subfiles} |
| 2 |
|
| 3 |
\begin{document} |
| 4 |
\noindent |
| 5 |
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, |
| 6 |
title={Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input}] |
| 7 |
%\begin{HBox}{Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input} |
| 8 |
If you want to use the card symbols {\setdefaults{colors=b+w}♣,♢,♡,♠} within your \LaTeX-document, |
| 9 |
then put these lines in your preamble. That's all. |
| 10 |
\\[0.3em] |
| 11 |
\verb|\DeclareUnicodeCharacter{2660}{\Sp}| |
| 12 |
\verb|\DeclareUnicodeCharacter{2661}{\He}| \\ |
| 13 |
\verb|\DeclareUnicodeCharacter{2662}{\Di}| |
| 14 |
\verb|\DeclareUnicodeCharacter{2663}{\Cl}| \\ |
| 15 |
\verb|\DeclareUnicodeCharacter{2664}{\Sp}| |
| 16 |
\verb|\DeclareUnicodeCharacter{2665}{\He}| \\ |
| 17 |
\verb|\DeclareUnicodeCharacter{2666}{\Di}| |
| 18 |
\verb|\DeclareUnicodeCharacter{2667}{\Cl}| \\[0.3em] |
| 19 |
|
| 20 |
%\vspace{0.3em} |
| 21 |
%\\[0.3em] |
| 22 |
If you put them in a file \textbf{\emph{onedown.symbols}}, somewhere where |
| 23 |
\LaTeX{} can find it, then the \OneDown package will take care of loading it. An |
| 24 |
apropriate place would be in your .texmf directory. |
| 25 |
\end{tcolorbox} |
| 26 |
%\end{HBox} |
| 27 |
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, |
| 28 |
title={To enter these card symbols on your keyboard, use this with Linux}] |
| 29 |
Add following lines to your \emph{.Xmodmap} and run \textbf{xmodmap .Xmodmap} |
| 30 |
\\[0.3em] |
| 31 |
{\ttfamily |
| 32 |
keycode 38 = 0x0061 0x0041 0x0061 0x0041 0x1002663 0x1002667 0x00e6 \\ |
| 33 |
keycode 39 = 0x0073 0x0053 0x0073 0x0053 0x1002662 0x1002666 0x100017f \\ |
| 34 |
keycode 40 = 0x0064 0x0044 0x0064 0x0044 0x1002661 0x1002665 0x00f0 \\ |
| 35 |
keycode 41 = 0x0066 0x0046 0x0066 0x0046 0x1002660 0x1002664 0x01f0 \\ |
| 36 |
keycode 65 = space nobreakspace space nobreakspace nobreakspace NoSymbol \\ |
| 37 |
} |
| 38 |
\tcblower |
| 39 |
Now you can enter {\setdefaults{colors=b+w}♣,♢,♡,♠} with \emph{Shift+AltGr} a,s,d,f |
| 40 |
\end{tcolorbox} |
| 41 |
|
| 42 |
|
| 43 |
\end{document} |
| 44 |
\endinput |