# Tag Info

3

Unicode's advantages As I see it, there are many advantages to using a Unicode font with XeLaTeX/LuaLaTeX, some of which are mentioned in answers to the above questions and in other places, notably Alan Munn's answers to How to use phonetic IPA characters in LaTeX and Preparing a text for conversion to LaTeX: How to convert "ejective stops" in ...

2

You can prevent the breaks after \ by making this a letter, via alsoletter={\\}. However, arbitrary breaks before \ are dangerous and can give the wrong syntax from tex TeX point of view. \def\a{\b} is not the same as \def\a{ \b} which is equivalent to \def\a{ \b} On the other hand \def\a{\b\c} \def\a{\b \c} \def\a{\b \c} are equivalent. I ...

0

In a pinch, a horizontal \rule may also suffice: \documentclass{article} \newcommand{\TextUnderscore}{\rule{.4em}{.4pt}} \begin{document} \texttt{Samp\textunderscore{}Dist\textunderscore{}Corr}\par \texttt{Samp\_Dist\_Corr}\par \texttt{Samp\TextUnderscore{}Dist\TextUnderscore{}Corr} \end{document} The width - .4em - can be adjusted to suit. The height - ...

7

Gretl developer here. Here's the story: gretl has used (for a few years now) the Unicode character 2212 for the minus sign if the output terminal supports Unicode. This is typographically correct (see for example here), but doesn't play nice with LaTeX because of its awkward relationships with Unicode: the solution I use is to put the two lines ...

6

It's probably better to use ^^^^043a which produces a character token, rather than use \char"043A which is a non expandable primitive accessing a font position. The character token is usable in more contexts (such as writing to tables of contents) and generally has less restrictions than \char. the ^^^^ notation (and \char"043A) will work in luatex or ...

2

Because the simple solution isn't here till now, I put it: \protected\edef\#{\string#}

1

Here I use the \convertchar macro of the stringstrings package to change all occurances of \# into ?, and use that in the label. \documentclass[a4paper]{scrartcl} \usepackage[left=2cm,right=2cm,top=2.5cm,bottom=2cm]{geometry} \usepackage{stringstrings} \setlength\parindent{0pt} \makeatletter \newcommand{\req}[2]{% \convertchar[q]{#1}{\#}{?}% ...

2

In your example, you used \# in the \req parameter. If this is not an issue, you can simply redefine locally its meaning when you generate the label. For instance, you can replace \label{req:#1} by {\def\#{REPLACEMENT}\xdef\lbl{req:#1}}\label{\lbl}. Example: \documentclass[a4paper]{scrartcl} \usepackage[left=2cm,right=2cm,top=2.5cm,bottom=2cm]{geometry} ...

1

Well, this works, but it is a very dirty trick. I hope I'll later manage to comment the code. One thing is sure: it's extremely fragile (and impossible to robustify). \documentclass[a4paper]{scrartcl} \usepackage[left=2cm,right=2cm,top=2.5cm,bottom=2cm]{geometry} \setlength\parindent{0pt} \makeatletter \def\req#1#2{% \begingroup \catcode`\#=13 ...

5

Just change the definition of the three fixed fonts to use the default encoding. \documentclass[12pt,a4paper]{letter-classic} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[icelandic,ngerman,english]{babel} \usepackage{lmodern} %\selectlanguage{english} %% main language of the letter (not necessary) ...

4

The glyphs do not seem to be available with Computer Modern Sans Serif in OT1 encoding. The class defines three different switches, ssf, nsf and bsf, for small, normal and big cmss fonts, but all of them in OT1 encoding. T1 encoding (or Cork encoding) was developed to handle glyphs of western european alphabets. Simply declaring the switches in the document ...

Top 50 recent answers are included