# Is there an easy way to use two different sets of options for an environment?

I need to use the two quotation styles shown below (the first paragraph is the normal text):

To this end, I am currently using the following code:

\documentclass[a4paper]{article}

\usepackage{lipsum}
\usepackage{quoting}

\begin{document}

\lipsum[1]

\begin{quoting}[indentfirst=false,font={itshape},leftmargin=3cm,rightmargin=\rightmargin]
\lipsum[1]
\end{quoting}

\begin{quoting}[indentfirst=false,leftmargin=1.5cm,rightmargin=\rightmargin]
\lipsum[1]
\end{quoting}
\end{document}


With my current code, I'll have to repeat informing the options

[indentfirst=false,font={itshape},leftmargin=3cm,rightmargin=\rightmargin]


and

[indentfirst=false,leftmargin=1.5cm,rightmargin=\rightmargin]


and I can't help but think there is an easier and more consistent way of accomplishing this.

Is there a way to obtain this? Is there a correct way of doing this in LaTeX?

• It might also be possible to change the defaults, although I would have to look more closely at quoting to get an idea how difficult it would be. – John Kormylo Apr 27 '19 at 22:07

Define new environments (named as you wish):

\documentclass[a4paper]{article}

\usepackage{lipsum}
\usepackage{quoting}

\newenvironment{myquoteA}{\begin{quoting}[indentfirst=false,font={itshape},leftmargin=3cm,rightmargin=\rightmargin]}{\end{quoting}}
\newenvironment{myquoteB}{\begin{quoting}[indentfirst=false,leftmargin=1.5cm,rightmargin=\rightmargin]}{\end{quoting}}
\begin{document}

\lipsum[1]

\begin{quoting}[indentfirst=false,font={itshape},leftmargin=3cm,rightmargin=\rightmargin]
\lipsum[1]
\end{quoting}

\begin{quoting}[indentfirst=false,leftmargin=1.5cm,rightmargin=\rightmargin]
\lipsum[1]
\end{quoting}

\begin{myquoteA}
\lipsum[1]
\end{myquoteA}

\begin{myquoteB}
\lipsum[1]
\end{myquoteB}
\end{document}


• That solved my problem, thank you very much. I cannot upvote yet because of low reputation, or else I would – Rafael B Apr 27 '19 at 15:12
• @RafaelBeirigo, welcome to TEX.SE. – Sigur Apr 27 '19 at 15:14