Git Product home page Git Product logo

herries-press's People

Contributors

godbyk avatar kberry avatar wspr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

herries-press's Issues

titling: proposed \titlepagestyle

Original question:

I was trying to change the pagestyle of an article using the titling package, hoping that unlike the standard maketitle it wouldn't automatically make the first page style plain, but it does.

My reply:

It doesn't seem unreasonable to me to add a \titlepagestyle command to the page; it will still need to override the default of "plain" but at least it doesn't break backwards compatibility with older versions of the package.

tocloft: \cftparskip ignored when using [titles] option

The \cftparskip length is ignored when the [titles] package option is provided; the ToC uses the regular \parskip instead.

Minimal working example:

\documentclass{article}

%\usepackage{tocloft} % will use \cftparskip in the ToC as expected
\usepackage[titles]{tocloft} % will use \parskip in the ToC instead

\cftparskip=0em
\parskip=1em

\begin{document}

\tableofcontents

\section{Section} blah
    \subsection{Subsection} blah
    \subsection{Subsection} blah
\section{Section} blah
    \subsection{Subsection} blah
    \subsection{Subsection} blah
        \subsubsection{Subsubsection} blah
        \subsubsection{Subsubsection} blah
        \subsubsection{Subsubsection} blah
    \subsection{Subsection} blah
\section{Section} blah
    \subsection{Subsection} blah
    \subsection{Subsection} blah

\end{document}

vertbars should issue a \par at the beginning

Given that vertbars can only be used on whole paragraphs it makes no sense in my opinion to only issue a \par at the end but not at the beginning

\documentclass{article}

\usepackage{lipsum,vertbars}

\begin{document}
\lipsum[1] 
\begin{vertbar}
  This paragraph gets a vertical bar.
  And this part should only have one bar but in fact it gets two!
  \begin{vertbar}
    A nested environment!
  \end{vertbar}
  And here the outer bar should still continue, which it does.
\end{vertbar}
\lipsum[1]
\end{document}

bildschirmfoto 2018-11-03 um 16 43 52

possibly too many labels for changepage

I am using changepage and latex 2.09 (I know, I know...) for a large two-sided book, with several "adjustwidth_" calls on each page. Everything works great until about 100 pages or so in, when the formatting suddenly stops working. The failure is NOT one of incorrect even/odd page determination, but rather manifests as incorrect spacing within equations inside adjustwidth_ environments. Nor does the problem go away with \strictpagecheck; I toggle this back and forth with \easypagecheck, and see only the expected occasional misattribution near the top or bottom of the pages when the latter is used, but no other difference. The problem DOES go away by commenting out any of the previous chapters, resulting in a shorter document. Finally, the .aux and .log files for two very similar runs, one above the critical length threshold and one below, do not indicate any differences apart from what would be expected. In particular, none of the memory allocations listed at the bottom of .log is anywhere near to being exceeded.

Could this be a manifestation of what the changepage documention refers to as:
"A disadvantage of the strict option is that the package generates
a new label for each adjustwidth environment, and TEX may run out
of space if there are an excessive number of labels in the document."?
If so, why is there no error message or warning to that effect, and also, why do I get the same problem when \easypagecheck is used throughout? Finally and most crucially: is there a fix? Can I somehow increase the available number of labels? I only need to get to page 165...

tocloft: part formatting doesn't happen because \numberline is omitted

A typical .toc file looks like this:

\contentsline {part}{I\hspace {1em}I want to enlarge the space between the label and the content}{2}
\contentsline {chapter}{\numberline {1}Introduction}{3}
\contentsline {section}{\numberline {1.1}Just a sample section}{3}
\contentsline {subsection}{\numberline {1.1.1}Explain}{3}

Note that part doesn't use \numberline. Therefore, we need to be a bit smarter with how we try and format that ToC entry. Should be able to check if the token list contains \numberline, if not branch and check if it contains \hspace, then parse out the hard-coded formatting and insert the required internal tocloft macros.

Or just patch the \part macro… it's an unfortunate situation!

hanging package makes ' unusable in math

\documentclass{article}
\usepackage{hanging}
\begin{document}
\[K' x\]
\end{document}

Produces

! TeX capacity exceeded, sorry [input stack size=10000].
'->\futurelet 
              \next \h@ngrqtest 
l.4 \[K' 
         x\]
!  ==> Fatal error occurred, no output PDF file produced!

As the non-active ' is re-inserted, but as this is math-active, it loops.

verse: off-by-one error with repeating indent pattern

As far as I can see, the syntax below is intended to be supported by the package. Somewhere in the bowels of the repeating code:

\documentclass{article}

\usepackage{verse}
\setlength\stanzaskip{3pt}
\poemlines{1}

\begin{document}

\begin{verse}
\indentpattern{1100011}

\begin{patverse*}

\flagverse{1¤}
From the besieged Ardea all in post,\\*
Borne by the trustless wings of false desire,\\*
Lust-breathed Tarquin leaves the Roman host,\\*
And to Collatium bears the lightless fire\\*
Which, in pale embers hid, lurks to aspire\\*
And girdle with embracing flames the waist\\*
Of Collatine's fair love, Lucrece the chaste.\\!

\flagverse{2¤}
Haply that name of 'chaste' unhappily set\\*
This bateless edge on his keen appetite\\*
When Collatine unwisely did not let\\*
To praise the clear unmatched red and white\\*
Which triumph'd in that sky of his delight,\\*
Where mortal stars, as bright as heaven's beauties,\\*
With pure aspects did him peculiar duties.\\!

\flagverse{3¤}
For he the night before, in Tarquin's tent,\\*
Unlock'd the treasure of his happy state\\*
What priceless wealth the heavens had him lent\\*
In the possession of his beauteous mate\\*
Reckoning his fortune at such high-proud rate,\\*
That kings might be espoused to more fame,\\*
But king nor peer to such a peerless dame.\\!

\end{patverse*}
\end{verse}

\end{document}

It works if there are repeating patverse* environments, though, so who knows...

koma-script and \part and \numberline

Need to look into this problem that I've kinda fixed already but need to confirm the fix won't break other things:

%    \end{macrocode}
% In default \LaTeX, the part ToC entry is written without \verb|\numberline|
% and hence the `presnum' needs to be inserted manually.
% In Koma-Script, however, this is not the case.
%    \begin{macrocode}
       {\cftpartfont \if@cftkoma\else\cftpartpresnum\fi #1}%

(Github is screwing up that markup, sorry.)

Definition for \thedate (etc?) shouldn't use x-expansion

I'm not sure why the code uses xdef here:

\appendiargdef{\date}{%
  \begingroup
    \renewcommand{\thanks}[1]{}
    \renewcommand{\thanksmark}[1]{}
    \renewcommand{\thanksgap}[1]{}
    \protected@xdef\thedate{#1}
\endgroup}

The result is poor if \today is redefined:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{titling}
\title{foo}
\author{bar}
\date{\today}
\show\today
\makeatletter
\show\thedate
\makeatother
\begin{document}
\show\today
    \maketitle
    \thedate{}
\end{document}

Changing is potentially a problem but I would say worth fixing the bug.

nextpage & epigraph: loading order

nextpage.sty contains the instruction:

% NOTE: If used with the epigraph package, 
%       then nextpage.sty must be loaded first.

but it would be nice if whatever causes the incompatibility could be worked around.

\needspace and \Needspace need to hide their actions better!

The suggestion in #10 is not sufficient. \needspace needs to work like \addpenalty / \addvspace, that is inspect a previous vertical skip, back up, does its work and then readd the space that was backed up so that a following \addvspace can interact with the space.

It is debatable if after backing up one needs to enlarge the requested space.

MWE showing the problem:

\documentclass{article}

\usepackage{needspace}


\begin{document}

\section{no needspace}

\begin{itemize}
\item x  \item x  \item x  \item x
\end{itemize}


\begin{itemize}
\item y  \item y  \item y  \item y
\end{itemize}

\newpage

\section{with needspace}

\begin{itemize}
\item x  \item x  \item x  \item x
\end{itemize}

\needspace{1cm}

\begin{itemize}
\item y  \item y  \item y  \item y
\end{itemize}


\newpage

\section{with Needspace}

\begin{itemize}
\item x  \item x  \item x  \item x
\end{itemize}

\Needspace{1cm}

\begin{itemize}
\item y  \item y  \item y  \item y
\end{itemize}

\end{document}

Result:

test-needspace.pdf

changepage: more robust even/odd test against page number changes

From Martin Münch:

if a two-sided document starts with a right side/page, and a left/even - right/odd check should be performed, one would need the absolute page number, for example \theCurrentPage from pagesLTS package:
"\theCurrentPage gives the current \theCurrentPage total/absolute page, in contrast to \thepage, which gives only the page name in the current page numbering scheme. For example, when there are Roman VII pages in the frontmatter and afterwards in the mainmatter you are at arabic page 9, then \theCurrentPage is 16, whereas \thepage is 9. When the page \number" (name) is manipulated by \addtocounter{page}{...} or \setcounter{page}{...}, \theCurrentPage ignores this. Because CurrentPage is a normal counter, you can also say e. g. \Roman{CurrentPage} to get the value in Roman page numbering scheme (e. g. VIII for 8)." (p. 8 of the pagesLTS documentation).

[snip]

\RequirePackage{everyshi}[2001/05/15]%v 3.00
\newcounter{cp@CurrentPage}
\setcounter{cp@CurrentPage}{1}
\EveryShipout{\addtocounter{cp@CurrentPage}{1}}

and using \arabic{cp@CurrentPage} instead of \thepage might help.

So, maybe you could add a "right/left" page check (assuming first page = right) to your package additional to the existing "even/odd" page number check?

The penalty used in \needspace is questionable and space check needs to apply \prevdepth correction

After skipping ahead with

\vskip 0 plus requested space

it issues \penalty -100

This means that this breakpoint is usually preferable to filling the requested space with normal text (as that will generate a breakpoint with 0 (or higher)).

If the needed space is exactly available, then the badness of the page page will be at most 100 (and probably less) thus it becomes a bonus to break at this point.

Thus the penalty should be positive (probably something like 100 or perhaps even more).

Concerning \prevdepth: the skipping ahead without taking it into account first time may be ok as that is only a stretch amount, but when doing a real skip it should be substracted. Otherwise: if there are still exactly 3 lines left and we ask for 3 lines the skip will make the page overfull if \prevdepth is non-zero. E.g., something like

  \renewcommand{\needspace}[1]{%
  \begingroup
    \setlength{\dimen@}{#1}%
    \vskip\z@\@plus\dimen@
    \penalty 1000\vskip\z@\@plus -\dimen@
    \advance\dimen@-\prevdepth                         % <---- added
    \vskip\dimen@
    \penalty 9999%
    \vskip -\dimen@
    \vskip\z@skip % hide the previous |\vskip| from |\addvspace|
  \endgroup
}

The advantage of subtracting it only at the later point is that we don't have to worry that \prevdepth really exists as we know by then that we are in vertical mode. The above doesn't contain a fix for #32

\Romannum breaks with recent latex core

Hi! It seems that a recent change to textcasing in LaTeX broke \Romannum from the romannum package.

MnWE:

\listfiles
\documentclass{article}
\usepackage{romannum}
\begin{document}
Hello! \Romannum{6}
\end{document}

Listfiles:

 *File List*
 article.cls    2021/10/04 v1.4n Standard LaTeX document class
  size10.clo    2021/10/04 v1.4n Standard LaTeX file (size option)
romannum.sty    2009/09/03 v1.0b roman numerals
stdclsdv.sty    2009/09/04 v1.1a Sectional divisions
l3backend-pdftex.def    2022-07-01 L3 backend support: PDF output (pdfTeX)
 ***********

Investigation

Unterminated \romannumeral in \romannum.

Solution

Add a space after \romannumeral #1 and \romannumeral -#1:

\newcommand{\romannum}[1]{%
  \ifnum#1<1
    \ifnum#1=0
      o%
    \else
      -\romannumeral -#1 %
    \fi
  \else
    \romannumeral #1 %
  \fi}

[hyphenat] Only underscores work

From a user:

While trying to break text at underscores in typewriter fonts I stumbled
over hyphenat, which offers a great solution for my problem (although I
redeclared \BreakableUnderscore to not use a hyphen).

During my search on how to break the text, I eventually found a stack
exchange answer recommending hyphenat with a disappointing comment it
wouldn't work: https://tex.stackexchange.com/a/290801/51583 .

Because I also found a nice example sentence with some other solutions
(https://tex.stackexchange.com/q/219445/51583), I tested hyphenat more
thoroughly as follows:

\documentclass[a4paper]{article}
\usepackage[htt]{hyphenat}
\begin{document}
If an unrecoverable error occurs during the transformation, then a
\texttt{javax.xml.transform.TransformerException} is thrown.

If an unrecoverable error occurs during the transformation, then a
\texttt{javax\_xml\_transform\_TransformerException} is thrown.

If an unrecoverable error occurs during the transformation, then a
\texttt{javax\textbackslash{}xml\textbackslash{}transform\textbackslash{}TransformerException}
is thrown.

If an unrecoverable error occurs during the transformation, then a
\texttt{javax/xml/transform/TransformerException} is thrown.
\end{document}

Interestingly, hyphenat only breaks the second version with the
underscores, contrary to the expectation.

epigraph: natural width

From Michael Palmer:

Regarding the epigraph package, may I suggest an \epigraphx macro that
adjusts the overall width to the natural text width of the quote, or
maybe to the larger of the quote and the author's name?

Here is what I use myself. (The negative vertical space is owing to my
preferred font setup.)

\newsavebox{\epbox}
\newcommand{\epigraphx}[2]{%
 % need minibox for manual line breaks
 \sbox{\epbox}{\epigraphsize{}\minibox{#1}}%
 \setlength{\epigraphwidth}{\wd\epbox}%
 \epigraph{#1\vspace{-4pt}}{#2}\noindent\ignorespaces%
}

PDF niceties in documentation

Many (most) of the packages are not compiled with hypdoc, so they're missing niceties such as PF bookmarks and hyperlinks. Should be fixed as each package is updated. Here's a list of packages that need attention:

  • abstract
  • appendix
  • bez123
  • booklet
  • changepage
  • combine
  • epigraph
  • hanging
  • hyphenat
  • layouts
  • makecmds
  • newfile
  • pagenote
  • romannum
  • stdclsdv
  • titling
  • tocbibind
  • tocloft
  • tocvsec2
  • xtab

changepage: improve documentation

Namely, adjustwidth isn't meant to cross page boundaries; changetext cannot work for fragments on a page (it's a whole page or it's nothing); ditto changepage.

tocloft doc updates

Hi WIll - since clearly (and not surprisingly) you are way overloaded, I thought I would make a note here that I sent you a long email on November 17 (2020 :) about updates to the tocloft doc. I'm happy to make them if you agree and add me to the repo ... best, karl.

Is it possible to use tocloft to get such a ToC?

I use book documentclass, and I need below ToC style:

Preface ........................ I
Abstract ........................ II
1 Introduction
1.1 Section 1 ............... (1)
1.2 Section 2 ............... (3)
2 Another Chapter
2.1 Section 1 ............... (6)
2.2 Section 2 ............... (8)
...
Ack ..............................(54)
References ................. (56)
Appendix 1 ..................(58)
Appendix 2 ..................(60)

Because I know Abstract, Introduction, and Ack all use chapter, once I change the chapter style all are affected.

layout: add marginparwidth

Original question:

marginparwidth is still omitted in the page layout, although marginparpush, and marginparsep appears. Is there a way to display marginparwidth and its length in the page layout?

Peter's reply:

it just requires adding a line to the code that prints out the parameter values (around lines 564--583 in \drawpage, macro \pagevalues, in lines 1048--1066 in \drawstock, and in macro \stockvalues (the \marginparwidth value is, I think, held in \l@youthpvii (line 273)

Change of length names, not reflected in documentation on CTAN

\cftchapindent seems to have changed to \cftchapterindent
\cftsecindent seems to have changed to \cftsectionindent
\cftsubsecindent seems to have changed to \cftsubsectionindent
\cftsubsubsecindent seems to have changed to \cftsubsubsectionindent

However none of this is reflected in the documentation found on CTAN: https://www.ctan.org/pkg/tocloft

I came here via this stackexchange post https://tex.stackexchange.com/questions/485514/left-align-all-levels-in-table-of-contents

epigraph:there should be no page breaks generated between heading + epigraph + following text

At the moment

\section{Foo}
\epigraph{bar}{baz}
Foobar  ...

allows a break after the epigraph which makes it unusable for most applications. There should be no such break imo at least not by default.



\documentclass{article}

\setlength\textwidth{207.0pt}

\usepackage{epigraph}

\iffalse % possible fix but too simple minded as that probably 
         % changes the spacing ...
         % probably better chnge the env penalties
\makeatletter
\renewcommand{\epigraph}[2]{\vspace{\beforeepigraphskip}
  {\epigraphsize
  % add box
  \vbox\bgroup\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
    \@epitext{#1}\\ \@episource{#2}
    \end{minipage}\end{\epigraphflush}%
  % and use vspace*  
    \egroup
    \vspace*{\afterepigraphskip}}}
\makeatother

\fi

\setlength\textheight{5.5\baselineskip}

\begin{document}

\section{A Package Test}

\epigraph{Cookies! Give me some cookies!}
         {Cookie Monster}

When adding a quote the paragraph following
it comes out indented.
If you don't like this use \verb=\noindent= (not that perfect either)
\end{document}

needspace: bad interactions with `\addpenalty`

Via Donald A on c.t.t.:

There is a conflict between \needspace and the \addpenalty
hidden inside the \section command.  \needspace should end
with \vskip\z@skip (\vskip 0 pt), just as the definition of
\vspace does, to ensure co-operation.

The first \needspace works because page breaks are forbidden
after chapter headings, so \addpenalty is not used by \section.

appendix: \Hy@chapapp uses \appendixname

Via https://tex.stackexchange.com/q/461125/35864 and ultimately as it turns out a few other questions, most notably https://tex.stackexchange.com/q/67627/35864, https://tex.stackexchange.com/q/58848/35864, https://tex.stackexchange.com/q/41649/35864

The following MWE fails for me (with pdfLaTeX)

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[magyar]{babel}
\usepackage[titletoc]{appendix}
\usepackage{hyperref}

\begin{document}
\tableofcontents

\begin{appendices}
\chapter{test appendix}
\end{appendices}
\end{document}

with many error messages of the form

! Undefined control sequence.
\GenericError  ...                                
                                                    #4  \errhelp \@err@     ...
l.1 ...ggel�k.a.A}{f\374ggel\351k test appendix}{}
                                                  % 1
? 
! Undefined control sequence.
\GenericError  ...                                
                                                  \let \@err@               ...
l.1 ...ggel�k.a.A}{f\374ggel\351k test appendix}{}
                                                  % 1
? 
! Undefined control sequence.
\GenericError  ...                                
                                                  \@empty \def \MessageBreak...
l.1 ...ggel�k.a.A}{f\374ggel\351k test appendix}{}
                                                  % 1
? 

The issue seems to be the use of the localised term \appendixname as anchor in \Hy@chapapp instead of a safe ASCII-only like \Hy@appendixstring.

Make \RequirePackage{tocloft} work before \documentclass

As pointed out on TeX.SE, \RequirePackage{tocloft} currently doesn't work before \documentclass and that's too bad : it would be helpful for classes which load packages that need tocloft to be loaded before them, such as etoc.

Hence, would it be possible to make \RequirePackage{tocloft} work before \documentclass, e.g. by postponing the \@ifundefined{chapter} and \@ifundefined{section} checks \AtBeginDocument?

DTX files with documentation from CTAN

Several packages do not have DTX files, and documentation for them has recently appeared on CTAN. I need to merge the CTAN docs into this repository and turn them all into proper packages. Again, I'll probably do this periodically as I make updates to them. Affected packages:

  • anonchap
  • chngcntr
  • midpage
  • nextpage
  • printlen
  • vertbars

[Tocloft] Can't change title of tableofcontents

Dear Dev,
with this MWE I'd expect to have the word Sommario instead of Indice as title of table of contents, but this is not working anymore. I don't know when this problem appeared.

% !TeX TS-program = xelatex
% !TeX spellcheck = it_IT
% !TeX encoding = UTF-8
% !TeX root = main.tex
% !BIB TS-program = biber

\documentclass[11pt,b5paper]{book}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}

\usepackage[titles]{tocloft}
\renewcommand{\contentsname}{Sommario}

\usepackage{lipsum}

\begin{document}
\tableofcontents

\chapter{kjlkklj}
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum

\chapter{kjlkklj}
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum
\section{lkjlklkj}
\lipsum
\end{document}

Best regards,
DC

verse package

A suggestion for assigning numbers (and other stuff) to a line of a verse.

% verseprob.tex

\documentclass{article}
\usepackage{verse}

% put something after the verse line (adjust the \hskip as appropriate)
\newcommand{\flagverseR}[1]{%
\hskip1.5\versewidth\rlap{#1}\hskip-1.5\versewidth}

% this version enables the \hskip adjustment via the optional argument
\renewcommand{\flagverseR}[2][1.5\versewidth]{%
\hskip#1\rlap{#2}\hskip-#1}

% counter for verse number
\newcounter{vscntr}
\newcommand{\zeroverse}{\setcounter{vscntr}{0}} % zero the number
\newcommand{\upverse}{\refstepcounter{vscntr}} % increment the number

\begin{document}

\settowidth{\versewidth}{In a cavern, in a canyon}
\poemtitle{Clementine}
\zeroverse % zero the verse number
\begin{verse}[\versewidth]
\begin{altverse} \upverse % increment the verse number
\flagverse{\thevscntr} In a cavern, in a canyon, \ % put verse number at the left
Excavating for a mine, \
Lived a miner, forty-niner, \
And his daugther, Clementine. \!
\end{altverse}

\begin{altverse} \upverse % increment the verse number
\flagverse{\textsc{chorus}}\flagverseR[2\versewidth]{\thevscntr} Oh my darling, Oh my darling \ % put something before the line and a verse number afterwards
Oh my darling Clementine. \
Thou art lost and gone forever, \
Oh my darling Clementine. \!
\end{altverse}
\end{verse}

\end{document}

xtab: support multicol

(Although this may be impossible.)

From Akim Demaille:

\documentclass{article} 
  \usepackage{xtab} 
  \usepackage{multicol} 
\begin{document} 
\def\1{1111111111111111 & 22222222222222\\}
\def\2{\1\1\1\1\1\1\1\1\1\1\1\1}
\def\3{\2\2\2\2\2\2\2\2\2\2\2\2}
\begin{multicols}{2} 
  \tablehead{% 
    \hline 
    Left & Right \\ 
    \hline 
  } 
  \tabletail{\hline} 
  \tablelasttail{\hline} 
  \begin{xtabular}{|c|c|} 
    \3
  \end{xtabular} 
\end{multicols} 
\end{document} 

tocloft and extsizes issue

This is a weird one, but to quote the relevant snippet from Matthew Skala's excellent bug report:

When the font size is 14 or 17, the value of \cftnodots times whatever
font-dependent dimension it gets multiplied with is so very large that
TeX writes out a bad DVI file.

In short, we either need to work around the leaders entirely (say using \hfill instead) or scale down the large number that gets used for "no dots":

A simple workaround is to after loading tocloft give the \cftnodots
macro a smaller value. Five thousand works for me:

  \renewcommand{\cftnodots}{5000}

Problem with changepage and parcolumns

I am trying to use the "parcolumns" environment (from the package of the same name) inside an "adjustwidth" environment. The LaTeX compiles and produces output, but also throws the following error:

! LaTeX Error: Something's wrong--perhaps a missing \item.

The columns are produced correctly, but only one of the side margins is changed by adjustwidth. Here is an example:


\documentclass{article}

\usepackage{parcolumns}
\usepackage{changepage}

\begin{document}

\begin{adjustwidth}{2em}{2em}
    \begin{parcolumns}{2}
        \colchunk {
            Here a chunk...
        }   
        \colchunk {
            ...there a chunk
        }   
        \colplacechunks
    \end{parcolumns}
\end{adjustwidth}

\end{document}

Either environment on its own seems to work fine. I had the same problem using the "changemargin" environment defined at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=chngmargonfly , and also when I used the "parallel" package instead of parcolumns.

My LaTeX version is "This is pdfTeX, Version 3.1415926-1.40.9 (MiKTeX 2.7) (preloaded format=latex 2009.11.13)" (from the .log file) on Windows XP.

Context: - I want a small length (perhaps half a page to one page) of two-column text/maths in the middle of standard, single-column text/maths. This is for a derivation where I handle two cases in parallel, applying the same operations to each (so using parcolumns to line up equivalent paragraphs is ideal). Using parcolumns alone makes those columns a bit too narrow for my equations, and making the whole document wider would probably make the single-column parts too wide. I don't want to start a new page when I change the number of columns.

I can work around this by making the text smaller instead of making the margins wider, but clearly using adjustwidth would be a more elegant and readable solution. Perhaps these environments are fundamentally incompatible?

Thank you very much for your time, and for a package that I'm bound to find useful in other situations :-)

David.

PS. "adjustwidth" does seem to work fine with the "multicols" environment from the "multicol" package.

tocloft issues a warning and renounces adding `\cfttocprehook` etc... to `\@starttoc` when parskip is loaded before it

\documentclass{book}
\usepackage{parskip}

%\makeatletter
%\show\@starttoc

\usepackage{tocloft}
\begin{document}
\tableofcontents
\section{foo}
\end{document}

gives

Package tocloft Warning: \@starttoc has already been redefined; tocloft bailing
 out. on input line 1156.

It has been reported already on tex.sx some years ago. I observed it only today with a class loading parskip automatically.

The message is emitted at end of tocloft.sty and some functionality is in place only the hooks are not installed. So the message is a bit frightening and should perhaps read "\cfttocprehook et al. not installed" in place of "bailing out".

Change marginpar{sep,width} with adjustwidth?

Hi,

Thanks for the changepage package, it's very useful!

Would it be possible to add some command or option so that using the adjustwidth environment would also change \marginparsep and \marginparwidth? I had to use the following to get what I wanted:

\begin{adjustwidth}{}{3.5cm}
\addtolength{\marginparwidth}{3.5cm}
\addtolength{\marginparsep}{-3.5cm}
...
\end{adjustwidth}

It's not really important, but it would be nicer to to have an option to also set these lengths with adjustwidth.

Thanks!

hyphenat: Feature Request: Breakable ZWNJ and Nothing

While in the English language word compositions without any joining character (such as a hyphen or space) such as “catfish” or “breakthrough” are very rare, this is the predominant case in German. This alone can often leads to long words, which break the hyphenation algorithm. Additionally, on the composing boundary you do not want ligatures to happen, e.g., for lack of a better example for English: If using a font with a kt-ligature, you do not want it to be used in “breakthrough”. In such cases you want to use a zero-width non-joiner (ZWNJ) at the boundary, which is a sure way to break hyphenation. Finally the composing boundary is (little surprisingly) a place, where hyphenation may (even should) happen. So you usually want to place a command there that tells LaTeX that:

  • it must not use a ligature here
  • it should hyphenate, whatever comes before and after, as if it they were words of their own
  • it may hyphenate here

Such a command is like hyphenat’s \colonhyp{}, just that the colon is replaced by a ZWNJ. I succeeded in creating such a command myself by adding the following lines to hyphenat’s code at the appropriate place, however mainly copying without understanding:

\newcommand{\BreakableZWNJ}{\leavevmode%
\prw@zbreak {\kern0pt}\discretionary{-}{}{}\prw@zbreak}
\DeclareRobustCommand{\ZWNJhyp}{%
\ifmmode {\kern0pt}\else\BreakableZWNJ\fi}

(I used {\kern0pt} as a ZWNJ here, since \/ and "| (as supplied by babel/polyglossia) did not work as intended. I am not entirely happy with this ZWNJ either, so if there is a better solution …)

Furthermore, I found a “\nothinghyp{}” to be useful for some odd purposes (really short justified lines with intials), so I think it may not do any harm to supply such a command too. My code for this was:

\newcommand{\BreakableNothing}{\leavevmode%
\prw@zbreak\discretionary{-}{}{}\prw@zbreak}
\DeclareRobustCommand{\nothinghyp}{%
\ifmmode\else\BreakableNothing\fi}

Sorry for not going the Git way here, but as I already mentioned: I do understand very little of the pasted code, so I preferred to thouroughly explain my intentions.

Twocolumn ToC, etc

Should have an option or a hook for two-column ToCs and List-ofs. This is quite easy conceptually:

\usepackage{multicol}
\addtocontents{toc}{\protect\begin{multicols}{2}}
\AtEndDocument{\addtocontents{toc}{\protect\end{multicols}}}

I think that since an external package is required it's not entirely in the spirit of Peter's style to have a package option that loads multicol. So I'll have to think about an interface that is not too inconvenient but general enough for multiple applications.

epigraph: page breaks bad

From Frank

At the moment

\section{Foo}
\epigraph{bar}{baz}
Foobar  ...

allows a break after the epigraph which makes it unusable for most applications. There should be no such break imo at least not by default.

\documentclass{article}
\setlength\textwidth{207.0pt}
\usepackage{epigraph}

\iffalse % possible fix but too simple minded as that probably 
         % changes the spacing ...
         % probably better chnge the env penalties
\makeatletter
\renewcommand{\epigraph}[2]{\vspace{\beforeepigraphskip}
  {\epigraphsize
  % add box
  \vbox\bgroup\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
    \@epitext{#1}\\ \@episource{#2}
    \end{minipage}\end{\epigraphflush}%
  % and use vspace*  
    \egroup
    \vspace*{\afterepigraphskip}}}
\makeatother

\fi

\setlength\textheight{5.5\baselineskip}

\begin{document}

\section{A Package Test}

\epigraph{Cookies! Give me some cookies!}
         {Cookie Monster}

When adding a quote the paragraph following
it comes out indented.
If you don't like this use \verb=\noindent= (not that perfect either)
\end{document}

verse package defines \theHpoemline with \newcommand

Could the verse package change the line

\newcommand*{\theHpoemline}{\arabic{verse@envctr}.\arabic{poemline}}

into

\providecommand{\theHpoemline}{}
\renewcommand*{\theHpoemline}{\arabic{verse@envctr}.\arabic{poemline}}

This would improve compatibility with hyperref (as it would no longer be required to load verse before) and also with the new tagging code which defines the \theH<counter> representations directly. See also latex3/tagging-project#49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.