0

I'm trying to compose a non-Unicode character by arranging Unicode characters one above the other or one next to the other close-up, but I'd need a negative space which in text mode isn't available. Is there a way to get something similar?

  • 1
    Why should you not be able to use a \hspace{-1pt} in text mode? – Ulrike Fischer Jan 7 '14 at 8:45
  • Because by "negative space" I meant \!, and I didnt know the argument of \hspace could be negative. :) – MickG Jan 7 '14 at 9:45
  • 1
    @UlrikeFischer -- if that character string happens to fall exactly at the right margin, an \hspace can break, unless it's explicitly told not to. \kern won't break. – barbara beeton Jan 7 '14 at 14:44
  • Can you tell what characters you want to superimpose to each other? – egreg Jan 7 '14 at 15:30
  • @MickG The question is too generic to receive an answer. – egreg Jan 7 '14 at 18:16
0

I answer as per David Carlisle's request. The point is that I tend not to invent too much, and I had no idea \hspace could accept a negative argument, so I tried \! which isn't allowed in text mode since it's defined in terms of \thinmuskip. The character I wanted to compose was the Biang in Biangbiang noodles. I ended up doing it like this:

%Comandi comuni
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{report}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{hyperref,mathptmx}
\newfontfamily{\Cht}{STKaiti}
\newcommand{\scb}{\scalebox}
\newcommand{\hsp}{\hspace}
\newcommand{\zhangmazhang}{\scb{1}[3.33333333333]{長}\hspace{-3pt}\scb{2.3}[3.5385]{馬}\hspace{-3pt}\scb{1}[3.33333333333]{長}}
\newcommand{\niuyanniu}{\scb{1}[2]{幺}\hsp{-4pt}\scb{1.3}[2.1667]{言}\hsp{-4pt}\scb{1}[2]{幺}}
\newcommand{\STKaitibiangbiang}{\scb{8}[10]{辶}\hspace{-57pt}\rotatebox[x=0.2cm,y=1cm]{-7}{\scb{5}[2]{\raisebox{5.3pt}{心}}}\hsp{-37pt}\scb{0.7}[0.7]{\raisebox{33pt}{\zhangmazhang}}\hsp{-28pt}\raisebox{43pt}{\scb{1.25}[1.25]{\niuyanniu}}\hsp{-39pt}\raisebox{26pt}{\scb{1}[4.5]{月}}\hsp{0.87cm}\raisebox{25pt}{\scb{1.2}[4.8]{刂}}\hsp{-1.5cm}\raisebox{61pt}{\scb{3.9}[1.5]{八}}\hsp{-1.7cm}\raisebox{58pt}{\scb{5.6}[4]{宀}}\hsp{0.21cm}}

\begin{document}
\fbox{\Cht{\scb{8}[10]{辶}\hspace{-57pt}\rotatebox[x=0.2cm,y=1cm]{-7}{\scb{5}[2]{\raisebox{5.3pt}{心}}}\hsp{-37pt}\scb{0.7}[0.7]{\raisebox{33pt}{\zhangmazhang}}\hsp{-28pt}\raisebox{43pt}{\scb{1.25}[1.25]{\niuyanniu}}\hsp{-39pt}\raisebox{26pt}{\scb{1}[4.5]{月}}\hsp{0.87cm}\raisebox{25pt}{\scb{1.2}[4.8]{刂}}\hsp{-1.5cm}\raisebox{61pt}{\scb{3.9}[1.5]{八}}\hsp{-1.7cm}\raisebox{58pt}{\scb{5.6}[4]{宀}}\hsp{0.21cm}}}吗\scb{0.1}[0.1]{\STKaitibiangbiang}\scb{0.4}[0.4]{\STKaitibiangbiang}\\[1cm]
Oh yeah! Fatto!
\end{document}

Btw yes, \Cht is a TeX-style syntax font switch, so \Cht{…} should be {\Cht …}. I only learnt that long after this was done.

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.