{expl3} is the programming "language" written for the LaTeX3 project. It is a library of common functions for storing and manipulating data and performing higher-level logical tasks than commonly provided for in TeX and LaTeX.
6
votes
2answers
33 views
Inline Mapping Bug?
The enclosed document creates a sequence variable and then uses inline mapping to attach a sequence number to each item. The inline map then outputs the result and places it into a token list variable ...
19
votes
2answers
279 views
Using LaTeX3’s xtemplate
Relevant are the answers to Moving to LaTeX3 for package authors and What new bits have already been implemented in Latex3? Will my current documents (with many packages) still compile with Latex3?
...
9
votes
2answers
82 views
Emulating \@ifnextchar in expl3
I would like to write an expl3 version of the following.
\documentclass{article}
\makeatletter
\def\ie{i.e\@ifnextchar.{}{.\@{} }}
\makeatother
\pagestyle{empty}
\begin{document}
\noindent
\ie ...
8
votes
3answers
98 views
Test whether last letter of a string is upper case or not
I would like to define a command that will behave according to the nature of the last character fed it. But I'm having difficulty just getting the components of my command to work.
I thought I could ...
13
votes
1answer
106 views
How do I register the prefix of my expl3 package?
This question needs an easy to find answer here, so:
I was told that I can and should register prefixes of my macro names in my expl3 using packages. How do I do that?
6
votes
2answers
92 views
How to document a expl3 macro using dtx
I am writing the documentation to a package implemented in expl3 using ltxdoc, and the relevant part would look like
% \begin{macro}{\conteq_args_once}
% Some explanation
%
% \begin{macrocode}
...
7
votes
2answers
80 views
Can I store sequences in sequences with expl3
The documentation for l3seq states
LaTeX3 implements a “sequence” data type, which contain an ordered
list of entries which may contain any balanced text .
but for many programming tasks it ...
8
votes
2answers
99 views
PDF keywords from Expl3 clist
I’m trying to add PDF keywords to my résumé. In the custom class file, I have these lines:
\clist_new:N \jcsres_keywords_clist
\NewDocumentCommand \keywords {m} { \clist_gset:Nn ...
3
votes
1answer
58 views
Expl V-type argument no fully expanding as I expected
This is related to an earlier question of mine.
I'm posting my own interpretation of what's happening hoping that if I'm wrong, someone will chime in an explain why.
The issue with xparse's ...
5
votes
2answers
77 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}
...
4
votes
2answers
60 views
“hiding” \par from a tabular
I want to use a macro to write a line of a tabular. As part of this macro, there is an argument that isn't set in the tabular, but is saved for later use. This unused argument should be allowed to ...
7
votes
1answer
77 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
2answers
53 views
l3prop - getting an entry inside a macro fails
I the following example I defined two new macros \UseLength and \xUseLength. Both macros shall put back the stored value of the key in the input stream. The macro \UseLength works as expected. The ...
5
votes
1answer
44 views
How to redefine \str_if_eq:xxTF for backward compatibility
I just updated all the packages for TeXLive 2012 today and it appears that \str_if_eq:xxTF has been deprecated.
How do I define a macro so that I can use the latest TeX Live but still be able to run ...
4
votes
2answers
76 views
Can't generate a tikz matrix, using expl3
Suppose, I want to generate a matrix of nodes:
\documentclass{article}
\usepackage{expl3}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\matrix
[
row ...
3
votes
1answer
44 views
How to use a macro inside \tl_set:Nx
This code works:
\documentclass{article}
\usepackage{expl3}
\usepackage{color}
\setlength\parindent{0pt}
\begin{document}
\ExplSyntaxOn
\tl_new:N \_text
\tl_set:Nn \text {1}
\tl_set:Nx \text ...
3
votes
1answer
51 views
expl3 outputting sequence of plists
Suppose, I have a sequence of 2 plists:
(
{
1 => 2,
3 => 4
},
{
5 => 6,
hello => 8
}
)
I am traversing through the sequence and want to output only plists, ...
27
votes
2answers
227 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?
6
votes
3answers
215 views
How to use data structures in TikZ?
I created a foreach statement, using expl3 and TikZ/pgf:
\documentclass{article}
\usepackage{tikz}
\setlength{\parindent}{0cm}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new:Npn \Counter #1 \Stopper { ...
9
votes
2answers
97 views
Text within ExplSyntaxOn/Off
As below, I would like to test whether a user has input some custom text, and if not, then to display default text.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\tl_new:N \l_empty_tl
...
7
votes
1answer
126 views
Wrapper for siunitx' \SI macro to automatically split number and unit
Problem
I use the siunitx-package to typeset numbers and units with correct spacing etc. There is a command
\SI{<number>}{<unit>}
for that. However, it would be much easier to write ...
4
votes
1answer
122 views
Search specific entries in database
I have written a command, which takes five arguments to interpolate between two points.
Now I tried to get the two points from an csv file.
\documentclass{article}
\usepackage{expl3}
...
8
votes
1answer
95 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 ...
3
votes
1answer
41 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 ...
4
votes
1answer
74 views
Writing macros on file defined at compilation time
This is a follow-up to this question. I have a LaTeX3 code that reads a file formatted as follows:
<numberA> "<nameA>"
<numberB> "<nameB>"
<numberC> "<nameC>"
...
1
vote
0answers
67 views
Conflict between expl3.sty and breqn [duplicate]
I've encountered some problems using the breqn-package. I've allready read most of the topics on this forum about breqn but didn't find a solution.
When I use the breqn-package, the log-file produces ...
3
votes
0answers
458 views
miktex 2.9, l3kernel installation fails [closed]
I freshly installed 2.9
I tried to compile a XeLatex document, which works fine on my work computer.
I got the following error:
expl3.sty missing.
It tries to install l3kernel
starting package ...
14
votes
2answers
277 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 ...
3
votes
1answer
55 views
List Version of \str_if_eq
I am using \str_if_eq:xxTF{\A}{\Target}{<true>}{<false} to execute the <true> or <false> code if \A=\Target.
What is the list version equivalent of this?
So I am looking for ...
13
votes
1answer
171 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. ...
6
votes
2answers
108 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
49 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
69 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
295 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 ...
2
votes
1answer
82 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
83 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 ...
8
votes
2answers
177 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
91 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
47 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
72 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 ...
2
votes
0answers
64 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
118 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 ...
3
votes
0answers
673 views
File expl3.sty not found when trying to compile a *.tex file with XeLaTeX [closed]
I've installed XeTeX to my Fedora 17 recently (before that, I was using pdfLaTeX). The main reason for switching to XeTeX was the polyglossia package I'd like to make use of. Unfortunately, whenever ...
9
votes
1answer
170 views
Store results of a calculation automatically under a new macro name
As I am now accessing values from tables via a macro to make dynamic references in the text (see here) and make calculations with it, I need a way to make the resulting variables under which the ...
4
votes
1answer
160 views
xeCJK l3-too-old
I started using XeTeX and whenever I use the xeCJK package I get the following error:
! Critical xeCJK error: "l3-too-old" !
!
! Support package 'expl3' too old.
!
! Please update an up to date ...
5
votes
0answers
330 views
Trying to make an automatic histogram (in pgfplots?)
How can I convert the automatic table generated by the macro, to an automatic histogram?
Is the best way do it using pgfplots?
\documentclass{article}
\RequirePackage{ifthen}
...
3
votes
1answer
116 views
Problem with tikz-pgf and \pgfmathabs
This is a follow up question to Problem with pgfmathsetmacro in foreach loop with pgfplots.
In short I also want to use \pgfmathabs to get the absolute value of a number in that example (with \i as ...
6
votes
1answer
143 views
luacode and ExplSyntaxOn/Off
I'm trying to build some sort of an interface to a lua matrix module. I've navigated a few issues and arrived at something that I felt like I could probably modify to work. Anticipating the need for ...
3
votes
1answer
80 views
Extra line in a tabular using expl3 syntax
I'm having trouble using (the amazing) expl3 package with a tabular environment. Specifically, I'm getting a full extra row in my tabulars when creating rows using \seq_map_inline. I can avoid this ...
13
votes
1answer
404 views
How to transpose a table in expl3
I've been very impressed with xparse and expl3, and have written a wonderful document command using \ProcessList that takes a comma separated list and turns it into a (basically) 1 column table.
...