1

I am currently trying to typeset Mario Pieri's 1900 paper Point and Motion, and have run into difficulties replicating the format of the original paper.

Pieri uses an old style of quotation, where if the quote continues onto the next line, the open quotation mark is repeated at the beginning of each line, until the quotation is complete.

There is code for this in this answer, which appears to create a new environment in which the quoting convention takes place. But I'm having trouble adapting it.

The first issue is that if there is a footnote within the environment, latex gets "stuck" in an endless loop when rendering the pdf, and no output is ever produced.

The second issue is that I would like the page breaks in my document to roughly correspond to the page breaks in the original document. But inserting a page break in the above defined environment causes the first line of the quotation to be misaligned.

Here is a minimum (non)working example of the latex code with the footnote issue. The code with the misaligned first line is the same, but with the footnote removed. Any help on this would be greatly appreciated!

\documentclass[twoside,english,egregdoesnotlikesansseriftitles, hyperfootnotes=false]{extarticle}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=4cm,bmargin=4cm,lmargin=11.5em,rmargin=11.5em}
\usepackage{babel}
\usepackage{float}
\usepackage{units}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage[unicode=true,pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\newlength{\lyxlabelwidth}      % auxiliary length 
\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}[section]
\theoremstyle{plain}
\newtheorem{prop}[thm]{\protect\propositionname}

\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[notquote]{hanging}      %Hanging paragraphs; option prevents choking on apostrophes.
\usepackage{scrextend}      %Indent entire paragraphs, left or right.

\usepackage{titling}
    \setlength{\droptitle}{-18ex} 


% Create an environment for an old quoting style
% where if the quote continues onto the next line,
% the open quotation mark is repeated
% at the beginning of each line,
% until the quotation is complete.

\makeatletter
\def\lastlinelength{
{\abovedisplayshortskip\z@\abovedisplayskip\z@
    \belowdisplayshortskip\z@\belowdisplayskip\z@
$$\global\dimen\@ne\dimexpr\predisplaysize-2em\relax
 \xdef\tmp{
      \predisplaysize\the\predisplaysize
      \prevgraf\the\prevgraf\relax}
$$\vskip\dimexpr-\parskip-\baselineskip\relax}\tmp}
\makeatother

% The code for the start of  environment
\def\contiq#1{ \textquotedblleft%
\lastlinelength
% save the depth of the previous line (Normally
% TeX uses this automatically but would lose the
% informatiom due to the boxing/reboxing)
\dimen0\prevdepth
% Save the prefix text from `#1` in box 0.
% In this version make it red, probably real code
% should not do that and should just have `#1` you
% could always add colour or font changes in the argument.
\setbox0\hbox{\textquotedblleft\space }%
% start saving the paragraph in box 2
\setbox2\vbox\bgroup\bgroup\vskip94sp
% by resetting the prevdepth to the saved value
% Tex will automatically insert glue to maintain even spacing
% before the first line.
\prevdepth\dimen0
% Reduce the width for line breaking by the width of box 0 to allow for
% the insertion of the prefix string later.
\advance\hsize-\wd0 
% end of begin environment code
\noindent\vadjust{\penalty123}\kern\dimen1 #1%
% close off the saving of box 2 started above.
\endgraf\egroup\egroup
% So at those point box 2 contains the body of the environment
% with lines broken to a short line length.
%
% Clear box 1 ready to start collecting the modified lines
\global\setbox1\vbox{}%
% Use unbox box2 (onto itself)
\setbox2\vbox{%
\unvbox2
\global\setbox5\lastbox
\unskip
% at this point we are at the end of box 2 now
% loop backwards up the vertical list copying glue and penalties
% but modifying boxes to add the prefix.
\loop
%
% an e-tex primitive that reports the last item in the vertical list.
% type 1 is a box, so remove the box (a line of text) and then
% put into box 1 a box that is this box together with the prefix which
% was saved in box 0
\ifnum\lastnodetype=1
\global\setbox3\lastbox
\global\setbox1\vbox{%
\hbox{\copy0\box3}%
\unvbox1}%
\fi
%
% type 11 is glue so remove it from this list and add
% equivalent glue to box 1
\ifnum\lastnodetype=11
\skip0\lastskip\unskip
\global\setbox1\vbox{\vskip\skip0\unvbox1}%
\fi
%
% same for penalty
\ifnum\lastnodetype=13
\count0\lastpenalty\unpenalty
\ifnum\count0=123
\setbox0\hbox{}%
\else
\global\setbox1\vbox{\penalty\count0 \unvbox1}%
\fi
\fi
%
% other node types are not handled here: either they won't happen
% or they can't be removed anyway so would break the loop \special
% for example would be bad.
%
% -1 means the vertical list is empty: we have reached the top of the box.
\ifnum\lastnodetype=-1
\else
\repeat}%
% Tip the modified box back onto the main list for the page, unbox
% it so that page breaking may still happen (if it could happen in the
% original context).
\vskip-\baselineskip
\unvbox1
\noindent \textquotedblleft\space \unhbox5\unskip\unskip\ \quotedblbase
}

%Prevents a margin error with the geometry package
\geometry{nomarginpar}

\makeatother

\providecommand{\propositionname}{Proposition}
\providecommand{\theoremname}{Theorem}

\begin{document}

\section{Ribaltamento di una retta in sè medesima. Centro d'una coppia di punti. Ribaltamento d'un piano sopra sè stesso. Relazione d'ortogonalità fra tre punti, o fra due rette incidenti.}

\subsection*{POSTULATO X°.}
\begin{prop}
\textbf{Se $a$ e $b$ sono punti non coincidenti, esiste un moto che rappresenta in sè stesso $a$, e dà per immagine a è un qualche punto diverso dai, ma appartenente ad $ab$}. --- Un tal moto è certamente proprio (P6 § 1) e rappresenta la retta $ab$ su sè stessa (P17 §1), in maniera che, salvo $a$, nessun altro punto di $ab$ corrisponde a sè stesso (P15 § 1). E in grazia a P28 § 1, il mede simo principio si riproduce tal quale (benché sotto altra veste) nella proposizione: \textquotedblleft ~Ogni volta che $a$ e $b$ siano punti l'un l'altro distinti, la sfera di $b$ intorno ad $a$ e la congiungente $a$ con $b$ s'incontreranno eziandio in qualche punto diverso da $b$~\quotedblbase . Ved. P13, 29 § 1.
\end{prop}


\subsection*{POSTULATO XI°.}
\begin{prop}
\textbf{Dal supposto che $a$, $b$ siano punti l'un l'altro distinti e che $\mu$, $\nu$ siano moti, per ciascuno dei quali $a$ resti in quiete, e $b$ si traduca in un punto diverso da $b$ ma appartenente ad $ab$, si dedurrà che le immagini di $b$ secondo $\mu$ e $\nu$ coincidono}. --- Ovvero, che è lo stesso: \textquotedblleft ~se $a$ e $b$ sono punti distinti, la congiungente $a$ con $b$ e la sfera $b$ centro $a$ non potranno sicuramente incontrarsi in piìi che due punti distinti~\quotedblbase .
\end{prop}

\contiq{ Essendo $a$ e $b$ punti distinti, la locuzione \textquotedblleft \emph{simmetrico di $b$ rispetto ad $a$}'' --- simbolizzata in \textquotedblleft $\nicefrac{b}{a}$'' --- vien posta a significare quel punto, che giace ad un tempo sulla retta $ab$ e sulla sfera $b_{a}$, ma ch'è diverso da $b$. \footnote{Qui come appresso (dove non si nascondono equivoci) si parlerà di più punti coincidenti come di un unico punto; conforme all'uso dei più. Meglio sarebbe il dire ad es.: \textquotedblleft quel punto che insieme con tutti gli eguali, costituisce la classe degli $ab\smallfrown b_{a}$ diversi da $b$''.} Ved. P1, 2. --- Se all' opposto i punti $a$ e $b$ coincidono, la detta frase è per denotare il punto $b$: cosicché $\nicefrac{a}{b}\equiv a$.}--- Si osservi che da $b'=\nicefrac{b}{a}$, si deduce $b=\nicefrac{b'}{a}$, qualunque sian questi punti $a$ e $b$ (P4, 30 § 1); e che, se $b\sim=a$ , i punti $b$ e $\nicefrac{b}{a}$ sono sempre distinti fra loro (P29 § 1).

\contiq{ Se, come dianzi, $a$ e $b$ sono punti distinti, u sia un moto che rappresenti $a$ con sè stesso e $b$ con un punto $b'$ di $ab$; si conclude che alla sua volta $b'$ sarà \pagebreak tradotto in $b$ da quel moto.} {[}Se $b'=b$ non occorron parole. --- Se $b'\sim=b$, sia $b"=\mu b'$. Sarà $b"$ un $ab$ diverso da $b'$, poscia che $\mu\left(ab\right)=ab'=ab$ (P17,19 § 1), e che sulla ab nessun punto è tautologo, fatta eccezione di $a$ (P15 §1). Dunque in ordine ai moti $\mu$ e $\overline{\mu}$ (P4 § l) si può allegare il pstl. XI°, secondo il quale dovranno coincidere i punti $\mu b'$ e $\overline{\mu}b'$, cioè $b"$ e $b$.{]}
\end{document}

1 Answer 1

1

Not an answer. Just an illustration.

The lineno package might be worth a look: it can attach anything to the ends of lines. It appears to work on paragraphs (when lines are formed).

quotes

MWE

\documentclass{article}
\usepackage[pagewise]{lineno}
\usepackage{lipsum}

\begin{document}

\noindent Example:

\begin{runninglinenumbers} 
\renewcommand\makeLineNumber 
{\hss\textquotedblleft\ \rlap{\hskip\textwidth\ \textquotedblright}} 
\lipsum[1]
\par\lipsum[1]
\end{runninglinenumbers}

This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. \begin{numquote}
\renewcommand\makeLineNumber 
{\hspace{2em}\textquoteleft\ \rlap{\hskip\textwidth\hspace{-5em}\ \textquoteright}} 
 This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. 

This is some text. This is some text. This is some text. This is some text. This is some text. \end{numquote} This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. 


\renewcommand\makeLineNumber 
{\hss\textbraceleft\ \rlap{\hskip\textwidth\ \textbraceright}} 

This is some text. This is some text. This is some text. This is some text. This is some text. \linenumbers This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some 

This is some text. This is some text. This is some text. This is some text. This is some text.  This is some text. \nolinenumbers This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some 
\end{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.