Skip to main content
added 29 characters in body
Source Link
Massimo Ortolano
  • 55.7k
  • 19
  • 167
  • 210

First, as I argued in this answer, I suggest you to not use directly the command \texttt but to define a new command reflecting its purpose.

About your specific question, a common way is as follows:

  1. Don't put parentheses if you are declaring the existence of a certain function or making a reference to it (example from the Matlab documentation):

The inv function and the expression A^-1 both compute the matrix inverse.

  1. Use the parentheses with the input argument list when you want to describe the details of the function and its calling syntax:

The function max(a,b) finds the maximum between the variables a and b.

First, as I argued in this answer, I suggest you to not use directly the command \texttt but to define a new command reflecting its purpose.

About your specific question, a common way is as follows:

  1. Don't put parentheses if you are declaring the existence of a certain function (example from the Matlab documentation):

The inv function and the expression A^-1 both compute the matrix inverse.

  1. Use the parentheses with the input argument list when you want to describe the details of the function and its calling syntax:

The function max(a,b) finds the maximum between the variables a and b.

First, as I argued in this answer, I suggest you to not use directly the command \texttt but to define a new command reflecting its purpose.

About your specific question, a common way is as follows:

  1. Don't put parentheses if you are declaring the existence of a certain function or making a reference to it (example from the Matlab documentation):

The inv function and the expression A^-1 both compute the matrix inverse.

  1. Use the parentheses with the input argument list when you want to describe the details of the function and its calling syntax:

The function max(a,b) finds the maximum between the variables a and b.

Source Link
Massimo Ortolano
  • 55.7k
  • 19
  • 167
  • 210

First, as I argued in this answer, I suggest you to not use directly the command \texttt but to define a new command reflecting its purpose.

About your specific question, a common way is as follows:

  1. Don't put parentheses if you are declaring the existence of a certain function (example from the Matlab documentation):

The inv function and the expression A^-1 both compute the matrix inverse.

  1. Use the parentheses with the input argument list when you want to describe the details of the function and its calling syntax:

The function max(a,b) finds the maximum between the variables a and b.