texlive[63406] Master/texmf-dist: mnotes (26may22)
commits+karl at tug.org
commits+karl at tug.org
Thu May 26 21:51:35 CEST 2022
Revision: 63406
http://tug.org/svn/texlive?view=revision&revision=63406
Author: karl
Date: 2022-05-26 21:51:34 +0200 (Thu, 26 May 2022)
Log Message:
-----------
mnotes (26may22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/mnotes/mnotes.pdf
trunk/Master/texmf-dist/source/latex/mnotes/mnotes.dtx
trunk/Master/texmf-dist/tex/latex/mnotes/mnotes.sty
Added Paths:
-----------
trunk/Master/texmf-dist/source/latex/mnotes/Makefile
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/mnotes/Makefile
Deleted: trunk/Master/texmf-dist/doc/latex/mnotes/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mnotes/Makefile 2022-05-26 19:51:13 UTC (rev 63405)
+++ trunk/Master/texmf-dist/doc/latex/mnotes/Makefile 2022-05-26 19:51:34 UTC (rev 63406)
@@ -1,57 +0,0 @@
-SHELL=/bin/bash
-NAME=mnotes
-VERSION=0.8
-DISTDIR=$(NAME)
-ARCHIVE_NAME=/tmp/$(NAME)-$(VERSION).tar.gz
-DISTFILES=$(NAME).dtx Makefile README $(NAME).ins $(NAME).pdf
-
-DEP=$(NAME).sty
-
-all: pdf
-
-ps: $(NAME).ps
-
-%.ps: %.dvi
- dvips $(DVIPSOPT) $< -o $@
-
-pdf: $(NAME).pdf $(DEP)
-
-%.pdf: %.dtx
- pdflatex $<
- makeindex -s gglo.ist -o $(NAME).gls $(NAME).glo
- makeindex -s gind.ist -o $(NAME).ind $(NAME).idx
- pdflatex $<
-
-dist: $(DISTFILES)
- rm -rf $(DISTDIR)
- mkdir $(DISTDIR)
- cp -aL --parents $(DISTFILES) $(DISTDIR)
- tar cfvz $(ARCHIVE_NAME) $(DISTDIR)
- rm -rf $(DISTDIR)
-
-clean:
- rm -f $(NAME).{glo,log,toc,lot,lof,idx,ilg,ind,aux,blg,bbl,dvi}
- rm -f *~
-
-cleandist: clean
- rm -f $(NAME).{pdf,sty,ins}
-
-REFWARN = 'Rerun to get cross-references'
-LATEXMAX = 5
-
-%.dvi: %.dtx $(DEP)
- latex $<
- RUNS=$(LATEXMAX); \
- while [ $$RUNS -gt 0 ] ; do \
- if grep $(REFWARN) $*.log > /dev/null; \
- then latex $< ; else break; fi; \
- RUNS=`expr $$RUNS - 1`; \
- done
-
-$(NAME).sty: $(NAME).ins FORCE
- tex $(NAME).ins
-
-$(NAME).ins:
- pdflatex $(NAME).dtx
-
-FORCE:
Modified: trunk/Master/texmf-dist/doc/latex/mnotes/mnotes.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/source/latex/mnotes/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/latex/mnotes/Makefile (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mnotes/Makefile 2022-05-26 19:51:34 UTC (rev 63406)
@@ -0,0 +1,57 @@
+SHELL=/bin/bash
+NAME=mnotes
+VERSION=0.9
+DISTDIR=$(NAME)
+ARCHIVE_NAME=/tmp/$(NAME)-$(VERSION).tar.gz
+DISTFILES=$(NAME).dtx Makefile README $(NAME).ins $(NAME).pdf
+
+DEP=$(NAME).sty
+
+all: pdf
+
+ps: $(NAME).ps
+
+%.ps: %.dvi
+ dvips $(DVIPSOPT) $< -o $@
+
+pdf: $(NAME).pdf $(DEP)
+
+%.pdf: %.dtx
+ pdflatex $<
+ makeindex -s gglo.ist -o $(NAME).gls $(NAME).glo
+ makeindex -s gind.ist -o $(NAME).ind $(NAME).idx
+ pdflatex $<
+
+dist: $(DISTFILES)
+ rm -rf $(DISTDIR)
+ mkdir $(DISTDIR)
+ cp -aL --parents $(DISTFILES) $(DISTDIR)
+ tar cfvz $(ARCHIVE_NAME) $(DISTDIR)
+ rm -rf $(DISTDIR)
+
+clean:
+ rm -f $(NAME).{glo,log,toc,lot,lof,idx,ilg,ind,aux,blg,bbl,dvi}
+ rm -f *~
+
+cleandist: clean
+ rm -f $(NAME).{pdf,sty,ins}
+
+REFWARN = 'Rerun to get cross-references'
+LATEXMAX = 5
+
+%.dvi: %.dtx $(DEP)
+ latex $<
+ RUNS=$(LATEXMAX); \
+ while [ $$RUNS -gt 0 ] ; do \
+ if grep $(REFWARN) $*.log > /dev/null; \
+ then latex $< ; else break; fi; \
+ RUNS=`expr $$RUNS - 1`; \
+ done
+
+$(NAME).sty: $(NAME).ins FORCE
+ tex $(NAME).ins
+
+$(NAME).ins:
+ pdflatex $(NAME).dtx
+
+FORCE:
Property changes on: trunk/Master/texmf-dist/source/latex/mnotes/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/mnotes/mnotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mnotes/mnotes.dtx 2022-05-26 19:51:13 UTC (rev 63405)
+++ trunk/Master/texmf-dist/source/latex/mnotes/mnotes.dtx 2022-05-26 19:51:34 UTC (rev 63406)
@@ -28,13 +28,12 @@
%
%% @LaTeX-package-file{
%% author = "Saturnino Luz",
-%% version = "0.6",
-%% date = "18 April 2013",
+%% version = "0.9",
+%% date = "25 May 2022",
%% filename = "mnotes.dtx",
%% address = "S Luz
-%% Trinity College
%% Dublin, Ireland",
-%% URL = "http://www.scss.tcd.ie/~luzs/",
+%% URL = "https://gitlab.com/e1700/mnotes/",
%% email = "luzs at acm.org",
%% codetable = "ISO/ASCII",
%% keywords = "margin, notes, comments",
@@ -55,7 +54,7 @@
This is a generated file.
-Copyright (C) 2013 by S Luz <luzs at acm.org>
+Copyright (C) 2013-2021 by S Luz <luzs at acm.org>
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license
@@ -93,7 +92,7 @@
%</driver>
%<package>\ProvidesPackage{mnotes}[%
%<*driver|package>
- 2013/20/04 v0.7 margin notes for collaborative document editing]
+ 2022/25/05 v0.9 margin notes for collaborative document editing]
%</driver|package>
%<*driver>
\documentclass{ltxdoc}
@@ -153,7 +152,7 @@
%
% \section{Package options}
%
-% The basic usage is to include a \verb+\usepackage{mnote}+ to the
+% The basic usage is to include a \verb+\usepackage{mnotes}+ to the
% preamble of your \LaTeX\ document.
%
% The \textsf{mnotes} package also provides some basic
@@ -227,6 +226,23 @@
% are not regular \LaTeX\ users.
% \end{verbatim}
%
+% \DescribeMacro{\Mnewauthor} Define author-specific margin notes for
+% comments. \\The
+% \verb+\Mnewauthor[<initials>]{<name>}{<todonote specs>}+ macro
+% defines a command for personalised comments by author \verb+name+ by
+% setting up the command \verb+\mn<initials>[highlight]{comment}+
+% which can then be used in the text. Usage:
+% \begin{verbatim}
+% \newauthor[BD]{Bob}{yellow}
+% \end{verbatim}
+% This defines \verb+\mnBD+, which can be used to comment and highlight
+% as follows:
+% \begin{verbatim}
+% \mnBD[this is highlighted]{this is a margin note.} or,
+% alternatively, without highlighting
+% \mnBDhis is a margin note with no highlights.}
+% \end{verbatim}
+%
% \DescribeMacro{\HideMNOTES} Comments can be ``switched off'' at any
% point in the text by adding a \verb+\HideMNOTES{}+ command anywhere
% in the text.
@@ -248,6 +264,7 @@
% is passed
% as an option. In this case, note placement reverts to \LaTeX{}'s
% kernel's \verb+\marginpar+ macro.
+% \item[soul] for highlighting.
% \item[tikz] for graphics (boxes and connectors). N.B.:
% \texttt{tikz} is note required if \texttt{basic} is passed as an
% option.
@@ -288,6 +305,7 @@
% Get package options
% \begin{macrocode}
\RequirePackage{kvoptions}
+\RequirePackage{soul}
\DeclareVoidOption{basic}{\@mnotes at basictrue}
\DeclareVoidOption{sidenotes}{\@mnotes at sidenotestrue}
\DeclareVoidOption{hide}{\@mnotes at hidetrue \AtEndOfPackage{\HideMNOTES{}}}
@@ -295,8 +313,8 @@
\SetupKeyvalOptions{family=mnotes, prefix=mnotes@}
\DeclareStringOption{scale}[1.05]
\define at key{mnotes}{scale}{\if at mnotes@hide\else%
-\pdfpagewidth#1\paperwidth\@mnotes at scaletrue\fi}
-\DeclareVoidOption{centre}{\if at mnotes@scale\hoffset\pdfpagewidth
+\setlength{\paperwidth}{#1\paperwidth}\@mnotes at scaletrue\fi}
+\DeclareVoidOption{centre}{\if at mnotes@scale\hoffset\paperwidth
\advance\hoffset-\paperwidth
\hoffset.5\hoffset\fi}
\DeclareStringOption{mnwidth}[\MNOTEWIDTH]
@@ -307,6 +325,8 @@
\define at key{mnotes}{fontsize}{%
\count1=#1 \multiply \count1 by 116 \divide \count1 by 100%
\def\MNFONT{\fontsize{#1}{\count1}\selectfont}}
+%% try to keep notes on the same margin
+% \makeatletter \@mparswitchfalse \makeatother
%\ExecuteOptions{}
\ProcessKeyvalOptions{mnotes}
%\ProcessOptions
@@ -352,8 +372,8 @@
[{\MNFONT\raggedleft\color{#1}\em #2}]%
{\MNFONT\raggedright\color{#1}\em #2}}%
\else% not basic
-\newcommand{\MNOTEon}[2][\MNCOLOUR]{
-\setlength{\marginparsep}{6pt}\setlength{\marginparwidth}{\MNOTEWIDTH}
+\newcommand{\MNOTEon}[2][\MNCOLOUR]{%
+\setlength{\marginparsep}{6pt}\setlength{\marginparwidth}{\MNOTEWIDTH}%
\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
\node [coordinate] (textPOS) {};%
\end{tikzpicture}%
@@ -362,7 +382,7 @@
{\MNFONT\raggedright\em%
\begin{tikzpicture}[remember picture]%
\draw node [draw=#1,text width=\MNOTEWIDTH-1pt] (notePOS) {#2};%
-\end{tikzpicture}
+\end{tikzpicture}%
}%
\else
\marginpar%
@@ -377,17 +397,17 @@
\fi%
\if at twocolumn%
\if at firstcolumn%
- \if at mnotes@reverseconnect
+ \if at mnotes@reverseconnect%
\mnoteswestlink{#1}%
- \else
+ \else%
\mnoteseastlink{#1}%
- \fi
+ \fi%
\else%
- \if at mnotes@reverseconnect
+ \if at mnotes@reverseconnect%
\mnoteseastlink{#1}%
- \else
+ \else%
\mnoteswestlink{#1}%
- \fi
+ \fi%
\fi%
\else%
\if at twoside%
@@ -419,6 +439,31 @@
\fi
% \end{macrocode}
% \end{macro}
+%\begin{macro}
+% Define author-specific margin notes for comments.
+% Syntax: \verb'\Mnewauthor[<initials>]{<name>}{color}'
+% Example:
+% \verb'\Mnewauthor[SL]{Nino}{yellow}'
+% Sets up the command \verb'\mn<initials>{}' which can then be used in the
+% text.
+% E.g.:
+% \verb'\mnSL[this is highlighted]{this is a margin note.}'
+% \verb'\mnSL{this is a margin note with no highlights.}'
+% \begin{macrocode}
+\newcommand{\Mnewauthor}[3][]{%
+ % If #1 is not given, use #2 by default as the cmd name
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty%
+ \def\@authid{#2}%
+ \else%
+ \def\@authid{#1}%
+ \fi%
+ % Define the \mnX command with the colour and so on
+ \expandafter\newcommand\csname mn\@authid\endcsname[2][]{%
+ \if at mnotes@hide ##1\else\sethlcolor{#3}\hl{##1}\MNOTE[#3]{#2: ##2}{}\fi}%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\MNOTE}
% User interface to \verb+\MNOTEon+
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/mnotes/mnotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mnotes/mnotes.sty 2022-05-26 19:51:13 UTC (rev 63405)
+++ trunk/Master/texmf-dist/tex/latex/mnotes/mnotes.sty 2022-05-26 19:51:34 UTC (rev 63406)
@@ -21,7 +21,7 @@
%% 2003/12/01 or later.
%%
\ProvidesPackage{mnotes}[%
- 2013/20/04 v0.7 margin notes for collaborative document editing]
+ 2022/25/05 v0.9 margin notes for collaborative document editing]
\expandafter\ifx\csname mnotespaperwidth\endcsname\relax
\newdimen\mnotespaperwidth
\mnotespaperwidth1.05\paperwidth
@@ -41,6 +41,7 @@
\newif\if at mnotes@reverseconnect
\@mnotes at reverseconnectfalse
\RequirePackage{kvoptions}
+\RequirePackage{soul}
\DeclareVoidOption{basic}{\@mnotes at basictrue}
\DeclareVoidOption{sidenotes}{\@mnotes at sidenotestrue}
\DeclareVoidOption{hide}{\@mnotes at hidetrue \AtEndOfPackage{\HideMNOTES{}}}
@@ -48,8 +49,8 @@
\SetupKeyvalOptions{family=mnotes, prefix=mnotes@}
\DeclareStringOption{scale}[1.05]
\define at key{mnotes}{scale}{\if at mnotes@hide\else%
-\pdfpagewidth#1\paperwidth\@mnotes at scaletrue\fi}
-\DeclareVoidOption{centre}{\if at mnotes@scale\hoffset\pdfpagewidth
+\setlength{\paperwidth}{#1\paperwidth}\@mnotes at scaletrue\fi}
+\DeclareVoidOption{centre}{\if at mnotes@scale\hoffset\paperwidth
\advance\hoffset-\paperwidth
\hoffset.5\hoffset\fi}
\DeclareStringOption{mnwidth}[\MNOTEWIDTH]
@@ -60,6 +61,7 @@
\define at key{mnotes}{fontsize}{%
\count1=#1 \multiply \count1 by 116 \divide \count1 by 100%
\def\MNFONT{\fontsize{#1}{\count1}\selectfont}}
+%% try to keep notes on the same margin
%\ExecuteOptions{}
\ProcessKeyvalOptions{mnotes}
\if at twocolumn\if at mnotes@scale\hoffset\pdfpagewidth
@@ -85,8 +87,8 @@
[{\MNFONT\raggedleft\color{#1}\em #2}]%
{\MNFONT\raggedright\color{#1}\em #2}}%
\else% not basic
-\newcommand{\MNOTEon}[2][\MNCOLOUR]{
-\setlength{\marginparsep}{6pt}\setlength{\marginparwidth}{\MNOTEWIDTH}
+\newcommand{\MNOTEon}[2][\MNCOLOUR]{%
+\setlength{\marginparsep}{6pt}\setlength{\marginparwidth}{\MNOTEWIDTH}%
\begin{tikzpicture}[remember picture, baseline=-0.75ex]%
\node [coordinate] (textPOS) {};%
\end{tikzpicture}%
@@ -95,7 +97,7 @@
{\MNFONT\raggedright\em%
\begin{tikzpicture}[remember picture]%
\draw node [draw=#1,text width=\MNOTEWIDTH-1pt] (notePOS) {#2};%
-\end{tikzpicture}
+\end{tikzpicture}%
}%
\else
\marginpar%
@@ -110,17 +112,17 @@
\fi%
\if at twocolumn%
\if at firstcolumn%
- \if at mnotes@reverseconnect
+ \if at mnotes@reverseconnect%
\mnoteswestlink{#1}%
- \else
+ \else%
\mnoteseastlink{#1}%
- \fi
+ \fi%
\else%
- \if at mnotes@reverseconnect
+ \if at mnotes@reverseconnect%
\mnoteseastlink{#1}%
- \else
+ \else%
\mnoteswestlink{#1}%
- \fi
+ \fi%
\fi%
\else%
\if at twoside%
@@ -150,6 +152,18 @@
\end{tikzpicture}%
}
\fi
+\newcommand{\Mnewauthor}[3][]{%
+ % If #1 is not given, use #2 by default as the cmd name
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty%
+ \def\@authid{#2}%
+ \else%
+ \def\@authid{#1}%
+ \fi%
+ % Define the \mnX command with the colour and so on
+ \expandafter\newcommand\csname mn\@authid\endcsname[2][]{%
+ \if at mnotes@hide ##1\else\sethlcolor{#3}\hl{##1}\MNOTE[#3]{#2: ##2}{}\fi}%
+}
\newcommand{\MNOTE}{\MNOTEon}
\newcommand{\HideMNOTES}{\renewcommand{\MNOTE}[2][red]{}}
\newcommand{\ShowMNOTES}{\renewcommand{\MNOTE}{\MNOTEon}}
More information about the tex-live-commits
mailing list.