{latex3} is about the new material being developed by the LaTeX3 Project. This includes the expl3 programming language along with higher-level concepts such as xparse.

learn more… | top users | synonyms

4
votes
1answer
66 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))?
4
votes
1answer
113 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
406 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
82 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
176 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 ...
3
votes
0answers
79 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 ...
14
votes
2answers
142 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
188 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
142 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 ...
16
votes
1answer
321 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
105 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 ...
23
votes
1answer
545 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
533 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
431 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
213 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
164 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 ...
11
votes
2answers
987 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
410 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 ...
3
votes
1answer
901 views

Installation of siunitx and LaTeX 3

I am interested in using the package siunitx. However, it appears that I need to be running LaTeX 3 in order to do this. The installation information on CTAN seems somewhat cryptic, and I am ...
4
votes
1answer
198 views

Change \baselinestretch using xparse in TeX Live 2012

Is there a preferred way to change \baselinestretch using the xparse package included in TeX Live 2012? (I believe this is xparse version 3570, dated 2012/04/23.) If I run latex -output-format pdf ...
6
votes
1answer
334 views

LaTeX 3 read/write to file like toc

I tried to reimplement some kind of a toc facility. I write wouts argument into a file and try to reinclude this. So the Problem is, that \ior_str_gto:NN seems to stop at linebreaks. Please consider ...
42
votes
4answers
3k views

Abandon LaTeX2e for LaTeX3 or LuaTeX

I think my question is: Should I abandon pdflatex, possibly for xetex or context, and a TeX/LaTeX based macro writing approach, possibly for a LuaTeX or LaTeX3 based approach? Possibly relevant to ...
5
votes
1answer
370 views

LaTeX3: Double number sign (##) [duplicate]

Possible Duplicate: What is the meaning of double pound symbol (##1) in an argument? I see some LaTeX3 code with ##1 instead of #1 for parameters. What are the rules for this? This answer ...
18
votes
4answers
482 views

How do I get a value out of a group?

I've just recovered from my first real foray into LaTeX3 programming. It was ... an experience. Not a completely unpleasant one and once I'd gotten used to the syntax then I found it a lot easier ...
33
votes
3answers
549 views

Will LaTeX3 improve freedom of package ordering and reduce “options clash”?

A prefatory afterthought: you may think this question better asked on the LaTeX3 mailing list, but I believe there may be a more general interest in the rather Byzantine rules for package load order. ...
5
votes
2answers
169 views

Latex3 input/output and expansion of macros

I have a package that formats a course outline and have a macro that reads a formatted user file and turns it into a section. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N ...
12
votes
1answer
835 views

Update / Install the newest version of LaTeX3

The developing of LaTeX3 goes on. However some feature will be improved or added. The LaTeX3 team can't upload every day a new version to CTAN. How can I install the newest version LaTeX3?
6
votes
1answer
117 views

What is the proper way to pass user input to package commands?

I'm wondering if someone can fill me on the proper technique for passing parameters from a document to the underlying package. The user would interface via a document like this: ...
7
votes
1answer
281 views

LaTeX3 from Package Options to Class Options

Howdy please consider the following expample: \RequirePackage{ expl3 , xparse , l3keys2e , xfrac } \ProvidesExplPackage {somewhat} {2012/04/29} {1} {descrr} ...
4
votes
1answer
171 views

Parse a file with a regexp and return first match

I need to write a command that searches a file for a string that matches a certain regexp, and inserts that string. I know how to parse a string of text using a regex with \usepackage{l3regex} ...
10
votes
1answer
529 views

Subscripts and superscripts

In LaTeX2 a_1, a_{123} and a^1, a^{123} used to produce subscripts and superscripts respectively. In LaTeX3 superscripts still work the same way, but what happened to subscripts? I suspect the ...
6
votes
1answer
169 views

Apply command list to argument correctly

I have a clist filled with values I want to use as commands and apply them all successively e.g. \cmda{\cmdb{\cmdc{arg}}} to the argument of the \apply function. I added an example but it doesn't ...
5
votes
2answers
197 views

regexp capturing issue

The following regexp code gives the result \documentclass[11pt]{book} % use larger type; default would be 10pt \usepackage{pgffor} \usepackage{l3regex,xparse} \usepackage{etextools} ...
4
votes
2answers
308 views

Use the \SplitArgument function to pass an array of token-separated values as a single argument

In my work with linear algebra and matrices I have been quite restricted by LaTeX2 and its maximum of 9 arguments that may be passed to a \newcommand. While LaTeX3 imposes that same limitation for the ...
6
votes
2answers
349 views

formatting real numbers using LaTeX3

I want to format real numbers, which are the result of lengthy calculations using the l3fp package, for output as values to keys in PDF objects. The formatted numbers should have at most 9 figures ...
2
votes
0answers
185 views

Nesting of case-selecting functions [closed]

Can case-selecting functions like \prg_case_int or \prg_case_str be nested? If so I will provide some examples of very weird results I observe with nesting. REVISION: I messed up the syntax ...
74
votes
1answer
2k views

What can *I* do to help the LaTeX3 Project

First, I appreciate this may not be the right place for this question, so absolutely no offence if it gets closed. I'm very much an end-user, rather than a programmer, of LaTeX, and I watch with awe ...
95
votes
5answers
9k views

LaTeX3 versus pure Lua

Reading this site for the last nearly two years I've learned a lot about LaTeX3 (which I had previously understood to be a defunct pipe dream) and LuaTeX (of which I was previously totally unaware). ...
28
votes
1answer
291 views

LaTeX3 — What is the difference between the modules l3seq and l3clist?

LaTeX3 provides the two modules seq and clist. What is the difference? The module clist is introduced by Comma lists contain ordered data where items can be added to the left or right end of ...
16
votes
1answer
849 views

LaTeX3 and pauper's coffins

Frank Mittelbach in this answer said: "I would be interested who would attempt to do that in the plain TeX box model approach. In the MWE below is my approach which I will from now onwards call it for ...
10
votes
3answers
136 views

What is the difference between \cs_if_exist:NTF and \cs_if_free:NTF?

I don't understand what difference of existance and being free means. Consider this example: \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \cs_new:Npn \my_cs: {} ...
8
votes
1answer
217 views

Print catcodes in LaTeX with LaTeX3

I have the following MWE which prints the catcode of every character in the list. The input method is: \MyList{`+,{`,},`\%,`a} but I want to simplify as follows: \MyList{+,{,},\%,a} Here the ...
5
votes
1answer
317 views

Equivalent of \@afterheading for LaTeX3

I want to define an environment with LaTeX3 where I can supress the indention in the first line. For LaTeX2e you can use \@afterindentfalse\@afterheading. The example use this combination. But I want ...
5
votes
1answer
200 views

Splitting on new lines using \SplitList

What do I pass to \SplitList to get it to split the string on a new line? I've tried \n and \r, but neither of those work. The code I used was \documentclass{article} \usepackage{xparse} ...
3
votes
1answer
528 views

Undefined control sequence with xparse

I just installed the texlive-latex3 package and tried running pdflatex on the following (copied directly from another question posted here): \documentclass{article} \usepackage{xparse} \ExplSyntaxOn ...
7
votes
1answer
508 views

How to process a comma separated list?

Using receipt of "LaTeX3: unable to convert space separated list into clist" I elaborated the following code for my needs: \documentclass{book} ... \usepackage{expl3} \begin{document} ...
21
votes
5answers
2k views

What is missing in LaTeX?

I have been reading this article and started to think about the position of LaTeX amongst the current competitors. Currently, I am using it (or XeTeX) even for ‘casual writing’ and sometimes I spend ...
5
votes
1answer
169 views

LaTeX3: unable to convert space separated list into clist

I want to convert a space separated list of items, given as argument to a function, into a clist variable in order to iterate over them. However, I am not able to create a usable clist variable as the ...
8
votes
1answer
365 views

NFSS: Is there any further plan about font scheme in LaTeX3?

What will be the place of New Font Selection Scheme (NFSS) in LaTeX3? NFSS is neither new nor answering to modern trends (I mean True and Open Type fonts). LaTeX3 team has already done huge work but ...
8
votes
1answer
500 views

Complete example from LaTeX3 intro

I don't understand an example from section 6.1 of expl3-intro.tex from LATEX3 documentation. It is said there: Here are two equivalent ways of defining the function \foo:nn: \cs_set:Npn \foo:nn ...