Skip to content

Commit

Permalink
use marginpar
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Mar 23, 2024
1 parent 2b84913 commit 27184b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
17 changes: 9 additions & 8 deletions doc/tagpdf.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
\usepackage[style=numeric]{biblatex}
\addbibresource{tagpdf.bib}

\usepackage[noparboxrestore]{marginnote}
\reversemarginpar
\NewDocumentCommand\sidenote{m}{\marginpar{#1}}
\usepackage{booktabs}
\setlength\belowcaptionskip{10pt}
\usepackage{tcolorbox}
Expand Down Expand Up @@ -384,10 +384,11 @@ \section{Loading}
\begin{taglstlisting}
\DocumentMetadata
{
% testphase = phase-I, % tagging without paragraph tagging
testphase = phase-II % tagging with paragraph tagging and other new stuff.
% testphase = phase-III % tagging with paragraph sec, toc, block tagging and more
% pdfversion = 2.0 % pdfversion must be set here.
% testphase = phase-I, % tagging without paragraph tagging
% testphase = phase-II, % tagging with paragraph tagging
testphase = phase-III, % tagging with paragraph sec, toc, blocks and more
pdfversion = 2.0, % pdfversion must be set here.
pdfstandard=ua-2, % pdfstandard can be set too
}
\documentclass{article}
\begin{document}
Expand Down Expand Up @@ -1028,7 +1029,7 @@ \subsubsection{Commands to mark content and chunks}
The validators complain if some text is not marked up, but it is not
quite clear if this is a serious problem.

The\sidenote{lua mode only} lua mode will mark up everything unmarked as
The\sidenote{lua mode} lua mode will mark up everything unmarked as
\texttt{artifact=notype}. You can suppress this behavior by setting the
tagpdfsetup key \texttt{activate/tagunmarked} to false. See section
\ref{ssec:setup}.
Expand Down Expand Up @@ -1199,7 +1200,7 @@ \subsubsection{Retrieving data} \label{sec:retrieve}

\subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local}

In\sidenote{Luamode mode only} luamode the mc-commands set and unset an
In\sidenote{lua mode} luamode the mc-commands set and unset an
attribute to mark the nodes. One can view such an attribute like a font
change or a color: they affect all following chars and glue nodes until
stopped.
Expand Down Expand Up @@ -2521,7 +2522,7 @@ \subsection{Boxes with tagging commands}

We assume in the following that the box contains only well balanced tagging
commands and no parts that are \enquote{untagged}. It should be possible to
copy the whole box inside a \verb+\tagstructbegin+/\verb+\tagstructend+
copy the whole box inside a \verb+\tagstructbegin+/\hspace{0pt}\verb+\tagstructend+
pair. So the following is fine as box content
\begin{taglstlisting}
box=\tagstructbegin{...}\tagmcbegin{} balanced content\tagmcend\tagstructend
Expand Down
12 changes: 7 additions & 5 deletions doc/tagpdfdocu-patches.sty
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@
}

% ======== marginnote ==========
% 2024-03-23 currently marginnote is no longer used, we use marginpar
% TODO marginnote has a bug (a \par is missing) so it messes up tagging.
% but currently unneeded as we marked them up as artifacts anyway as they don't contain
% meaningful contents
\renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%
%\renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%

\NewDocumentCommand\sidenote{m}
{
\tag_mc_artifact_group_begin:n{notype}\tagpdfparaOff\marginnote{#1}\tag_mc_artifact_group_end:
}
%\NewDocumentCommand\sidenote{m}
% {%
% %\tag_mc_artifact_group_begin:n{notype}\tagpdfparaOff\marginnote{#1}\tag_mc_artifact_group_end:
% \marginpar{#1}%
% }

\ExplSyntaxOff
% ======== tikzpicture ==========
Expand Down

0 comments on commit 27184b4

Please sign in to comment.