{latex3} is about the new material being developed by the LaTeX3 Project. This included the expl3 programming language along with higher-level concepts such as xparse.
5
votes
2answers
70 views
Expl variable assignments not behaving as I expect
I don't get what I'm doing wrong here. Neither of the commented lines work as the uncommented version does.
\begin{filecontents}{silly.tex}
This is just a test.
\end{filecontents}
...
7
votes
1answer
73 views
Sorting a clist in LaTeX3
I have a clist that I'd like to bubble sort. I'm sure this is a simple matter of something like \clist_bubblesort:N or something, but I don't know what the appropriate incantation is. A quick google ...
6
votes
1answer
66 views
\pdfstrcmp or \strcmp in pure TeX
I'm trying to get LaTeX3 working with an old e-TeX kernel, and it fails due to the lack of \pdfstrcmp (or XeTeX's \strcmp equivalent).
Is there a pure TeX definition of \pdfstrcmp that I could insert ...
1
vote
1answer
42 views
Error compiling modiagram [closed]
EDIT: This question has been identified as a bug
Consider the following MWE as t.tex from the modiagram manual:
\documentclass[border=3mm]{standalone}
\usepackage{modiagram}
\begin{document}
...
6
votes
0answers
94 views
Index problem when using l3doc for LaTeX document writing
I use l3doc to write document for my package. In the document I need describe macros, environments and options of the package. I started using the environment function only. After the tip came from ...
27
votes
2answers
213 views
What do ExplSyntaxOn and ExplSyntaxOff do?
Related to the question What do \makeatletter and \makeatother do? for LaTeX2e, here related to LaTeX3
What do \ExplSyntaxOn and \ExplSyntaxOff do?
8
votes
2answers
147 views
Automating table creation
I have the following table that I need to recreate quite a few times
Due to its size and complexity (yes, I am a tex novice) I am looking into
ways of automating the creation of said table. I try ...
3
votes
1answer
94 views
Emulating amsmath's \varGamma…\varOmega with unicode-math
While recompiling old documents with XeLaTeX and unicode-math I have run into the two problems:
The amsmath \varGamma...\varOmega macros for slanted uppercase Greek math characters are not defined. ...
8
votes
1answer
87 views
Working with clist indices in LaTeX3
Friends, I'm trying to port an old code of mine to a LaTeX3 implementation. Thanks to egreg, Joseph and David, I made a good progress! But then, I got stuck.
From the link above, I'm porting my ...
2
votes
1answer
34 views
How do I create an expandable conditional with a loop inside?
I need to create an expandable conditional that uses a loop (that is, a ..._map_function:). It should either return true from inside the loop, or return false otherwise. In a 'normal' programming ...
17
votes
1answer
193 views
Grid typesetting with LaTeX3
Grid typesetting is something that is rather hard to achieve with LaTeX and as this question states there are currently two packages, e.g. grid and gridset, that can help to use grids. Unfortunately ...
8
votes
0answers
205 views
A flexible derivative macro with LaTeX3
In an earlier post I asked a question about writing a flexible derivative macro, and someone suggested that a LaTeX3 version might be easier to understand, so I decided to try my hand at writing one. ...
1
vote
0answers
39 views
flexisym incompatible with AMS classes since last expl3 update
It seems that since the last expl3 update (March 14, 2013), the flexisym package (used by breqn) is no longer compatible with the AMS document classes. Here is a minimal failing example:
...
14
votes
2answers
272 views
LaTeX3: How to get reliable control over the level of expansion?
Say you want to write LaTeX3 code that manages user data. Sometimes you want to process that data, but other times you just want to store it, move it around and return it unchanged (when developing a ...
5
votes
1answer
75 views
listings package and latex3 variable
I'm trying to change a custom environment from a lot of optional parameters to a ;-separated list (using this answer as a template and writing its main functionality as a latex3 macro).
The macro ...
0
votes
1answer
240 views
Siunitx installation: I can't find file l3docstrip.tex
I have some problem trying to compile siunitx.
When I do latex siunitx.dtx, I get the following message:
! I can't find file `l3docstrip.tex'.
l.77 \input l3docstrip.tex
Where am I supposed to find ...
13
votes
1answer
159 views
Is there a LaTeX3 approach to \ignorespaces?
The following code works as I would like it to: Given the state of the boolean, certain content is to be printed or not. If it's not printed, then I run the risk of creating extraneous whitespace. ...
17
votes
3answers
379 views
Always use \NewDocumentCommand instead of \newcommand?
Are compelling reasons to stick with \newcommand or should one always use \NewDocumentCommand instead, even when not using any of the additional features offered by xparse?
In addition and more ...
6
votes
2answers
171 views
A macro for optimization problems
This question is an extension of Using an array environment inside an xparse command. I was advised to make a separate question for the extension. I would like to thank egreg very much for his help. I ...
6
votes
2answers
106 views
How do you signal an error from within an expandable function?
I would like to do some error checking from within an expandable function. But my attempts at signalling an error are not processed correctly, but rather returned to the input stream---contrary to my ...
1
vote
1answer
48 views
Unexpected hung latex compilation with property list retrieval
This is very closely related to a previous question of mine. From the comments to this previous question, I understand that my approach here is completely wrong headed. So why bother post a ...
3
votes
1answer
67 views
key values getting improperly passed through a property list getter function
I'm creating rather complicated diagram and would like to put all the controls all in one easy to find location and not scattered throughout the document. To do this, I've created setter and getter ...
14
votes
1answer
285 views
Guidelines: when is LaTeX3 too much LaTeX3?
This morning I found myself writing a document where essentially the same text is repeated several times. Because I've been mucking around a lot recently learning LaTeX3, it took absolutely no ...
3
votes
1answer
144 views
Learning LaTeX3
In my attempt to venture in the realm of LaTeX3 coding, I was wondering if a list of answers, in LaTeX3, can be made? That is, a list of links to answer in which users here at TeX.SX have used such ...
2
votes
1answer
74 views
LaTeX complaining about illegal parameter number
Inspired by a question yesterday, I thought I'd try my hand at a LaTeX3 solution which would show how to convert base 10 numbers into any other base of the user's choice.
Yesterday I wrote a nice ...
8
votes
1answer
81 views
printing the value of a boolean to terminal without stopping latex
I'm trying to debug some LaTeX3 code. To do so I would like to write the value of an internally generated boolean to the terminal, but I don't want to stop the work-flow of the LaTeX run.
For the ...
23
votes
3answers
367 views
A guide to understanding expandability: when to write protected functions and when not to
I'm having difficulty understanding (and appreciating) the concept of expandability. I'm very murky about understanding when and how expandability impacts me in writing code for my documents.
I've ...
6
votes
1answer
73 views
Conflict between xparse and pstricks: pstricks doesn't believe xparse function is defined
I want to create a pspicture with a variety of parameters which are interdependent. I'm using expl3 for the interface. But I get an error when I try to use \getr
Error: /undefined in \getr
Operand ...
4
votes
1answer
80 views
key-value is not being read as expected
I'm trying to write some code that allows me to reveal in stages the content of a pre-existing file (a pspicture showing a geometric construction). I'm trying to write this using LaTeX3. I've got ...
5
votes
1answer
44 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}
...
8
votes
2answers
174 views
aliasing vs variants — preferred practices?
This is somewhat related to a question I asked earlier here.
I'm trying to split a token using a delimiter. However, the delimiter is stored in a token. Looking at the most recent documentation, I ...
5
votes
2answers
86 views
Splitting delimited token list argument
I wrote a little piece of code (function \getfirst:w) that splits its delimited argument at the first embedded :. The code works well if used standalone, but I am unable to place it into the .code:n ...
2
votes
0answers
46 views
testing whether a variable or control seq. is a box in LaTeX3
Is there a way, in LaTeX3, to find out whether a given control sequence or variable is a box register (created with \box_new:(cN))?
3
votes
1answer
71 views
Commands from xparse inside functions created by \cs_new:Npn?
Is it okay to put commands from xparse inside functions created by \cs_new:Npn instead of \NewDocumentCommand? Would that be a confusion of programming levels?
The example below works but I was ...
5
votes
2answers
299 views
latex3 complaining about Undefined control sequence. But it is defined!
I've tried pairing this down, but each time I do that I'm either correcting my mistake or something. So here's a slightly unwieldy MWE.
In a nutshell, what I'm trying to do is....
I'm writing a ...
6
votes
1answer
49 views
latex3: errors I don't understand
I have the following code:
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\cs_new:Nn \__test_current_choice_against_version: { I'm working }
\seq_new:N \g__user_defined_choice_seq
...
3
votes
1answer
105 views
How to map optional arguments to functions?
What is the right way to map each optional argument to a function that applies a specific style to it?
In the example below, optional arguments are typeset in bold face preceded by a colon. But I ...
2
votes
0answers
63 views
Is there a gentle introduction to learning expl3 syntax [duplicate]
Possible Duplicate:
Programming with LaTeX3
I was going to post a question about creating a switch within a command to determine formatting for a command and came across the following link
...
13
votes
2answers
114 views
writing to \jobname.aux using LaTeX3
In LaTeX2e, one can write to the standard auxiliary file via the \@auxout file handle. Are there dedicated LaTeX3 functions (planned) that facilitate writing to \jobname.aux or is there an equivalent ...
10
votes
2answers
161 views
How to make the last word in a sequence the first?
I am looking for a macro that would take a string (better to say -- a sequence of words) and output the last word at the fist place before remaning part of the sequence. I want to put this macro into ...
4
votes
2answers
96 views
Automatically run a LaTeX3 function on the document environment
Is it possible to define a package so that it will automatically run a LaTeX3 function on the entirety of the document environment?
If I define a function similar to the following:
\cs_new:Npn \demo ...
13
votes
1answer
144 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
1answer
86 views
Is a command with an argument before and after the command possible?
I'm trying to create a LaTeX3 command that works the same whether its argument comes before or after the command. For example, I'd like to define \squared to be used as either \m\squared or \squared\m ...
15
votes
1answer
315 views
Programming with LaTeX3
What is the best way to learn to programming in LaTeX3, and where can I get the best information in your opinion. I know that does not sound like a specific question, but I want to deepen on LaTeX and ...
7
votes
3answers
248 views
parse variable length comma separated list into command
I've been trying to modify the solution here into a LaTeX3 command that takes a variable length comma separated list of numbers and an optional argument (a unit) and prints the square root of the sum ...
2
votes
0answers
212 views
When will LaTeX3 be released? [closed]
I'm surprised how difficult it was to google the answer to this question, so now I'm asking in here: When is LaTeX3 likely to be released? How far is development at this moment? And what is currently ...
17
votes
1answer
192 views
Is there a right way to do combined conditionals in LaTeX3?
I have some LaTeX3 code and I want to add a new feature. This will involve choosing between various actions at a particular point. There are two choices to be made, and these choices are ...
4
votes
2answers
117 views
xparse verbatim with newline
I'm trying to define a simple command using xparse and it's verbatim argument:
\DeclareDocumentCommand\macro{v}{#1}
but see
! LaTeX error: "xparse/verbatim-newline"
!
! Verbatim argument of ...
10
votes
2answers
749 views
Iterative method to solve nonlinear equations
I am trying to solve the following equation (coming from fluid dynamics) using TeX.
1/sqrt(lambda) = 2 * log(Re * sqrt(lambda)) - 0.8
where lambda is the unknown, sqrt means "square root", the log ...
5
votes
1answer
287 views
7-2012 l3kernel & l3packages updates | 'broken'?
After installing recent updates to l3kernel and packages (both packaged 2012-07-19) on my MikTeX 2.9 system, several things seem to have broken:
docs relying on unicode-math no longer compile ...

