jterrace / sphinxtr

The Sphinx Thesis Resource
http://jterrace.github.com/sphinxtr
Other
153 stars 51 forks source link

LaTeX: natbib doesn't recognize "authoryear" option #19

Open erikbgithub opened 10 years ago

erikbgithub commented 10 years ago

For some reason my HTML generates citations with "authoryear" but my PDF doesn't. I'd really prefer to use this variation because I feel it is more commonly used in Germany. Adding some debugging prints to the natbib/__init__.py doesn't yield any output at all (only when processing the HTML generation). Any ideas what could be done here?

jterrace commented 10 years ago

In footer._tex, it uses \bibliographystyle{refstyle}. You can change that to use a different style file

erikbgithub commented 10 years ago

Suddenly all our disagreements in recent issues make sense. Is it correct that you mostly want the LaTeX to work fine and the Python/Sphinx stuff around it is just tooling that helps you write faster LaTeX? I have a totally different approach. For me Sphinx is the major tool and LaTeX is only one of its outputs. If it is correct then it would make sense to sometimes develop in different directions in our forks, because we try to fulfill 2 different usecases. What do you think?

Examples: In my eyes Pygments should work fine and it doesn't matter if LaTeX generates a Verbatim box with styled text parts inside or a lstlisting environment with literal source code inside. In my usecase its also a major bug if the conf.py file doesn't allow changing the citation style, while in your usecase it is actually perfect to change a footer tex file. In your usecase it even makes sense for me.

jterrace commented 10 years ago

I wouldn't say that it's meant just to be tooling around latex. I still want HTML to have first-class support, but latex is still a very important output, since most thesis are submitted using it.

In this case, I think it makes sense to have the conf.py change the style. I just took the approach that people are generally going to need and want to tweak the latex output themselves anyway.