## LaTeX forum ⇒ Text Formatting ⇒ csquotes: displayquote with and without quotation marks Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
SonnenAnlieger
Posts: 4
Joined: Thu Feb 26, 2015 10:58 am

### csquotes: displayquote with and without quotation marks

Hi there,

I am working on my German PhD in law. I found out that the package csquotes is perfect for citations and quotes. The only problem I am facing is that I need two environments for "displayquote". One with guillemets as quotation marks and one without any quotation marks. The latter one is for citing law texts.

This is what I got so far:


So I defined three new environments called zitat, zitatc and gzitat of displayquote. The last one should be the one without quotation marks.

Can anyone help me on this? Thank you!!

Tags:

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
Please be a bit more verbose on your requirements, what should be printed where and how. Let us take care of the implementation. Right now, you have 3 quote environments, and i have no idea what they shall do, which one is to cite laws (g for Gesetz?).

Please be aware, that \small is a font switch, not an environment. Since you are writing in german, a link to our german partner site TeXwelt. Feel free to ask there as well.
Wieso kann ich Schriftauszeichnungen nicht als Umgebung nutzen?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

SonnenAnlieger
Posts: 4
Joined: Thu Feb 26, 2015 10:58 am
Ok, I'll try to be more precise. In my paper I mostly have to quote citations and legal text. For the legal text I do not need any quotation marks. As a fact I would like to have none. The other quotes should have quotations marks no matter which kind of.

And I want to use this environment \begin{displayquote}<Quote>\end{displayquote} to make it easier for me to distinguish between normal text and quotes.

So I thought of defining two different environments called "zitat" and "gzitat". The latter should be without quotation marks as it should quote legal text. The third of these environments is just an alias and is called "zitatc". I need this to link the quote to a bibtex entry.

All quotations should be smaller than the normale text. This is why I put the \small-Command in the new environments. I don't know if there is a better way for achieving this.

I used the commands

to get quotation marks to the displayquote-environment at all. But what I really need is one environment with and one without quotation marks.

I hope that helps you to understand my problem.

Thanks a lot!
Stefan

rais
Posts: 268
Joined: Sun Nov 16, 2014 8:51 pm
SonnenAnlieger wrote:And I want to use this environment \begin{displayquote}<Quote>\end{displayquote} to make it easier for me to distinguish between normal text and quotes.

So I thought of defining two different environments called "zitat" and "gzitat".

That may all be well, but how are the environment's arguments to be handled? According to the csquotes' documentation, \begin{displayquote} understands two optional arguments---for citation and final punctuation---but what about the arguments to your own environments? This:
SonnenAnlieger wrote:
\newenvironment{zitat}[2]{\begin{small}\begin{displayquote}#1#2 }{\end{displayquote} \end{small}}
defines a new environment zitat', that has two mandatory arguments, which are passed on to the internally called displayquote' environment---as (first part of its) body. Why bother?

SonnenAnlieger wrote:All quotations should be smaller than the normale text. This is why I put the \small-Command in the new environments.

\small is quite different from the shown \begin{small}...\end{small}. That's just one of the things: you didn't put a \small command into your new environments. You did put a not defined small' environment into your newenvironments.

You may be better off by providing a minimal working example that actually demonstrates the usage of your selfdefined environments.

KR
Rainer

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
rais wrote:You may be better off by providing a minimal working example that actually demonstrates the usage of your selfdefined environments.

I agree strongly. I have been trying to figure out what you want to do, on and off, for the last three hours.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

SonnenAnlieger
Posts: 4
Joined: Thu Feb 26, 2015 10:58 am
The mini example is here:
\documentclass[a4paper,10pt,fncontinued]{jurabook} \usepackage[utf8]{inputenc}\usepackage[ngerman]{babel}\usepackage[T1]{fontenc} \usepackage{graphicx}\graphicspath{ {pics/} } \usepackage{color} \usepackage{makeidx}\makeindex \usepackage[draft]{pdfpages} \usepackage{eurosym} \usepackage{parskip} \usepackage[normalem]{ulem} \usepackage{ifthen}\emergencystretch20pt\tolerance2000\usepackage{listings} \title{Cloud Computing}\author{Stefan}\date{05. Februar 2015} \usepackage[%backend=biber,%uniquename=true,%singletitle=true%sorting=nyvt,%sortcites=true,%maxnames=3,%idemtracker=constrict,% style=biblatex-juradiss,% ibidtracker=false,% datezeros=false,% date=short,%]{biblatex}  \usepackage[babel,german=guillemets]{csquotes} \bibliography{jura_bib} \begin{document} \begin{zitat}This is a quotation which should have quotation marks I define once in the preamble.\end{zitat} \begin{gzitat}§ 1232 WhatEver It is prohibited ...\end{gzitat} \end{document}

So the zitat-environment should look like this and have quotation marks:

"This is a quotation which should have quotation marks I define once in the preamble."

The gzitat-environment shoud look like this:
§ 1232 WhatEver

It is prohibited ...

I didn't know that I've used mandatory arguments in my environment. How can I use optional arguments?

In my opinion I should use two different environments for quotation of legal texts and literal quotation from other authors.

I hope that gives you an idea what I am looking for. Sorry I left not enough information for you.

Stefan

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
csquotes is for some kind of fancy quoting, you can combine it with biblatex to cite.

So, you can do:
\begin{gesetz}{bgb250}Text Paragraph 250 BGB\end{gesetz}

Text Paragraph 250 BGB                          BundesGesetzBuch Paragraph 250
Along with an entry in your bibliography. The same goes for normal quotes.

Above {bgb250} is the mandatory argument, you could use optional arguments as well. I could just code something up that you can use, but if you don't want all this fancy stuff, the usual quote environment from the LaTeX Kernel is more than enough.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
Please look at the following example and play around a bit.

\documentclass[a4paper,10pt,fncontinued]{jurabook} \usepackage[utf8]{inputenc}\usepackage[ngerman]{babel}\usepackage[T1]{fontenc} \usepackage{blindtext}\usepackage{url}\usepackage{parskip}\usepackage{xcolor}\usepackage{xparse} \usepackage[babel,german=guillemets]{csquotes}\usepackage[style=authoryear]{biblatex}\addbibresource{biblatex-examples.bib} \newenvironment{zitat}[2][]{%	\begin{displaycquote}[#1]{#2}%		\color{blue}\small	}{\end{displaycquote}} \NewDocumentEnvironment{gesetz}{ O{} }{	\begin{quote}\small\color{red}\textquotedblleft}{%		\IfValueT{#1}{\setlength{\parskip}{0pt}\par\hbox{}\hfill\cite{#1}}\textquotedblright\end{quote}\bigbreak} \begin{document}\begin{zitat}{aristotle:physics}\blindtext\end{zitat}\begin{zitat}[12]{companion}\blindtext\end{zitat}\blindtext\begin{gesetz}[westfahl:space]\blindtext\end{gesetz}\begin{displayquote}\color{green}\blindtext\end{displayquote}\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

SonnenAnlieger
Posts: 4
Joined: Thu Feb 26, 2015 10:58 am
I found a solution that fit my needs:

\newenvironmentx{zitat}[1][1]{%		\small%                \begin{displayquote}[{\textit{#1}}]\frqq}%		{\flqq\end{displayquote}} \newenvironmentx{zitatc}[3][1, 2]{%		\small%		\begin{displaycquote}[{#1}][{#2}]{#3}\frqq}%		{\flqq\end{displaycquote}} \newenvironmentx{gzitat}[1][1]{%		\small%         \begin{displayquote}[{\textit{#1}}]}%         {\end{displayquote}}`

Thanks a lot for your help!!

Stefan Kottwitz
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum,

and thanks for posting the solution which you are now using! That's good practice, so further reader coming in via google would found a good solution.

Good luck with your PhD! If you would encounter any LaTeX challenge, let us know. Either here, or in our German partner forum.

Stefan