# Tag Info

10

As explained in my answer to Listings and Babel (with some languages) are breaking hyphenation, characters with a non zero \lccode are those that TeX considers as forming words, when hyphenation is tried. Thus in the masters'' only the and masters are considered as words under normal settings, where  and ' have zero \lccode. If \lccode\'=\' ...

5

Thanks to the comments I realised the are two ways to accomplish what I needed. In the examples I'll be using the word Lor'themar. Global definition (in the preamble): \lccode\'=39\hyphenation{Lor'-the-mar} Local definition (in running text): [...] Aethas replied, and Lor'\-the\-mar felt that his controlled tone [...] Both ways seem to be equally ...

0

I found a useful fix at the link below, after many hours of searching: https://github.com/jgm/pandoc/issues/889 Basically change \setmonofont[]{$monofont$} to \setmonofont[Mapping=tex-ansi]{$monofont$}

3


7

\documentclass[a4paper]{article} \usepackage[T1]{fontenc} % enable this to make a WEB template compilable % he <TMPL_VAR ..>'s will be replaced by the template system \catcode<=\active \catcode_=12 \gdef<#1>{\texttt{\textless #1\textgreater}} \begin{document} <TMPL_VAR TEST> <TMPL_IF NAME=TEST> something </TMPL_IF> ...

6

In math mode, typing ' is equivalent to typing ^{\prime}, '' to ^{\prime\prime} and so on. If you need “real” quotes in math mode, you have to define a math character for them. Typing  is not guaranteed to give the desired result. You can define \DeclareMathSymbol{\mlq}{\mathord}{operators}{} \DeclareMathSymbol{\mrq}{\mathord}{operators}{'} Complete ...

8

In math mode ' produces a prime; to get the closing quotation mark in math mode you can use \text from amsmath: \documentclass{book} \usepackage{amsmath} \begin{document} $abc' \quad abc{\text{'}}$ \end{document}

4

In the question Adequate hyphenation of words already containing a hyphen, I was looking for a fully automatic solution (i.e., without special shorthands in the document body and without using \hyphenation or similar commands) to disregard break points less than four characters before and after existing hyphens. From Stephan Henning's answer I learned that ...

1

Thanks Alvaro. Additionally I have figured out how to do this code (to get commas everywhere, except at the end): ARTICLE: Change function output.nonnull with: FUNCTION {output.nonnull} { 's := output.state mid.sentence = { ", " * write$} { output.state after.block = % { add.period$ write${ ", " * write$ newline$... 9 The definition of \thinspace is % latex.ltx, line 1315: \def\thinspace{\kern .16667em } so it's a kern; since it's not followed by glue it's not a feasible line break point. You probably want \hspace{.16667em} instead of it; then \allowbreak is not needed. On the other hand, \ignorespaces does nothing at all where you place it, because its only action ... 4 The separator is defined under FUNCTION {output.nonnull} in the bst file. Specifically, in your file physicsFNM, locate these lines: ... FUNCTION {output.nonnull} { 's := output.state mid.sentence = { ", " * write$ } { output.state after.block = { add.period$write$ ... The last line (which corresponds to line 83 on your file) should be ...

6

With LuaTeX, a simple solution is to enter explicit hyphens in the \hyphenation command as =. \hyphenation{Ar-beiter=Unfall-ver-si-che-rung} \showhyphens{Arbeiter-Unfallversicherung} \bye After compiling this document with LuaTeX, the .log file shows that hyphenation is possible [][] \tenrm Ar-beiter-Unfall-ver-si-che-rung with hyphenations ...

1

See egreg’s answer to question Why can words with hyphen char not be hyphenated? Indeed, if you try the following example, you'll see that TeX hyphenates the compound word: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \begin{document} \hyphenchar\font=\string"7F \parbox{1pt}{In Baden-W\"urttemberg} \end{document}

6

Inside the optional argument of \beginsong you need an extra pair of braces around the opening quotation marks, as in {,,} , or to use „ or \quotedblbase: \documentclass[a4paper,12pt]{mwart} \usepackage[lyric]{songs} \setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in} \setlength{\textwidth}{6.5in} \setlength{\topmargin}{0in} ...

5

Simple answer: You can use \newcommand{\creflastconjunction}{, and~} From the manual: \creflastconjunction is used between the penultimate and final cross-reference in a list of more than two [pg. 12, at least for the 2012-03-07 version of the manual I have] Redoing your example: \documentclass{article} \usepackage$standard${ntheorem} ...

22


8

You can use \crefmultiformat: \documentclass{article} \usepackage[standard]{ntheorem} \usepackage{cleveref} \crefmultiformat{proposition}{propositions~#2#1#3}% { and~#2#1#3}{, #2#1#3}{, and~#2#1#3} \begin{document} \begin{proposition}\label{thm:roses} Roses are red. \end{proposition} \begin{proposition}\label{thm:violets} Violets are blue. ...

3

Declare \mlq and so on as \mathrel, because TeX doesn't add space between consecutive relation symbols: \documentclass[varwidth,border=3pt]{standalone} \usepackage{amsmath} \DeclareMathSymbol{\mlq}{\mathrel}{operators}{} \DeclareMathSymbol{\mrq}{\mathrel}{operators}{'} \DeclareMathSymbol{\mlqq}{\mathrel}{operators}{"5C} ...

1

As indicated in my comment, you must enclose the \rightarrow in braces to shield it from operating on the surrounding quotation marks. \documentclass{standalone} \usepackage{varwidth} \usepackage{amsmath} \DeclareMathSymbol{\mlq}{\mathord}{operators}{} \DeclareMathSymbol{\mrq}{\mathord}{operators}{'} \begin{document} \begin{varwidth}{\linewidth} \$Op ...

Top 50 recent answers are included