glyphtounicode.tex has been described as the best solution for generating copy-and-pasteable symbols. However, I find that various symbols that I need to use do not paste as the appropriate Unicode codepoints/characters. How can I fix this?
This is how my macros should be pasting:
\nSubset: ⋐̸ (U+22D0 U+0338)\cong: ≅ (U+2245)\ncong: ≇ (U+2247)\bigcup: ⋃ (U+22C3)\notin: ∉ (U+2209)\neq: ≠ (U+2260)\llbracket: ⟦ (U+27E6);\rrbracket: ⟧ (U+27E7)\llparenthesis: (|;\rrparenthesis: |)- Update: Unicode offers the symbol pairs ⦇ ⦈ (U+2987/U+2988) and ⦅ ⦆ (U+2985/U+2986), which many might consider a better choice for these macros.
\coloneqq: ≔ (U+2254)\models: ⊧ (U+22A7) [currently |=]\Rsh: ↱ (U+21B1)\textlengthmark: ː (U+02D0) [currently :]\blackdiamond: ⬩ (U+2B29)\sqbullet: ▪ (U+25AA)\square: ▫ (U+25AB)
(Note: Earlier I erroneously stated that \neg pastes incorrectly as ¬ (U+FFE2) instead of ¬ (U+00AC). This is not correct: \neg pastes correctly; it's Word that replaces this by the other symbol, just as I noticed that Word doesn't copy all accented letters correctly from pdf-files (whereas they paste exactly right into Notepad). I actually don't know whether this is truly a Word issue (if so, it's likely a legacy encoding/font hack) or has to do with pdflatex or maybe the Unicode/non-Unicode clipboard distinction in Windows. Anyone feel free to add (non-ranty) insight into this.)
This is how they currently paste:
>; ; ;
S
; <; ,; J; K; L; M;B; |=;é; :; ˛; ‚; ˝
(The linebreaks before and after \bigcup ("S") are probably caused by it being a big operator, so they're nothing to worry about.)
Here is minimal example code:
\documentclass{article}
\input glyphtounicode % I am using the updated version from http://www.lcdf.org/type/ (lcdf-typetools-2.94.tar.gz).
\pdfgentounicode=1
\usepackage[T3,T1]{fontenc} % The T3-encoding is required by the tipa-package.
\usepackage[noenc,safe]{tipa} % \textlengthmark
\usepackage{txfonts}
\usepackage[only,llbracket,rrbracket,llparenthesis,rrparenthesis]{stmaryrd}
\usepackage[mathb]{mathabx}
\begin{document}
\noindent \( \nSubset; \cong; \ncong; \bigcup; \notin; \neq; \llbracket; \rrbracket; \llparenthesis; \rrparenthesis; \coloneqq; \models; \Rsh; \mbox{\textlengthmark}; \blackdiamond; \sqbullet; \square\) \\
\noindent \( \nexists \)
\end{document}
The symbol ∄ (\nexists) at the end has been included to demonstrate that glyphtounicode.tex is compatible with my code, because it pastes correctly (and in fact requires a recent version of glyphtounicode.tex, see the comment in my code).
glyphtounicode.tex(\pdfglyphtounicode{approximatelyequal}{2245}), so I am not sure what's going wrong. – Lover of Structure Aug 08 '12 at 09:51\pdfcompresslevelwould make and what apfbis. I also do not know how to know which font a given macro from a given package is using. Ideally one solution for each case (from someone) and I'll figure out the rest by myself. Sorry ... this is after looking at this for a couple of hours, and I'm a beginner as far as font matters are concerned. – Lover of Structure Aug 08 '12 at 10:15pfbbut thepdf. If you add\pdfcompresslevel=0to your document and compile then thepdfis more or less a normal text file and you can open it in your editor. – Ulrike Fischer Aug 08 '12 at 10:37accsupppackage, or will I need to wrap them into new commandnames? (Immediately wrapping without any mathmode or other caveats should work, right?) – Lover of Structure Aug 08 '12 at 12:20\mathbinto get the spacing right. – Ulrike Fischer Aug 08 '12 at 14:59accsupp? – Lover of Structure Aug 09 '12 at 02:56$a=b$has a very different spacing to$a{=}b$as in the second case the=is not longer a relation. – Ulrike Fischer Aug 17 '12 at 08:20