Stack Exchange network consists of 183 Q&A communities includingStack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I try to implement the currying function , and I start from implement the following :\myproc<=b<=a will print a \mapsto b \mapsto {\rm output}\myproc<=b will print {\bf a} \mapsto b \...
I am working with an old LaTeX file originally prepared by a retired professor (on macOS, with a rather old TeX distribution).The preamble contains many packages and manual layout settings. My goal ...
\def : How is the \verb command, e.g. in \verb=\verb=, defined?I'm not asking about \verb as such, but as an example how to \def something like that, a command with arguments encapsulated in brace-...
I'm trying to draw a 3D parametric curve ⟨x(t),y(t),z(t)⟩ using \addplot3 in TikZ/pgfplots, but I want to predefine the functions for x(t), y(t), and z(t) so that I can reuse them later in my drawing, ...
According to the comment package documentation p.2 section 3.1 one should be able to rename the cutfile's file name.Given the following MWE this does not seem to work:\documentclass{article}\...
Suppose that one defines (with \def) macros with a lot of text, lots of such macros, using a good amount of TeX memory. Some useful stuff is done with these macros, then they are not needed anymore....
I have madethis command \RepNum{#1}{#2}. This command is created to indicate the number of times the argument #1 is repeated in the list #2, separated by commas.\def\RepNum#1#2{% \begingroup \...
Given the list one,two,three,four,fiveHow can I retrieve the third element three from the list?CODE:\documentclass{article}\def\myList{one,two,three,four,five}\begin{document} The ...
I am trying to compile this Tex file with this style file in the same directory, following these instructions. I am using TeXstudio 4.8.1.I am getting the following error messages:e-jc.sty error 73 ...
I'm trying to apply the parallel foreach idea from https://tex.stackexchange.com/a/193943/2113 to pair up a list of coordinates with a (potentially shorter) list of items. The answer https://tex....
I'd like to \define a list using \foreach, then use that in another \foreach, like this:\documentclass{standalone}\usepackage{tikz}\begin{document}\begin{tikzpicture} \def\coords{\foreach \x ...
Is there a way to remove a single newline character from an input? Something like this\edef\test{\removenl{ Hello World %}}% \test should have ` Hello World `Context: Consider a file.txt that ...
In the following minimal example, I am able to define a custom \if* command based on ifcsname, however when I use it inside \loop construct I get Extra \fi errors\documentclass{article}\...
I have the following macro/command:\def\definenewcounter#1{\newcount \csname#1\endcsname}It is supposed to create a new count with it's name being whatever argument 1 is, but it is throwing errors. ...