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}
Related
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}
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}
So I have the following document:
\include{preamble}
\title{test title}
\begin{document}
\maketitle
\begin{equation*}
\begin{aligned}
\pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\sqrt{\pi\dots}}}}}
\end{aligned}
\end{equation*}
\bibliographystyle{plain}
\bibliography{references}
\end{document}
the contents of my preamble.tex file is:
%%%%% Document Setup %%%%%%%%
\documentclass[10pt,onecolumn]{revtex4} % Font size (10,11 or 12pt) and column number (one or two).
\usepackage{times} % Times New Roman font type
\usepackage[a4paper, left=1.85cm, right=1.85cm,top=1.85cm, bottom=1.85cm]{geometry} % Defines paper size and margin length
\usepackage[font=small, labelfont=bf]{caption} % Defines caption font size as 9pt and caption title bolded
\usepackage{graphics,graphicx,epsfig,ulem} % Makes sure all graphics works
\usepackage{amsmath} % Adds mathematical features for equations
\usepackage{etoolbox} % Customise date to preferred format
\usepackage{subcaption}
\usepackage{caption}
\makeatletter
\patchcmd{\frontmatter#RRAP#format}{(}{}{}{}
\patchcmd{\frontmatter#RRAP#format}{)}{}{}{}
\renewcommand\Dated#name{}
\makeatother
\usepackage{fancyhdr}
\def\bibsection{\section*{References}} % Position reference section correctly
\usepackage{import}
\usepackage{pdfpages}
\usepackage{transparent}
\usepackage{xcolor}
\newcommand{\incfig}[2][1]{%
\def\svgwidth{#1\columnwidth}
\import{./figures/}{#2.pdf_tex}
}
\pdfsuppresswarningpagegroup=1
For some reason the title just will not be included on the pdf when I compile the code, I am sure I have \title{} and \maketitle in the correct positions. Any help as to why this is would be much appreciated.
Move the title after \begin{document}:
\documentclass{revtex4}
\begin{document}
\title{test title}
\maketitle
\end{document}
(don't do this with other documentclasses. Most of the time it is better to have the \title in the preamble, e.g. to get sensible pdf meta data if combined with hyperref)
I used the command \setcounter{tocdepth}{\subsubsectiontocdepth} to add the subsubsection to TOC. But the font size of subsubsection is larger than that of section and subsection (Please refer the attached image). Can someone please help me to set the font size of subsubsection in TOC same as the font size of section and subsection?
Following is the MWE that also includes solution to my problem:
\documentclass[a4paper,10pt,twoside,bibliography=totoc]{scrreprt}
\usepackage{babel}
\usepackage[subfigure]{tocloft}
\usepackage{caption}
\usepackage{setspace}
\setstretch{1.4}
\usepackage[headsepline]{scrlayer-scrpage}
\automark[chapter]{chapter}
\setcounter{tocdepth}{\subsubsectiontocdepth}
\renewcommand{\cftsecfont}{\sffamily}
\renewcommand{\cftsubsecfont}{\sffamily}
\renewcommand{\cftsubsubsecfont}{\sffamily} % I added this line of code. This solved my problem
\renewcommand{\cftchapdotsep}{4.1}
\renewcommand*{\chapterheadstartvskip}{\vspace*{-1cm}}
\begin{document}
\pagestyle{plain}
\pagenumbering{Roman}
\vspace*{-2cm}
\tableofcontents
\pagestyle{scrheadings}
\pagenumbering{arabic}
\chapter{This is Chapter 1}
\section{This is section 1}
\subsection{This is subsection 1}
\subsubsection{This is subsubsection 1}
\end{document}
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}