changing the citation style in LateX - latex

I am very new to LaTex so my question may be really naive. I am writing my PhD thesis using this template. The problem is that I need to change the citation style so that it based on author year not numbers as in the template. I tried many times but it always fails with many error messages due to the macros of the template.
It will be a great help to guide me how to change the style. Unfortunately I have only limited time to finalize the thesis.
Thank you in advance.

I reviewed the documentation of biblatex and found that the answer is very easy. One should make sure that the option style in the package biblatex is set to authoryear as style = authoryear,.
To enable the natbib Compatibility (to use \citep and \citet etc), you have to add natbib=true,.

Related

tex programming

can some one help m from where and how i will i learn the tex programming
because i have to make package which i will use in miktex
If you are really determined, the book by the original author of TeX itself is a great source: http://www.ctex.org/documents/shredder/src/texbook.pdf . (I wonder if this is a legal copy but found as the first hit on Google.)
Package writing is generally where the most arcane features of the TeX language are most heavily exercised. Writing a package should not be the first thing you do with (La)TeX!
Writing this in 2018, I would suggest that you start with learning XeLaTeX and the fontspec package. That can save you a whole bunch of grief w.r.t. text encodings and fonts.
If you have specific questions, head over to https://tex.stackexchange.com/.

How to integrate Sphinx-generated Latex code in existing Latex documents?

I've used Sphinx to document a Python library. So far this works great, I get nice HTML and LaTeX output. Concerning Latex, Sphinx generates a complete standalone document with lots of special packages and configurations.
But, I would like to integrate the generated Latex files within an already existing Latex project (more precise: in the appendix of a book). In particular I want the Sphinx-generated documentation pages to have the header, footer and section heading styles of the parent document. I guess I could somehow transfer the relevant parts by manually removing unneeded stuff and adjusting various options in the tex files generated by Sphinx. However, probably this is going to be a very tedious fiddling taking too much of my time (thinking of conflicting packages and options I have to detect and fix).
Does Sphinx' Latex-Builder support such a use case? If not, is there a more general approach how to merge independent Latex-documents?
Thanks for any hints!
It seems there is no generally valid answer to this question. I've asked this question on the sphinx mailing list and received an answer which basically says one has to manually extract and partly convert the relevant parts of the latex code generated by sphinx - a less expensive solution does not yet exist.

How to highlight "what's new" between two latex documents

For my Master Thesis I am writing a Latex document where I must put all the research I do. This document is reviewed periodically by my thesis advisors once or twice per month. Since this is a big document I'd like to automatically highlight what's new in the document since the last revision same way like Word or Openoffice do.
So my question is, given that I have a Latex document controlled by Subversion, what is the best way to create a pdf highlighting the differences between the HEAD and a previous version?
Say that I want:
New text in a red coloured font
New images and tables with a light red background
Deleted text marked as a footnote or something similar
If not all are possible, which ones could be implemented?
Thanks.
Check out latexdiff. It is much better than simple diff programs because it understands LaTeX and won't mark changes that are simply extra spaces, or reformatted lines in the tex file.
There are several packages which could manage revisions. I'd like to use some version control system like git to manage and show changes.
You could use a diff program. I recommend DiffMerge from Source Forge.
i like wdiff. available on an *nix platform.
you can use
wdiff -w "\fbox{" -x "}" -y "\fbox{\fbox{" -z "}}" ...
I created revdiff to build diff versions of my papers before sending them to reviewers. They have told me several times that the result was really helpfull. Hope it can be useful for you.
Find it here: http://pedromateo.github.io/revdiff-LaTeX/

Getting "longnamesfirst" option to work with natbib in LaTeX - custom .bst

I'm writing an MSc dissertation and I'm having difficulty getting the longnamesfirst option working in natbib.
My University has a very specific referencing style a little like APA, but not quite the same. I've used the docstrip utility to build a basic framework and then edited it to fit the requirements of my University.
Having tested it with the simplest possible document; applying my bst then trying it again with one of the defaults (\bibliographystyle{apacite}) I can see than natbib works as intended with apacite. It doesn't however produce correct results with my bst.
So my question:
How does the .bst file link with natbib to enforce the "longnamesfirst" option?
I've come to a solution. Looks like my bst file wasn't correctly written to take advantage of natbib's longnamesfirst option. In particular, there are a few functions like format.full.names I didn't have. It appears natbib needs these to generate those crucial first few references.
A regeneration from latex makebst and a merge later and I'm good to go.

Is there a quick way to get titlesec "simple mode" functionality in memoir class?

Memoir class doesn't play nice with the titlesec package. Memoir has all the functionality of titlesec, but it doesn't seem to have a nice "simple mode" analogue. So in titlesec (with the article document class) I could just use \usepackage[small,compact]{titlesec} and that was that. If I wanted to do the same thing with memoir, it looks like I have to go through redefining all the section heading formatting and spacing itself?
Am I missing a quick way to replicate [small,compact] in memoir?
The point is not that I don't know how to get memoir to do this stuff. The point is that memoir is missing the "quick options" mode that titlesec had. If all I want to do is make all the section headings a little smaller the [small,compact] options when calling the package was fine. To do this in memoir takes a lot more work, going through all the options manually. Is this true or am I missing a memoir version of the quick options?
\usepackage[small,compact]{titlesec} will now work in memoir. I'm sure it didn't always work, but it does now. So the answer to my question is yes, there is a quick way to do it: use the titlesec package.
Please read the memoir documentation. You can do this by opening a command prompt and entering texdoc memman
Specifically, see Chapter 8, which says:
8.1 Introduction In this chapter I first discuss the various kinds of
divisions within a book and the
commands for typesetting these. After
that I describe the class methods for
modifying the appearance of the
chapter and other sectional headings.
The facilities described here provide
roughly the same as you would get if
you used the titlesec [Bez99] and
sectsty [McD98] packages together; the
commands are different, though.
The memoir documentation is very good. You will most likely find everything you need in that document. It hasn't failed me yet.

Resources