I have written the following in latex
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{description}
\item Ans:
\begin{enumerate}
\item text
\end{enumerate}
\end{description}
\end{document}
and I get an output like
Ans:
1. text
I would like to know if there is a way to get an output like this
Ans: 1. text
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{description}
\item[Ans:]
\begin{enumerate}
\item text
\end{enumerate}
\end{description}
\end{document}
Related
I would like create an bulleted list that contain and equation, how can I do? I have tru this but is not working and it gives me error. The package is already present in the code
\usepackage{amsmath}
\begin{itemize}
\begin{align*}
\item X_i it is a ...
\end{align*}
\end{itemize}
This is my base:
https://it.overleaf.com/latex/templates/template-lucas/tnzgmxxqppwh
Your items seem to be mainly normal text, so I suggest to use inline math for the math parts:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item $X_i$ it is a ...
\end{itemize}
\end{document}
I would like to change the font of the alerted text in my beamer, I want it to be in bold, in both text and math mode. I tried using boldmath but it doesn't work :
\begin{frame}{Test}
\setbeamercovered{invisible}
\setbeamercolor{alerted text}{fg=vertf}
\setbeamerfont{alerted text}{family=\sffamily, series=\bfseries\boldmath}
$$\alert<2>{x} + \alert<3>{y} + \alert<4>{z}$$
\begin{itemize}
\item <2-| alert#2>x
\item <3-| alert#3>y
\item <4-| alert#4>z
\end{itemize}
\end{frame}
You could work around the problem with something like this:
\documentclass{beamer}
\setbeamercovered{invisible}
\setbeamercolor{alerted text}{fg=green}
\setbeamerfont{alerted text}{series=\bfseries\boldmath}
\renewcommand<>{\alert}[1]{%
\ifmmode\text{%
\begin{alertenv}#2\relax$#1$\end{alertenv}%
}%
\else%
\begin{alertenv}#2\relax#1\end{alertenv}%
\fi%
}
\begin{document}
\begin{frame}
\frametitle{Test}
\[
\alert<2>{x} + \alert<3>{y} + \alert<4>{z}
\]
\begin{itemize}
\item <2-| alert#2>x
\item <3-| alert#3>y
\item <4-| alert#4>z
\end{itemize}
\end{frame}
\end{document}
I have a code below. And I want to highlight the current formula in red while others are in black. many thanks in advance.
\documentclass{beamer}
\usetheme{default}
\title{Beamer Template}
\author{TeXstudio Team}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}
\begin{frame}{Frame Title}
\begin{itemize}
\item bla
\pause \item \textcolor{red}{redbla}
\pause \item \textcolor{red}{redbla but the I want to see the second redbla in \textcolor{black}{black.}}
\end{itemize}
\end{frame}
\end{document}
You can highlight the current item in red by using the <alert#+> overlay specification:
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{itemize}[<alert#+>]
\item bla
\item redbla
\item redbla but the I want to see the second redbla in black.
\end{itemize}
\end{frame}
\end{document}
I would like to align my equations for nicely in latex. My problem is that those equations represent conditions with that they need to be numerated. What I have now numerates my equation but my first equation is not align with the others. Any suggestion?
\begin{center}
\begin{enumerate}
\centering
\item $f_k(x_k)=y_k$
\item $f_k(x_{k+1})=f_{k+1}(x_{k+1})$
\item $f^\prime_k(x_{k+1})=f^\prime_{k+1}(x_{k+1})$
\item $f^{\prime\prime}_k(x_{k+1})=f^{\prime\prime}_{k+1}(x_{k+1})$
\end{enumerate}
\end{center}
Blockquote
Hello you may use a minipage and delete the \centering.
I also added the \fbox just to see the borders of the minipage, you may take it out if you wish.
\begin{center}
\fbox{
\begin{minipage}{2in}
\begin{enumerate}
\item $f_k(x_k)=y_k$
\item $f_k(x_{k+1})=f_{k+1}(x_{k+1})$
\item $f^\prime_k(x_{k+1})=f^\prime_{k+1}(x_{k+1})$
\item $f^{\prime\prime}_k(x_{k+1})=f^{\prime\prime}_{k+1}(x_{k+1})$
\end{enumerate}
\end{minipage}
}
\end{center}
I am trying to do the following:
\usepackage{enumitem}
\begin{description}[style=nextline]
\item [First Thing]
\item [Second Thing]
\item [Third Thing]
\begin{enumerate}
\item First Item
\item Second Ite,
\end{enumerate}
\item [Final Thing]
\end{description}
However, the enumerated list starts on the same line as the description, not on the next line as I would like. Anyone have any ideas how to fix this nicely? I tried adding a \hfill after [Third Thing], and this sorts of works, but leaves too large a vertical space.
You need to add anything after "third thing", in order to have the enumerate on another line. And the simplest is an empty box.
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[style=nextline]
\item [First Thing]
\item [Second Thing]
\item [Third Thing] \mbox{}
\begin{enumerate}
\item First Item
\item Second Ite,
\end{enumerate}
\item [Final Thing]
\end{description}
\end{document}
This is probably what you consider a "too large vertical space", but this is the behaviour of nextline style. Without it, lines are much closer:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{description}%[style=nextline]
\item [First Thing]
\item [Second Thing]
\item [Third Thing] \mbox{}
\begin{enumerate}
\item First Item
\item Second Item,
\end{enumerate}
\item [Final Thing]
\end{description}
\end{document}
Now, if you want a large space everywhere, but after third thing, you can hand control the spacing:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[style=nextline]
\item [First Thing]
\item [Second Thing]
\item [Third Thing] \mbox{}\\[-1cm]
\begin{enumerate}
\item First Item
\item Second Item,
\end{enumerate}
\item [Final Thing]
\end{description}
\end{document}