Generalflushright without a new paragraph being created

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
eule
Posts: 3
Joined: Thu Sep 25, 2008 11:04 am

flushright without a new paragraph being created

Post by eule »

hi everyone,

i have the following problem. In my document I create definitons of certain things as following:

Code: Select all

\par
\begingroup
\leftskip=1cm % ggf. verstellen
\rightskip=1cm 
\noindent \textit{"Multimodal interaction systems process combined natural input modes - such as 
speech, pen, touch, hand gestures, eye gaze, and head and body movements - in 
a coordinated manner with multimedia system output."}
\begin{flushright} \citep[p. 74, p. 1]{myths, oviatthandbook}\\ \end{flushright}
\par
\endgroup
However, as I use flushright to align the citation right, a new paragraph gets greated (as far as I understood). this creates an extra line between the definition and the citation. I already tried raggedright, but I does not work at all and the citation ends up at the left side. That's why I am using flushright, which works fine, except for the extra line between the definition and the citation.

Does anybody know a way to correct this or has a better solution? I would really appreciate it...

thanks in advance!

Eule

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

flushright without a new paragraph being created

Post by Stefan Kottwitz »

Hi Eule,

try

Code: Select all

\par\hspace*{\fill}\citep...
or \\ instead of \par.

Stefan
LaTeX.org admin
eule
Posts: 3
Joined: Thu Sep 25, 2008 11:04 am

Re: flushright without a new paragraph being created

Post by eule »

thanks! that did the job! works perfectly!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

flushright without a new paragraph being created

Post by localghost »

I may add a solution with a new environment and a new command.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{txfonts}

\parindent0em

\newcommand{\signed}[1]{%
  \unskip\hspace*{1em plus 1fill}%
  \nolinebreak[3]\hspace*{\fill}\mbox{\upshape #1}
}

\newenvironment{xquote}{%
  \begin{list}{}{%
    \rightmargin
    \leftmargin
  }
  \itshape
  \item[]
}
{\end{list}}

\begin{document}
  \begin{xquote}
    "Multimodal interaction systems process combined natural input modes - such as speech, pen, touch, hand gestures, eye gaze, and head and body movements - in a coordinated manner with multimedia system output."\signed{\cite[p. 74, p. 1]{myths, oviatthandbook}}
  \end{xquote}
\end{document}
The new \signed command has been derived from an example given in the (german) book "LaTeX Hacks".


Best regards
Thorsten¹
Post Reply