I have the problem, that I need to insert the NIS (New Israeli Shekel) Symbol into a otherwise english document with math formulas. The Symbol itself is in testmode. How can I manage to get the symbol? It can be a hack as well...
Asked
Active
Viewed 1,347 times
2 Answers
10
It's easy to do with fontspec and an Opentype font that has that symbol; its code is U+20AA. This requires compiling with Xe/LuaLaTeX. Here is an example with DejaVu Sans. I define a \NIS macro:
\documentclass[a4paper,12pt]{article}
\usepackage{fourier}
\usepackage[no-math]{fontspec}
\setmainfont{Heuristica}
\setsansfont{DejaVu Sans}
\newcommand\NIS{\char"20AA\,}
\begin{document}
This is the New Schekel Symbol: \\
\sffamily
\begin{tabular}{@{}cccc}
\texttt{regular} & \texttt{bold} & \texttt{italic} & \texttt{bold italic}\\[2ex]
\NIS 2 & \bfseries \NIS & \itshape \NIS &\bfseries\itshape \NIS
\end{tabular}
\end{document}

Bernard
- 271,350
-
There should be a space:
\newcommand{\NIS}{\char"20AA }or something like\NIS 2would give quite surprising results. – egreg Aug 24 '14 at 20:59 -
@egreg: Thanks! I must say I didn't think of checking. Updated answer. – Bernard Aug 24 '14 at 21:23
-
Sorry, but the thin space is wrong. I meant a space character. Better yet,
\newcommand{\NIS}{\symbol{"20AA}}– egreg Aug 24 '14 at 21:31 -
I put a thin space because it's the usual spacing between number and unit — at least in French typography. What does the use of
\symboldo? – Bernard Aug 24 '14 at 21:39 -
2
\symbolavoids the problem with numbers (no strange space after"20AA). Dollar and pound symbols don't want a thin space when preceding the amount; I dare say that most of the French typesetting rules are not followed in other languages. – egreg Aug 24 '14 at 22:00 -
I see. I must say I know only partially English rules (mainly British ones), better French rules , vaguely German ones and not at all the rest. Any way, I'll modify my answer. Thanks for the information about \symbol! – Bernard Aug 24 '14 at 22:17
4
Find a good version of the symbol on line or create it yourself by compiling with XeLaTeX or LuaLaTeX the file
\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{DejaVu Sans}
\begin{document}
\symbol{"20AA}
\end{document}
If you call the file NIS.tex, then you'll have NIS.pdf. Then, in your document, you can just say
\usepackage{graphicx}
\DeclareRobustCommand{\NIS}{\includegraphics[height=\fontcharht\font`T]{NIS}}
and use the command normally:
\documentclass{article}
\usepackage{graphicx}
\DeclareRobustCommand{\NIS}{\includegraphics[height=\fontcharht\font`T]{NIS}}
\begin{document}
I paid \NIS 200
\Large I paid \NIS 200
\end{document}

See Where do I place my own .sty or .cls files, to make them available to all my .tex files? for instructions about where to put NIS.pdf in order for it to be available for every document.
\documentclass{...}and ending with\end{document}. – Aug 24 '14 at 09:04fontspecand a font that supports this symbol, e.g. Arial or Times on a Windows machine. – doncherry Aug 24 '14 at 09:08