andythomas / tex-sidenotes Goto Github PK
View Code? Open in Web Editor NEWThis package allows the typesetting of manuscripts with notes, figures, citations, captions and tables in the margin, which is common e.g. in science textbooks or theses.
This package allows the typesetting of manuscripts with notes, figures, citations, captions and tables in the margin, which is common e.g. in science textbooks or theses.
It should be possible to typeset an input file with \documentclass{caesar-book} and \documentclass{caesar-handout} without changing other parts of the file. The output file should have the expected behavior, which is e.g. to swallow the abstract if book is used.
I was trying to test caesar_book.cls
for something I'm writing. I got an error for unrecognized command \newcommandtwoopt
. When I look at the code I don't see a RequiresPackage for twoopt. Am I missing something?
With 'seems to have stopped working', I mean it definitely does not work any more, but I assume it did so before.
I have to be very carefull what I say here, because I am completely new to (La)Tex; on february 28 I installed TexLive using TexLive's own online installer install-tl-20170223 on Xubuntu 16.04.2 x64. But I am not the first to have bumped into this problem, although apparently nobody cared to report it to you. See e.g. Weird output from the sidenotes package.
A reply on that url links the problem to a change in the latest version of the xparse package, which I think may be similar to this issue : xparse's document commands used in math su(p|b)scripts with no brace give error #338
This simple code
\documentclass{book}
\usepackage{sidenotes}
\begin{document}
This text is annotated\marginnote{annotation} in the margin.
This text is annotated\footnote{annotation} in the footing.
This text is annotated\sidenote{annotation} in the margin.
\end{document}
gives the following error messages, all on the line with the call to \sidenote
macro:
Illegal unit of measure (pt inserted). This text is annotated\sidenote{annotation}
Missing number, treated as zero. This text is annotated\sidenote{annotation}
Illegal unit of measure (pt inserted). This text is annotated\sidenote{annotation}
Missing number, treated as zero. This text is annotated\sidenote{annotation}
Illegal unit of measure (pt inserted). This text is annotated\sidenote{annotation}
Missing number, treated as zero. This text is annotated\sidenote{annotation}
Illegal unit of measure (pt inserted). This text is annotated\sidenote{annotation}
Missing number, treated as zero. This text is annotated\sidenote{annotation}
Illegal unit of measure (pt inserted). This text is annotated\sidenote{annotation}
Commenting out that \sidenote
-line gives a nice result with a note in the margin and another one in the footing.
The reply I mentioned, also suggests a workaround that makes the \sidenote
macro work again:
\makeatletter
\renewcommand* \@sidenotes@multisign {3sp}
\makeatother
sidenotes package is version 40658 (1.00)
xparse package is in l3packages, which is version 43183 (SVN 6878)
\sidenote{Inga Inga Inga}[100pt] is shifting the sidenote while \sidenote[]{Inga Inga Inga}[100pt] has no effect.
sidenotes.sty v2.0, but omits the optional parameters. They are not useful if several output formats are generated at the same time.
put caesar.def, caesar-handout, cesar-book, macro.inp.tex, kindle.inp.tex in one cls file
Generate some code to test the .qx file without the .y file. Use the tex file as an input and generate the token list side by side with the tex source code.
introduce \margintext{}[] in sidenotes.sty to ensure interface consistency with the other macros
get rid of the dependence on twoopt
the fullwidth environment has to distinguish between article or book
use the generic \extrafloats{100}
macro. This is available since 2015!
Similar to marginfigure
and margintable
, introduce a way to place listings in the margin.
As far as I know, the existing code for marginfigure
can be used and altered for this, i.e.
\newsavebox{\@sidenotes@marginlistingbox}
\DeclareCaptionStyle{marginlisting}{font=footnotesize}
\NewDocumentEnvironment{marginlisting} { o }
{
\begin{lrbox}{\@sidenotes@marginlistingbox}
\begin{minipage}{\marginparwidth}
\captionsetup{type=listing,style=marginlisting}
}
{
\end{minipage}%
\end{lrbox}%
\@sidenotes@placemarginal{#1}{\usebox{\@sidenotes@marginlistingbox}}
}
works.
The code for the LaTeX macro is:
\newcommand{\smallfigure}[2]{%
\begin{figure}[ht!]
\begin{minipage}[b]{110pt}
\centering
\includegraphics[width=110pt]{#1}
\end{minipage}
\hfill
\begin{minipage}[b]{110pt}
\centering
\captionsetup{width=110pt, justification=RaggedRight}
\caption{#2\label{#1}}%
\end{minipage}
\end{figure}
}
It is supposed to look like this:
Hello,
I liked your show-case in Stack Exchange. The link given on those page is broken. I wonder I could get the zip file of your document.
Provide a second book-style with different chapter, section formatting and such.
change the figure numbering in the book from e.g. 1.7 to 7. Next Figure in chapter 2 should be 8 and not 2.1
\sidecite uses \margintext instead of \sidenote in the caesar module and, therefore, no number. solution has to tare care of expansion.
The actual mechanism seems very clumsy. Find a way to detect subsequent macros and insert a superscript comma.
Add a separator, e.g. '; and' between multi entries of a fullcite command.
is: E Maxwell, Isotope effect in the superconductivity of mercury, Physical Review 78 (1950) 477โ477, C Reynolds et al., Superconductivity of isotopes of mercury, Physical Review (1950)
should be: E Maxwell, Isotope effect in the superconductivity of mercury, Physical Review 78 (1950) 477โ477; and C Reynolds et al., Superconductivity of isotopes of mercury, Physical Review (1950)
Hey, before I started working on this (as a complete ConTeXt neophyte), I figured I'd add it as an issue to see if you had a solution in there that is not obvious to me, or if you had worked on it at all.
As I'm going to be using this with submissions, I'd rather try to have as much of the positioning automated to avoid significant edits.
(Also, thanks for all the work on this!)
\documentclass{article}
\usepackage{sidenotes}
\begin{document}
Text\sidenote{text} text
text\sidenote{text}text
\end{document}
if a sidecite follows a sidenote or vice versa, the superscripts should be separated by e.g. commas
There is no need for the high level macros any more. Change the interface back to normal LaTeX conventions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.