Questions tagged [etoolbox]

{etoolbox} is a package which provides several macros which take advantage of the {e-tex} extension of (La)TeX.

31 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
2 answers
686 views

Output to multiple .pdf documents using LuaLaTeX and Toggles

I have a document that I sometimes want to print as one single document, and other times I want to print it as smaller groups of pages. I would like to automate the process. I'm using TeXmaker with ...
  • 404
3 votes
0 answers
74 views

cleveref refers to appendix as chapter when titlesec is used

I use titlesec to adjust chapter headings for the report class (no page breaks in main report, but with page breaks in appendix). However, cleveref now refers to the appendix as "chapter A" instead of ...
2 votes
0 answers
29 views

How to detect if a certain patch has been made?

This answer offers a nice patch to allow lineno works fine with amsmath environments, and I would like to use this in some of my classes and styles that use lineno. However, this may cause the patch ...
  • 6,821
2 votes
0 answers
50 views

How to generate a list containing the values of a table

I have a table containing two columns with x and y values respectively and I want to generate a list \coordinates containing (x,y) for each row of the column. I tried defining a command that creates a ...
  • 2,748
2 votes
0 answers
200 views

Indentation and fonts conflict in theorem environment with amsbook

I'm using amsbook package but don't like the indentation at the beginning of theorems and proofs environments. I've tried to the the solution proposed here, and it works with respect to indents, ...
  • 121
1 vote
0 answers
46 views

How do I separate chapters and insert a few empty lines between two chapters?

I know it has been asked before but I just can't seem to make it work not matter what I try. I am using the report class. Now I want only my chapters to start below the end of the preceeding chapter. ...
1 vote
0 answers
36 views

exam/geometry: First footer is shifted below when setting geometry using \AtBeginDocument

This answer does the job for placing the header right. However, the first footer is unknowingly shifted way much down. So, why does \AtBeginDocument{\settototalheight\headerTotalHeight{\headerContents}...
  • 8,839
1 vote
0 answers
417 views

Use \apptocmd to redefine \chapter

I am trying to write the style name into the marginal part, e.g., CN&CT to come at marginal note for \chapter tag, for this, I tried with the code, which are follows as: \documentclass{book} \...
  • 11.3k
1 vote
0 answers
205 views

Different titleformat style for different numberless chapters (2nd part)

Referring to this thread: Different titleformat style for different numberless chapters, I've the following code: \begin{filecontents*}{\jobname.bib} @book{ bottero:1992, author = "Bottero, ...
  • 1,877
1 vote
0 answers
60 views

Calling author, title, etc without format

I am working on a document in which I use the environment titlepage for the cover. My problem is that I use later \@autor, \@title, etc, and since they are formatted on the cover; when I use these ...
1 vote
0 answers
70 views

Dynamic datatool group by

I found this code in datatool group by? \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{ff14.txt} ClassID; Schueler_Name; Schueler_Vorname; Subject 5a; Stiner; Markus; Big ...
1 vote
0 answers
62 views

datatool & etoolbox - more expansion shenanigans

This is the code in question: \documentclass{article} \usepackage{etoolbox} \usepackage{datatool} \usepackage{longtable} \usepackage{fp} \def\initialValue{10} \DTLnewdb{thisEntryDBWarehouse} \...
  • 113
1 vote
0 answers
108 views

Inverse Search with etoolbox

I have a collection of documents, all of which contain a common "sub-document" using the subfiles package. These different master documents all define various booleans using the functionality from ...
0 votes
0 answers
24 views

How do I check if a list item is blank when it is passed as a parameter in LaTex?

I'm trying to create a command that accepts two lists using the \listofitems package where the first list is optional. In the command I want to check if the first entry in the optional list is "...
  • 1
0 votes
0 answers
15 views

Adding Appendix entry conditionally

I would like to get a line in my table of contents, list of figures, list of tables, and list of algorithms depending on whether there are elements in the appendix/appendices. I have tried to do it in ...
0 votes
0 answers
16 views

Error messages when compiling PDFLaTeX on Heroku server

I run this process to generate my pdf file on my local machine and it works fine. However when I host it on Heroku with a Django app I will get some error messages. process = subprocess.Popen( ...
0 votes
1 answer
30 views

Auto infra\supra with Linguex examples

I'm trying to make this work with Linguex: https://tex.stackexchange.com/a/360869/262813 But I always get "infra". \documentclass{report} \usepackage{linguex} \usepackage{etoolbox} % ...
0 votes
1 answer
101 views

How to reduce one counter

In the MWE below, the excoutP is added to store the value of excout. How can we only use the counter excout? \documentclass{article} \usepackage{etoolbox} \usepackage{xcolor} \...
0 votes
1 answer
27 views

Excessive vertical space after quote using report class

I want to get rid of excessive vertical spacing after a block quote using the report class. I am using this suggestion to customize the font size and spacing of the blockquote. It appears as if the ...
  • 1
0 votes
1 answer
73 views

What is a robust user-defined way to define cross-references and adjunct values that work inside and outside environments?

This question is a follow-up on these two Why does \zifrefundefined fail on tcolorbox reference? \@nameuse fails on definition within tcolorbox What I want to achieve: I want to have an environment,...
  • 251
0 votes
0 answers
60 views

Conflict between hyperref and etoolbox packages

I'm trying to compile a file using hyperref to get hyperlinks and etoolbox, for I want a specific setup for theorems that I actually found here (https://tex.stackexchange.com/a/424034/248426). However,...
0 votes
0 answers
33 views

Error with unicode characters in cseappto

\documentclass[a4paper,10pt]{book} \usepackage[utf8]{inputenc} \usepackage{etoolbox} \begin{document} \cseappto{myList}{entry1} \cseappto{myList}{entry2} \cseappto{myList}{{\'e}ntry3} ...
  • 113
0 votes
0 answers
72 views

ttfamily in the chapter title of Korean language document

When having a Korean document and we have \ttfamily in a \chapter (or other section command) we get an error in respect to etoolbox, and a crash on the line after the \tableofcontents (independent of ...
  • 1,217
0 votes
0 answers
43 views

Chemical packages bug fontspec mhchem siunits

Example: \documentclass[10pt]{beamer} \usetheme{Singapore} \setbeamertemplate{navigation symbols}{} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{helvet} \usepackage{natbib} \...
0 votes
0 answers
61 views

Hyperlink to homepage after author in amsart

The amsart class provides the command \urladdr which is intended to place a hyperlink to the homepage of each author at the end of the document. I wonder whether the amsart setauthors command can be ...
  • 209
0 votes
0 answers
71 views

Hook for outer par mode

Is it possible to execute macros after the correct mode is 'reached?' \documentclass{article} \usepackage{etoolbox} \usepackage{marginfix} \newcommand{\mymarginpar}[1]{\AfterEndEnvironment{figure}{\...
  • 6,009
0 votes
0 answers
47 views

etoolbox error in running template for ScienceAsia

Currently I am using pctexv6, and I tried to typeset this following simple template for a specific journal. However the output didn't come out and I got error message saying ! Package etoolbox Error: ...
0 votes
0 answers
347 views

How to set fancyhdr on chapter initial page of two side report?

\documentclass[twoside]{report} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \chapter{First} \lipsum[1-9] \end{document} Given the obove as a start. I see one ...
  • 1,122
0 votes
0 answers
54 views

Two column bibliography in 9pt with no Bibliography title, no article titles and use journal abbreviations

I'm trying to squeeze a two column bibliography into a one column article document using this in the preamble. So far so good: \usepackage{multicol} \usepackage{etoolbox} \patchcmd{\thebibliography}{\...
  • 3,285
0 votes
0 answers
119 views

\isdefempty not working for multiple macros

I am still learning tex. The following example allows me to check if a variable exists, and if it does then prints some text in the PDF. This works great. However, when I add in a href, this appears ...
  • 41
0 votes
0 answers
273 views

An environment for conditional compilation using a switch

I want to bar certain parts of my document from compiling based on a toggle switch. The reason is that my books contain a lot of PGF diagrams and graphs and the whole book takes a lot of time to ...
  • 867