Hot answers tagged

83

Here is an example using the csquotes package. It defines some new powerful commands for quoting, most notably the commands \enquote, \textquote, \blockquote and \foreignquote. \foreignquote together with babel allows to define foreign quotes. The correct punctuation will automatically be used. \textquote and \blockquote allow a citation as optional ...


63

As far as I can tell, your question is really about how to quote material -- either inline, with other text, or as a block quote. The fact that the material to be quoted comes from a specific cited source is peripheral to the issue, I believe. To quote a fairly short string -- whether a single word, a few words, or an entire sentence -- inline, you just ...


43

I wrote a package pullquote which allows to create circular as well as rectangular inserts. See Two-column text with circular insert.


28

Standard LaTeX provides the quote (no inner indentation, intended for short quotations) and quotation (inner indentation, intended for longer quotations) environments: \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[4] \begin{quote} \lipsum[4] \end{quote} \lipsum[4] \begin{quotation} \lipsum[2]\lipsum[4] \end{quotation} \end{document}...


26

An adaptation of a piece of code found on line but I do not remember where exactly. \documentclass[11pt]{book} %%%%******************************************************************** \usepackage{microtype} \usepackage{times} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{xcolor} \usepackage{lipsum} %%%%*******...


26

Here's an example: \documentclass{article} \usepackage[T1,OT1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[finnish]{babel} \begin{document} «» \fontencoding{T1}\selectfont «» \end{document} As you can see, the first line has really \ll and \gg, as the guillemets aren't available in the OT1 encoding. In the second line we use a T1-encoded font, ...


24

Old question, but it was the first to come up on my google search. If anyone is still looking, the \textelp{} command from the csquotes package provides exactly the functionality requested: \documentclass{article} \usepackage{csquotes} \begin{document} \enquote{The csquotes package provides elipses, \textelp{} as well as smart quoting.} \end{document}


24

Assuming you use the setspace package and the instruction \onehalfspacing to modify the line spacing of the document, you may achieve your objective by including the following instructions in the preamble: \usepackage{etoolbox} \AtBeginEnvironment{quote}{\singlespacing\small} In the document classes I'm familiar with, if the main document font size is 12pt,...


23

Define a new quote style and add appropriate level tests for the outer quotation marks: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[maxlevel=3]{csquotes} \makeatletter \DeclareQuoteStyle{threelevel} {\ifnum\csq@qlevel<2 \guillemotleft\else\textquotedblleft\fi}% opening outer mark {\ifnum\csq@...


22

I took Gonzalo Medina's second solution in his answer to "Inspirational" quote at start of chapter and changed the following: Instead of using the memoir class, the epigraph package (from memoirs author) is loaded; \epigraphfontsize is replaced with \epigraphsize; The etoolbox package is used to patch the internal \@epitext command so that \...


21

I'm not quite sure what's ›correct‹ and ›incorrect‹ in your perspective, or what exactly you find problematic with the result you're currently getting. Maybe a minimal example would be helpful. Here's what I do, and what has always (i.e., for about 5 years now) given me output that's correct by my standards. Over time, I've reduced the number of different ...


20

Your method, {}\hspace{-5pt}{``}, is clumsy insofar as you have to guess at the actual width of the leading quotes ``. A way to avoid that calculation is with the macro \makebox[0pt][r]{``} which places a right-aligned box of zero-width, effectively lapping the text to the left. As you see, however, it doesn't save much typing. So one way to deal with ...


18

You can define your own macro for this: \newcommand{\omissis}{[\dots\unkern]} or use the \textelp{} macro from csquotes. Note that \textelp is a macro taking an argument, so the {} after it is mandatory in order to get [...]. A different possibility is to add the kerning also in front of the dots: \newcommand{\somissis}{[\,\dots]} Here'a a minimal ...


17

The command \quote doesn't officially exist: it's there only because the quote environment uses it internally: Some text to have something to say and to start quoting a very famous sentence \begin{quote} Don't use footnotes in your books, Don. \end{quote} which is a very good recommendation.


17

Your analysis is correct. A couple of years ago, the pdftex team has been discussing whether pdftex should indeed try harder. No clear conclusion transpired except that it would probably be too difficult to get it right in all cases, hence the issue was postponed for later consideration ... maybe too late for pdftex now, and to be passed on to luatex. ...


16

if i remember correctly, this is one of the rationales for knuth's definition of \llap; this has been carried over into latex. it really needs to be used only in horizontal mode, so you should ensure that by using \noindent at the beginning of your quoted paragraph: \begin{quote} \noindent\llap{``}Lord Bacon, in 'the true marshalling ...


16

Well if you literally want to replicate what Knuth did, you could use the same macros. The macros he used/uses for The Art of Computer Programming (TAOCP) are available as taocpmac.tex, and the relevant ones for the examples in the question are \quoteformat and \author. Download taocpmac.tex, comment out the \input figdir.local line at the top (or create a ...


15

In both \mktextquote and \mkblockquote, add \iflanguage{english}{\itshape}{} at the appropriate position. (\iflanguage is a babel conditional.) \documentclass[fontsize=11pt]{book} \usepackage[frenchb]{babel} \usepackage{csquotes} \renewcommand{\mktextquote}[6]{% #1% \iflanguage{english}{\itshape}{}% ADDED #2#4#3#6#5% } \renewcommand{\...


15

And if you want to do yourself something very basic, just define a new command: \documentclass{book} \newcommand{\chapquote}[3]{\begin{quotation} \textit{#1} \end{quotation} \begin{flushright} - #2, \textit{#3}\end{flushright} } \begin{document} \chapter{First Chapter} \chapquote{``Begin at the beginning,¨ the King said gravely, ``and go on till you come ...


15

Mico and Barbara Beeton have already commented that using -- as appropriate -- double quotes (``/ '') or single quotes (`/') for quotes with typographic meaning will resolve your error. And Andrew Swann has suggested to use commands like \enquote from the csquotes package for marking quotes within .bib files. I'll add that for users of biblatex there's ...


15

You can load the package etoolbox and add the line \AtBeginEnvironment{quote}{\itshape} to your preamble. In this way, each time a quote environment starts, the italic shape is selected. \documentclass{article} \usepackage{etoolbox} \AtBeginEnvironment{quote}{\itshape} \begin{document} Hello \begin{quote} aaa bbb \end{quote} Hello again \end{...


14

I don't think picking up just on brace groups is viable, there are too many braces in a TeX document. I used \q{...} here. After clarification in chat and comments, a version with named references. orig.tex \documentclass{article} \usepackage{qting} %% orig.tex \begin{document} Here is some text. \q{aa}{This is some text I want to quote.} Here is yet ...


14

Also for completeness, please refer to the attrib package. You can approximate the effect you want with the following: \begin{quote} We call a disposition the arrangement of that which has parts, in respect either of place or of capacity or of kind; for there must be a certain position, as the word ‘disposition’ shows. \attrib{{\em Metaphysics} {\...


13

Please always post complete documents showing the class used. In the standard classes the caption is set twice once as a single line to see if it fits, and then as a paragraph if not, the single line trial generates the error if you use a display environment. You can turn this off with the caption package: \documentclass{article} \usepackage{caption} \...


13

In addition to Steven Segletes' answer, you might (in terms of interface) consider using the csquotes package, which provides various hooks to produce an automatic environment for displaying quotes. The potential benefit of this is that it avoids the need to add \andIquote at the start of any quotation: assuming you want all quotations styled this way, it ...


12

Direct \newcommand The easiest answer is \newcommand: \documentclass{article} \newcommand*{\textrepi}{This text will be shown in several places} \newcommand*{\Lorem}{Lorem ipsum} \begin{document} \Lorem \textrepi lorem lorem. (!) \Lorem\ \textrepi\ lorem lorem. \Lorem{} \textrepi{} lorem lorem. \end{document} As you can see in the first line the ...


11

I just want to add for completeness that the memoir package provides the \sourceatright[⟨length⟩]{⟨text⟩} command, which can be used immediately after a quote or quotation environment and does what the question asks.


11

Here is a proposal, using some low level commands. The text is typeset in a \vtop and its depth is used to place the opening quotes, while the closing quotes will be level with the top line (with some lowering due to size). Thanks to Jake, I've been able to solve a mystery that bugged me, about a spacing that seems necessary and is due to the inner sep of ...


11

You do not need a figure environment to use \includegraphics. To place the image on the left and quote on the right, you can use for example beamers columns, or a normal tabular. Both are demonstrated below. By default a p column has justified text. By adding \raggedright\arraybackslash at the beginning of the cell, the text is set with left justification ...


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