Changing fontsize of word "References" in Latex - latex

I'm a beginner to latex, I was writing an article. At the end when adding references. I did:
\begin{thebibliography}{100}
Some bibitems here
\end{thebibliography}
After compiling, the word "Reference" appears in pdf, and it is too big in size. I want its font size to be 12pt. How can I do that?

Using the titlesec package, you can temporarily change the size of section headings:
\documentclass[12pt]{article}
\usepackage{titlesec}
\begin{document}
test
\begingroup
\titleformat*{\section}{\fontsize{12pt}{14pt}\bfseries\selectfont}
\begin{thebibliography}{100}
Some bibitems here
\end{thebibliography}
\endgroup
\end{document}

Related

How could I change the numeration style in table of contens in beamer (Latex)?

Hello I am new at beamer (overleaf), so I have learned very much, so I would like to change the design of the numeration in table of contents. I mean with that (see picture attached):
I would like to change to a square, or simply the number. Anyone knows others styles? I am using the \usetheme{CambridgeUS}.
You can set the sections/subsections in toc template to change to e.g. a square or plain numbered sections:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{sections/subsections in toc}[square]
%\setbeamertemplate{sections/subsections in toc}[sections numbered]
\begin{document}
\section{title}
\begin{frame}
\tableofcontents
\end{frame}
\end{document}

Use ttf file in overleaf Latex for standard font

UPDATE:
Ok i think a lot of problems are solved now. First I needed to include ttf. Than I had some issues with the headlines. But the last listing will show my solution :D Thank you :D
(step 1 of 3)
Hi I want to change my standard font of my overleaf testfile..
The example is strange because I need to write a custom comand before my code.
But I just want to use my ttf as standard everywhere!
%
% Example of how to use a custom TTF font by following the directions here:
% http://math.stanford.edu/~jyzhao/latexfonts.php
%
% In this case, the custom font is LoKinderSchrift, from
% http://www.fonts101.com/fonts/view/Uncategorized/22887/LoKinderSchrift
%
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}
\title{Example: Custom Font}
\author{writeLaTeX}
\begin{document}
\maketitle
Normal Font Text.
\Huge\customfont{Custom Font Text!}
\end{document}
(Step2 of 3)
Ok thank you I was able to introduce my ttf into my document.
It looks like the numebr is to small?
How to delete the point after
the number at chapter?
ODD
The Table of content looks ok.
How to make Chapter names bold?
content looks ok
% !TeX TS-program = xelatex
\documentclass{report}
\usepackage[german]{babel}
%\usepackage[utf8x]{inputenc} % don't use `utf8x`
%\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}
\usepackage{titlesec}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter{. }}{0pt}{\Huge\bfseries}
\usepackage{fontspec}
\setmainfont{test.ttf}
\title{Example: Custom Font}
\author{writeLaTeX}
\begin{document}
\maketitle
\tableofcontents
\chapter{Testchapter}
How to delete the point before the chapter?
The NUMBER looks smaller than the TEXT ?!
WHY?
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
It
\chapter{Testchapter}
How to delete the point before the chapter?
Why
this is a chaptertext
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
\section{testsection}
this is a section test
Normal Font Text.
It
\end{document}
(step 3 of 3)
Final solution:
\documentclass[report]{scrreprt}
\usepackage[fontsize=12pt]{fontsize}
\usepackage[left=6cm,right=1cm,top=1.5cm,bottom=1cm,includeheadfoot]{geometry}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage{fontspec}
\setmainfont{test.ttf}
\begin {document}
\tableofcontents
\blinddocument
\end {document}
I suggest to compile your document with xelatex or lualatex. This way, you can use the fontspec package and easily use fonts installed on your computer or even just .ttf files:
% !TeX TS-program = xelatex
\documentclass{article}
\usepackage[english]{babel}
%\usepackage[utf8x]{inputenc} % don't use `utf8x`
%\newcommand\customfont[1]{{\usefont{T1}{custom}{m}{n} #1 }}
\usepackage{fontspec}
\setmainfont{lokisd__.ttf}
\title{Example: Custom Font}
\author{writeLaTeX}
\begin{document}
\maketitle
Normal Font Text.
\Huge Custom Font Text!
\end{document}

How to increase font size of just chapter names in latex

need of a small guidance here.
I am using report class, and I do not need chapter numbers for every chapter, just the chapter names.
Is there a way to increase just the font size of the chapter names?
\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\begin{document}
\chapter{Introduction}
\end{document}
Observation:
Chapter number is to be removed. I would really appreciate any guidance to increase the font size of the chapter name.
I tried the following to remove chapter numbers. But font size is causing a little concern
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{5pt}{\huge}
Thanks
You can control the font size of the chapter title with the third argument of \titleformat. In your example, this was \normalsize, change this to whatever size you like:
\documentclass[11pt]{report}
\usepackage{lmodern}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\fontsize{56pt}{64pt}\bfseries}{}{5pt}{}
\begin{document}
\chapter{Introduction}
text
\end{document}

LaTeX two-column layout does not keep text between borders

I am using the \twocolumn tag to use the two-column layout in LaTeX. The problem is that this does not work properly and the text seems not to be fixed between the borders. Not sure if that minimal example helps, but at least you can see my includes and the text with which it happens.
\documentclass[12pt,a4paper, abstracton]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[backend=biber, sorting=none]{biblatex}
\usepackage{hyperref}
\usepackage[hyphenbreaks]{breakurl}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
\twocolumn
\section{Introduction}
Glutamate carboxypeptidase II (GCPII), N-acetyl-L-aspartyl-L-glutamate peptidase I (NAALADase I), NAAG peptidase or prostate-specific membrane antigen (PSMA) \dots
\end{document}
Screenshot of left column in PDF that shows the problem
Why does LaTeX write from the first column into the second column and how can I fix that? I would like to avoid change each line separately, where that happens. I am looking for a global solution.
Since the workarounds of the accepted answer were not satisfactory to me, I kept searching and found a more adequate and fast workaround, adding to my preamble the following:
\setlength{\emergencystretch}{3em}
The length 3em can be changed as needed, just keep it as low as possible in order to preserve optimal appearance.
More details here.
Latex has trouble finding a suitable break point because words with multiple capital letters are normally assumed to be acronyms which should not be hyphenated.
Possible workarounds:
force a line break with \linebreak before the word. This might result in undesirable large spaces in the line, especially in your situation in with only a single white space in the line
tell latex where possible break points are with long\-word (I don't know if there are any possible hyphenation points in NAALADase). This can also be globally for the whole document with \hyphenation{long-word} in your preamble
rephrase the sentence
use another layout. Very short lines combined with very long and unbreakable words is a tough combination
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[backend=biber, sorting=none]{biblatex}
\usepackage{hyperref}
\usepackage[hyphenbreaks]{breakurl}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
\twocolumn
\section{Introduction}
Glutamate carboxypeptidase II (GCPII), N-acetyl-L-aspartyl-L-glutamate peptidase I \linebreak (NAALADase I), NAAG peptidase or prostate-specific membrane antigen (PSMA) \dots
\end{document}

How to disable numbering in latex?

I am new to latex and I wrote the below tex code on Texmaker editor.
What I want to do is to add the "University" section without any numbering preceeding it and to be centered horizontally, because when I run the code I find that the word "University" is displayed but it is preceeded by a number and I do not want to display any number preceeding that word.
code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{kpfonts}
\author{Anan}
\pagestyle{plain}
\begin{document}
\section{University}
\end{document}
\section*{\centering University}
% * removes numbering for _this_ \section instance,
% \centering within environment centres the title.
Note however, that this is a local solution, and that it's better practice (and easier for you to make later document-global changes) to re-define the \section, \subsection, ... environments using the titlesec package, as is described well in Alan Munn:s answer in the following tex.stackexchange thread:
https://tex.stackexchange.com/questions/8546/section-heading-centering-problem
All you have to do is to edit your line 9:
\section{University}
this way:
\section*{\centering University}
since the command \section* produces unnumbered sections.
Further, if you want to to include an unnumbered section to your table of contents, you can add
\addcontentsline{toc}{section}{University}
(this time without \centering) just after. The resulting code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{kpfonts}
\author{Anan}
\pagestyle{plain}
\begin{document}
\tableofcontents
\section*{\centering University}
\addcontentsline{toc}{section}{University}
Text.
\end{document}

Resources