3

I've been working on a large latex project (compiled using pdflatex) and I need to use some some gammadion cross symbols in the text.

The unicode for this are U+534D and U+5350 and I've tried using inputenc + DeclareUnicodeCharacter but with no success. I would like to avoid using any other type setting engine (xelatex or lualatex) as this would require many modifications to my tex project.

In the comprehensive list of LaTeX symbols (http://anorien.csc.warwick.ac.uk/mirrors/CTAN/info/symbols/comprehensive/symbols-a4.pdf) I found symbols for the Simpson characters(!?) so I find it difficult to believe there is no standard command for the gammadion crosses...

Thanks!

2 Answers2

5

Based on @HarishKumar comment here goes the solution

Define the following commands before \begin{document}, i.e.

for a 卍 gammadion

\newcommand{\agni}[1]{%
    \begin{tikzpicture}[#1]
        \draw (-1,1)  -- (0,1)  -- (0,-1) -- (1,-1);
        \draw (-1,-1) -- (-1,0) -- (1,0)  -- (1,1);
    \end{tikzpicture}%
}

and for a 卐 gammadion

\newcommand{\fash}[1]{%
    \begin{tikzpicture}[#1]
        \draw (-1,1)  -- (-1,0) -- (1,0) -- (1,-1);
        \draw (-1,-1) -- (0,-1) -- (0,1) -- (1,1);
    \end{tikzpicture}%
}

To insert symbols in text just use \agni{scale=0.2} or \fash{scale=0.2} respectively.

egreg
  • 1,121,712
  • In both definitions there are superfluous blank spaces: one after the { starting the definitions and the other one just after \end{tikzpicture}. – Gonzalo Medina Aug 26 '15 at 15:21
1

Based on the one from Jake Pyne, but you only have to use \agni to include it.

Complete code

\documentclass[varwidth=true, border=2pt]{standalone}

% Color
\usepackage{color}
\definecolor{lightgray}{gray}{0.95}

%Additional packages and symbol definition
\usepackage{tikz}

\newcommand{\agni}{%
    \begin{tikzpicture}[x=1.4ex, y=1.4ex, scale=0.5, baseline=-.8ex]
        \draw[semithick] (-1,1)  -- (0,1)  -- (0,-1) -- (1,-1);
        \draw[semithick] (-1,-1) -- (-1,0) -- (1,0)  -- (1,1);
    \end{tikzpicture}%
}

%document
\begin{document}{\textcolor{lightgray}{a}}\agni{\textcolor{lightgray}{b}}
\end{document}

Rendered

enter image description here

Martin Thoma
  • 18,799