Questions tagged [arguments]

The {argument} tag is used for specific questions about macro parameters and arguments.

Filter by
Sorted by
Tagged with
1
vote
1answer
158 views

Getting arguments of any LaTeX command

I do not like R and LaTeX. I simply love them. In R, I can get the arguments of any function using args(function_name) on command line. I wonder if we can get the list of all possible arguments of any ...
1
vote
1answer
131 views

How to pass a caption as an argument of newenvironment

I make a next newenvironment to insert the code of a tikzfigure in the document \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{minted} \usepackage{tkz-...
1
vote
1answer
147 views

Command with argument and several results inside command (inside command…)

I want to reuse a command that performs the same type of action (a specific parsing of the incoming expression) inside the other command, which should form the contents of the document and can also ...
1
vote
1answer
363 views

How to globally define different task bar colors in a gantt chart?

I've been working with this gantt chart example here. I would like to add user specific colore bars. Essentially, I don't want to have to type bar/.append style={fill=green} into every new bar command....
1
vote
3answers
100 views

\def\foo#1:#2:#3 can be called with \foo{a:b:c} but not \foo{a:\bc}

This works: \def\myfunc#1{\expandafter\myfuncdoit#1\relax} \def\myfuncdoit#1:#2:#3\relax{ First: (#1), Second: (#2), Third (#3) } \foreach \p in {x:foo:int,y:bar:float,z:baz:bool}{ (\myfunc{\p}) } ...
1
vote
1answer
80 views

\foreach doesn't compose with my string-splitting command

I wrote \myfunc which splits a colon-delimited string into two parts. It works, in and of itself, as does a simple \foreach over comma-separated colon-delimited strings. But if I try to call \myfunc ...
1
vote
1answer
125 views

Parse Argument by Character while Executing Embedded Macros

I am interesting in parsing a string of input character by character, and doing something to each character. In this MWE, I merely apply a \textbf to each successive character as an example, to ...
1
vote
1answer
50 views

\IfStrEqCase redefines #1

What is the meaning of #1, #2, etc in the optional parameter of \IfStrEqCase? This required me to use a ##1 instead of #1 within \pgfplotsinvokeforeach which I was not expecting. I would have ...
1
vote
1answer
86 views

How to enter multiple arguments in the interactive math mode

I've defined a new command in the document's preamble. For the sake of this question the following (tested!) example: \newcommand{\multipleargs}[3]{{#1}-{#2}-{#3}} Using [cmd]-M on MacOS I want to ...
1
vote
1answer
63 views

Bugs in conditional structure in a newcommand definition with optional arguments

I am trying to create a new command for add a caption and/or the label to an equation. The not optional parameter is for the text of the equation and first optional parameter is for the label, the ...
1
vote
1answer
79 views

Macros taking code as an argument which can access parent arguments in LaTeX 3

In Latex 3 I would like to be write a macro which takes as an argument code which can internally define a macro. How do I do this in a way that allows the code being passed to access arguments of the ...
1
vote
0answers
19 views

Passing arguments to longfbox in BeforeBeginEnvironment

I defined a \BeforeBeginEnvironment for lstlisting and added a default \begin{longfbox}[...] definition. What I want is to pass some custom arguments to \begin{longfbox}[...] defined in \...
1
vote
1answer
68 views

Is there option in any IDE to display available options for specific function?

Does any IDE support feature to show all available arguments for specific function? For example instead just showing circle(nothing) like this: To show something like this (similar like Visual Studio ...
1
vote
0answers
26 views

Macros passing arguments of different data types [duplicate]

I'm new to LaTeX and quite impressed with this program! So, I'm willing to concede not being entirely certain that the issue I'm having has to do with data types, or just using \includegraphics{} ...
1
vote
0answers
104 views

Trouble with frame in newcommand [duplicate]

I'm making a slideshow with LaTeX beamer class like this : \documentclass[xcolor=dvipsnames]{beamer} \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{...
0
votes
1answer
70 views

Macros with 0, 1 or 2 arguments

Is it possible to build a macro accepting 0, 1 or 2 arguments ? Why ? I want to have the following functionalities. \exercice will print Exercice alone. \exercice{2} will print Exercice (2 pts). \...
0
votes
1answer
163 views

expandafter and csname

I was recently looking for the creation of commands that use the name of another command and I recently discovered \expandafter and \csname instructions. I manage to create simple one using these ...
0
votes
1answer
46 views

Problem calling \creflabelformat from a command

I'm using the cleveref package with some customizations, using \creflabelformat. Because cleveref should be the last package to load, and because the customization commands should come after cleveref ...
0
votes
1answer
482 views

Argument of \language@active@arg~ has an extra } when long caption

Here is my Preamble: \documentclass[letterpaper, 10 pt, conference]{ieeeconf} \overrideIEEEmargins \usepackage{graphics} \usepackage{graphicx} \usepackage[spanish]{babel} % spanish \...
0
votes
1answer
42 views

Finding out the number of needed macro arguments

How can I find out how many arguments (i.e. {} pairs) are used when 'calling' a macro? (my favorite error, that I extend a macro, i.e. it needs one more argument, then I use it to compile a text ...
0
votes
1answer
283 views

\nameref inside custom command

I have created my own command with \newcommand and it Works fine with "static" input in the arguments. But, when I give e.g. a \nameref{sec:title} it is throwing errors like these: Undefined control ...
0
votes
1answer
36 views

A question about arguments to a LaTeX macro

Several weeks ago, I asked a question about a LaTeX macro to insert an image in a document using an IF statement. The solution worked perfectly. Now I have a similar issue. I have the following ...
0
votes
1answer
96 views

Generate math symbols from argument

I have been trying to create a small latex math symbol reference. My list will require repetition of lines like \textbackslash lfloor - $\lfloor$. I want to create a command that takes in one argument ...
0
votes
1answer
44 views

Only last value of a variable goes into \psfrag function

I make two calls, but it seems like only last value of \lRaise goes into the function, so both boxes are raised by -5pt: \newlength{\lRaise} \setlength{\lRaise}{-0.97pt} \psfrag{low-order}[B][][0.8]{\...
0
votes
1answer
98 views

cite not working with 2 arguments

I want to include a reference with text before the citation in parentheses, like so: "(e.g., Brautigam & Bell, 1995)". I have to use the \cite command, because it's a journal template with strict ...
0
votes
1answer
29 views

Pseudocode argument management: best way to deal with many arguments

In latex pseudocode, if you have function calls inside another function with many arguments, lets say more than 4, would you still put the arguments everywhere, omit them or use some kind of ...
0
votes
0answers
46 views

Is there a list of ALL standard commands of LaTeX 2e? [duplicate]

I am looking for a list of all commands available in LaTeX 2e, commands available without packages. I am creating a parser for latex therefore I need to know all commands and the corresponding ...
0
votes
0answers
46 views

How to pass argument to an environment in command form

I have defined \newenvironment{cvolist}[1][2.25cm]{\setlength{\pwd {#1}\enumerate} {\endenumerate \aftergroup\ignorespacesafterend\vspace{-1.5em}} That way I can have a list in an environment (this ...
0
votes
0answers
68 views

Mathpartir: How to insert “\\” between entries with macro?

I'm using a tool to generate large amounts of LaTeX, which contain inference rules that I'm typesetting using mathpartir. Below, I've got a MWE that's very similar to the code I've got generated. ...
0
votes
1answer
106 views

How to know all the optional arguments of Latex commands\environments? [duplicate]

For external packages CTAN provides the needed documentation, however, for built-in Latex commands I am not aware of any proper documentation except for The (not so) short introduction to Latex which ...