I want to make a document that looks like an old top secret file written on a typewriter. The problem is that when I want to use a center
environment, the alignment of the characters is off. Is there a way to make sure that the boxes of all the characters are aligned while still making use of the center
environment?
MWE
\documentclass[a4paper]{article}
\title{Your Paper}
\author{You}
\begin{document}
\ttfamily
\raggedright
\begin{center}
Top Secret Document
\end{center}
This is a top secret document containing secret information about a secret thing which has remained secret for many years. This is a top secret document containing secret information about a secret thing which has remained secret for many years.
\end{document}
Best Answer
In response to Nathanael comment, I update my earlier answer with a more powerful method, able to cope with multi-paragraph material, pagebreaks being allowed.
The extra inter-paragraphs vertical skips (
\parskip
) inside the specially centered material will be lost, though. As this is usually0pt
plus some stretchable glue this effet is not very significant.First answer:
A method based on measuring things first. On each line. (
\vmark
copied from Werner's answer)