XeTeXQuotation with author name witouth breakpages

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
max_mad666
Posts: 12
Joined: Thu Sep 08, 2011 4:04 pm

Quotation with author name witouth breakpages

Post by max_mad666 »

Hello it's me again ;)

On the web I've find this macro in order to get quotation and autor name. And in addition the autor name will not be cut from the citation if the citation is at the end of a page.

This is the macro.

Code: Select all

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil(#1)%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quotation}}
  {\signed{\usebox\mybox}\end{quotation}}
And this is how to use it in a document :

Code: Select all

\begin{aquote}{Name Author to near from citation}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore  magna aliquyam erat, sed diam voluptua. At vero eos et accusam  et justo duo dolores et ea rebum. Stet clita kasd gubergren,  no sea takimata sanctus est Lorem ipsum dolor sit amet.  
\end{aquote}

\begin{aquote}{Other Name Author}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore  magna aliquyam erat, sed diam voluptua. At vero eos et accusam  et justo duo dolores et ea rebum. Stet clita kasd gubergren,  no sea takimata sanctus est Lorem ipsum dolor sit amet.  
\end{aquote}
What I just wish is to know how to get more space (I have no specific vertical size in cm but I just wish to get more space cuz now its really to near) between the author name and the citation itself. But again witouth cutting the author name from the citation... I've tried to change some number in the macro but it did not work...

P.-S. I m using xelatex that's why I've posted here...
Thank you
Attachments
Capture.PNG
Capture.PNG (70.76 KiB) Viewed 9535 times

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Quotation with author name witouth breakpages

Post by cgnieder »

Hi,

that \signed macro is almost 1:1 from the TeXbook…

How about this: change \signed to this one

Code: Select all

\def\signed#1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil\raise-3pt\hbox{(#1)}%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}
and leave the rest as is was.

Regards
site moderator & package author
max_mad666
Posts: 12
Joined: Thu Sep 08, 2011 4:04 pm

Re: Quotation with author name witouth breakpages

Post by max_mad666 »

@cgnieder Thank you a lot it works like a charm
Post Reply