Considering the following TeX code:
\documentclass{article}
\begin{document}
\begin{itemize}
\item[1] abc
\item[2] def
\end{itemize}
\end{document}
How one can change the font size of 1..2 item numbers?
Considering the following TeX code:
\documentclass{article}
\begin{document}
\begin{itemize}
\item[1] abc
\item[2] def
\end{itemize}
\end{document}
How one can change the font size of 1..2 item numbers?
Like this, you mean?
\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate]{font=\huge\bfseries}
\begin{document}
\begin{enumerate}
\item abc
\item def
\end{enumerate}
\end{document}
Note that your
\begin{itemize}
\item[1] abc
\item[2] def
\end{itemize}
May not be doing what you want. You are asking for an 'itemize' environment, then overriding the bullets normally provided with a manual set of enumerate numbers. You may prefer to use \begin{enumerate} \item ... \end{enumerate} as I wrote above.
If you need or want to use the itemize environment, you could adapt my suggestion and use:
\usepackage{enumitem}
\setlist[itemize]{font=\huge\bfseries}
Compare the output:
\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate]{font=\huge\bfseries}
\setlist[itemize]{font=\huge\bfseries}
\begin{document}
\begin{enumerate}
\item abc
\item def
\end{enumerate}
\begin{itemize}
\item[1] abc
\item[2] def
\end{itemize}
\end{document}
Provisional Edit (If this solves the problem, please edit the question so it is useful to others in the future.)
Given the link mentioned in the comments, and the stated desire to not change the documents as they stand (which I don't recommend as a general practice), perhaps this is what you are looking for:
Add this line to your preamble (modify characteristics as needed):
\setbeamerfont*{shahzad}{size=\footnotesize,series=\bfseries,shape=\itshape}
Then substitute
\usebeamerfont*{shahzad}
for
\usebeamerfont*{itemize \beameritemnestingprefix item}%
Complete example:
\documentclass{beamer}
\usepackage{lmodern}
\setbeamerfont*{shahzad}{size=\footnotesize,series=\bfseries,shape=\itshape}
\makeatletter
\newcommand\ChangeItemFont[3]{%
\renewcommand{\itemize}[1][]{%
\beamer@ifempty{##1}{}{\def\beamer@defaultospec{#1}}%
\ifnum \@itemdepth >2\relax\@toodeep\else
\advance\@itemdepth\@ne
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
\usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
\list
{\usebeamertemplate{itemize \beameritemnestingprefix item}}
{\def\makelabel####1{%
{%
\hss\llap{{%
% \usebeamerfont*{itemize \beameritemnestingprefix item}%
\usebeamerfont*{shahzad}%
\usebeamercolor[fg]{itemize \beameritemnestingprefix item}####1}}%
}%
}%
\ifnum\@itemdepth=1\relax
#1%
\else
\ifnum\@itemdepth=2\relax
#2%
\else
\ifnum\@itemdepth=3\relax
#3%
\fi%
\fi%
\fi%
}
\fi%
\beamer@cramped%
\raggedright%
\beamer@firstlineitemizeunskip%
}}
\makeatother
\begin{document}
\begin{frame}
\frametitle{Font size changed}
\ChangeItemFont{\fontsize{30}{36}\selectfont}{\scriptsize}{\LARGE}
\begin{itemize}
\item[1] First item. % <-- note this one
\begin{itemize}
\item First subitem.
\begin{itemize}
\item[1] First subsubitem. % <-- note this one
\item Second subsubitem.
\item Third subsubitem.
\item Fourth subsubitem.
\end{itemize}
\item Second subitem.
\end{itemize}
\item Second item.
\item Third item.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Regular font size}
\begin{itemize}
\item First item.
\begin{itemize}
\item First subitem.
\begin{itemize}
\item[1] First subsubitem.
\item Second subsubitem.
\item Third subsubitem.
\item Fourth subsubitem.
\end{itemize}
\item Second subitem.
\end{itemize}
\item Second item.
\item Third item.
\end{itemize}
\end{frame}
\end{document}
Ultimately, though, you should change your practices for future documents. Using itemize environments for enumerate ones will lead to problems in the long run.
enumitempackage couldn't do it either). But not as easily. In my view, for list-related environments,enumitemis the canonical package to use. Why do you wish to avoid it? – jon Mar 01 '16 at 06:39\item[1]and forth in the code of the answer there, the1does change size to match the font of the list item. What do you want it to do? – jon Mar 01 '16 at 07:15\size=\footnotesize). Do you mean you want relative fontsize changes? Do you want to specify different values for different lists? There are now too many unknowns. Please revise your question and explain clearly what you want. Your minimal example is much appreciated, but in this case is too minimal. – jon Mar 02 '16 at 01:45