2

Usually when inserting something that someone else says we would like to specially mark it and format it for example in forums you can use the [quote][/quote] bbcode formating or even using the markdown's \>.

In my tex example:

\documentclass[a4paper,25pt]{report}
\usepackage[a4paper,footskip=0.25in]{geometry}

\usepackage{makeidx}
\usepackage{polyglossia}
\usepackage{csquotes}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{libertine}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{url}

% Uncomment it and uncomment any \lipsum notation as well.
% Afterwards build and see how beautifull result is displayed
\usepackage{lipsum}


\usepackage[backend=bibtex, bibstyle=numeric, citestyle=numeric-comp, sorting=none]{biblatex}
\bibliography{./material.bib}

\usepackage[pdfauthor={"Dimitrios Desyllas, Ioannis anagnostou"},
    pdftitle={"Setting up a LoRa IoT communication using LoRaWAN"},
    pdfsubject={"iot"},
    pdfkeywords={"privacy by design, privacy, howto, technologies, legal requirements"},
    hidelinks
]{hyperref}

\setdefaultlanguage{english}
\setotherlanguages{greek}

\setmainfont{Liberation Serif}
\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
\newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O}
\setmainfont[Kerning=On,Mapping=tex-text]{Linux Libertine O}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Univercity Of MOE OTAKUS}
\fancyhead[R]{Legion on Otakus \& Weabos}


\title{Motteke Seifuku}
\date{Univercity of Moe Otakus - 2018}
\author{Dimitrios Desyllas (Nekomimi1233)}

\begin{document}
    \maketitle
    \tableofcontents

    \chapter{Introduction}
        \lipsum[1-20]

    \chapter{Motteke Seifuku}
        \section{Seifukus Rocks!!!}
        \subsection{Generic information}
          This is a nice list \cite{US7791415B2}
        \begin{enumerate}
            \item Seifuku are awesome
            \item Watashiwaravuseifuku
            \item whatecer I want
        \end{enumerate}

    Also someone special \cite{US7791415B2} said:

    "Seifukus are the quide to the future"
    - Someone Special

    \lipsum[5-9]


        \subsection{Frequencies of seing seifuku}
    \lipsum[5-9]

        \section{Lorem Ipsum}
        \lipsum[1-20]

    \chapter{Implementation of Lorem Ispum}
        \section{Introduction}
        \lipsum[1-8]
        \section{Materials Used}
        \lipsum[5-10]
        \section{Projects Implemented}
        \lipsum[7-13]
    \printbibliography
\end{document}

I would like to be able to mark the section:

"Seifukus are the quide to the future"
- Someone Special

In my text like:

\begin[from=Someone Special]{quote}
Seifukus are the quide to the future
\end{quote}

And somehow to apply special formating. How I can make it possible?

  • 1
    Maybe the epigraph package is what you're looking for? – Bernard Apr 7 '18 at 14:13
  • 1
    There is a quote environment in LaTeX (though it doesn't add the source that way, you could do \end{quote}~\hfill-- Someone Special\par or something like that. – Skillmon Apr 7 '18 at 14:33
  • 1
    Probably a good idea to have a look at csquotes as well. – Paul Stanley Apr 7 '18 at 15:41
3

A very basic version of quote which takes the quoted person as argument. Further customize the environment to get the formatting you want.

\documentclass[]{article}

\usepackage{duckuments}
\newenvironment{quoted}[1]
  {%
    \def\quoteFrom{#1}%
    \begin{quote}%
  }
  {%
    \hbox to \textwidth{\hfill -- \quoteFrom}%
    \end{quote}%
  }

\begin{document}
\blindduck[-]
\begin{quoted}{A famous eye ducktor}
  \blindduck[-]
\end{quoted}
\blindduck[-]
\end{document}

enter image description here

2

btw, you got a messy preamble. Take care of your preamble or it will eventually turn it's back on you.


From a similar question's answer by Gonzalo Medina, I use the following in my documents:

%% compile with Xe- or LuaLaTeX

\documentclass[a4paper]{report}

% ------------------------------------------------------------------------ FONTS
\usepackage{fontspec}
\setmainfont{Libertinus Serif}

% --------------------------------------------------------------------- LANGUAGE
\usepackage{polyglossia}
\setdefaultlanguage{english}

% ----------------------------------------------------------------------- QUOTES
\usepackage{csquotes}
\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
        \hbox{}\nobreak\hfil(#1)% <-- edit this to change the looks of the author to e.g. "...\hfil - #1%" to get a similar output as in Skillmon's example (also, the %-sign needs to be there!)
        \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{signquote}[1]
{\savebox\mybox{#1}\begin{quote}}
    {\signed{\usebox\mybox}\end{quote}}

% ----------------------------------------------------------------------- LIPSUM
\usepackage{duckuments}

\begin{document}

Someone special said a one-liner:

\begin{signquote}{Someone Special}
    Seifukus are the quide to the future.
\end{signquote}

If there is enough space, the name will not be moved to the next line, which I find appealing.

\begin{signquote}{A famous eye ducktor}
    \blindduck[2]
\end{signquote}

\begin{signquote}{A famous eye ducktor}
    \blindduck[3] 
\end{signquote}

Works with haiku, too. If the name it too long, please find a quote from another author with a shorter name.

\begin{signquote}{A famous limerickorice}
    There was a young fisher named fisher, \\
    who fished for a fish in a fissure. \\
    The fish, with a grin, pulled the fisherman in, \\
    now, they're fishing the fissure for fisher.
\end{signquote}

\begin{signquote}{A man from Japan}
    There was a young man from Japan \\
    Whose limericks never would scan. \\
    When asked why that was, \\
    He replied "It's because \\
    I always try to cram as many words into the last line as I possibly can.
\end{signquote}

\begin{signquote}{You shouldn't quote people with very long names. They tend to say very long things and don't break nicely.}
     There was a young lady of Riga \\
    Who smiled as she rode on a tiger; \\
    They returned from the ride \\
    With the lady inside, \\
    And the smile on the face of the tiger.
\end{signquote}

\end{document}

screenshot of compiled document

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.