Questions tagged [code-review]
{code-review} asks for a review or possible improvement of the code used to create some output (typically a {diagram} or some structured format like a {title-page}).
59 questions
4
votes
0
answers
186
views
RFC: An new (?) alignment environment
One of the issues I have with ams alignment environments is that they use "cells" which change in size to fit their content. This is required for all cells which are used for alignment, but ...
3
votes
0
answers
80
views
Externalising l3draw pictures with memoize
Note that I just got this to minimally work, so do not take the claims below without a spade or so of salt.1 In particular, 'works' is employed in a sense likely to deviate significantly from ordinary ...
4
votes
0
answers
73
views
Inserting "background" material after the previous line
This is sort of a code review question.
I wrote a macro \backbelow to insert "background" material after the previous line. This can be used to wrap the text around a figure without wrapfig ...
0
votes
1
answer
347
views
Drawing two planes in space, highlighting the intersection line
So, I'm stuck on this drawing: I have to draw two planes of equations x+y+z = 2 and x+y-z = 1, highlighting the line obtained by their intersection. This is what I wrote so far. I'm not happy, it ...
0
votes
1
answer
75
views
Unecessary checks before calling `\cs_if_exist_use:cTF`?
Consider this wrapper as an example:
\prg_new_conditional:Nnn \check_engine:n{p,T,F,TF}{
\tl_trim_spaces_apply:nN{#1}\__check_engine:n
}
\cs_new:Npn \__check_engine:n #1{
\bool_lazy_any:nTF{
...
2
votes
1
answer
154
views
Efficiently checking if an input can be parsed as a floating-point number in an expandable way in LaTex3?
I am trying to implement a function in LaTeX3 \check_if_fp:n that checks if an input can be parsed as a floating-point number (in an expandable way, so not using regexes). After a lot of thinking I ...
2
votes
0
answers
147
views
Using the `l3` layer to define headings
Further to my previous question regarding a package I am developing and in which I failed miserably to communicate some of the concepts clearly, here is what I am trying to achieve. The package is to ...
0
votes
0
answers
74
views
Modifying partially the book class chapter code using l3 language
Consider the following code, which is an extract from a much longer code, which I tried to reduce to a more reasonable size.
What it does?
The code provides a package, that overwrites the chapter ...
3
votes
3
answers
375
views
Testing if a string is a hexadecimal string in LaTeX3: code review, optimization, expandability, and protection
Consider the code in LaTeX3. It tests whether a string is a hexadecimal string (optionally also testing the length of that string) (a string where every character is either 0-9 or A-F).
\documentclass[...
13
votes
2
answers
389
views
Code Review: LaTeX Profiling in expl3
I have a pretty big template of packages/classes for multiple different document types.
Some of the users sometimes complain that the compile times are soooo long.
However, to find the bottlenecks of ...
0
votes
1
answer
112
views
Add comma after journal title and "new series" (spelled out in full) in biblatex
My code:
\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Read \textcite{sarfraz}.
Read \textcite{...
0
votes
0
answers
77
views
Evalution of new version command / Code review
I'm still newbie latex user, so I need help from advanced users to figure out in macros restrictions and their pitfalls
Prerequisites:
I need to extract filename from its path, and I found this ...
1
vote
1
answer
2k
views
easyreview package : setreviewsoff not working
I have been working on a personal template for preparing my papers in case some journal don't have one.
In the way, I found the easyReview package and the commands \setreviewsoff or \setreviewson ...
1
vote
1
answer
82
views
Looking for a better layout or style in writing solutions of equations
Before I proceed to write a lot of solutions, I want to adopt a style that I will use consistently in my document. So far I write a solution of an equation as follows. Could you review this ? Any ...
0
votes
1
answer
132
views
Is this a good way to change \section in document using luacode? Or could this be done using plain Latex macro?
I wanted to do simple thing. Change each \section to \cprotect\section in the whole document.
I could not figure out how to do it using latex macro. So I used lua
I'd like to ask if you think this ...