Discussion:
how can I write reference
(too old to reply)
AS
2017-05-12 13:26:48 UTC
Permalink
Raw Message
how can I write reference as (Wittman & Xu 1987) in latex?

I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
Peter Flynn
2017-05-12 18:49:34 UTC
Permalink
Raw Message
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
Please post a Minimal Working Example (MWE) to demonstrate what you are
trying to do. See
http://latex.silmaril.ie/formattinginformation/help.html#mwe
Post by AS
\bibliographystyle{apalike}
You also need the apalike package, but apalike is undocumented.
I prefer to use apacite, but either will work.
Post by AS
\renewcommand{\bibname}{References}
In the article class this is \refname.
Post by AS
\bibliography{ref}
Your file ref.bib must contain (with other entries):

@Article{wittman87,
author = {A.D. Wittman and Z. Xu},
title = {A catalogue of sunspot observations from 165 BC to AD 1684},
journal = {Astronomy and Astrophysics Supplement Series},
year = 1987,
volume = 70,
pages = {83--94}}

Then the following MWE will work.

\documentclass{article}
\usepackage{apacite}
\begin{document}
A reference to \cite{wittman87}.
\renewcommand{\refname}{References}
\bibliographystyle{apacite}
\bibliography{ref}
\end{document}

///Peter
AS
2017-05-13 12:06:46 UTC
Permalink
Raw Message
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
there is error as:

apacite.sty Too many }'s. \let\fi\fi}
;;;;;;;;;;;
my packages are

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphics}
\usepackage{color}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{refstyle}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{placeins}
\usepackage[numbers]{natbib}
\usepackage{blindtext}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{textcomp}
\usepackage{scicite}
\usepackage{cite}
\usepackage{apacite}
Peter Flynn
2017-05-13 18:10:03 UTC
Permalink
Raw Message
Post by AS
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
apacite.sty Too many }'s. \let\fi\fi}
;;;;;;;;;;;
my packages are
[snip]
That is not useful.

Please make a *minimum* working example that demonstrates your problem.

///Peter
Michael Shell
2017-05-14 02:23:50 UTC
Permalink
Raw Message
On Sat, 13 May 2017 05:06:46 -0700 (PDT)
Post by AS
Post by AS
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
apacite.sty Too many }'s. \let\fi\fi}
;;;;;;;;;;;
A net search found this:

https://tex.stackexchange.com/questions/226206/apacitenatbib-in-lyx-always-error-too-many-s

"You get this error if you load natbib additionally before apacite:"
"So don't load natbib but use only \usepackage[natbibapa]{apacite}
(which will load natbib)."


But, do heed the advice of the previous posters - know how to trim
down an example to the bare minimum so that others here can easily
compile it. In the process, you will usually find the offending
package when the problem goes away after the package is removed.


Cheers,

Mike Shell
AS
2017-05-13 20:00:09 UTC
Permalink
Raw Message
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
OK, I write thesis my main page as:
\documentclass[12pt,b5paper,twoside,openany]{book}
%---------------------------------Packages--------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphics}
\usepackage{color}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{refstyle}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{placeins}
\usepackage[numbers]{natbib}
\usepackage{blindtext}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{textcomp}
\usepackage{scicite}
\usepackage{cite}
\usepackage{apacite}

\usepackage{times}
\usepackage{siunitx}
\usepackage{geometry}
\usepackage[Lenny]{fncychap} %Chapter style
%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
%---------------------------------Cover&Lists--------------------------------------------------
\begin{document}
\pagenumbering{}
\input{coverpage}
\maketitle
\pagestyle{fancy}
\renewcommand{\headrulewidth}{2pt}
\rhead{ }
\setcounter{page}{0}
\renewcommand{\thepage}{\roman{page}}
\input{acknowledgment}
\large
\doublespace
\tableofcontents
\singlespace
\large
\listoffigures
%---------------------------------Chapters--------------------------------------------------
\include{./chapters/chapter1}
\include{./chapters/chapter2}
%\include{./chapters/chapter3}

%---------------------------------References--------------------------------------------------
\bibliographystyle{apacite}
\renewcommand{\bibname}{References}
\bibliography{ref}
\end{document}



In chapters I want to cit reference to appear as name and year as example (Gokhale & Zwaan 1972), Not [3].
Peter Flynn
2017-05-13 21:27:36 UTC
Permalink
Raw Message
Post by AS
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
No, **MINIMAL**.

Remove all the packages that do not affect the problem.
Post by AS
In chapters I want to cit reference to appear as name and year as
example (Gokhale & Zwaan 1972), Not [3].
I already posted an example of how to do this.
Why are you asking again?

///Peter
Donald Arseneau
2017-05-14 04:28:19 UTC
Permalink
Raw Message
Post by AS
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
\documentclass[12pt,b5paper,twoside,openany]{book}
%---------------------------------Packages--------------------------------------------------
\usepackage[utf8]{inputenc}
...
Post by AS
\usepackage[numbers]{natbib}
...
Post by AS
\usepackage{scicite}
\usepackage{cite}
\usepackage{apacite}
...
Post by AS
In chapters I want to cit reference to appear as name and year as example (Gokhale & Zwaan 1972), Not [3].
See the conflicting requests? Choose one cite style and drop the
others.
--
Donald Arseneau ***@triumf.ca
AS
2017-05-14 11:20:46 UTC
Permalink
Raw Message
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
Thanks very much for all yours, now when I run it

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\begin{equation*}
\begin{align}
I&=I_{lin}(\SI{0}{\degree})+I_{lin}(\SI{90}{\degree})=I_{lin}(\SI{45}{\degree})+I_{lin}(\SI{135}{\de%gree}) \\
Q&=I_{lin}(\SI{0}{\degree})-I_{lin}(\SI{90}{\degree}) \\
U&=I_{lin}(\SI{45}{\degree})-I_{lin}(\SI{135}{\degree}) \\
V&=I_{circ}(right)-I_{circ}(left)
\end{align}
\end{equation*}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
appears this error

Package amsmath Error: Erroneous nesting of equation structures;(amsmath) trying to recover with `aligned'. \end{align}

How can I fix it?
Julius Dittmar
2017-05-14 17:51:41 UTC
Permalink
Raw Message
Post by AS
Thanks very much for all yours, now when I run it
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\begin{equation*}
\begin{align}
I&=I_{lin}(\SI{0}{\degree})+I_{lin}(\SI{90}{\degree})=I_{lin}(\SI{45}{\degree})+I_{lin}(\SI{135}{\de%gree}) \\
Q&=I_{lin}(\SI{0}{\degree})-I_{lin}(\SI{90}{\degree}) \\
U&=I_{lin}(\SI{45}{\degree})-I_{lin}(\SI{135}{\degree}) \\
V&=I_{circ}(right)-I_{circ}(left)
\end{align}
\end{equation*}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
appears this error
Package amsmath Error: Erroneous nesting of equation structures;(amsmath) trying to recover with `aligned'. \end{align}
How can I fix it?
Two possibilities, both easily found if you read amsmath documentation
about the align environment. One is you use the align environment. As
that is a stand-alone math environment, remove the equation* environment
around it. The other is mentioned in the error message aswell: use the
aligned environment instead of the align environment. It does about the
same as the align environment, but is no stand-alone math environment
and thus can be used inside of an equation* environment.

I personally would prefer the first solution.

Hope that helps,

Julius Dittmar
AS
2017-05-14 11:39:09 UTC
Permalink
Raw Message
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
I solve it, thanks very much
Peter Flynn
2017-05-14 18:39:21 UTC
Permalink
Raw Message
Post by AS
Post by AS
how can I write reference as (Wittman & Xu 1987) in latex?
I use
\bibliographystyle{apalike}
\renewcommand{\bibname}{References}
\bibliography{ref}
I solve it, thanks very much
*plonk*

Loading...