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

  • 1
    This should work fine (if \bfit is not already defined). What error do you get? – Ulrike Fischer Mar 16 '19 at 23:03
  • I edited the question with the error – J.Rodriguez Mar 16 '19 at 23:06
  • 1
    Sounds as if you are missing a closing brace somewhere. – Ulrike Fischer Mar 16 '19 at 23:14
  • Can you please post a MCVE? That will help locate the problem. – Davislor Mar 16 '19 at 23:39
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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.