Affichage des articles dont le libellé est Recent Questions - TeX - LaTeX Stack Exchange. Afficher tous les articles
Affichage des articles dont le libellé est Recent Questions - TeX - LaTeX Stack Exchange. Afficher tous les articles

vendredi 5 décembre 2014

hyperlink for citations using harvard style


I am following a prescribed template for authoring my thesis, and it has \usepackage{harvard}. I would like hyperlinks to my citations, for instance, \cite{ref} should point to the particular reference in my reference list. I am using \usepackage{hyperref}, but the links are not created. Am I missing something? Please suggest.


TIA Vinod





Labelling Multi-"node" Path


I would like to ask for a path drawn with the following command



\draw [->] (4) to [out=225,in=0] (11) to [out=180,in=-90] (12) to [out=90] (2);


How can I add a sloped label to the path. Furthermore, if I would like the label appear on the section between (12) and (2), what should I do?


Thanks!enter image description here




Edited


My apologies. The code and generated output is as below.



\begin{tikzpicture}[->,>=stealth',node distance=5cm,font=\small\setstretch{1.0}]

\node [state] (1) [] {A};
\node [state] (2) [below=15cm of 1] {B};
\node [state] (3) [left of=2] {C};
\node [state] (4) [above of=3] {D};
\node [] (5) [below=1cm of 3] {};
\node [] (6) [left of=4] {};

\draw [->,smooth] (2) to [out=225,in=0] (5) to [out=180,in=-90] (6) to [out=90] (1);

\end{tikzpicture}


enter image description here





Copy/paste math formulas in pdf to Word?


I am trying to copy, from a pdf file, some math formulas that were written in latex. I want to paste them onto Word. Is there a way I can do this directly and get the formula exactly without getting the format messed up? I am doing this for my Masters thesis. I do not want to learn Latex





How to use \guilsinglleft and \guilsinglright in csquotes


I was reading Jan Tschichold's The Form of the Book and he suggest to use


[\guilsinglleft] and [\guilsinglright]


instead of « » for the outer quotation mark. So, I wonder how to do it, provided that Biblatex produces the article entry (and other entries as well) with «guillemots».


The output should look something like this:



‹Here is a quote «and a quote within». Done!›



The code should be



\enquote{Here is a quote \enquote{and a quote within}. Done!}






Textbox Nodes Won't Appear In Diagram


I am trying to create a simple venn diagram with the labels a,b,c with a U in the right hand corner of the box like this picture: enter image description here


I have created the venn diagram the way I wanted to, but I can't create node labels that appear like in the image. Here is what I've made and the source code that I've been using. I've been playing around with different colors and I still can't see it. enter image description here


\documentclass[12pt, tikz, border=5]{article} \usepackage{tikz} \begin{document} \tikzstyle{textbox}=[draw=black, fill=black, thick, rectangle] \begin{tikzpicture}[scale=4, blend group=screen] \fill[lightgray] ( 270:.7) circle (1) node [textbox] {\begin{minipage}{0.15\textwidth} $\boldmath{c}$\end{minipage}}; \fill[gray] (180:.5) circle (1); \fill[darkgray] (0:.5) circle (1); \draw[ultra thick, fill=black!100!] ([shift={(-0.1,-0.1)}]current bounding box.south west) rectangle ([shift={(0.1,0.1)}]current bounding box.north east) ; \end{tikzpicture} \end{document}





Centering a table in a figure environment


I have the following code which I am trying to use to show the image of the lo shu magic square being translated into its numeric magic square equivalent:



\begin{figure}[htbp]
\centering
\includegraphics[width=150pt]{loshu.png}
$\longrightarrow$
\begin{tabular}{|c|c|c|}
\hline
4 & 9 & 2\\
\hline
3 & 5 & 7\\
\hline
8 & 1 & 6\\
\hline
\end{tabular}
\caption{The lo-shu magic square}
\label{fig:loshu}
\end{figure}


However, when I typeset this, the arrow is at the bottom along with the table. I'd like for the arrow and table to be aligned in the center of the figure so the transformation looks natural. Any ideas?:





Creating title page in latex


I need to create a title page of the given format



**(Title of the Thesis)**

Thesis

Submited in partial fulfilment of the requirements of

BITS C421T/42T Thesis

By

(Author)

ID No. ( )

Under the supervision of

----------------------
(Name and Designation of Supervisor)

Instiute emblem

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI (RAJASTHAN)

(Date)


I am new to latex, and am miserably failing to do so. I tried the center the lines by using the command \center, but even that is not working. How should I go about creating said titlepage? Also, how do I embed an image in the title page?





How does mktexmf find fonts on mac?


I installed a new font using Font Book on my mac. But when I try using fontspec, I get an error that says "font-not-found". It seems that the name that appears in the Font Book application is not the same as the files for the font that were installed, but I tried different names and it still doesn't seem to be able to load. When I select "show in finder" in Font Book, it shows me that the files are stored in ~/Library/Fonts. Any ideas on why fontspec is having issues?





Spread Image Pages in Chapter Opener


Chapter Opener Image is full page image. I have need to mask half page image and frond-end would like to put some text. I'm expecting the output (see screenshot). How do achieve this in LaTeX/XeLaTeX. I had searched and found only figure caption Unusual graphics and caption placement.




  1. 1Half-Page Image is BackEnd.


    a) Put the Chapter Number and Chapter Title in Front End of the Half-Page Image.




  2. After Half-Page Image, Yellow Color box is back-end.




  3. 2Half-Page Image is BackEnd.


    a) list text put in front of the second-half page in front-end text.




enter image description here


enter image description here


My MWE is:



\documentclass[11pt,twoside,openany,svgnames,x11names]{book}
\usepackage{wallpaper}
\usepackage{changepage}
\usepackage[explicit]{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning}
\usepackage{lipsum}
\usepackage{geometry}
\geometry{
paperwidth=216mm, paperheight=303mm,
left=23mm,
right=18mm,
top=23mm, bottom=23mm,
headheight=\baselineskip,
headsep=7mm,
footskip=10mm
}
\definecolor{chapopcolor}{cmyk}{.18,0,1,0}

\newcommand\chapterillustration{}

\titleformat{\chapter}{}{}{0pt}{
\ThisULCornerWallPaper{1}{\chapterillustration}
\tikz[overlay,remember picture]
\fill[chapopcolor,opacity=1]
(current page.north west) rectangle
([yshift=-3cm] current page.north east);
\strictpagecheck\checkoddpage
\ifoddpage{
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=south west,
xshift=20mm,yshift=-30mm,
font=\sffamily\bfseries\huge]
at (current page.north west)
{\fontsize{16}{18}\selectfont\textcolor{white}{\chaptername}\ \thechapter};
\node[text=blue,
font=\fontsize{32}{34}\selectfont,
inner ysep=12pt, inner xsep=20pt,
rounded rectangle,anchor=east,
xshift=-20mm,yshift=-30mm]
at (current page.north east) {#1};
\end{tikzpicture}
}
\else {
\ThisLLCornerWallPaper{.35}{fern_mo_01}
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=south east,
xshift=-20mm,yshift=-30mm,
font=\sffamily\bfseries\huge]
at (current page.north east)
{\chaptername\ \thechapter};
\node[fill=Sienna!80!black,text=white,
font=\Huge\bfseries,
inner sep=12pt, inner xsep=20pt,
rounded rectangle,anchor=west,
xshift=20mm,yshift=-30mm]
at ( current page.north west) {#1};
\end{tikzpicture}
}
\fi
}
\titlespacing*{\chapter}{0pt}{0pt}{135mm}





\begin{document}
\pagestyle{headings}

\renewcommand\chapterillustration{six-computers-chips-circuits}

\chapter{Chapter TeXt Here}

\section*{What you will learn}
\section*{Asian curriculum}

\begin{itemize}
\item[1A] Number Systems
\item[1B] Place value
\item[1C] Addition and subtraction
\item[1D] Addition and subtraction
\item[1E] Multiplication
\item[1F] Multiplying larger numbers
\item[1G] Division
\item[1I] Estimating and rounding Order of operations
\end{itemize}

\section*{Statistics and Probability}

\begin{itemize}
\item Data measures Determine mean, median, and range
and use these measures to compare
data sets explaining reasoning
\item Data investigation
Investigate questions involving the
collection of univariate and simple
bivariate data
\item Sample space
Construct sample spaces for single-
step experiments
\item Relative frequency
Calculate relative frequencies, and recognise variation between results
\end{itemize}

\end{document}




Need to restart TeXShop to use XeLaTeX


I have a document that must be compiled using XeLaTeX. If I open TeXshop and compile this file first, everything is fine and it works. However, if I open a different file that is normally compiled with pdflatex, it will compile that fine. But if I now try to compile the file that requires xelatex, I get an error, since the console shows that it is trying to use pdflatex. I tried looking in preferences and telling it to use the xelatex command, but it doesn't seem to do anything. Also, if I compile the xelatex file first, and then try compiling the other one, it works fine, but the console shows that it was compiled using xelatex.


Any ideas on why it is behaving like this, and what I can do to switch between behaviors without restarting Texshop?





Producing the lo shu magic square


I am writing up a paper on magic squares, and I would like to include the lo shu magic square, but I'd like to do this using XeLaTeX as opposed to just including a picture. The following picture is what I want to produce: enter image description here


Does someone know how to produce what's above? I thought something like tikz would probably have to be used, but I'm not very advanced with LaTeX just yet.





Baposter title out of bounds


My poster is made using \baposter. I changed fontscale=0.2 and now the title is out of bounds of the poster. How can I move down the boxes to make room for the title or force the title down to compress the boxes? Note: my title is made using \textsc





left justified bold and not italic header


I am using \documentclass{article} to write a paper. I have to write a header left justified, bold, font size 12 pt and not italic. Also with the page numbers in the right.


How can I have this?





Can I plot an average-line plot like this with PGFPlots?


I would like to create a plot like this (maybe a bit better looking - this is my attempt):


enter image description here


Here is how the data for the plot looks:



x,min,max,avg
0,800,3600,2628.571429
1.5,2000,3600,2942.857143
2.0,3000,3600,3300
3.0,3200,4000,3885.714286
4.5,3200,5000,4414.285714



  1. Can I create a plot like this with pgfplots (i've looked for a plot type like this but could not find it anywhere)?

  2. Is there any way to get rid of the ugly "scaling" that I do (i.e. divide by 1000)?

  3. Is there a better way refer to DTLcurrentindex without writing it out in full every time?

  4. Is there a better way to read the data from the file?

  5. Any other glaring mistakes?


My code follows:



\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{arrows.meta}
\usepackage{datatool}

\usetikzlibrary{arrows,backgrounds,snakes}
\begin{document}

\begin{tikzpicture}[>=Stealth]
\DTLloaddb{data}{moose.csv}
\DTLforeach*{data}{\x=x,\min=min, \m=max, \avg=avg}{
% Draw the top whisker
\draw (\DTLcurrentindex - 0.2, \m/1000) -- (\DTLcurrentindex + 0.2, \m/1000);
% Draw the bottom whisker
\draw (\DTLcurrentindex - 0.2, \min/1000) -- (\DTLcurrentindex + 0.2, \min/1000);
% Draw the vertical line
\draw (\DTLcurrentindex, \min/1000) -- (\DTLcurrentindex, \m/1000);
% Draw the middle line
\draw (\DTLcurrentindex - 0.1, \avg/1000) -- (\DTLcurrentindex + 0.1, \avg/1000);

% Draw the x-axis and y-axis
\draw[->] (0,0) -- (6,0);
\draw[->] (0,0) -- (0,6);
\foreach \tick in {1,2,3,4,5}{
\draw (-0.05, \tick) -- (0.05, \tick);
}

% Draw the x tick and label
\draw (\DTLcurrentindex, 0.05) -- (\DTLcurrentindex, -0.05) node[below]{\x};
}
\end{tikzpicture}

\end{document}




Can coordinates declared inside "append after command+\pgfextra" command be used afterwards?


I would like to add some lines to certain nodes but being declared within node options and I thought using append after command and \pgfextra...\endpgfextra. But new coordinate nodes declared inside this new path are not know outside. What can I do to use them?


Just a little example to show the problem. In next code, the command \draw (a.antenna)--(b.antenna) doesn't work.



\documentclass[tikz,border=2mm]{standalone}

\begin{document}

\tikzset{antenna/.style={append after command={
\pgfextra \draw (\tikzlastnode.north)--++(90:1cm) circle(2pt) coordinate (\tikzlastnode.antenna); \endpgfextra}}}

\begin{tikzpicture}

\draw node[draw, minimum width=2cm, antenna] (a) at (0,0) {A};

\draw node[draw, minimum width=2cm, antenna] (b) at (2,0) {B};

%\draw (a.antenna) -- (b.antenna);
\end{tikzpicture}

\end{document}




How to plot Dirichlet Function


I'm writting a document in maths and I want to add the graph of the Dirichlet Function. I was googling to find the tikz code of something like that but unfortunately I found nothing...


The graph is what seems in the picture: enter image description here


I don't know how to plot it in tikz... and a link I found http://ift.tt/1yvzUGX


well while it was compiled... the graph was nowhere to be seen.


So, I would be more than happy if someone could provide me a link where I can copy the cody or draw that for me... I know it's a long shot!





jeudi 4 décembre 2014

Move text / numbers to a new line


Let's say you have a few pages worth of text then numbers, ie name address phone number.


Example :


Name address 0123 4444 name address 0987 6754 name address 5674 5643 etc


How can one create a rule that moves each new 'name address number' to a new line so every one is on a new line?


Eg " if any 4 numbers in a row, then move the next letter to a new line" would do the trick but I am not sure what program it would need to be put in to do it, Word and Excel don't seem to have that functionality .


I'm not a coder but if anyone has any suggestions it would be greatly appreciated.


Thanks





Resizing my table


I'm trying to fit my table on the page like this:


enter image description here


But instead it goes like this:


enter image description here


With the left side being the end of the page. How do I do this? This is what I have:



\begin{table}[!htb]
\centering

\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
Monday-saturday & Full-time new (break after 3 hours) & Full-time new (break after 4 hours) & Part-time new & Total employees working & Minimum employees needed & Additional costs
\\\hline
10:00-11:00 & 0 & 1 & 1 & 2 & 2 & \euro0
\\\hline
11:00-12:00 & 1 & 0 & 2 & 5 & 5 & \euro 30
\\\hline
12:00-13:00 & 1 & 2 & 1 & 9 & 9 & \euro40
\\\hline
13:00-14:00 & 0 & 0 & 0 & 9 & 9 & \euro0
\\\hline
14:00-15:00 & 0 & 0 & 0 & 6 * 6 & \euro0
\\\hline
15:00-16:00 & 0 & 0 & 0 & 5 & 5 & \euro10
\\\hline
16:00-17:00 & 0 & 0 & 2 & 5 & 5 & \euro10
\\\hline
17:00-18:00 & 0 & 0 & 4 & 11 & 9 & \euro0
\\\hline
18:00-19:00 & 0 & 0 & 0 & 10 & 10 & \euro10
\\\hline
19:00-20:00 & 0 & 0 & 0 & 9 & 9 & \euro40
\\\hline
20:00-21:00 & 0 & 0 & 0 & 4 & 4 & \euro10
\\\hline

\end{tabular}


\end{table}




How can I revive a phantom text?


In LyX, I made a certain section "phantom". Now I want to bring it back to normal.


I tried right-clicking on the text and un-checking the "Phantom" option, but it didn't have any effect.


I also looked in Edit->Text Style, but found nothing that seems related.


How can I bring my text back to life?





Spread Image Pages in Chapter Opener


Chapter Opener Image is full page image. I have need to mask half page image and frond-end would like to put some text. I'm expecting the output (see screenshot). How do achieve this in LaTeX/XeLaTeX. I had searched and found only figure caption Unusual graphics and caption placement.




  1. 1Half-Page Image is BackEnd.


    a) Put the Chapter Number and Chapter Title in Front End of the Half-Page Image.




  2. After Half-Page Image, Yellow Color box is back-end.




  3. 2Half-Page Image is BackEnd.


    a) list text put in front of the second-half page in front-end text.




enter image description here


enter image description here


My MWE is:



\documentclass[11pt,twoside,openany,svgnames,x11names]{book}
\usepackage{wallpaper}
\usepackage{changepage}
\usepackage[explicit]{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning}
\usepackage{lipsum}
\usepackage{geometry}
\geometry{
paperwidth=216mm, paperheight=303mm,
left=23mm,
right=18mm,
top=23mm, bottom=23mm,
headheight=\baselineskip,
headsep=7mm,
footskip=10mm
}
\definecolor{chapopcolor}{cmyk}{.18,0,1,0}

\newcommand\chapterillustration{}

\titleformat{\chapter}{}{}{0pt}{
\ThisULCornerWallPaper{1}{\chapterillustration}
\tikz[overlay,remember picture]
\fill[chapopcolor,opacity=1]
(current page.north west) rectangle
([yshift=-3cm] current page.north east);
\strictpagecheck\checkoddpage
\ifoddpage{
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=south west,
xshift=20mm,yshift=-30mm,
font=\sffamily\bfseries\huge]
at (current page.north west)
{\fontsize{16}{18}\selectfont\textcolor{white}{\chaptername}\ \thechapter};
\node[text=blue,
font=\fontsize{32}{34}\selectfont,
inner ysep=12pt, inner xsep=20pt,
rounded rectangle,anchor=east,
xshift=-20mm,yshift=-30mm]
at (current page.north east) {#1};
\end{tikzpicture}
}
\else {
\ThisLLCornerWallPaper{.35}{fern_mo_01}
\begin{tikzpicture}[overlay,remember picture]
\node[anchor=south east,
xshift=-20mm,yshift=-30mm,
font=\sffamily\bfseries\huge]
at (current page.north east)
{\chaptername\ \thechapter};
\node[fill=Sienna!80!black,text=white,
font=\Huge\bfseries,
inner sep=12pt, inner xsep=20pt,
rounded rectangle,anchor=west,
xshift=20mm,yshift=-30mm]
at ( current page.north west) {#1};
\end{tikzpicture}
}
\fi
}
\titlespacing*{\chapter}{0pt}{0pt}{135mm}





\begin{document}
\pagestyle{headings}

\renewcommand\chapterillustration{six-computers-chips-circuits}

\chapter{Chapter TeXt Here}

\section*{What you will learn}
\section*{Asian curriculum}

\begin{itemize}
\item[1A] Number Systems
\item[1B] Place value
\item[1C] Addition and subtraction
\item[1D] Addition and subtraction
\item[1E] Multiplication
\item[1F] Multiplying larger numbers
\item[1G] Division
\item[1I] Estimating and rounding Order of operations
\end{itemize}

\section*{Statistics and Probability}

\begin{itemize}
\item Data measures Determine mean, median, and range
and use these measures to compare
data sets explaining reasoning
\item Data investigation
Investigate questions involving the
collection of univariate and simple
bivariate data
\item Sample space
Construct sample spaces for single-
step experiments
\item Relative frequency
Calculate relative frequencies, and recognise variation between results
\end{itemize}

\end{document}