Hallo ihr Lieben!

Ich habe folgenden Quelltext. Der Urheber des Zitatboxquelltextes ist Stackexchangenutzer Loop Space. Der Quelltext wurde am 14. September 2011 um 11:42 erstellt.

Open in Online-Editor
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[T1]{fontenc}

%Source: Stackexchange user Loop Space, September 14 '11 at 11:42
%Quotation
\thispagestyle{empty}% for cropping
\usepackage{microtype}
\usepackage{tikz}
\usetikzlibrary{backgrounds}%background
\thispagestyle{empty}
\makeatletter
\tikzset{%
  fancy quotes/.style={
    text width=\fq@width pt,
    align=justify,
    inner sep=1em,
    anchor=north west,
    minimum width=\textwidth,
  },
  fancy quotes width/.initial={.8\textwidth},
  fancy quotes marks/.style={
    scale=8,
    text=white,
    inner sep=0pt,
  },
  fancy quotes opening/.style={
    fancy quotes marks,
  },
  fancy quotes closing/.style={
    fancy quotes marks,
  },
  fancy quotes background/.style={
    show background rectangle,
    inner frame xsep=0pt,
    background rectangle/.style={
      fill=gray!25,
      rounded corners,
    },
  }
}

\newenvironment{fancyquotes}[1][]{%
\noindent
\tikzpicture[fancy quotes background]
\node[fancy quotes opening,anchor=north west] (fq@ul) at (0,0) {``};
\tikz@scan@one@point\pgfutil@firstofone(fq@ul.east)
\pgfmathsetmacro{\fq@width}{\textwidth - 2*\pgf@x}
\node[fancy quotes,#1] (fq@txt) at (fq@ul.north west) \bgroup}
{\egroup;
\node[overlay,fancy quotes closing,anchor=east] at (fq@txt.south east) {''};
\endtikzpicture}
\makeatother

\begin{document}
\twocolumn
\begin{fancyquotes}
Hier ist mein Zitat.
\end{fancyquotes}
\end{document}

Wie beschränke ich die Zitatbox mitsamt Text auf eine Kolonne in einer zweisäulen Umgebung?

Viele liebe Grüße und ein Dankeschön für eure Hilfe!

gefragt 13 Feb '15, 17:27

Basilius%20Sapientia's gravatar image

Basilius Sap...
510143442
Akzeptiert-Rate: 33%

bearbeitet 13 Feb '15, 18:20

Johannes's gravatar image

Johannes
7.3k294566

s/textwidth/columnwidth/g

(13 Feb '15, 17:43) Johannes

Danke an Johannes für die Antwort. Es hat prima funktioniert. Einfach textwidth mit columnwidth ersetzen. Hier dann der fertige Zitatblockquelltext:

Open in Online-Editor
\thispagestyle{empty}% for cropping
\usepackage{microtype}
\usepackage{tikz}
\usetikzlibrary{backgrounds}%background
\thispagestyle{empty}
\makeatletter
\tikzset{%
  fancy quotes/.style={
    text width=\fq@width pt,
    align=justify,
    inner sep=1em,
    anchor=north west,
    minimum width=\columnwidth,
  },
  fancy quotes width/.initial={.8\columnwidth},
  fancy quotes marks/.style={
    scale=8,
    text=white,
    inner sep=0pt,
  },
  fancy quotes opening/.style={
    fancy quotes marks,
  },
  fancy quotes closing/.style={
    fancy quotes marks,
  },
  fancy quotes background/.style={
    show background rectangle,
    inner frame xsep=0pt,
    background rectangle/.style={
      fill=gray!25,
      rounded corners,
    },
  }
}

\newenvironment{fancyquotes}[1][]{%
\noindent
\tikzpicture[fancy quotes background]
\node[fancy quotes opening,anchor=north west] (fq@ul) at (0,0) {``};
\tikz@scan@one@point\pgfutil@firstofone(fq@ul.east)
\pgfmathsetmacro{\fq@width}{\columnwidth - 2*\pgf@x}
\node[fancy quotes,#1] (fq@txt) at (fq@ul.north west) \bgroup}
{\egroup;
\node[overlay,fancy quotes closing,anchor=east] at (fq@txt.south east) {''};
\endtikzpicture}
\makeatother
Permanenter link

beantwortet 13 Feb '15, 18:21

Basilius%20Sapientia's gravatar image

Basilius Sap...
510143442
Akzeptiert-Rate: 33%

bearbeitet 13 Feb '15, 18:21

1
(13 Feb '15, 19:53) cgnieder

Es ist tatsächlich ein häufiger Fehler \textwidth zu verwenden, wo nach genauerem Hinsehen eigentlich \columnwidth oder sogar \linewidth besser wäre.

(14 Feb '15, 13:37) saputello
Deine Antwort
Vorschau umschalten

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Markdown-Grundlagen

  • *kursiv* oder _kursiv_
  • **Fett** oder __Fett__
  • Link:[Text](http://url.com/ "Titel")
  • Bild?![alt Text](/path/img.jpg "Titel")
  • nummerierte Liste: 1. Foo 2. Bar
  • zum Hinzufügen ein Zeilenumbruchs fügen Sie einfach zwei Leerzeichen an die Stelle an der die neue Linie sein soll.
  • grundlegende HTML-Tags werden ebenfalls unterstützt

Frage-Themen:

×728
×25

gestellte Frage: 13 Feb '15, 17:27

Frage wurde gesehen: 8,389 Mal

zuletzt geändert: 14 Feb '15, 13:38