Tag Info

Hot answers tagged

11

Under the normal setting, the math code for comma is "613B as it results from \mathcode`\,="613B in Plain TeX and \DeclareMathSymbol{,}{\mathpunct}{letters}{"3B} in LaTeX (precisely in fontmath.ltx). This means that the comma is a punctuation symbol (class 6), and that it's taken from the font specialized for math letters (family 1, where the math ...


8

\documentclass{article} \begin{document} \showoutput $,$, \end{document} produces which are "quite similar" in the default computer modern fonts, but if you look at the log you see ....\mathon ....\OML/cmm/m/it/10 ; ....\mathoff ....\OT1/cmr/m/n/10 , So the second one is a , in cmr10 whereas the first is a ; in cmmi10 (classic TeX encodings are ...


7

assuming your file is UTF8 encoded the log file shows Missing character: There is no in font ptmr7t! Missing character: There is no in font ptmr7t! Missing character: There is no in font ptmr7t! as you have not told latex you are using UTF-8, so it sees a dash as three separate characters from its three bytes. All of them have the 8th bit set and the ...


5

csquotes has predefined styles based on the language setting. If your language is british, then you get single quotes. Otherwise you could define them manually. You can alter them using \DeclareQuoteStyle as described in the manual on pp. 14--15 (texdoc csquotes). \documentclass{article} \usepackage[british]{babel} \usepackage{csquotes} \begin{document} He ...


4

As noted in the comments one should use matching text and math fonts which use very simmilar punctuation symbols. According to the TeXbook using Test with variable $x$. is to be preferred as well as Test with one $x$, two $y$, or three variables $z$. mainly because in several cases the punctuation symbols are more tightly spaced in math mode than in text. ...


4

Do you want angle brackets or guillemet quotes: \documentclass{article} \usepackage[T1]{fontenc} \begin{document} This $\langle$one, two three$\rangle$ or This \guilsinglleft one, two three\guilsinglright \end{document}


4

since this wasn't specifically a latex question, here's my favorite method. \def\<#1>{$\langle$\ignorespaces#1\unskip$\rangle$} \<some text> \< some text > good for "meta" notation, if this alternate form is used (does require latex): \def\<#1>{$\langle$\textit{\ignorespaces#1\unskip}$\rangle$}


4

The package you are using adds a ' so you can do the same to LT version after loading longtable: \makeatletter \def\LT@c@ption#1[#2]#3{% \LT@makecaption#1\fnum@table{#3}% \def\@tempa{#2}% \ifx\@tempa\@empty\else {\let\\\space \addcontentsline{lot}{table}{\protect\numberline{\thetable.}{#2}}}% \fi} \makeatother


4

Periods are a strange beast, because the space factor must be set correctly (of course, if you use \nonfrenchspacing). \catcode`@=11 \def\checkperiod{\futurelet\next\check@period} \def\check@period{% \if\noexpand\next.% \spacefactor\sfcode`. \expandafter\@gobble \fi} \long\def\@gobble#1{} \def\@{\spacefactor\@m} \catcode`@=12 \xspaceskip=4em % ...


3

The basic interface is pretty simple, but you leave a lot of questions unanswered about the language(s) involved and the degree of complexity about quotations (and possibly about encodings). Here's the basic idea though: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,french]{babel} ...


3

I don't know if this was your intend by I try it: \long\def\isnextchar#1#2#3{\def\tmpa{#2}\def\tmpb{#3}% \let\tmp=#1\futurelet\next\isnextcharA } \def\isnextcharA{\ifx\tmp\next\expandafter\tmpa\else\expandafter\tmpb\fi} \def\PhD{\isnextchar.{PhD}{Ph.D.}} \def\PhD{\isnextchar.{PhD}{Ph.D.}} The \PhD\ inside the sentence is different than \PhD. gives: The ...


2

You need to patch the bibliography driver online provided by biblatex-chicago to achieve what you want. So, add the following lines in your preamble \usepackage{xpatch} \xpatchbibdriver{online} {\newunit\newblock \iftoggle{cms@doionly}% {\iffieldundef{doi}% {}% {\printfield{doi}% \clearfield{url}}}% {\printfield{doi}}% ...


2

You can redefine \glt to capture content up to some ending delimiter. Below I've used \end from \end{exe}: \documentclass{article} \usepackage[english]{babel} \usepackage{gb4e} \usepackage{csquotes} \begin{document} \begin{exe} \ex \gll Etwas fremdsprachiger Text \\ some {foreign language-y} text \\ \glt \enquote{Free translation.} \end{exe} ...


1

You can reduce the space by putting comma inside braces like 0{,}5. But it is better to use siunitx. \documentclass[a4paper,11pt]{book} \usepackage{empheq} \usepackage[detect-all]{siunitx} \begin{document} 0,5 \begin{empheq}{align} 0{,}5\\ \num[output-decimal-marker = {,}]{0.5} \end{empheq} \end{document}


1

This has nothing to do specifically with empheq. The simple document \documentclass{article} \begin{document} 0,5 $0,5$ \end{document} will show the same behavior. In math mode a comma is a punctuation symbol, so TeX automatically adds a thin space after it, which is needed in formulas like $(a,b)$. Either you use 0{,}5 in math mode, because this makes ...



Only top voted, non community-wiki answers of a minimum length are eligible