6

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...

3
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Aug 24 '14 at 9:04
  • 1
    Welcome to tex.sx! If you’re referring to the Unicode symbol ₪, you can simply use that symbol, compiling with XeLaTeX or LuaLaTeX, together with fontspec and a font that supports this symbol, e.g. Arial or Times on a Windows machine.
    – doncherry
    Aug 24 '14 at 9:08
  • Thanks for the quick answers! Is there also a possibility while using pdftex?
    – Rulli
    Aug 24 '14 at 9:54
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}

enter image description here

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.

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} 

enter image description here

6
  • There should be a space: \newcommand{\NIS}{\char"20AA } or something like \NIS 2 would 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 \symbol do?
    – Bernard
    Aug 24 '14 at 21:39
  • 2
    \symbol avoids 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.