File:Hanging punctuation.svg

Summary

Description
English: An example of hanging punctuation.

From the XeLaTeX code copied below, I generated a PDF, then added vertical coloured lines to the PDF in macOS Preview 10, then cropped and converted to SVG in Inkscape, then halved the file size with SVGO.

The intermediate stage with Preview was because I was initially just going to make a PNG screenshot, before deciding that I could keep it as vectors.

Source code

% !TEX program = xelatex
\documentclass[a4paper, 12pt]{letter}
	\usepackage{fontspec}
	\usepackage[left=60mm, right=60mm, top=30mm, bottom=40mm]{geometry}
	\usepackage[latin]{babel}
	% Expansion is good, but doesn't work with XeLaTeX yet.
	\usepackage[protrusion=true, expansion=false, factor=1000]{microtype}
	\SetProtrusion{encoding={*},family={*},series={*},size={12}}
		{
			{}={1000,1000}, {,}={1000,1000}, {-}={1000,1000}, 
			{.}={1000,1000}, {*}={1000,1000}, {;}={1000,1000},
			{(}={1000,1000}, {)}={1000,1000}
		} 
	
\begin{document}
	
	``Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi.
	Morbi auctor lorem 	non justo. 
	Nam lacus libero, pretium at, lobortis vit\ae, ultricies et, tellus. 
	Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vit\ae\
	ornare odio metus a mi. 
	Morbi ac orci et nisl hendrerit* mollis.
	Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. 
	Cum sociis natoque penatibus;
	(et magnis dis parturient montes, nascetur ridiculus) mus.
	Aliquam tincidunt urna.''

\end{document}

I hereby release the above source code into the public domain.

The XeLaTeX code uses the Microtype package, which improves typography and allows fine control of it. By default, Microtype wouldn't be as zealous as this, but instead allow characters to hang into the margin only as much as they need to in order for the edges to feel straight. I, however, pumped the setting up to 1000.

The font is Latin Modern Roman 12pt; the text is Lorem ipsum nonsense, with added punctuation.

Created to replace Hanging quotation.png, which was a raster image, small, only showing one hanging punctuation mark (only on the left), poorly justified on the right-hand side, &c.
Date
Source Own work
Author Correctrix
Other versions
SVG development
InfoField

Licensing

Correctrix, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Hanging%20punctuation.svgCategory:Self-published work
Category:Text alignment Category:Typography
Category:CC-BY-SA-4.0 Category:Self-published work Category:Text alignment Category:Typography Category:Valid SVG created with LaTeX