18

(I rewrote this answer rather significantly after discussions with OP and after receiving very significant coding help from @EgorSkriptunoff) Here's a solution that doesn't pre-specify a list of all abbreviations for which thinspace should be inserted after interior periods (aka "full stops"). Instead, it sets up a pattern matching function to capture u.a., ...


17

You should look up what "optical sizing" of fonts entails. (Computer Modern is an example of a font family with optically sized letters at various font sizes.) Letters that are sized optically for \tiny are not ordinary letters reduced linearly by 50%, and they are not simply horizontally stretched either. Instead, they are individually re-drawn, with ...


17

If you add \typeout{\the\font} \typeout{\the\fontdimen2\font} %space \typeout{\the\fontdimen3\font} %stretch \typeout{\the\fontdimen4\font} % shrink \typeout{\the\fontdimen7\font} % punct after \begin{document} then you will find pdftex \OT1/LinuxLibertineT-TLF/m/n/12 3.0pt 1.5pt 0.99959pt 0.5004pt xetex \TU/LinLibertine(0)/m/n/12 3.0pt 1.5pt 1.0pt ...


16

Yes, that's a bug in microtype. Until the package is updated, a temporary fix would be to add \makeatletter\let\glb@currsize\@empty\makeatother after the \lsstyle and math inside a group, which forces the math fonts to be set up anew. EDIT: This has been fixed in microtype v2.6.


14

As of March 2015, to my knowledge there's no reason not to use LetterSpace=... provided by fontspec. However, there's a couple of reasons to prefer the functional equivalent provided by microtype (\textls and \lsstyle). microtype's feature has been around for some 10 years now; it's tried and tested, and its benefits and limitations seem well documented. ...


13

Sure: \documentclass{article} \usepackage{lipsum} \newenvironment{stretchpars} {\par\setlength{\parfillskip}{0pt}} {\par} \begin{document} \lipsum[2] \begin{stretchpars} \lipsum[2] \end{stretchpars} \end{document}


13

Here's a simple solution to the problem. It uses the Lua callback process_input_buffer to scan each input line for one of the given abbreviations and insert a small space in there. For that action you only need to specify the abbreviation (table key) you want to replace with a spaced version (table value). That mechanism can, of course, be used to simply ...


12

try this: \documentclass{article} \begin{document} $\mathrm{A}' \quad \mathrm{X}' \quad \mathrm{A}\!' \quad \mathrm{A}\mkern-2mu' $ \end{document} the large gap between the A and the prime is because of the shape of the A. if you have\mathrm{X}' the spacing is much nicer. so "backing up" the prime is what is needed. a negative thinspace, \!, is too much, ...


10

It is better to use an enumerate list to do what you're doing. If you want to reproduce exactly the same output, load enumitem and use the following settings leftmargin=0pt,align=left,labelsep=10pt,itemindent=*,label={\bfseries\alph*.} MWE: \documentclass[a4 paper,11pt]{article} \usepackage{amsmath, amsfonts, amssymb, parskip, dsfont, amsthm, wasysym, ...


10

\documentclass{article} \usepackage{microtype} \begin{document} \noindent This is a rather short sentence that will not fill a line. {\raggedright \spaceskip 2\fontdimen2 \font This is a rather short sentence that will not fill a line. \spaceskip 1em \relax This is a rather short sentence that will not fill a line. } % Or from microtype: \noindent\...


10

You can adjust the way the end-of-line character ^^M is handled. We first make it active (change its category code to 13) and then define it to be \ignorespaces: \documentclass{article} \catcode`\^^M=\active\relax% Make end-of-line character active \let^^M\ignorespaces \begin{document} a b \end{document}


10

Here's an example that includes a file with the .eps extension for greater image quality. It's placed within a figure environment that allows us to properly place it and also add a caption (if needed). The space for the word oggetto is achieved with the description environment. Of course, you'll need to replace image_name with the name of your logo (in ....


9

By default, microtype will enable tracking for the fonts defined in the smallcaps set (see microtype.cfg), which includes all sc shape fonts, but not si, that is italic smallcaps. You should get what you want if you add the following to the preamble: \DeclareMicrotypeSet*{smallcapsi} { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2}, shape = {...


9

It isn't clear from your question what effect you need other than setting \parindent and \parfillskip to zero to remove the white space at the start and end. I borrowed Stephen's text to make comparison easier, each version of the text is set 4 times, justified as normal, then again with no parfillskip and then trying again to be one line longer or shorter. ...


9

with Alegreya small caps are a family and not a shape and so the default settings of microtype don't affect them. You must activate tracking yourself: \documentclass{article} \usepackage[tracking = true, letterspace = 500]{microtype} \usepackage{Alegreya} % <- tracking does not work with small caps \DeclareMicrotypeSet*[tracking]{alegreyasc} { font = ...


8

If you set columns=flexible then spaces are not stretched as much. Also you should allow breaking of lines, but only at whitespaces. Finally, it is best to tell listings that the language being set is Java: \documentclass{article} % source code listing \usepackage{listings} \usepackage{color} \usepackage{xcolor} \usepackage{caption} % citation style \...


8

LetterSpace works also with negative values: \documentclass{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Alegreya} \newfontface{\titlingfont}[LetterSpace=-10]{Alegreya Bold} \begin{document} {\Large\titlingfont A HIDEOUS TITLE} \Large\bfseries A HIDEOUS TITLE \end{document} You can also use \scalebox from graphicx: \documentclass{article} ...


8

Yes, @Robert beat me to it by a few seconds. Here is the version I had come up with in the mean time. Note, even if you use @Robert's answer, you still also need to modify your \SetTracking line as I've shown here to disable ligatures for shape si. \documentclass{scrbook} \usepackage{fontspec} \setmainfont[SmallCapsFeatures={Renderer=Basic}]{Minion Pro} \...


8

Use a box half the width of the character: \documentclass{article} \newcommand{\half}[1]{\makebox[.5\width][l]{#1}} \begin{document} x\half{A}\half{B}\half{C} \end{document}


8

Here's a LuaLaTeX-based solution. It sets up a Lua function called nabla_f that does most of the work, and it assigns this function to the process_input_buffer callback, making it operate on all inputs before TeX starts is usual processing. % !TEX TS-program = lualatex \documentclass{article} \usepackage{times,mtpro2} % text and math fonts \usepackage{...


8

After searching and experimenting I contrived a partial answer. Please expand if you know the answer to the rest. First point, about why limit the font sets: Protrusion. Still unclear why not set all or allmath, results do not worsen then. Expansion. Setting expansion to all or allmath yields sometimes better results and sometimes worse results. It did ...


7

$VSS$ means $V$ times $S$ times $S$. If you need an italic text in math mode, you may use $\textit{VSS}$ or $\mathit{VSS} (they are not equivalent).


7

The KOMA-script classes have their own method for changing basic aspects of the caption typesetting. On the other hand, the caption package allows greater flexibility and many more customization options. Since the package can't know each and every font combination, it also provide an interface for defining new options. In your case you can do \usepackage{...


7

If you want to preserve column alignment, but want to reduce inter character spacing, set the basewidth option to a smaller value: \documentclass{article} \usepackage{listings} \usepackage{xcolor} % for setting colors % set the default code style \lstset{ language=C++, frame=tb, % draw a frame at the top and bottom of the code block tabsize=4, %...


7

25.28894pt 22.22226pt 25.28894pt Just move \begin{document} : \documentclass{article} \usepackage[log-functions=false]{expl3} \usepackage[log-declarations=false]{xparse} \usepackage[stretch=10]{microtype} \begin{document} \ExplSyntaxOn \newcommand{\cftpartfont}[1]{\normalfont\textls*[80]{\uppercase{#1}}} \newlength{\lswidth} \settowidth{\lswidth}{\...


7

Sticking a "d" and "B" together sounds easy, but it actually required quite a bit of tuning. EDITED to take egreg's suggestion of using a \clipbox instead of masking with a white \rule. 1) They are slightly different vertical height, so the "d" had to be scaled to the height of a "B". 2) The top serif of the "d" is sloping, and so part of the left ...


7

Letter spacing can't work across font changes. You have to emulate it with an explicit kern. Since the font is at 12pt, LetterSpacing=40 corresponds to adding a 4.8pt kern between letters. \documentclass[12pt]{article} \usepackage{fontspec} \setmainfont[LetterSpace=40]{EB Garamond} \begin{document} % No swashes \emph{ANAGRAMME} % Two swashes \emph{\...


7

This is called a ligature and is a sign of good typography. The standard ligatures for TeX are fi, fl,ffi,ffl, but there's also fj and the old style ligatures stand ct, and some others, depending on the font. They're most easily accessed with fontspec and xelatex. Here is an example, with Latin Modern, erewhon (an extension of Adobe Utopia) and Sabon Next ...


6

The mathtools package provides the option mathic=true for inserting such italic corrections automatically: \documentclass{article} \usepackage{fourier,mathtools} \begin{document} If \(0<b<1\). \emph{If \(0<b<1\)}. \emph{If 0<b<1}. \mathtoolsset{mathic=true} \emph{If \(0<b<1\)}. \emph{If 0<b<1}. \end{document}


6

The chapter title formatting is labelled in classicthesis.sty as "Fancy Stuff": % ******************************************************************** % Fancy Stuff % ******************************************************************** \RequirePackage{booktabs} % for better rules in tables \RequirePackage{textcase} % for \MakeTextUppercase \ifthenelse{\...


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