texlive[65255] Master/texmf-dist: luaquotes (12dec22)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 12 22:02:03 CET 2022


Revision: 65255
          http://tug.org/svn/texlive?view=revision&revision=65255
Author:   karl
Date:     2022-12-12 22:02:03 +0100 (Mon, 12 Dec 2022)
Log Message:
-----------
luaquotes (12dec22)

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-12-12 21:01:52 UTC (rev 65254)
+++ trunk/Master/texmf-dist/doc/lualatex/luaquotes/README	2022-12-12 21:02:03 UTC (rev 65255)
@@ -1,6 +1,6 @@
 luaquotes - smart quotes with lua
 
-version: 1.2.1
+version: 1.2.2
 
 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: 
+12/12/2022-added degm function
 23/11/2022-walking back automatic elision for now
 25/10/2022—support for elision
 30/08/2022—resolving bug with language versions

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-12-12 21:01:52 UTC (rev 65254)
+++ trunk/Master/texmf-dist/doc/lualatex/luaquotes/luaquotes-documentation.tex	2022-12-12 21:02:03 UTC (rev 65255)
@@ -80,6 +80,7 @@
 {latex}
 \usepackage[fr]{luaquotes} %French
 \usepackage[de]{luaquotes} % German
+\usepackage[degm]{luaquotes} % German with French-style quotes
 \end{minted}
 \subsubsection{English Features}
 The English features are designed to smartly recognise English punctuation:
@@ -110,7 +111,7 @@
 \end{tabular}
 \end{center}
 \subsubsection{The German option}
-The German option produces the following outpu:
+The German option produces the following output:
 
 \begin{center}
 \renewcommand{\arraystretch}{2}
@@ -123,9 +124,23 @@
 
 \end{tabular}
 \end{center}
+\subsubsection{The German (\texttt{degm}) option}
+The German (\texttt{degm}) option produces the following output:
 
+\begin{center}
+\renewcommand{\arraystretch}{2}
+\begin{tabular}{cc}
+\ttfamily User input &Output\\
+\LARGE\texttt{"Hallo!"}%
+&  \LARGE \degmdouble Hallo!\degmtr\\
+\LARGE\texttt{'Hallo!'}%
+&  \LARGE \degmsingle Hallo!\desgmtr\\
 
+\end{tabular}
+\end{center}
 
+
+
 \subsection{Activation and De-activation}
 The package automatically activates the smart quotes function at the beginning of the document. To deactivate the smart quotes function within a document, the following commands are used:
 \begin{minted}[
@@ -140,6 +155,7 @@
 \dumbquotes %English
 \frdumbquotes %French
 \dedumbquotes %German
+\degmdumbquotes %German with French-style quotes
 \end{minted}
 
 The following commands re-activate the smart quotes function:
@@ -155,12 +171,13 @@
 \smartquotes %English
 \frsmartquotes %French
 \desmartquotes % German
+\degmsmartquotes % German with French-style quotes
 \end{minted}
 
 A limitation on the (de-)activation of the package is that the Lua filters will not deactivate within the same paragraph, so the function can only be changed across paragraphs.
 
 \subsection{Monospace}
-As a general rule, smart quotes are rather undesirable in monospace text, and therefore, within the \color{darkspringgreen}\verb!	\texttt!\color{black} environment the package does not apply smart quotes. Thus, the same input produces in roman face \textcolor{darkspringgreen}{"Hello World"} but in monospace \texttt{"Hello World"}.
+As a general rule, smart quotes are rather undesirable in monospace text, and therefore, within the \color{darkspringgreen} \verb!\texttt!\color{black}\ environment the package does not apply smart quotes. Thus, the same input produces in roman face \textcolor{darkspringgreen}{"Hello World"} but in monospace \texttt{"Hello World"}.
 	
 	As the example above shows, the default behaviour of this package forces straight quotes in monospace, and disables \TeX\ quote ligatures (but not other \TeX\ ligatures) to do so, on the assumption that any form of curved quotes are undesirable.  
 	
@@ -201,11 +218,13 @@
 		Right double quote & \ttfamily U+201D & \verb!\sqtworight! & \Huge\thebox\sqtworight\\
 		Left guillemet [w/ space]& \ttfamily U+00AB & \verb!\glmtl! & \Huge\glmtl\thebox\\
 Right guillemet [w/ space]& \ttfamily U+00BB & \verb!\glmtr! & \Huge\thebox\glmtr\\
-Single left guillemet [w/ space]& \ttfamily U+2039 & \verb!\sglmtl! & \Huge\sglmtl\thebox\\
+		\texttt{degm} left guillemet & \ttfamily U+00BB & \verb!\degmtl! & \Huge\degmtl\thebox\\
+		\texttt{degm} right guillemet & \ttfamily U+00AB & \verb!\degmtr! & \Huge\thebox\degmtr\\
+		Single left guillemet [w/ space]& \ttfamily U+2039 & \verb!\sglmtl! & \Huge\sglmtl\thebox\\
+		Single right guillemet [w/ space]& \ttfamily U+203A & \verb!\sglmtr! & \Huge\thebox\sglmtr\\
+		\texttt{degm} single left guillemet & \ttfamily U+203A & \verb!\desgmtl! & \Huge\desgmtl\thebox\\
+		\texttt{degm} single right guillemet & \ttfamily U+2039 & \verb!\desgmtr! & \Huge\thebox\desgmtr\\
 
-Single right guillemet [w/ space]& \ttfamily U+203A & \verb!\sglmtr! & \Huge\thebox\sglmtr\\
-
-
 \end{longtable}
 	\end{center}
 
@@ -236,7 +255,7 @@
 
 
 
-For certain Polynesian langauges, a letter called the \okina Okina is used; while this appears identical to a left single quotation mark in many fonts, it is encoded differently in Unicode because it is properly a letter, not a punctuation mark. 
+For certain Polynesian languages, a letter called the \okina Okina is used; while this appears identical to a left single quotation mark in many fonts, it is encoded differently in Unicode because it is properly a letter, not a punctuation mark. 
 
 	
 	
@@ -254,7 +273,7 @@
 	
 	
 	\section{Future Development and Localisation}
-	The package's online repository is the best place to report bugs, feature requests, or other contributions, and is located at: \\\url{github.com/ezgranet/luaquotes}. 
+	The package's online repository is the best place to report bugs, feature requests, or other contributions, and is located at: \\\url{https://github.com/ezgranet/luaquotes}. 
 	
 	One obvious point of future development is the addition of other language localisations; this is technologically easy in principle but difficult for me to accomplish without assistance because it requires detailed knowledge of typographic conventions for any given language standard, and therefore the aid of contributors and collaborators.  	\section{Licence}
 	This project is licensed under the Latex Public Project Licence version 1.3\textit{c}. This documentation is copyright of the author but licensed under CC-BY-SA 3.0. 
@@ -829,7 +848,10 @@
 \frsmartquotes
 \frdumbquotes
 \desmartquotes
-\dedumbquotes\smartquotes}
+\dedumbquotes
+\degmsmartquotes
+\degmdumbquotes
+\smartquotes}
 \renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
     }
 
@@ -1195,6 +1217,283 @@
 \renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
 }
    \end{minted} 
+    \subsection{The German with French-style quotes (\texttt{degm}) option}
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% SCHÖNERES DEUTSCH
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\luaexec{
+    \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+function degmdoublequotes ( 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}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+function degmsinglequotelinestart ( s )
+           return (s:gsub ("^'","›" )  )
+        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}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{lua}
+function degmsinglequotesclose( 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}
+         }
+
+%% Two utility macros to activate/deactivate the Lua function:
+\newcommand\degmdoublequoteson{\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" , degmdoublequotes , "degmdoublequotes" )
+      \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+   }}
+\newcommand\degmdoublequotesoff{\directlua{luatexbase.remove_from_callback (
+   "process_input_buffer" , "degmdoublequotes" )
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+}}
+\newcommand\degmsinglequotelinestarton{\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" , degmsinglequotelinestart , "degmsinglequotelinestart" )\end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+   }}
+\newcommand\degmsinglequotelinestartoff{\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" , "degmsinglequotelinestart" )
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+   }}
+\newcommand\degmsinglequotescloseon{\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" , degmsinglequotesclose , "degmsinglequotesclose" )
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+   }}
+\newcommand\degmsinglequotescloseoff{\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" , "degmsinglequotesclose" )
+   \end{minted} 
+    \begin{minted}[
+frame=lines,
+framesep=2mm,
+baselinestretch=1.2,
+bgcolor=LightGray,
+fontsize=\footnotesize,
+linenos,
+breaklines,
+firstnumber=last
+]
+{latex}
+   }}
+   \newcommand{\degmsmartquotes}{\degmdoublequoteson
+\degmsinglequotelinestarton
+\degmsinglequotescloseon}
+   \newcommand{\degmdumbquotes}{\degmdoublequotesoff
+\degmsinglequotelinestartoff
+\degmsinglequotescloseoff}
+   \DeclareOption{degm}{
+\AtBeginDocument{
+\frsmartquotes
+\frdumbquotes
+\smartquotes
+\dumbquotes\dumbquotes
+\degmsmartquotes}
+\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
+}
+   \end{minted} 
    \subsection{The French option}
     \begin{minted}[
 frame=lines,
@@ -1502,6 +1801,9 @@
 
 \end{minted}
 \section{Version History}
+\subsection{\normalfont\texttt{1.2.2}}
+\ttfamily Added the "degm" option
+
 \subsection{\normalfont\texttt{1.2.1}}
 \ttfamily Suspended automatic elision support due to implementation issues
 

Modified: trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty	2022-12-12 21:01:52 UTC (rev 65254)
+++ trunk/Master/texmf-dist/tex/lualatex/luaquotes/luaquotes.sty	2022-12-12 21:02:03 UTC (rev 65255)
@@ -1,6 +1,6 @@
-\def\luaquotesversionnumber{1.2.1}
+\def\luaquotesversionnumber{1.2.2}
 \ProvidesPackage{luaquotes}
-  [2022/11/23\luaquotesversionnumber smart quotes with lua]
+  [2022/12/09\luaquotesversionnumber smart quotes with lua]
   % !TeX program = lualatex                                   
 % !TeX encoding = utf8
 % This work may be distributed and/or modified under the 
@@ -153,7 +153,7 @@
    \singlequotesoff}
    
        \DeclareOption{en}{
-\AtBeginDocument{\frsmartquotes\frdumbquotes\desmartquotes\dedumbquotes\smartquotes}
+\AtBeginDocument{\frsmartquotes\frdumbquotes\desmartquotes\dedumbquotes\degmsmartquotes\degmdumbquotes\smartquotes}
 \renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
     }
 
@@ -180,6 +180,8 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newcommand{\desingle}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"201A}}}
 \newcommand{\dedouble}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"201E}}}
+\newcommand{\degmsingle}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"203A}}}
+\newcommand{\degmdouble}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"00BB}}}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 % backtick
@@ -227,6 +229,10 @@
 \newcommand{\glmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,»}}
 \newcommand{\sglmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹\,}}
 \newcommand{\sglmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,›}}
+\newcommand{\degmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}»}}
+\newcommand{\degmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}«}}
+\newcommand{\desgmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}›}}
+\newcommand{\desgmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹}}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 % DEUTSCH
@@ -273,6 +279,50 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
+% SCHÖNERES DEUTSCH
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\luaexec{function degmdoublequotes ( s )
+           return ( s:gsub ( '"(..-)"' , "»\%1«" ) )
+         end}
+\luaexec{function degmsinglequotelinestart ( s )
+           return (s:gsub ("^'","›" )  )
+        end}
+\luaexec{function degmsinglequotesclose( s )
+return ( s:gsub ( " '(..-)'", " ‚\%1‹" ) )
+         end}
+
+%% Two utility macros to activate/deactivate the Lua function:
+\newcommand\degmdoublequoteson{\directlua{luatexbase.add_to_callback (
+   "process_input_buffer" , degmdoublequotes , "degmdoublequotes" )}}
+\newcommand\degmdoublequotesoff{\directlua{luatexbase.remove_from_callback (
+   "process_input_buffer" , "degmdoublequotes" )}}
+\newcommand\degmsinglequotelinestarton{\directlua{luatexbase.add_to_callback (
+   "process_input_buffer" , degmsinglequotelinestart , "degmsinglequotelinestart" )}}
+\newcommand\degmsinglequotelinestartoff{\directlua{luatexbase.remove_from_callback (
+   "process_input_buffer" , "degmsinglequotelinestart" )}}
+   \newcommand\degmsinglequotescloseon{\directlua{luatexbase.add_to_callback (
+   "process_input_buffer" , degmsinglequotesclose , "degmsinglequotesclose" )}}
+\newcommand\degmsinglequotescloseoff{\directlua{luatexbase.remove_from_callback (
+   "process_input_buffer" , "degmsinglequotesclose" )}}
+   \newcommand{\degmsmartquotes}{\degmdoublequoteson
+\degmsinglequotelinestarton
+\degmsinglequotescloseon}
+   \newcommand{\degmdumbquotes}{\degmdoublequotesoff
+\degmsinglequotelinestartoff
+\degmsinglequotescloseoff}
+   \DeclareOption{degm}{
+\AtBeginDocument{
+\frsmartquotes
+\frdumbquotes
+\smartquotes
+\dumbquotes\dumbquotes
+\degmsmartquotes}
+\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Français
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -308,7 +358,7 @@
 \frsinglequotelinestartoff
 \frsinglequotescloseoff}
    \DeclareOption{fr}{
-\AtBeginDocument{\desmartquotes\dedumbquotes\smartquotes\dumbquotes\dumbquotes\frsmartquotes}
+\AtBeginDocument{\desmartquotes\dedumbquotes\degmsmartquotes\degmdumpquotes\smartquotes\dumbquotes\dumbquotes\frsmartquotes}
 \renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
 
 



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