texlive[64812] Master/texmf-dist: luaquotes (25oct22)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 25 22:14:37 CEST 2022


Revision: 64812
          http://tug.org/svn/texlive?view=revision&revision=64812
Author:   karl
Date:     2022-10-25 22:14:37 +0200 (Tue, 25 Oct 2022)
Log Message:
-----------
luaquotes (25oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/luaquotes/README
    trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.pdf
    trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.tex
    trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/luaquotes/README
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luaquotes/README	2022-10-25 20:14:24 UTC (rev 64811)
+++ trunk/Master/texmf-dist/doc/lualatex/luaquotes/README	2022-10-25 20:14:37 UTC (rev 64812)
@@ -1,6 +1,6 @@
 luaquotes - smart quotes with lua
 
-version: 1.0.2
+version: 1.1.0
 
 This package automatically creates smart quotes using lua filters and provides auxiliary commands for typesetting specific lua punctuation
 
@@ -12,6 +12,7 @@
 GitHub site:  https://github.com/ezgranet/luaquotes
 
 Version history: 
+25/10/2022—support for elision
 30/08/2022—resolving bug with language versions
 28/08/2022—resolving bug with language versions
 24/08/2022 —package creation

Modified: trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.tex	2022-10-25 20:14:24 UTC (rev 64811)
+++ trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.tex	2022-10-25 20:14:37 UTC (rev 64812)
@@ -50,7 +50,11 @@
 
 \end{tabular}
 \end{center}
+
 \section{Smart quotes}
+
+
+
 \subsection{Options}
  The default option, for English quotation marks, is called by:
    \begin{minted}[
@@ -77,7 +81,24 @@
 \usepackage[fr]{luaquotes} %French
 \usepackage[de]{luaquotes} % German
 \end{minted}
+\subsubsection{English Features}
+The English features are designed to smartly recognise English punctuation:
+\begin{center}
+\renewcommand{\arraystretch}{2}
+\begin{tabular}{ccc}
+\ttfamily Feature & User input & Output\\
+ Double Quotes &  \LARGE\texttt{"Salut!"}%
+& 
+\LARGE "Hello"\\
+Single Quotes& \LARGE\texttt{'Hello!'}%
+&  \LARGE 'Hello' \\
+Contractions & \LARGE \texttt{Don't} & \LARGE Don't\\
+Elision & \LARGE\texttt{'ello} & \LARGE 'ello  \\
 
+
+\end{tabular}
+\end{center}
+
 \subsubsection{French option}
 The French option produces the following output, including the extra space around punctuation prescribed by French typography:
 \begin{center}
@@ -255,9 +276,9 @@
 firstnumber=last
 ]
 {latex}
-\def\luaquotesversionnumber{1.0.2}
-\ProvidesPackage{luaquotes}
-  [2022/08/01\luaquotesversionnumber smart quotes with lua]
+\def\luaquotesversionnumber{1.1}
+\ProvidesPackage{dev-lua}
+  [2022/10/25\luaquotesversionnumber smart quotes with lua]
   % !TeX program = lualatex                                   
 % !TeX encoding = utf8
 % This work may be distributed and/or modified under the 
@@ -474,7 +495,39 @@
 ]
 {latex}
         }
-         
+ \luaexec{
+     \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+
+ 
+function abbrevsingle ( s )
+           return ( s:gsub ( " '(..-) " , " ’\%1 " ) )
+         end
+         \end{minted}
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+
+         }        
+
+        
 \luaexec{
    \end{minted} 
     \begin{minted}[
@@ -579,6 +632,74 @@
 ]
 {latex}
 }}
+\newcommand\abbrevsingleon{\directlua{
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+
+
+luatexbase.add_to_callback (
+   "process_input_buffer" , 
+   abbrevsingle , 
+   "abbrevsingle" )
+     \end{minted}
+  \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+
+   
+   }}
+\newcommand\abbrevsingleoff{\directlua{
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+
+luatexbase.remove_from_callback (
+   "process_input_buffer" , 
+   "abbrevsingle" )
+     \end{minted}
+  \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+
+   }}
+
+
+
 \newcommand\singlequotelinestarton{\directlua{
    \end{minted} 
     \begin{minted}[
@@ -685,8 +806,11 @@
    \newcommand{\smartquotes}{%
 \doublequoteson%
 \singlequotelinestarton%
+\abbrevsingleon%
 \singlequoteson}
-   \newcommand{\dumbquotes}{\doublequotesoff
+   \newcommand{\dumbquotes}{
+   \doublequotesoff
+\abbrevsingleoff
    \singlequotelinestartoff
    \singlequotesoff}
     \end{minted} 
@@ -1381,16 +1505,23 @@
 
 \end{minted}
 \section{Version History}
-\subsection{\texttt{1.0.1}}
 
+\subsection{\normalfont\texttt{1.1.0}}
+\ttfamily 25 October 2022: Added support for elision
+
+
+\subsection{\normalfont\texttt{1.0.1}}
+
+
+
 \ttfamily 30 August 2022: Further corrections to bug preventing non-English usage
 
-\subsection{\texttt{1.0.1}}
+\subsection{\normalfont\texttt{1.0.1}}
 
 \ttfamily 28 August 2022: Change bug preventing non-English usage
 
 
-\subsection{\texttt{1.0.0}}
+\subsection{\normalfont\texttt{1.0.0}}
 
 \ttfamily 21 August 2022: Package creation
 

Modified: trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty	2022-10-25 20:14:24 UTC (rev 64811)
+++ trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty	2022-10-25 20:14:37 UTC (rev 64812)
@@ -1,6 +1,6 @@
-\def\luaquotesversionnumber{1.0.2}
-\ProvidesPackage{luaquotes}
-  [2022/08/30\luaquotesversionnumber smart quotes with lua]
+\def\luaquotesversionnumber{1.1}
+\ProvidesPackage{dev-lua}
+  [2022/10/25\luaquotesversionnumber smart quotes with lua]
   % !TeX program = lualatex                                   
 % !TeX encoding = utf8
 % This work may be distributed and/or modified under the 
@@ -92,6 +92,13 @@
            return (s:gsub ("^'","‘" )  )
         end}
          
+
+ 
+\luaexec{
+function abbrevsingle ( s )
+           return ( s:gsub ( " '(..-) " , " ’\%1 " ) )
+         end}        
+
 \luaexec{function singlequotes ( s )
            return ( s:gsub ( " '"," ‘" ) )
          end}
@@ -107,6 +114,14 @@
 \newcommand\doublequotesoff{\directlua{luatexbase.remove_from_callback (
    "process_input_buffer" , 
    "doublequotes" )}}
+\newcommand\abbrevsingleon{\directlua{luatexbase.add_to_callback (
+   "process_input_buffer" , 
+   abbrevsingle , 
+   "abbrevsingle" )}}
+\newcommand\abbrevsingleoff{\directlua{luatexbase.remove_from_callback (
+   "process_input_buffer" , 
+   "abbrevsingle" )}}
+
 \newcommand\singlequotelinestarton{\directlua{
 luatexbase.add_to_callback (
    "process_input_buffer" , singlequotelinestart , "singlequotelinestart" )
@@ -129,9 +144,11 @@
    \newcommand{\smartquotes}{%
 \doublequoteson%
 \singlequotelinestarton%
+\abbrevsingleon%
 \singlequoteson}
    \newcommand{\dumbquotes}{
    \doublequotesoff
+\abbrevsingleoff
    \singlequotelinestartoff
    \singlequotesoff}
    



More information about the tex-live-commits mailing list.