Styling of biblography - change underline to italic (Latex)
Asked Answered
F

2

7

I am struggeling with latex biblography styling.

Using the predefined

\bibliographystyle{plain}

style i get a nice result:

enter image description here

When adding the following package:

\usepackage {ulem}

I get this result in the biblography:

enter image description here

How can i remove the underline of the journal and get it italic?

I tried:

\renewcommand{\uline}[1]{\textit{#1}}

and also following, to undefine \uline

\renewcommand\uline[1]{}

But both create a lot of "Missing } inserted.\end{thebibliography}" in the bbl file. Is there a way to revert the \usepackage command or get back the old style?

Feld answered 2/7, 2018 at 8:45 Comment(0)
L
12

One of the features of the ulem package is to redefine \emph so that it uses \uline, so (as is presumably already clear to you) that's why you're getting underline in the bibliography, where text was emphasised before.

The documentation for the ulem package notes that adding the [normalem] option when loading the ulem package means that \uline is defined but \emph isn't redefined. I don't know if that would be an acceptable solution for you – ie, do you in fact want \emph to be underlined throughout the rest of the document?

Alternatively, if you only want \emph to go back to its original definition for the bibliography, you could try (ulem docs again) giving the command \normalem before loading the bibliography. However, the way that the bibliography is loaded can sometimes make it unexpectedly difficult to fiddle with its formatting (as you've discovered, when trying to redefine \uline).

If these thoughts don't resolve things, try posting a ‘minimal working example’. You may also be better off looking at, or possibly posting to, the TeX stackexchange.

Leela answered 2/7, 2018 at 10:26 Comment(1)
\normalem worked for me. Thanks for the answer, solution and explanationFeld
S
2

If anyone faced the issue of getting \hbuf errors in the Bibliography.
The Solution by NormanGrey helps in this case also:

The documentation for the ulem package notes that adding the [normalem] option when loading the ulem package...

Thus, just by making a small change in the settings.tex fixed this error:

\usepackage[normalem]{ulem}

It not only removed the underline, it fixed the overflow I had, as you can see here:

enter image description here

to

enter image description here

Thank you a lot.

Selfreliance answered 27/7, 2022 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.