1

Hello I have to make a document where I use a lot \textbf and \textit at the same time, so I tried to create a new command where it use both at the same time, but it gave me an error and I don't know how to do this in the correct way, I used:

\newcommand{\bfit}[1]{\textbf{\textit{#1}}}

Any idea how to make this?

Edit: The error that appears is this (I am on Texstudio): enter image description here

4
  • 1
    This should work fine (if \bfit is not already defined). What error do you get? Commented Mar 16, 2019 at 23:03
  • I edited the question with the error
    – TeemoJg
    Commented Mar 16, 2019 at 23:06
  • 1
    Sounds as if you are missing a closing brace somewhere. Commented Mar 16, 2019 at 23:14
  • Can you please post a MCVE? That will help locate the problem.
    – Davislor
    Commented Mar 16, 2019 at 23:39

1 Answer 1

2

Seems to work fine in WinEdt with MikTeX. Here is a MWE for reference:

\documentclass{article}
\newcommand{\bfit}[1]{\textbf{\textit{#1}}}
\begin{document}
  \textbf{\textit{Hello World}} \par
  \bfit{Using new command}
\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .