Question: Is there a way to typeset a right double quote directly above a period (if the quotation ends with a period)? Not to the left (for example, ."), not to the right (for example, ".), but directly above. The photo below is an example from *Trees, maps and, theorems* by Jean-luc Doumont.

![Right double quote directly above period.](https://i.stack.imgur.com/iXxS8.jpg)

Answer: 
One way is to add some negative "kerning" between the quotation mark and the period:

```
\documentclass{article}
\begin{document}
Here is an unkerned quotation mark: ``\dots''.

Here is a kerned quotation mark: ``\dots''\kern-0.5em.
\end{document}

```

![Example of kerning](https://i.stack.imgur.com/3HlPy.png)

The TeX command `\kern-0.5em` inserts a negative space between the quotation mark and the following period. You will have to play a little with the exact spacing, but using a measure like `-0.5em` which will scale with the font size should work reasonably well. 

Automatic Kerning with LuaLaTeX
===============================

As others have suggested, you can do this with macros, but if you want to do this automatically, you appear to need to include this kerning information in the font specific kerning table. This can be done with [LuaLaTeX](https://tex.stackexchange.com/questions/3602/an-example-of-changing-kerning-of-a-font-in-lualatex) as follows:

First create a file: `Palatino.fea`

```
languagesystem DFLT dflt;
languagesystem latn dflt;
feature kern {
pos  \quotedblright \period -1000;
} kern;

```

Now load this font information using `fontspec`:

```
\documentclass{article}
\usepackage{fontspec}
\setmainfont[FeatureFile=Palatino.fea]{Palatino}

\begin{document}
Here is an automatically kerned quotation mark: ``\dots''.

Here is a manually kerned quotation mark: ``\dots''\kern-0.5em.
\end{document}

```

Note that you need to compile this with `lualatex` now, and that you will need to add the custom kerning information for every font you would like to use.

![Automatic Kerning with LuaLaTeX](https://i.stack.imgur.com/olfJ5.png)
Here I use a stack. The `stacktype` is either "L" for Long or "S" for Short (default). If "L", the stacking "distance" is from baseline to baseline. By setting to `0pt`, it says that the two components share the same baseline (in contrast, a short stack distance is the vertical gap between the top of the "anchor" and the bottom of the stacked item). The `stackalignment` defines horizontal alignment (default c=center). Here, I set it for left alignment.

```
\documentclass{article}
\usepackage{stackengine}
\renewcommand\stacktype{L}
\renewcommand\stackalignment{l}
\begin{document}
by ``\dots\stackon[0pt]{.}{''}
\end{document}  

```

![enter image description here](https://i.stack.imgur.com/6NKr7.jpg)

The same result can be achieved, bypassing all the parameter settings, by using the generic `stackengine` macro with 8 mandatory arguments:

```
by ``\dots\stackengine{0pt}{.}{''}{O}{l}{F}{F}{L}

```

The eight mandatory arguments are:

* stacking distance
* anchor item
* stacked item
* O(ver) or U(nder) stack
* l(eft) c(enter) or r(ight) horizontal alignment
* T/F for "quietstack" ("T" means created but not printed)
* T/F for "useanchorwidth" ("T" means the anchor width determines the overall stack width)
* S(hort) or L(ong) stack