# How to replace a certain word(s) in Latex

This is my first work on Latex and I have problem - I downloaded a template from

which is a very nice template. However, until I go to page 4th (Abstract). I cannot replace Doctor of Philosophy with something else. I searched though the main file Thesis.tex and Thesis.cls but no hope. I guess it belongs to some kind of linked file.

I tried something like this possible solution but it does not work. I am using TeXstudio with MiKTeX 2.9

-
Welcome to TeX.SX! Did you really search Thesis.cls? Take a look at line 247 in that file. –  Torbjørn T. Jul 27 '14 at 8:38
Line 204 might also be of interest. –  moewe Jul 27 '14 at 8:43
@Oh - I searched for the word Doctor but I did not find and I just looked at the Abstract on the main thesis.tex and did not find anything special. Thanks Both. –  user7226 Jul 27 '14 at 8:51
I take a look again, I detected what happend - even I active the tab thesis.cls, when I searched, it actual searched the words in thesis.tex that why it resulted "End of scope reached with no match. Restart from Beginning?" –  user7226 Jul 27 '14 at 9:04
Use Ctrl R to replace words or equations or whatever –  MUHAMMED FASIL T.P. Oct 10 '14 at 11:04

The simplest way for modifying the phrase is to add a couple of lines to the .tex document.

I'll take the example document as a basis, you find the change between self-explaining comments:

%% ----------------------------------------------------------------
%% Thesis.tex -- MAIN FILE (the one that you compile with LaTeX)
%% ----------------------------------------------------------------

% Set up the document
\documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
\graphicspath{{Figures/}}  % Location of the graphics files (set up for graphics to be in PDF format)

% Include any extra LaTeX packages required
\usepackage[square, numbers, comma, sort&compress]{natbib}  % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
\hypersetup{urlcolor=blue, colorlinks=true}  % Colours hyperlinks in blue, but this can be distracting if there are many links.

%%%% We want to change the phrase Doctor of Philosophy' in the abstract
%%%% Replace Anything I want' with the phrase you want (even with nothing)
\usepackage{etoolbox}
\patchcmd{\abstract}{Doctor of Philosophy}{Anything I want}{}{}
%%%% End of change

%% ----------------------------------------------------------------
\begin{document}


No other change is needed.

A problem with these templates is that they use the vmargin package, which may cause issues with other packages, notably pdfpages. Another problem is the choice of colors.

-
thank you very much - this will be very good that I may need to replace more words in the future as I will start my thesis in this Fall. My advisor just told me I should learn some Latex by before the term begins. –  user7226 Jul 27 '14 at 8:54
@user7726 A good adviser. The contrary is put the cart before thehorse (and a huge waste of time). –  Fran Oct 10 '14 at 12:33