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}




Automatic three digit grouping


I have huge numbers in tables (some of them are grouped in three digit groups but some are not).


I need to make a small space (or comma) between groups of three digits. I have used two packages


\usepackage{numprint} and \usepackage{siunitx}


But it doesn't show any changes in my tables.


I know I can do manually using the backslash but I have heaps of numbers in my tables.


Here my code,



\begin{tabular}{|l|l|l|}
\hline
x & y & z \\
\hline
9,833.823 & 550,245 & 15004568 \\
\hline
9,458.230 & 81,345.23 & 198000344 \\
\hline
\end{tabular}


enter image description here





Where can I find the resources to create a preview progam like qtikz?


Writing tikz code can take a lot of time especially if there are a lot of figures that I want to code in LaTeX. As such, I think it would be a good side project to write a photoshop-like program to handle tikz diagrams. To do this requires being able to find documentation of how Tikz works.





How do I get \texttt with bold face in LaTeX?


This question was asked and answered 20 years ago but I wonder if there is a more modern solution today that does not involve quite so much hackery with overriding settings in font files.


I want my font to look exactly like the result of \texttt but in bold face.


How might I achieve this?





How may I vertically left-align the word 'Similarly' with the word 'This' in the following?



\documentclass[11pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{mathtools}
\usepackage{IEEEtrantools}

\begin{document}
\begin{equation*}
(a+b)(a+b)=a^{2}+2ab+b^{2}.
\end{equation*}
This may of course be written
\begin{flalign*}
&&(a+b)^{2}&=a^{2}+2ab+b^{2}&\\
\makebox[0pt]{Similarly}&&
(a-b)^{2}&= a^{2}-2ab+b^{2}&\\
\text{In the case}&&
(a+b)(a-b)&= a^{2}-b^{2}
\end{flalign*}
\end{document}




How to use \underline and \emph over several words with gb4e?


I'm new to gb4e and after googling around for a while I have not been able to get an answer for this.


How can I underline several words in a gloss without messing up the alignment?


Thanks for any help.





How Can I Shorten This?


I am trying to create the marks needed for this graph and this process is very lengthy. Is there a shorter way I could do this? I am trying to create a mark at every 1/6 mark between 1 and 6 so that I can place each interval. Here is what I'm trying to create:


enter image description here



\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2]
\draw [-] (0,0)--coordinate(x axis mid)(6,0);
\foreach\x/\xtext in {0,{1/6}/{1/6},{2/6}/{2/6},
{3/6}/{3/6},{4/6}/{4/6},{5/6}/{5/6},1,{7/6}/{7/6},6}
\draw[shift={(\x,0)}] (0pt,0pt)--(0pt,-2pt);
\draw [-] (0,0)--coordinate(y axis mid)(0,4);
\end{tikzpicture}
\end{document}


If I need to just hardcode everything then just let me know.





Tikz: shifting an angle lined



I am trying to shift an angled line but I can't seem to determine the correct method.






\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\coordinate (vp) at (10cm, 3cm);
\draw (1cm, 0) -- ($(1cm, 0)!2cm!(vp)$) coordinate (a);
% I want the line parallel to the line above
\begin{scope}[xshift = 0.5cm] % incorrect
\draw[|<->|] (1cm, 0) -- (a);
\end{scope}
\begin{scope}[yshift = 0.5cm] % incorrect
\draw[|<->|] (1cm, 0) -- (a);
\end{scope}
% incorrect
\draw[|<->|] ($(1cm, 0) + (-45:0.25cm)$) -- ($(a) + (-45:0.25cm)$);
\end{tikzpicture}
\end{document}




Aligning three columns differently; with images, manually broken and wrap-around text


I am trying to create a situation with three columns from left to right:


one with an image top-edge aligned to the top of the center column and the left of itself;


one with wrap-around text having manual breaks. Some of the text will be left aligned, some right;


and one with an image bottom-edge aligned to the bottom of the center column.


I have tried using three minipages, I also tried tabular (see mwe). I tried solution like Aligning image and text on top, with minipages, but I still could not figure out how to get the image in the right column to align to the bottom.



\documentclass{article}%

\usepackage{graphicx}%

\newlength{\myheadskip}
\setlength\myheadskip{2ex plus 1ex minus 0.5ex}
\newlength{\imagewid}
\setlength{\imagewid}{0.162\textwidth}


\newcommand{\partnerimageone}[6]{
\vspace{1.0\myheadskip}
\begin{minipage}[b][][t]{0.18\textwidth}
\flushleft
% \vspace{0pt}
\includegraphics[height=\imagewid]{#5}
% \vspace*{\fill}
\end{minipage}
\begin{minipage}[c]{0.62\textwidth}
\begin{flushleft}
\textbf{\Large #1}

\emph{#2}\vspace{-0.5\myheadskip}
\end{flushleft}

\begin{flushright}
\textbf{\Large #3}

\emph{#4}
\end{flushright}
\end{minipage}
\begin{minipage}[b][][b]{0.18\textwidth}
\flushright
\vspace*{\fill}
\includegraphics[height=\imagewid]{#6}
\end{minipage}
}

\newcommand{\partnerimagetwo}[6]{
\vspace{1.0\myheadskip}
\begin{tabular}{@{}p{0.18\textwidth} p{0.62\textwidth} p{0.18\textwidth}}
\vspace{-2ex}\includegraphics[height=\imagewid]{#5} &
\textbf{\Large #1} \newline
\emph{#2}\vspace{-0.5\myheadskip} \newline
{\flushright\hfill\textbf{\Large #3}} \newline
{\raggedleft\emph{#4}} &
% \end{flushright} &
\vspace*{\fill}
\includegraphics[height=\imagewid]{#6}
\end{tabular}
}

\begin{document}

\partnerimageone{
Your Favorite Food Truck
}{
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you\vspace{3ex}
}{
A Nice Bakery
}{
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
}{l_sq}{r_sq}

\partnerimagetwo{
Your Favorite Food Truck
}{
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you
Offering gourmet local eats prepared daily for you\vspace{3ex}
}{
A Nice Bakery
}{
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
This place is magnificent!
}{l_sq}{r_sq}

\end{document}


mwe





metapost annotation


Metapost is a powerful tool for drawing, but not sure if it's more easier than tikz for annotation. Is it possible to draw this annotation graph with metapost?


tikz code:



\documentclass[tikz]{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}

\tikzstyle{boxa} = [top color=white,bottom color=blue!20!]
\tikzstyle{boxb} = [top color=white,bottom color=red!20!]
\tikzstyle{curly} = [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=2pt]
% Input:
% #1 Line offset (optional)
% #2 Line angle
% #3 line start offset
% #4 Line end offset
% #5 Line label
% Example:
% \lineann[1]{30}{1}{4}{$L_1$}
\newcommand{\lineann}[5][0.5]{%
\begin{scope}[rotate=#2,blue,inner sep=2pt]
\draw[dashed, blue!40] (#3,0) -- +(0,#1)
node [coordinate, near end] (a) {};
\draw[dashed, blue!40] (#4,0) -- +(0,#1)
node [coordinate, near end] (b) {};
\draw[|<->|] (a) -- node[fill=white] {#5} (b);
\end{scope}
}
\begin{document}

\begin{tikzpicture}[scale=1]
\def\dx{2.0}
\def\dy{.5}
\filldraw[thick,boxa] (0,0) rectangle node{$P_1$} +(\dx,\dy);
\filldraw[thick,boxa] (\dx,0) rectangle node{$P_2$} +(\dx,\dy);
\filldraw[thick,boxa] (2*\dx,0) rectangle node{$P_3$} +(\dx,\dy);
\filldraw[thick,boxb] (3*\dx,0) rectangle node{$P_4$} +(\dx,\dy);

\draw [curly] (0,\dy)--(4*\dx,\dy) node [black,midway,yshift=14pt] {\footnotesize $T_0$};
\lineann[-10pt]{0}{3*\dx}{4*\dx}{\footnotesize $T_1$}
\end{tikzpicture}
\end{document}


Output:


enter image description here





I cannot seem to figure out how to move the location of the legend of my tikz graph.


I'd like to move it into the top left from the top right, but nothing I try works.


\begin{figure}[H] \caption{Stress-Strain Curve, Mix C} \begin{tikzpicture} \begin{axis}[xlabel=Strain ,ylabel=Stress (psi), width=12cm, height=8cm] \addplot+[smooth,color=blue,mark=o]coordinates{ (0.000001, 11) (0.000045, 38) (0.000123, 85) (0.000231, 150) (0.000371, 230) (0.000535, 321) (0.000709, 419) (0.000897, 524) (0.001094, 632) (0.001294, 745) (0.001502, 862) (0.001713, 981) (0.001929, 1103) (0.002146, 1226) (0.002365, 1351) (0.002585, 1478) (0.002806, 1605) (0.00303, 1733) (0.003256, 1861) (0.003408, 1945)


}; \addlegendentry{Specimen C19E-1}





How do I draw a box around a venn diagram


I created this venn diagram, and I need to put a box around it as a border, how would I do that?



\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=3, blend group=screen]
\fill[lightgray] ( 290:.7) circle (1);
\fill[gray] (150:.6) circle (1);
\fill[darkgray] (25:.8) circle (1);
\end{tikzpicture}
\end{document}


enter image description here





Tikz: drawing in perspective


I am working on drawing a beam in perspective. I have my point I want to use as the perspective point (10, 3). What would be the way to draw along this line? For instance, consider



\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0, 0) rectangle (1cm, 1cm);
% I want to draw a 2cm line from (1cm, 0) along the ray that goes to my vanishing point
\end{tikzpicture}
\end{document}



  1. I could set \pgfmathsetmacro\myangle{tan(3/10)} and use the \usetikzlibrary{calc} but \myangle is not producing a line that is 17 degrees when I issue \draw (1cm, 0) -- ++(\myangle:2cm);

  2. I have tried issuing \def\myangle{tan(3/10)} but this doesn't work at all.

  3. Or I could use scope and rotate a the line \draw (1cm, 0) -- (2cm, 0); by the intended angle but again tan(3/10) isn't evaluating correctly (not sure why).





Authors name in scshape in footnote (with Biblatex)


Referring to my question at the address [url]Authors' name in scshape with biblatex, for the sake of homogeneity I'd like to have authors' name all in scshape in footnotes too. The relevant code might to be the following one:



\AtEveryCite{
\DeclareNameFormat{labelname}{%
\renewcommand{\mkbibnamefirst}{\textlcsc}%
\renewcommand{\mkbibnamelast}{\textlcsc}%
\renewcommand{\mkbibnameprefix}{\textlcsc}%
\renewcommand{\mkbibnameaffix}{\textlcsc}%
\ifcase\value{uniquename}%
\usebibmacro{name:last}{#1}{#3}{#5}{#7}%
\or
\ifuseprefix
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}%
{\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
\or
\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
\fi
\usebibmacro{name:andothers}}}


but it doesn't work. Please, consider the fullcode (containing the previous definition of \newcommand\textlcsc:



\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[type1]{ebgaramond}
\usepackage{microtype}
\usepackage[heightrounded]{geometry}
\frenchspacing
\usepackage{xpatch}
\usepackage{textcase}

%%% BIBLIOGRAFIA
\usepackage[babel,italian=guillemets]{csquotes}
\usepackage[style=philosophy-verbose,backend=biber,scauthors=true,classical=true,%
firstinits=true,volnumformat=strings,volumeformat=romansc,sorting=nyt,citepages=omit,%
indexing]{biblatex}
\DeclareFieldFormat[article]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[inbook]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat{journaltitle}{\mkbibquote{#1}} % riviste tra virgolette caporali
\DeclareFieldFormat{issuetitle}{\mkbibquote{#1}} % riviste tra virgolette caporali
\renewcommand*{\bibfont}{\normalfont\footnotesize} % riduce il font della bibliografia

% inverte cognome/nome in philosophy-verbose
\AtBeginBibliography{%
\iftoggle{bbx:scauthorsbib}{%
\DeclareNameFormat{sortname}{%
\renewcommand{\mkbibnamefirst}{\textsc}%
\renewcommand{\mkbibnamelast}{\textsc}%
\renewcommand{\mkbibnameprefix}{\textsc}%
\renewcommand{\mkbibnameaffix}{\textsc}%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}}%
{}}%
\DeclareNameAlias{last-first/first-last}{first-last}

% rende gli autori in tutto maiuscoletto nella bibliografia
\newcommand\textlcsc[1]{\textsc{\MakeLowercase{#1}}}
\AtBeginBibliography{%
\iftoggle{bbx:scauthors}{%
\DeclareNameFormat{sortname}{%
\renewcommand{\mkbibnamefirst}{\textlcsc}%
\renewcommand{\mkbibnamelast}{\textlcsc}%
\renewcommand{\mkbibnameprefix}{\textlcsc}%
\renewcommand{\mkbibnameaffix}{\textlcsc}%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}}%
{}}%

% rende gli autori in tutto maiuscoletto nelle note
\AtEveryCite{
\DeclareNameFormat{labelname}{%
\renewcommand{\mkbibnamefirst}{\textlcsc}%
\renewcommand{\mkbibnamelast}{\textlcsc}%
\renewcommand{\mkbibnameprefix}{\textlcsc}%
\renewcommand{\mkbibnameaffix}{\textlcsc}%
\ifcase\value{uniquename}%
\usebibmacro{name:last}{#1}{#3}{#5}{#7}%
\or
\ifuseprefix
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}%
{\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
\or
\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
\fi
\usebibmacro{name:andothers}}}

% mantiene il nome autore nelle citazioni successiva alla prima
\DeclareNameFormat{labelname}{%
\ifcase\value{uniquename}%
\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
\or
\ifuseprefix
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
{\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
\or
\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
\fi
\usebibmacro{name:andothers}}

% ridefinisco il formato per usare il numero dell'edizione in apice
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\textsuperscript{#1}}
{#1\isdot\setunit{\addcomma\space}}}
% imposto l'ordine (e i separatori) dei dati
\renewbibmacro*{publisher+location+date}{%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit*{\space}%
\usebibmacro{date}%
\printfield{edition}%
\newunit}
% elimino la prima occorrenza del campo "edition"
\usepackage{xpatch}
\newcommand{\replaceedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{}%
{}
{\typeout{failed to patch driver #1}}
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}
% aggiungo le specifiche per philosophy-verbose
\xpatchbibmacro{incollection:full}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\xpatchbibmacro{book:full}
{\printfield{edition}%
\newunit}
{}%
{}
{}
\xpatchbibmacro{inbook:full}
{\printfield{edition}%
\newunit}
{}%
{}
{}

% sostituisce <(a cura di),> con <, a cura di>
\DefineBibliographyStrings{italian}{%
editor = {a cura di},%
editors = {a cura di},%
}
\xpatchbibmacro{bbx:editor}{\setunit{\addspace}}{\setunit{\addcomma\space}}{}{}

\begin{filecontents*}{\jobname.bib}
@book{ fornero:2008,
author = "Giovanni Fornero",
title = "Laicità debole e laicità forte",
publisher = "B. Mondadori",
location = "Milano",
year = "2008",
}

@book{ fornero:2009a,
author = "Giovanni Fornero",
title = "Bioetica cattolica e bioetica laica",
publisher = "B. Mondadori",
location = "Milano",
year = "2009",
edition = "2",
}

@inbook{ fornero:2009b,
author = "Giovanni Fornero",
title = "Due significati irrinunciabili di laicità",
booktitle = "La laicità vista dai laici",
editor = "G. D'Elia",
publisher = "Egea -- Università Bocconi Editori",
location = "Milano",
year = "2009",
pages = "61-74",
}

@book{ fornero:2012,
author = "Giovanni Fornero and Maurizio Mori",
title = "Laici e cattolici in bioetica: storia e teoria di un confronto",
publisher = "Le Lettere",
location = "Firenze",
year = "2012",
}

@book{ giordano:1997,
author = "Giuseppe Giordano",
title = "Tra paradigmi e rivoluzioni. Thomas Kuhn",
publisher = "Rubbettino",
location = "Soveria Mannelli",
year = "1997",
}

@book{ hoyningen:1993,
author = "Paul Hoyningen-Huene",
title = "Recontructing Scientific Revolutions",
publisher = "The University of Chicago Press",
location = "Chicago",
year = "1993",
}

@book{ kuhn:1982,
author = "Thomas Kuhn",
title = "La struttura delle rivoluzioni scientifiche",
publisher = "Einaudi",
location = "Torino",
year = "1982",
}

@inbook{ masterman:1980,
author = "Mary Masterman",
title = "La natura di un paradigma",
maintitle = "Critica e crescita della conoscenza",
editor = "Imre Lakatos and Alan Musgrave",
publisher = "Feltrinelli",
location = "Milano",
year = "1980",
edition = "3",
pages = "129-163",
}

@inbook{ mcmullin:1993,
author = "Ernan McMullin",
title = "Rationality and Paradigm Change in Science",
maintitle = "World Changes",
editor = "Paul Hprwich",
publisher = "The MIT Press",
location = "Cambridge (Massachusetts)",
year = "1993",
pages = "55-78",
}

@book{ siegel:1987,
author = "Harvey Siegel",
title = "Relativism Refuted",
publisher = "Reidel",
location = "Dordrecht",
year = "1987",
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\begin{document}

\section{Il concetto di paradigma in Kuhn}
È largamente note che il concetto kuhniano di paradigma -- così come definito e
adottato ne \emph{La struttura delle rivoluzioni scientifiche} del 1962 -- è
stato alla base di significative innovazioni \footcite[23]{kuhn:1982} anche nel
metodo storiografico, almeno applicato alla storia della scienza, ma insieme
che, da subito, è stato oggetto di numerose critiche per le sue ambiguità
e difficoltà.

In realtà, la nozione di paradigma matura gradualmente nella produzione
dell'epistemologo attraverso la sua monografia \emph{La rivoluzione copernicana}
del 1957 e trova approfondimenti teorici e affinamenti storiografici nella sua
produzione successiva.

Fra i primi a rilevare analiticamente le ambiguità e le oscillazioni del
concetto kuhniano di paradigma,

La caratteristica che svariati epistemologi e storici della scienza hanno
apprezzato e condiviso, ma dove risiede anche la maggior parte delle difficoltà
sia intrinseche, sia nell'utilizzo ulteriore della mozione kuhniana di paradigma
è il suo sfondo realistico (in cui si muove peraltro tutta la riflessione dello
stesso Kuhn. Fra le accezioni di paradigma che si intrecciano confusamente vi
sarebbero quella di «un'intera tradizione e un modello»\footcite[133]{masterman:1980}

\section{Il concetto di paradigma in Fornero}
Nell'approccio di Fornero\footcite[23]{fornero:2009a} il concetto di paradigma
è adottato per esplorare l'ambito vasto ed eterogeneo delle posizioni della
bioetica contemporanea.

La prima definizione offerta da Fornero chiarisce il paradigma come «la
posizione»\footcite[37]{fornero:2009a}

In seguito Fornero compie un approfondimento metodologico che lo porta ad
approfondire la prima definizione: il paradigma sarebbe in questa rinnovata
definizione «l'individuazione»

\printbibliography
\end{document}


So, whay I've further to modify? Thanx


==============================================


Post Scriptum


Try your own code in this case:



\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[type1]{ebgaramond}
\usepackage{microtype}
%\usepackage{xpatch}
%\usepackage{textcase}

%%% BIBLIOGRAFIA
\usepackage[babel,italian=guillemets]{csquotes}
\usepackage[style=philosophy-verbose,backend=biber,scauthors=true,scauthorscite=true,%
classical=true,firstinits=true,commacit=true,volnumformat=strings,volumeformat=romansc,%
sorting=nyt,citepages=omit,indexing]{biblatex}
\DeclareFieldFormat[article]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[inbook]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}} % in corsivo tutti i titoli
\DeclareFieldFormat{journaltitle}{\mkbibquote{#1}} % riviste tra virgolette caporali
\DeclareFieldFormat{issuetitle}{\mkbibquote{#1}} % riviste tra virgolette caporali
\renewcommand*{\bibfont}{\normalfont\footnotesize} % riduce il font della bibliografia

\newcommand\textlcsc[1]{\textsc{\MakeLowercase{#1}}}
\AtBeginBibliography{%
\iftoggle{bbx:scauthors}{%
\DeclareNameFormat{sortname}{%
\renewcommand{\mkbibnamefirst}{\textlcsc}%
\renewcommand{\mkbibnamelast}{\textlcsc}%
\renewcommand{\mkbibnameprefix}{\textlcsc}%
\renewcommand{\mkbibnameaffix}{\textlcsc}%
\ifnumequal{\value{listcount}}{1}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\ifblank{#3#5}
{}
{\usebibmacro{name:revsdelim}}}
{\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\usebibmacro{name:andothers}}}%
{}}%

\DeclareNameFormat{scdefault}{%
\renewcommand{\mkbibnamefirst}{\textlcsc}%
\renewcommand{\mkbibnamelast}{\textlcsc}%
\renewcommand{\mkbibnameprefix}{\textlcsc}%
\renewcommand{\mkbibnameaffix}{\textlcsc}%
\iffirstinits
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}%
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}
\newbibmacro*{cite:opcit}{%
\printtext[bibhyperlink]{\bibstring[\mkibid]{opcit}}}

% mantiene il nome autore nelle citazioni successiva alla prima
\DeclareNameFormat{labelname}{%
\ifcase\value{uniquename}%
\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
\or
\ifuseprefix
{\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}
{\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}%
\or
\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
\fi
\usebibmacro{name:andothers}}

\begin{filecontents*}{\jobname.bib}
@book{ fornero:2008,
author = "Giovanni Fornero",
title = "Laicita debole e laicita forte",
publisher = "B. Mondadori",
location = "Milano",
year = "2008",
}

@book{ fornero:2009,
author = "Giovanni Fornero",
title = "Bioetica cattolica e bioetica laica",
publisher = "B. Mondadori",
location = "Milano",
year = "2009",
edition = "2",
}

\end{filecontents*}

\addbibresource{\jobname.bib}

\begin{document}

Nell'approccio di Fornero\footcite[23]{fornero:2008} il concetto

Il paradigma la posizione\footcite[37]{fornero:2009}

Nell'approccio di Fornero\footcite[23]{fornero:2008} il concetto

\printbibliography
\end{document}




feynmf vs. feynmp: What's the difference?


What is the difference between feynmf and feynmp? By very basic understanding is that the former somehow makes use of raster graphics whereas the latter makes use of MetaPost.


Moreover, I have read that feynmp is actually preferable to feynmf, but why? Is there something that you can do with feynmp that you cannot with feynmf? Are some things easier? Does it do the same things better? I noticed very little difference when I changed \usepackage{feynmf} to \usepackage{feynmp}. Indeed, the biggest difference was that I had to add an extra line of code in order for it to typeset without error!





Image inside exam environment above question


I am wondering how can I fix the constant problem in inserting an image for a question. When I insert the image, I always have the image being above the question number. I want the question number to come first and then below it the inserted figure. What is a simple way to fix this? Here is my minimal working example:



\documentclass[12pt,a4paper]{exam}%,answers
\usepackage{tikz}
\usepackage{alphalph}
\usepackage{amsmath,amssymb}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{pgfplots} % for plots

\usepgfplotslibrary{groupplots}
\usetikzlibrary{arrows}

\makeatletter
\pgfplotsset{compat=1.6
auto title/.style={ title=(\AlphAlph{\pgfplots@group@current@plot})
}
}
\makeatother
\begin{document}
\begin{questions}


\question

\begin{center}
\includegraphics[scale=0.5]{10.png}
\end{center}




\end{questions}
\end{document}


enter image description here





Biblatex, biber and non-latin (cyrillic) UTF-8 names part II


I was looking for an example using biblatex, biber and mixed Latin/Greek/Cyrillic document; I found biblatex biber non-latin (cyrillic) UTF-8 names and biblatex: Abbreviating cyrillic authors' names with firstinits option, but neither of them are conclusive (and are closed). So, I came up with an MWE (below) which compiles with pdflatex test.tex; biber test; pdflatex test.tex; pdflatex test.tex (using TexLive 2014), and produces this:


/tmp/test.png


Mostly it looks as it should - my questions are:



  • Is this the correct way to use cyrillic names/titles with biblatex/biber? (that is, with \foreignlanguage?)

  • Like in the above post, the cyrillic name is not abbreviated, while the latin one is. How could I get them both to abbreviate?


Here is the code:



\documentclass{article}
\usepackage{filecontents} % tlmgr install filecontents
\begin{filecontents*}{\jobname.bib}
@BOOK{von1841faust,
title={Faust: Eine Tragödie. Erster Theil},
author={Johann Wolfgang von Goethe},
url={http://ift.tt/1BiPece},
year={1841},
publisher={Hermann Passarge}
}

% see: http://ift.tt/1zrqgDI
% if fonts are properly set-up, there's no need for separate \fontencoding{T2A}\selectfont, as in:
% title={\fontencoding{T2A}\selectfont \foreignlanguage{russian}{Двойник}},
% else - with or without \fontencoding{T2A}\selectfont:
% ! LaTeX Error: Command \CYRD unavailable in encoding T1.
% with \foreignlanguage and \fontencoding{T2A}:
% LaTeX Font Warning: Font shape `T2A/qpl/m/n' undefined
% (Font) using `T2A/cmr/m/n' instead on input line 48.
% kpathsea: Running mktexmf larm1000
% ! I can't find file `larm1000'.
% <*> ...ljfour; mag:=1; nonstopmode; input larm1000
% mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input larm1000' failed to make larm1000.tfm.
% ! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not found.

@book{dostoevskij2014dvoinik,
title={\foreignlanguage{russian}{Двойник}},
author={\foreignlanguage{russian}{Фёдор Михайлович Достоевский}},
isbn={9785000640227},
url={http://ift.tt/1zrqgTW},
year={2014},
publisher={Aegitas}
}

\end{filecontents*}

\usepackage[utf8]{inputenc}
\usepackage[T2A, T1]{fontenc} % before babel!
\usepackage[russian,greek,english]{babel} % tlmgr install babel-russian

\usepackage[sc]{mathpazo}
\usepackage{paratype} % tlmgr install paratype
\usepackage{tgpagella}

% T2A for cyrillic - paratype
\usepackage{substitutefont}
\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}

\usepackage{siunitx}

\usepackage[%
style=ieee,
isbn=true,
url=true,
defernumbers=true,
sorting=nyt, % "Sort by name, year, title."
%sorting=none, % "Do not sort at all. All entries are processed in citation order." (order of appearance)
bibencoding=utf8,
backend=biber
]{biblatex}
\bibliography{\jobname}

\begin{document}

From \si{\mega\ohm} to \si{\micro\watt} -- consider "Faust" \cite{von1841faust}, which is in (extended) Latin script; or "\foreignlanguage{russian}{Двойник}" \cite{dostoevskij2014dvoinik}, which is in Cyrillic script.

\printbibliography

\end{document}




Placing Two Generic Tables Beside Each Other


I have two tables that are virtually identical and look like so:



\begin{table}[!ht]
\fontsize{8}{8}\selectfont
\caption{caption$.}
\label{label}
\center{
\begin{tabular}{|c|c|c|c|}
\hline
$and$&$this$&$is$&$something$\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\end{tabular}
}
\end{table}

\begin{table}[!ht]
\fontsize{8}{8}\selectfont
\caption{caption$.}
\label{label}
\center{
\begin{tabular}{|c|c|c|c|}
\hline
$and$&$this$&$is$&$something$\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\hline
1&1&1&1\\
\end{tabular}
}
\end{table}


I know that these tables on their own aren't best practice, but what are the best practices for placing two tables like this, assuming I'm stuck with them, beside each other?





Installation of Tex Live did not solve a missing package problem


I'm writing this after literally half a day of trying.

Ever since I installed Ubuntu (couple of weeks ago) and up until now, I've been using TeXstudio 2.6.6 for writing latex documents.

I didn't have to install anything for it to compile and generate basic mathematical Latex documents.

But I was trying this morning to plot the graph of the equation x^2+y^2=5 on an x–y cartesian coordinate system (the circle with centre coordinates (0, 0) and radius 5), when I found out that I'm missing a package that could help me doing that: pgfplots.

This started an exhausting search that took almost 5 hours, while I was trying to understand how on earth to install this package.

So it all started with a post I found online, saying I need tlmgr in order to install new packages. this turns out later to have a partial support for my Ubuntu version (14.04), and required some more dependencies (at least I think that's what it was...) installation.

After doing that, I tried to install the package with:



tlmgr install pgfplots


That failed for a reason that was revealed an hour later: tlmgr "needs to be initialized" with:



tlmgr init-usertree


After doing that, I tried again tlmgr install pgfplots, which raised an error, saying I need to install xzdec.

Again, having no idea what I'm installing, I ran:



sudo apt-get install xzdec


And when I though my misery is finally over, I tried to install it again.

But that also raised some error (I don't remember what that was).

Looking again for an answer online, I found out this: http://ift.tt/19qV5Qu so I installed it too!

It took a while, but it seemed promising at first, because it looked like it was doing some work, and downloading tons of packages to /usr/local/texlive/2014/texmf-dist/ (the package pgfplots being one of them).

When it was finished, it said there to add /usr/local/texlive/2014/texmf-dist/doc/info to my INFOPATH and /usr/local/texlive/2014/texmf-dist/doc/man to my MANPATH and "most importantly" it said to add /usr/local/texlive/2014/bin/x86_64-linux to my PATH, and so I did, but when I now open TeX Studio, it still says "\usepackage{pgfplots} Package not found" and "File `pgfplots.sty' not found." !


Please, if I'm getting something wrong help me understand what it is.


Let's start with:

If Tex Live (the thing that I installed) is, and I quote:



an easy way to get up and running with the TeX document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows.



and I just installed it this very moment, then how was I able to write Latex documents on TeX Studio up until now?


The second thing I'm confused about:

If Tex Live is now installed, and I know that I have the package pgfplots on my machine (I saw it when Tex Live was showing me the installation progress), then why is Tex Studio still complaining it can't find this package?


Any help regarding these two questions will be greatly appreciated.

And I don't mean to sound rude, but please, please, please, don't tell me "you need X and Y to be able to run Z on W to solve this problem", but rather give me specific instructions ("Open X, move file Y to Z, run W from terminal..."). And please, please, please, don't tell me "you can find the answer in this link to the (200 pages of) documentation" but rather link me to the specific page in it discussing this issue.


Thank you for reading, any help would be greatly appreciated.





Trouble Creating


How would I draw this image using TikZ.


enter image description here


I have tried using curved lines, but I can't seem to get the details as accurate as they need to. The preamble to the document is:



\documentclass[12pt]{article}
\usepackage[reals]{layout}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{mflogo}
\usepackage{tikz}
\setlength{\topmargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.3in}
\setlength{\oddsidemargin}{0in}
\setlength{\headsep}{0in}
\setlength{\headheight}{0in}
\setlength{\parskip}{1em}




How to insert a table on the header


I am trying to insert a table on the header, just like the example below. The whole document where I was inspired to create this header can be found here Moshell User Guide.


Sample of desired output


On this picture this is header on every page of the document. The pages of course can vary based on the page number.


I have created a sample of code, that can reproduce the table format and also the header with the logo on the left the text in the middle and the page numbering on the right.


Sample of code provided below:



\documentclass{memoir}
\usepackage[ a4paper , centering ]{geometry}
\usepackage{graphicx} % demo option just for the example
\usepackage{lipsum} % demo option just for text
\usepackage{lastpage} % include last page numbering
\usepackage{chngpage} % allows for temporary adjustment of side margins
\usepackage{datetime}
\newdateformat{mydate}{\THEYEAR-\twodigit{\THEMONTH}-\twodigit{\THEDAY}}

\makepagestyle{mystyle}
\makeevenhead{mystyle}{\includegraphics[height=20pt]{LaTeX_logo}}{\hspace{3cm}Informational\\\hspace{3.1cm} USER GUIDE}{\thepage(\pageref{LastPage})}
\makeoddhead{mystyle}{\includegraphics[height=20pt]{LaTeX_logo}}{\hspace{3cm}Informational\\\hspace{3.1cm} USER GUIDE}{\thepage(\pageref{LastPage})}

\pagestyle{mystyle}
\begin{document}

\begin{table}
\begin{adjustwidth}{-1in}{-1in}
\begin{center}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\multicolumn{3}{|l}{{\small\textbf{Prepared (subject responsible)}}} & \multicolumn{3}{|l|}{{\small\textbf{No.}}} \\
\multicolumn{3}{|l}{Thanos 1 \& Thanos 2} & \multicolumn{3}{|l|}{1553-CXC1328930} \\ \hline
\multicolumn{1}{|l}{{\small\textbf{Approved (Document responsible)}}} & & \multicolumn{1}{l}{{\small\textbf{Checked}}} & \multicolumn{1}{|l}{{\small\textbf{Date}}} & \multicolumn{1}{|l|}{{\small\textbf{Rev.}}} & \multicolumn{1}{l|}{{\small\textbf{Reference}}} \\
\multicolumn{1}{|l}{ } & \multicolumn{1}{l}{ } & \multicolumn{1}{l}{ } & \multicolumn{1}{|l}{\mydate\today} & \multicolumn{1}{l}{J} & \multicolumn{1}{l|}{Thanos\_UserGuide.tex} \\ \hline
\end{tabular}
\end{center}
\end{adjustwidth}
\end{table}

\tableofcontents
\listoffigures
\listoftables

\lipsum[1-20]

\end{document}


I want the header to start from the very first page. Unfortunately on my code the header starts on the second page because of the table of contents, list of figures and list of tables. I am using the memoir class because I think it is the most correct to solve my problem but maybe it can be done also by other classes. Thanks in advance for your time and effort.





Using cyrillic with Tex Gyre Pagella and pdflatex?


I just saw in this posting: How to access cyrillic letters in the TeX Gyre fonts (e.g. pagella)? - comp.text.tex the note: "the TeX Gyre Pagella font, which includes glyphs for cyrillic.". There is an MWE there, which apparently worked in 2009; here it is (I just moved the fontenc line before the babel line, because pdflatex complained):



\listfiles
\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc} % before babel!
\usepackage[ngerman,russian]{babel}
\usepackage{tgpagella}

\begin{document}

Добро пожаловать!

\selectlanguage{ngerman}

Some german umlauts: ÄÖÜ, äöü, ß

\end{document}


I build this with pdflatex test.tex, and it fails on Texlive 2014 with:



...
This is METAFONT, Version 2.7182818 (TeX Live 2014) (preloaded base=mf)


kpathsea: Running mktexmf larm1000
! I can't find file `larm1000'.
<*> ...ljfour; mag:=1; nonstopmode; input larm1000

Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input larm1000

Transcript written on mfput.log.
grep: larm1000.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input larm1000' failed to make larm1000.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T2A/cmr/m/n/10=larm1000 at 10.0pt not loadable: Metric (TFM) file not fo
und.
<to be read again>
relax
l.100 \fontencoding\encodingdefault\selectfont

?


Apparently I may be missing some package, but I have no idea which one.


Is it possible to get this example working with pdflatex, and if so - how?





Embedding Youtube Videos with a Specific Time Stamp


I use something like this to embed youtube videos:


\documentclass{article} \usepackage{media9} %pdflatex, latex+dvips+ps2pdf, xelatex %\usepackage[dvipdfmx]{media9} %latex+dvipdfmx



\begin{document}
\includemedia[
width=0.6\linewidth,height=0.45\linewidth,
activate=pageopen,
flashvars={
modestbranding=1 % no YT logo in control bar
&autohide=1 % controlbar autohide
&showinfo=0 % no title and other info before start
}
]{}{http://ift.tt/1vSFoKM id>?rel=0} % Flash file
\end{document}


I would like to link to a video at a specific time. Usually the time is appended to the url as something link #t=144 for example. This of course leads to the following error at compile time:



! You can't use `macro parameter character #' in horizontal mode.


I tried to escape the # with \# but no luck.


Any advice?





Can someone explain this weird font behavior? (EBGaramond-Maths)


I am using the package EBGaramond-Maths.


This font is missing the symbols for these commands (from documentation):



\leftharpoonup \triangleright \flat \smile
\leftharpoondown \triangleleft \natural \frown
\rightharpoonup \star \sharp \vec
\rightharpoondown \partial \t


The default way of loading this package (as per the documentation) is



\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}


When the above-mentioned missing symbols are used, the package prints nothing out at the command, which is to be expected. However, if we use only newtxmath without the ebgaramond-maths package, the symbols are correctly produced. Thus, we can surmise that newtxmath has those symbols, but ebgaramond-maths does not.


However, this would suggest that when ebgaramond-maths is loaded, the compiler essentially "blanks out" the positions in the character map that the ebgaramond-maths lacks, rather than falling back on a previously loaded symbol. For example, although the \partial symbol is loaded by the newtxmath package and displays correctly when it is used without ebgaramond-maths, after loading ebgaramond-maths thereafter, the command does nothing.


1) Why does this happen?


2) If ebgaramond-maths just cancels whatever newtxmath does, then what is the point of loading newtxmath before?





is there a way to set a parbox to a minimum height?


i'm looking for a way to make it so that my \parboxes keep a minimum height, similar to CSS min-height , e.g.



\mhparbox{\textwidth}{3cm}{...}


would ensure that whatever text appears in place of ..., the resulting box will at least take up 3cm of vertical space. does a package to that effect exist or is there maybe a solution using \savebox?





LaTex chord making


I'm making a ukulele songbook and i used this code to make chords rise above the text. but it makes a small space before the word (when you put chords above). Please,do you know how to fix it ? Thanks



\newcommand{\ch}[1]
{
\makebox[-6pt][c]{\raisebox{22pt}[24pt]{~~{\setlength{}\huge\textbf{#1\hspace{-0.33in}}} }}
}




Shortcut with WinEdt 8


How do I create a shortcut (say Alt+A for \alpha) with WinEdt 8? It used to be quite simple with WinEdt 5.5.





Longtable float placement


I have a longtable that breaks over two pages. It is referenced in a paragraph that also breaks over a page, and continues at the top of the next.


My issue is that I need to make it so the longtable occurs at the top of the page immediately following its reference in the paragraph. That is, I need it to interrupt the paragraph by being the first thing to appear on the second page.


None of the placement options seem to make any difference on where the longtable is being placed.


Here is a minimum example of the table is currently:



\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{longtable}

\title{test}
\author{John Smith}
\date{December 2014}

\begin{document}

\maketitle

\section{Introduction}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus et metus vel pulvinar. Nunc fringilla at sapien at vestibulum. Phasellus ultricies elit metus, sit amet mattis mauris tristique in. Donec mollis turpis bibendum neque eleifend mollis. Donec efficitur ultricies mattis. Integer sagittis porta velit sit amet mattis. Praesent id dui in velit euismod tincidunt. Sed condimentum sapien magna, ut pharetra justo elementum vitae. Mauris malesuada lacinia volutpat. Proin quis mauris mattis tellus commodo mattis. Nam quis augue ut lacus commodo tincidunt. Cras fringilla urna a faucibus bibendum. Etiam vestibulum pharetra orci sit amet pharetra. Vestibulum quis quam aliquet TABLE \ref{tab:1} neque rhoncus auctor. Pellentesque feugiat justo sed dui interdum elementum. Vestibulum ut quam tincidunt, scelerisque est eget, aliquet dui. Vivamus vestibulum, libero a vestibulum pulvinar, dui lorem bibendum lorem, vitae blandit quam mauris vel risus. Phasellus vehicula dolor sagittis libero hendrerit convallis. Nam leo magna, placerat sed erat nec, sollicitudin varius augue. Nullam viverra et metus id pulvinar. Mauris nec ante sed turpis ornare interdum. Quisque tortor nisl, aliquam quis tortor eu, eleifend condimentum lorem. Duis metus erat, lacinia quis metus a, varius egestas elit. Aenean commodo pellentesque lectus, a venenatis purus consequat et. Cras ultrices tellus eget laoreet rutrum. Proin vitae dui vulputate, eleifend nunc a, suscipit odio. Morbi finibus, dolor sit amet pharetra dapibus, nisl urna pulvinar arcu, et elementum tellus augue eget purus. Maecenas viverra ipsum non maximus efficitur.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus et metus vel pulvinar. Nunc fringilla at sapien at vestibulum. Phasellus ultricies elit metus, sit amet mattis mauris tristique in. Donec mollis turpis bibendum neque eleifend mollis. Donec efficitur ultricies mattis. Integer sagittis porta velit sit amet mattis. Praesent id dui in velit euismod tincidunt. Sed condimentum sapien magna, ut pharetra justo elementum vitae. Mauris malesuada lacinia volutpat. Proin quis mauris mattis tellus commodo mattis. Nam quis augue ut lacus commodo tincidunt. Cras fringilla urna a faucibus bibendum. Etiam vestibulum pharetra orci sit amet pharetra. Vestibulum quis quam aliquet neque rhoncus auctor. Pellentesque feugiat justo sed dui interdum elementum. Vestibulum ut quam tincidunt, scelerisque est eget, aliquet dui. Vivamus vestibulum, libero a vestibulum pulvinar, dui lorem bibendum lorem, vitae blandit quam mauris vel risus. Phasellus vehicula dolor sagittis libero hendrerit convallis. Nam leo magna, placerat sed erat nec, sollicitudin varius augue. Nullam viverra et metus id pulvinar. Mauris nec ante sed turpis ornare interdum. Quisque tortor nisl, aliquam quis tortor eu, eleifend condimentum lorem. Duis metus erat, lacinia quis metus a, varius egestas elit. Aenean commodo pellentesque lectus, a venenatis purus consequat et. Cras ultrices tellus eget laoreet rutrum. Proin vitae dui vulputate, eleifend nunc a, suscipit odio. Morbi finibus, dolor sit amet pharetra dapibus, nisl urna pulvinar arcu, et elementum tellus augue eget purus. Maecenas viverra ipsum non maximus efficitur.

\begin{longtable}[!t]{l l l}
\caption{Test longtable.} \label{tab:1} \\
% Here are our column headings
\hline
\hline
Header1 & Header2 & Header3 \\
\hline
\endfirsthead

% Here is the caption on other pages
\caption*{\tablename\ \thetable{} (Continued)} \\
\hline
\hline
Header1 & Header2 & Header3\\
\hline
\endhead

\hline
\multicolumn{3}{r}{\textbf{(table continues)}}
\endfoot

content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\
content & content & content \\


\hline
\end{longtable}

\end{document}


To highlight the problem again: I would need the longtable positioned at the top of page two, displacing the text until after the longtable.


Is this possible?


Thank you.





Documentation on the arguments used when defining styles in an .inc file


I am new to using LyX, and recently asked a question about adding a modified style in an .inc file (Add caution and warning messages to book). One of the problems I had was finding documentation on the components or arguments of the modified style, such as Category, Margin, & LabelString. Is there a document or book where these are described? And what "language" are they in: LyX, LaTeX, or something else?


Thank you!





Latex Image not showing up and rest of document doesnt either


The image is called corrected and it is in the image folder which is in the same directory as the tex file...what am I doing wrong? Here is the code:



\documentclass[11pt]{article}

\usepackage{exscale}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{times}
\usepackage{epsfig}

\textwidth 6.5truein
\textheight 9.0truein
\oddsidemargin 0.0in
\topmargin -0.6in

\parindent 0pt
\parskip 5pt
\def\baselinestretch{1.1}

\begin{document}

\begin{LARGE}
\centerline {\bf CSci 423 Corrections}
\end{LARGE}
\vskip 0.25cm
\graphicspath{ {images/} }

\begin{enumerate}
\item Homework 1: (9 points) Give the state diagram of a DFA (with 15 states) that recognizes the set of strings such that in each string the number of 0s is divisible by 5 and the number of 1s is divisible by 3.
\newline

\includegraphics{corrected}
\item Homework 1: (10 points) Prove by induction that $\sum_{i=1}^n i^3 = (\sum_{i=1}^n i)^2$.
\newline

\newline
\end{enumerate}
\end{document}




How to extract coordiante values from intersections in one \begin{axis} environment to use in a second \begin{axis}.. environment in pgfplots


I would like to plot two graphs, side by side, in two separate \begin{axis}...\end{axis} environments using pgfplots. In one graph I want to plot the n curves y1=x^2, y2=2x^2,..., yn=nx^2. I then want to calculate the intersections of yi (i=1,..,n) and y=5, call this set {(xi,zi)}, and on the SECOND graph, produce a scatter plot of the data (zi,i).


I realise that the usual method is to post example TeX, but I really have no idea where to start with this and I think the problem is simple enough.


Many thanks.





Chapter Title and Table of Contents


If I use code such as:



\chapter{Introduction}
\subfile{intro/Introduction}

\chapter{Remaining Work}
\subfile{remaining/Remaining}


The result is:



Chapter 1
Introduction

Chapter 2
Remaining Work


I'd like to remove the "Chapter 1" etc title, preferably replacing with the number and title.


If I use:



\chapter*{Introduction}


Then the Chapter 1 label is removed, however, this ruins the table of contents - sections are labelled 0.1, 0.2 etc without ever being labelled by chapter.


How can I remove the Chapter N label and keep the numbering on the table of contents correct?





how to join lines in a diagram using tikz?



\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows,positioning,shapes,arrows,decorations.markings,arrows.meta}

\tikzset{
box/.style={draw,fill=white,rectangle,minimum size=2.5cm,align=center},
diatostealth/.style={draw,{Diamond}-{Stealth}}
}

\begin{document}
\begin{tikzpicture}

\node[box](a){a};
\node[box, below left=1.5cm of a](b){b};
\node[box, below right=1.5cm of a](c){c};


% the arrows
\path[diatostealth] (a.south) -- (b.north){};
\path[diatostealth] (a.south) -- (c.north){};

\end{tikzpicture}
\end{document}


What I have This is what I have currently.


What I want This is what I am trying to achieve.





Text disappeared after update to 2.8.6 [on hold]


No answer. So I think you can delete my question. Its just taking unusfully space away





Link in table of contents , table of figures


I am using KOMA-scripts in Lyx for my project now. I would like to show a link in the table of content, table of figures... as below:


1. Introduction.................. 1 2. Chapter 1......................2


At the moment the link is in Introduction, Chapter 1......I would like to link to pages only 1, 2...... How to show the link to pages not the text in the table of content please? Thanks!





Negative space equal the length of a string?


I'm trying to create symbols, like the Interrobang (basically the ? and ! combined into one punctuation mark), that are the result of two overlapping symbols. Something like this can be produced with two negative spaces, but it isn't anywhere near perfect.


I've seen this and have tried using \mkern{} and \kern{}, but they aren't working for the width of the text.


Basically, I need a command that will operate like: ? \negspace{?} !. This will essentially type a ?, go back the width of a ?, and type a !. (sort of like the ← key on a typewriter.) Is this possible?


Thanks!





Different styles in footnote and bibliography


I really like the style "philosophy-modern" for the bibliography at the end of the document. I also like to have verbose citations as footnotes.



bibstyle=philosophy-modern,
citestyle=philosophy-verbose,


enables me to have both. However "philosophy-modern" uses a lot of space in the footnote. Can I change to a different style in the footnote, but still have "philosophy-modern" in bibliography?


MWE:



\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}

\usepackage[backend=bibtex,
bibstyle=philosophy-modern,
citestyle=philosophy-verbose,
]{biblatex}
\addbibresource{sample}

\title{Bibliography management: \texttt{biblatex} package}
\author{Share\LaTeX}

\begin{document}

\maketitle

This document is an example of \texttt{biblatex} package using in bibliography
management. Three items are cited: \textit{The \LaTeX\ Companion} book
\autocite{latexcompanion}, the Einstein journal paper \autocite{einstein}, and
the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items
are \autocite{latexcompanion,knuthwebsite}.

\medskip

\printbibliography

\end{document}


enter image description here





Weird tipx error


Just for fun I wrote a converter for decimal numbers that prints them in bases < 37:



\documentclass{article}
\usepackage{fixltx2e,hyperref,ifthen}
\usepackage{tipx}

\makeatletter
\newcount\mod

\newcommand*{\modulo}[2]{%
\mod=#1
\@tempcnta=#2
\ifnum\mod<\@tempcnta\else
\loop
\advance\mod by -#2
\unless\ifnum\mod<#2
\repeat
\fi}%

\newcount\cnv@quotient \cnv@quotient=0
\newcount\cnv@power \cnv@power=1
\newcount\cnv \cnv=0
\def\comv{}

\newcommand*{\convertdec}[2][2]{%
\let\uppercase\relax %if symbols should not be uppercased
\cnv@quotient=#2
\whiledo{\cnv@quotient>0}{%
\modulo{\cnv@quotient}{#1}
\xdef\conv{\uppercase{\basechange{\the\mod}}\conv}
\divide\cnv@quotient by #1}%
\texorpdfstring{\conv\textsubscript{#1}}{\conv}
\let\conv\@empty}%
\newcommand{\basechange}[1]{%
\ifcase#1
0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or
\x \or \xi \or \xii \or \xiii \or \xiv \or \xv \or
\xvi \or \xvii \or \xviii \or \xix \or \xx \or
\xxi \or \xxii \or \xxiii \or \xxiv \or \xxv \or
\xxvi \or \xxvii \or \xxviii \or \xxix \or \xxx \or
\xxxi \or \xxxii \or \xxxiii \or \xxxiv \or \xxxv\fi}%
\def\x{a}
\def\xi{b}
\def\xii{c}
%and so on
\makeatother

\begin{document}
\convertdec[12]{131}
\end{document}


If I change the digit control words like



\def\x{$\alpha$}
\def\xi{$\beta$}


everything is fine. But, when I say \def\x{\textturntwo} the compilation won't terminate; seems to end up in a infinite loop. The strange thing is that the console does not yield a TeX capacity exceeded message. The .log file is just incomplete. What is going wrong here?





Longtable Row too large for a single page


I need to display a source text, and a translation into another language side by side. In order to keep the source and translation together I utilized a longtable, to span multiple pages. Unfortunately the paragraphs are sometimes too large for the font size required, and I end up with a header on one page, and then the text on the next, and the text overlaps my footer.


Since the text would be rather long and cloud the question, I put a working example up on writelatex.com below:


http://ift.tt/1Bi9Od0


Unfortunately manually editing the document to make it fit isn't an option as this is an automated process of putting this together. Is there a solution to a row overflowing the page?





Table caption inside tabular environment


I would like to write a table with latex which looks as similar as possible to this one here but I do not know how to add the caption to the header of the table as seen down below:


enter image description here


I reach as far as this here (see code down below) with only a "normal" standardized caption as we are used to from latex.



\documentclass[oneside,a4paper]{article}

\usepackage{mathpazo}
\linespread{1.05}

\usepackage[table,hideerrors]{xcolor}
\usepackage{booktabs,ctable}
\usepackage{caption}

\begin{document}
\begin{center}
\definecolor{blue}{HTML}{E7E8E8}
\rowcolors{1}{blue}{blue}
\begin{tabular}{ l c }
Parameter & Value \\
\specialrule{.1em}{.05em}{.05em}
\textbf{Parameter} & \textbf{Value} \\
\midrule
Number of territories & 22 \\
Age of sexual maturity (years) & 2 \\
& \\
Winter mortality & \\
Mean of the winter strength distribution (days) & 117\\
\specialrule{.1em}{.05em}{.05em}
\end{tabular}
\captionof{table}{Overview of processes, parameters and default values of the marmot model}
\label{tab:variables}
\end{center}


Edit: Modified (near perfect!) table based on the responses to work with multicol package.



\begin{center}
\refstepcounter{table} \label{tab:variables}
\definecolor{blue}{HTML}{E7E8E8}
\rowcolors{1}{blue}{blue}
\begin{tabular}{ L{5.1cm} C{2cm} }
\multicolumn{2}{L{\dimexpr7.1cm+2\tabcolsep\relax}}{%
\cellcolor{black}\color{white}\textbf{\small Table \ref{tab:variables} - Overview of processes, parameters, and default values of parameters of the Rapa Nui model}} \\
Parameter & Value \\
\specialrule{.1em}{.05em}{.05em}
\textbf{Parameter} & \textbf{Value} \\
\specialrule{.1em}{.05em}{.05em}
Number of territories & 22 \\
Age of sexual maturity (years) & 2 \\
& \\
Winter mortality & \\
Mean of the winter strength distribution (days) & 117\\
\specialrule{.1em}{.05em}{.05em}
\end{tabular}
\end{center}


So far, I have only two complains left:



  • The caption has too much space above, unlike @Mico's example. I did not figure out how to change that!

  • I did not managed to get the above code to function with dcolumn to align numbers suggested by @fldpi


Edit2: my final version (updated Mico's final version of the table)



\begin{center}
\refstepcounter{table} \label{tab:variables}
\definecolor{blue}{HTML}{E7E8E8}
\rowcolors{1}{blue}{blue}
\begin{tabular}{ L{5.1cm} d{3.0} }
\multicolumn{2}{L{\dimexpr7.1cm+2\tabcolsep\relax}}{%
\cellcolor{black}
\bfseries\small%
\textcolor{white}{Table \ref{tab:variables} -- Overview of processes, parameters, and default values of parameters of the marmot model}} \\
Parameter &
\multicolumn{1}{C{2cm}}{Value} \\
\specialrule{.1em}{.05em}{.05em}
Number of territories & 22 \\
Age of sexual maturity (years) & 2 \\[1ex]
Winter mortality & \\
Mean of the winter strength distribution (days) & 117\\
\specialrule{.1em}{.05em}{.05em}
\end{tabular}
\end{center}




Tocloft - change listof title format individually, while using titles option


I defined some new listofs with the tocloft package and used the provided titles option, but I only want the ToC to look like one of my chapters. My custom listofs should look like sections without numbers (\section*). Is there a way to change the format of certain titles of listofs while using the titles option?



\documentclass[twosite]{scrbook}
\usepackage[titles]{tocloft}
\newlistof[chapter]{som}{exp}{List of Something}
\newcommand{\something}[1]{%
\refstepcounter{som}
\par\noindent{Som.\hspace{1ex}\thesom:\hspace{1em}#1}
\addcontentsline{exp}{som}{\textbf{Som.\hspace{1ex}\protect\numberline{\thesom}:} #1}\par
}
\begin{document}
\something{Something is more than nothing}
\listofsom
\end{document}




Diagonal line in table with vertical text


I want to add a diagonal line in a the top line of a table where the other entries on the first row are written sideways. I've tried \backslashbox and \diagbox and \diag but no matter how I change the values the topmost position of the line does not increase without lifting all the other entries.



\usepackage{slashbox}

\begin{table}[ht]
\centering
\caption{Pugh matrix}
\begin{tabular}{|l|c|c|c|}
\hline\hline
\backslashbox[130pt]{Property}{Concept} & \begin{sideways} Concept 1 \end{sideways} & \begin{sideways} Next concept \end{sideways} &
\begin{sideways} Next concept/increase line{\ } \end{sideways} \\
\hline
Do this & 0 & 0 & - \\
Do that & 0 & 0 & 0 \\
Do it quickly & 0 & + & + \\
Do the task quickly & 0 & 0 & - \\
\hline
SUM: & 0 & +1 & +2 \\
\hline
Ranking & 2 & 2 & 1 \\
\hline
Keep & NO & NO & YES \\
\hline\hline
\end{tabular}
\label{tab:Pugh_matrix2}
\end{table}


example





Separate "document" in appendix


I'm not that familiar with LaTeX and have a problem with the structure of my document. The table of contents has been created with "\tableofcontents", the appendix with "\appendix" (no further commands for both of them, they are filled completely automatically). In the appendix I have a subsection "MyDocument" which should represent a logically separate document (but actually I want to write in the same tex file). Only the subsection name should appear in the table of contents, not more (normally it would also include one hierarchy layer below). Within this subsection I have three further layers of hierarchy which should be numbered without the appendix prefix "A".


So, the toc should look like this:


1 Chapter


2 Chapter


...


A Appendix


A.1 One appendix


A.2 MyDocument


A.3 Another appendix


The subsection "MyDocument" is placed in a separate tex file (included into appendix) and should look like this (all headings numbered and formatted as headings):


A.2 My Document


1 abc


1.1 hello


1.2 world


1.2.1 world A


1.2.2 world B


2 xyz


Edit: some code


main document



...
\tableofcontents

\include{chapters/chapter1}

\include{chapters/chapter2}

\appendix

\include{general/appendix}


appendix.tex



\section{Appendix}

\input{appendices/one}

\input{appendices/mydocument}

\input{appendices/another}


mydocument.tex



\subsection{My Document}

\subsubsection{abc}

\paragraph{hello}

\paragraph{world}

\subparagraph{world 1}

\subparagraph{world 2}

\subsubsection{xyz}


I found a static solution which is not very comfortable, but ok for my case (I'm mainly interested in the pre-formatted headings, but I don't want the structure of mydocument appear in the table of contents): Remove automated numbering and adding to the toc, use hard-coded numbers instead (probably not a good idea if the structure of this document changes, but in this special case it really is fixed)



\subsubsection*{1. abc}



etc.