Tag Info

New answers tagged


Instead of using the mathpazo package, which is (a) quite old and (b) well known for having various font metric problems, you could use the newpxtext and newpxmath packages. These are derived from the mathpazo package but have much better font metrics. In particular, these packages produce well-spaced hat symbols. If you use these packages instead of ...


Here I use stackengine to add a stacking gap on the argument of \hat. I also use scalerel package to preserve the math style, and to express the stacking gap, .3\LMpt, in terms of a unit that scales with the math style (as an argument to \ThisStyle{}, \LMpt is a scalable version of 1pt, that will scale with smaller math styles). The hat kerning is lost, ...


showexpl has to write the code to a temporary file. It uses an internal command of listings for this. But accent doesn't survive if you use the literate option too. Put the code in some external file and then use \LTXinputExample{test-code}


Run xelatex and everything will be fine without using the literate option: \documentclass{article} \usepackage{fontspec} \setmonofont[Scale=0.88]{DejaVu Sans Mono} \usepackage{listings} \usepackage{showexpl} \begin{document} \begin{lstlisting} áéíóúaeiou \end{lstlisting} \begin{LTXexample} áéíóúaeiou \end{LTXexample} \end{document}


There are two orders of problems: the distance from the arrow to the symbol is too big; in subscripts or superscripts, the arrow is too wide. Here's a solution for both. \documentclass[titlepage]{article} \usepackage{amsmath,graphicx} \newcommand{\harp}[1]{\mathpalette\harpoonvec{#1}} \newcommand{\harpvecsign}{\scriptscriptstyle\rightharpoonup} ...


Macros from the stackengine package allow one to set the vertical stacking gap. Compare items 1 vs. 2 and/or items 3 vs. 4, and/or 5 vs. 6 for a demonstration of changing the stacking gap. In addition, the appearance will also be affected by what is considered the baseline of the subscipt. In 1, 2, the baseline is between the "r" and the harpoon; in 3, 4, ...


A solution using the accents package. The difference of vertical spacing with respect to the O.P. method with \overset is null in scriptscriptstyle, slight in \scriptstyle and more important in \textstyle. Otherwise the placement is different : \documentclass[titlepage]{article} \usepackage{amsmath,amssymb} \usepackage{accents} ...


Here's a quick-and-not-too-dirty offering: a macro called \harp. It assumes it'll be used in subscript and superscript positions only. For now, it only works with letters that do not have an ascender part. I.e., don't use if with letters such as b, d, f, h, etc. (If you do need to use the macro with such letters, you'll need to tweak the argument of the ...


I just found out why this happened. In the TeXworks editor I use, the original setup is: "Format"--> "Smart Quotes"-->"Tex ligatures", after I changed the setup to: "Format"--> "Smart Quotes"-->"None", then it works as expected !!!!


Maybe that's very naive, but why not simply input direcly ö in the editor? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \begin{document} Toksöz \textsc{Toksöz} TOKSÖZ \end{document}


It is difficult to see in some editors, but in the first case you have \" acting on o, in the second: \' acting on ', hence the strange result. \documentclass{article} \begin{document} Toks\"{o}z Toks\''{o}z \end{document} BTW: your question gives an interesting example, why " and '' should never be mixed. Improper usage of " as a quote does not ...


I've had a similar problem, but I've "solved" it. Online some people seemed to suggest this is to do with hyperref, but, I'm not convinced. Loading hyperref last had no effect whatsoever. In the .tex file I had: \begin{proposition}\label{prop:amG delta in amG delta K} \begin{enumerate} \item This formats so that the 1. of the \item is right next to the ...

Top 50 recent answers are included