The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
1answer
23 views

Remove all body text from book class with nested files

I have a long set of notes as a book class where each chapter is added to the master document with \input{}. Each chapter file has sections, subsections, itemizes, enumerates, and body text. I would ...
1
vote
1answer
77 views

How can I apply a regex (l3regex) on items in a sequence? [LaTeX3]?

I am trying to apply a regular expression to a string item from a sequence in LaTeX3. Example Compiles with error, but only by pressing return many times. ! Missing control sequence inserted. ...
3
votes
2answers
21 views

Changing remote path of figures to local path with a regular expression

I am using markdown to write the bulk of my thesis, and then converting it to LaTeX (with Pandoc) for the final presentation. To include graphics I use dropbox share links as: ...
4
votes
1answer
70 views

Does LaTeX support including a specific part of an \input, like a specific environment and ignoring everything else? [duplicate]

Can LaTeX natively include only specific expressions from an input file (ignoring the rest)? I am not sure how to best word my question. Below is an example of what I'd like to do. Situation For ...
5
votes
2answers
88 views

Strange behave of index and l3regex

I am experimenting with LaTeX3 features and get a strange behaviour in a combination from index and l3regex. I try to replace all occurrences of :<space> with the exclamation mark sign, so that ...
2
votes
1answer
52 views

How to automatically put the footnotes before punctuation?

I have little problem :). I have a big file with 1422 footnotes. The problem is that I need to put every footnotes before punctuation (.,;). How to automatically put the footnotes before punctuation? ...
3
votes
1answer
50 views

Extracting the pagenumber of the first page of a section from the toc file

In a project I am working on, I use subfiles to compile a document, each containing one section. If I compile only the document containing some given section, I want the page number to be correct. One ...
6
votes
1answer
348 views

Color each letter in document

I am trying to define a command that changes the color of every letter in the whole document to a specified color. I already tried different approaches from this thread, but I was not able to color ...
2
votes
0answers
50 views

Listings - Keyword with Regex [duplicate]

I would like to colorize in a special color all my constant which are all in capital letters in my code and all my method variables which begin with an @. Is it possible to use Regex to define ...
6
votes
1answer
249 views

Dynamic calculation within regular expression quantifier in LaTeX3's l3regex package

I am trying to do some simple calculations to be applied to a regular expression quantifier used in l3regex's \regex_replace_all:nnN function. I've built my code around what I found here: Defining a ...
40
votes
4answers
2k views

Has the time come for a LaTeX3 successor to 'listings'?

I'm currently looking for a nice and challenging open-source project to work/collaborate on after my thesis. I don't have a Comp. Sci. background, but I'd like to learn more about compiler ...
2
votes
1answer
226 views

l3regex usage throws __scan_new:N error

Using TeXLive, with this MWE \documentclass{article} \usepackage{expl3} \usepackage{l3regex} \begin{document} a \end{document} I get an error for an undefined control sequence ...
3
votes
1answer
146 views

How can I match a control sequence using \regex_match?

How can I match a control sequence using \regex_match? This code \newcommand{\iw}[1]{\immediate\write16{#1}} \iw{1 should be true} \regex_match:nnTF {May} {May} {\iw{TRUE}} {\iw{FALSE}} ...
8
votes
1answer
136 views

Missing space when replacing with \regex_replace_all:nnN

How can I make \regex_replace_all:nnN not remove the space between x y? \documentclass{article} \usepackage{l3regex} \ExplSyntaxOn \cs_new:Npn \replace #1#2#3 { \tl_set:Nn \l_tmpa_tl {#3} ...
17
votes
1answer
519 views

Defining a find and replace algorithm using LaTeX3's l3regex

I've been trying to work out the mechanics of LaTeX3's regular expression system as implemented in l3regex, but am having some difficulty understanding how/why it is acting as it is. If I use as an ...
5
votes
0answers
224 views

Dynamically applying formatting to regular expressions [closed]

One useful tool I find in InDesign are the Grep styles. With them, one can define character styles (e.g., boldface in small caps) for whatever expression matches the grep pattern. I know this is ...
1
vote
1answer
342 views

Regular Expression for logical implication?

I am massively unfamiliar with the usage and syntax of regular expressions so the following problem is making my brain bleed. Background: I am taking logical expressions, parsing them, making some ...