title: Previous half of page left blank when floating figure

text: I have a document where I wish to have a block of text then my figure then a block of text below that. I have tried using the `[H]` option along with the `float` package. While this does what I want it is giving me a side effect of leaving the bottom half of the page before blank.               Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer in ipsum cursus, ullamcorper tortor eu, congue ante. Mauris non nunc aliquam, sollicitudin purus ac, hendrerit nibh.     \begin{figure}[H]       \centering       \includegraphics[scale=0.3, trim = 0mm 0mm 0mm 95mm, clip]{architecture}       \caption{Proposed system architecture}     \end{figure}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer in ipsum cursus, ullamcorper tortor eu, congue ante. Mauris non nunc aliquam, sollicitudin purus ac, hendrerit nibh.      EDIT: If I remove the `H` then the figure is placed in the middle of my references. EDIT: Complete document               % ********************************************************************     % *                  Format for IMVIP 2014  papers,                  *     % *                  based on the IMVIP 2001, 2006 template          *     % ********************************************************************          \documentclass[a4paper,11pt]{article}          \textwidth     14.5cm  %     \textheight    25.7cm  %     \oddsidemargin      +1.0cm  %     \evensidemargin  +1.0cm  %     \topmargin     -1.5cm  %          \usepackage{times}     \usepackage{graphicx}     \usepackage{float}          \pagestyle{empty}     \begin{document}          \title{\bf Wearable Computing to Aid in Activities of Daily Living}     \author{%     {\bf Author details suppressed}\\     Premier Image and Vision Laboratory\\     1504 Highway Street\\     ZZ-3595 Cybercity \\     a.other@premier.infolab.zz               \\\\     }     \date{}     \maketitle     \thispagestyle{empty}     \begin{abstract}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer in ipsum cursus, ullamcorper tortor eu, congue ante. Mauris non nunc aliquam, sollicitudin purus ac, hendrerit nibh. Cras mollis fringilla condimentum. Aenean pellentesque, elit sit amet ultricies adipiscing, sem eros tempus diam, vel dictum metus libero in lorem. Etiam venenatis, nisi non elementum lobortis, ipsum augue eleifend ligula, blandit pulvinar tortor dolor quis mauris. Nunc vestibulum varius augue vitae gravida. Suspendisse potenti. In in tempus ligula. Aliquam vehicula turpis erat, non auctor libero volutpat ut. Maecenas pharetra luctus mauris. In lacinia ante nibh, eu lacinia elit rutrum ut. Nunc nec aliquet lectus. Fusce nisl justo, porttitor in arcu ac, scelerisque interdum massa. Fusce consectetur nunc at fermentum ultricies. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur semper, nunc nec sodales dapibus, orci lacus mattis tellus, ut vehicula dolor lectus vitae metus.     \end{abstract}     \textbf{Keywords:} Machine Vision, Wearable Computing, Smart Environments, Emerging Healthcare, Pervasive Computing.          \section{Introduction}     One of the most important achievements of the 20\textsuperscript{th} century has been the remarkable gain of life expectancy throughout the world, however, this has resulted in the oldest group of society (aged 85 plus) to be the most rapidly expanding segment of society \cite{Christensen2009}. The burden placed on health care systems will continue to increase as this segment of society continues to expand \cite{Christensen2009}, one potential solution to ease the burden on the health care systems in the use of an automated ``smart environment'' which would allow occupants that would normally need the assistance of carers to live at home with a larger degree of independence. A smart environment can be defined as being one that is ``able to acquire and apply knowledge about the environment and its inhabitants in order to improve their experience in that environment'' \cite{Cook2007}. It is an example of ubiquitous computing which represents the idea of ``computing everywhere'', in other words, making computing and communication effectively transparent \cite{Weiser1991}.          Wearable technology offers new opportunities within pervasive computing, allowing data to be continuously collected from a user and his/her immediate environment. Such a solution is particularly useful to support intelligent applications within smart environments where contextual information is core to success. The current paper proposes a solution to facilitate indoor localisation through the use of a single ``always on'' wearable camera. Location is determined using machine vision techniques that identify ``key'' objects within an environment and cross-reference these against a knowledge base that indicates these objects room placement within the environment. It is hypothesised that using a single wearable camera to determine user location will offer low impact in terms of equipment installation when compared with fixed vision or dense sensing based technologies while offering the potential to ``follow'' a user within an environment and provide enhanced contextual information based on location information.          The current work also aims to address one of the main challenges faced within smart environments; namely the heterogeneous nature of the data. Each device stores data in a different format which can create difficulties when data is being exchanged and processed as well as limiting the opportunity for data to be reused and compared \cite{McDonald2013}. This challenge is further compounded as there is no single common standard being used \cite{McDonald2013}. HomeML is one potential standard that can be used, it is an XML based open format for the exchange of data generated within a smart environment. HomeML was originally proposed as a means of solving the problems caused by the heterogeneous nature of data generated within a smart environment \cite{McDonald2013}.          \section{Related Work}     G\'{o}mez-Romero \textit{et al.} developed a system that used multiple fixed cameras placed within a smart environment which allowed them to detect objects, including people, in the cameras field of view \cite{Gomez-Romero2011a}. As the system was able to determine between people and objects it also allowed simple scene recognition using simple rules such as \textit{touch} or \textit{enclosing} (determined by overlapping boundary boxes) to establish which object the occupant was interacting with \cite{Gomez-Romero2011a}. While this technique was effective there where limitations with this approach. Due to the static nature of the cameras occlusion was an issue, while they tried to overcome this problem by reassigning the size and position of the boundary box when size variation over 80\% was detected but this did not solve the problem of total occlusion \cite{Gomez-Romero2011a}. Multiple occupancy is also an issue with this system as the cameras can only detect if a person is present or not and cannot distinguish between multiple occupants. One final problem with this system is due to the static nature of the cameras multiple cameras are needed in each room to attempt to cover all angles, which still may not be possible, both driving up the cost in terms of retro-fitting to the users environment.          Kurze and Roselius proposed an open architecture and runtime environment for mobile augmented reality applications that would allow the monitoring on environmental information to provide context aware support \cite{Kurze2010}. They also provided an example system that consisted of wearable smart glasses along with a facial recognition application. However their proposed architecture does not take account of other external sensors that may be placed within a smart environment.          Kang \textit{et al.} proposed an approach to identify and segment objects from scenes that are encountered in ADL. Their approach used a bottom-up segmentation approach and extracts object candidates as groups of mutually consistent segments \cite{Hebert2011}. While this work could detect objects in the scene it could not determine what activity the occupant was performing but this approach has been built on by Pirsiavash and Ramanan in order to determine what ADL the occupant was performing \cite{Pirsiavash2012}. Pirsiavash and Ramanan where able to achieve a 77\% accuracy rate in determining the correct activity with higher accuracy being currently limited due to genuine ambiguities in the data, as well as difficulties in annotation (annotations consist of an action label, bounding box, identity, and human-object interaction). Such as actions that involve interactions with the same object or objects which are small and often occluded and so may not be fully annotated \cite{Pirsiavash2012}. While both these techniques could detect objects in a scene and determine ADL they could not use this information in order to determine context or provide contextual information. \clearpage          \section{SERG Smart Environment}     To support smart environment research the SERG lab has a large scale intelligent environment (approximately 6,800 ft\textsuperscript{2}) to support the deployment and evaluation of connected health solutions. The lab consists of four dedicated smart labs (each 17 m\textsuperscript{2}) including a smart kitchen, living room, and meeting room to support research staff and postgraduate students. The labs are also fitted out with a series of sensors, such as TyneTec contact sensors fitted to doors, cupboards etc. as well as access to a range of wearable technology and high performance servers.          \section{Wearable Camera to Recognise Objects}     This research proposes a solution to facilitate indoor localisation through the use of a single ``always on'' wearable camera. Location is determined using machine vision techniques that identify ``key'' objects within an environment and cross-reference these against a knowledge base that indicates these objects room placement within the environment. For example, if a cooker and fridge are detected then it can be assumed that the user is in the kitchen. This approach will employ ``off the shelf'' machine vision tools, more specifically an OpenCV Haar Feature-based Cascade Classifier for rapid object detection. This method involves training a classifier using a series of positive images (images of the object you wish to detect), which are subsequently compared with a set of negative images in order to ``train'' the algorithm to discriminate between environmental objects observed within a given video stream. In an ideal scenario the negative images would be identical to the positive images minus the object of focus. This method uses AdaBoost to combine many ``weak'' classifiers to form one ``strong'' classifier.          \section{System Architecture}          \begin{figure}[H]       \centering       \includegraphics[scale=0.3, trim = 0mm 0mm 0mm 95mm, clip]{architecture}       \caption{Proposed system architecture}     \end{figure}          \section{Conclusion}     In summary, this research aims to develop a context aware application through the use of wearable technology. In doing so, the research will advance context awareness through improved location based services based on vision processing of environmental objects. An effective data storage and inferencing system will also be developed to enable sensor integration of video based data along with other environmental and biometric sensors. Future work will focus on collecting and analysing data from the SERG labs and extending homeML to accommodate video data. Consequently, the adoption of homeRuleML will be investigated as a method to manage rules through a multi-agent based system.          \bibliography{imvip2014}     \bibliographystyle{apalike}          \end{document}


title: Adding small caps to my bibliography title

text: I use `classic thesis` and I would like to have the title of my references in caps in the table of contents, but it is not the case. What do I have to do ? This is my preamble :               \documentclass[11pt,a4paper,footinclude=true,headinclude=true]{scrbook} % KOMA-Script book     \usepackage[T1]{fontenc}          \usepackage[applemac]{inputenc}         \usepackage[frenchb]{babel}     \usepackage{apacite}     \usepackage[parts,pdfspacing,dottedtoc,eulerchapternumbers]{../classicthesis} %        ...     \begin{document}     \pagestyle{scrheadings}     \manualmark     \markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}          \addcontentsline{toc}{part}{Table des matières}     \tableofcontents     \pagestyle{scrheadings}     ...     { \raggedright      \bibliographystyle{apacite}      \bibliography{mabiblio}}


title: LaTeX3: Peek for spaces

text: I don't get space-observing look-aheads right. What am I doing wrong here?               \documentclass{article}     \usepackage{expl3}     \begin{document}     \ExplSyntaxOn     \cs_new_protected:Npn \testInNormalLaTeXSyntax #1       { \intern: #1 }     \cs_new_protected:Nn \intern:       {         \peek_charcode:NTF A           { (next~token~is~A)~ }           {              \peek_charcode:NTF ~               { (next~token~is~space)~ }               { (next~token~is~neither~nor)~ }           }       }     \ExplSyntaxOff          Hello, world with spaces!\\     \testInNormalLaTeXSyntax{AA}\\     \testInNormalLaTeXSyntax{bA}\\     \testInNormalLaTeXSyntax{ A}     \end{document}      White the first test works (AA), but the code line `\peek_charcode:NTF ~` breaks things.


title: Correct use of arguments pattern in pgfkeys/append after command in tikz?

text: I could not find many examples for the correct use of arguments patterns in pgfkes, but I was able to come up with the following:               \documentclass{standalone}     \usepackage{tikz}          \tikzset{dimen/.style={<->,>=latex,thin,       every rectangle node/.style={fill=white,midway}     }}          \tikzset{measuring south/.style args={from #1 to #2 is #3}{             append after command={                 draw (#1.south west) -- ++(0,-1.0)                  coordinate (A1) -- ++(0,-10pt)                 (#2.south east) -- ++(0,-1.0) coordinate (A2) -- ++(0,-10pt)                 [dimen] (A1) -- (A2) node {#3}             }         }     }          \begin{document}     \begin{tikzpicture}         \node(a)  [draw,rectangle,text=teal] at (0,0) {here};         \node(b)  [draw,rectangle,text=olive] at (3,0) {there};         \path[measuring south=from here to there is far,fill=red];            \node(x) [draw,rectangle,text=blue] at (0,-2) {Heaven};       \node(y) [draw,rectangle,text=red] at (3,-2) {Hell};       \draw (x.south west) -- ++(0,-1.0)                  coordinate (A1) -- ++(0,-10pt)                 (y.south east) -- ++(0,-1.0) coordinate (A2) -- ++(0,-10pt)                 [dimen] (A1) -- (A2) node {sin};     \end{tikzpicture}     \end{document}      In my output, I would have liked to see the dimension lines from "here" to "there", but these are not visible. ![Above: what I currently have; below: what I would like to achieve](http://i.stack.imgur.com/Lsmh4.jpg)


title: Hyperref package is causing error message

text: I am trying to typeset my document, but the including the hyperref package gives me the following error: > The required file tex\latex\url\url.sty is missing. Now my problem can probably be solved by installing the url package, but my question is: Why do I _have to_ do this? There are no odd references in my document. I even tried using it like this                   \documentclass[12pt,a4paper]{article}         \usepackage{hyperref}         \begin{document}         Hello         \end{document}      and it still produced the same error message. So why won't this work? Is the hyperref package useless without the url package?


title: Undefined commands using hyperref.sty

text: To give you a little context. After a happy few months of happily using Emacs/AucTeX I accidentally deleted the hyperref directory (did I mention I'm new to LaTeX and linux?). Since then I've been trying to get it to work again. I've tried both to reinstall this package using tlmgr and downloading the .tds.zip, installing all the files in the directories where they belong (LaTeX is able to find the files) A simple code that generates this error message is:               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \end{document}      The error message I get is               ERROR: Undefined control sequence.          --- TeX said ---     <argument> \ltx@IfUndefined                              {pdfdraftmode}{\let \pdf@ifdraftmode \ltx@second...     l.124 }      So I understand it is unable to understand the following lines in hyperref.sty:               \RequirePackage{pdftexcmds}[2009/04/10]     \@ifpackagelater{pdftexcmds}{2010/11/04}{}{%       \ltx@IfUndefined{pdfdraftmode}{%         \let\pdf@ifdraftmode\ltx@secondoftwo       }{%         \ifpdf           \def\pdf@ifdraftmode{%             \ifnum\pdfdraftmode=\ltx@one               \expandafter\ltx@firstoftwo             \else               \expandafter\ltx@secondoftwo             \fi           }%         \else           \let\pdf@ifdraftmode\ltx@secondoftwo         \fi       }%     }      I've tried to comment these lines out but the problem persists. I also thought the cause would be that the version of pdftexcmds was too old. But this is not so as it's dated 2009/09/23. If someone can help me figure out I'd be really thankful. If you suggest that I reinstall several packages, instructions on how to do so safely would be appreciated.


title: units error with siunitx

text: > ! Undefined control sequence.               \documentclass[12pt]{article}     \usepackage{siunitx}     \begin{document}     \si{300}{\nanogram\per\millilitre}     \end{document}      Why?


title: Thick ticks are cut off

text: I want thick ticks but the 1st and last ticks are cut. It seems that the figure is cut exactly at axis boundaries so the thick ticks are cut off and look thiner than it others. Could someone tell me how to fix it please ? Here is a minimal example :               \documentclass[a4paper,11pt,twoside]{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}          \begin{figure}     \begin{tikzpicture}          \begin{axis}[     axis equal image,     xmin=0., xmax=4, ymin=-1.5, ymax=1.5,     xlabel={centimètres}, ylabel={},     xlabel style={yshift=10pt},     axis x line*=middle, axis y line=none,     xtick={0,1,2,3,4},     major tick length=10pt,     minor tick length=5pt,     major x tick style={thick, color=black},     minor x tick num={9},     xticklabels={},     xtick align=center,     axis on top,     width=0.9\textwidth     ]     \end{axis}          \end{tikzpicture}     \end{figure}          \end{document}


title: Tikz circle around text in overall slide

text: I have a list of possible structures divided over a couple of columns, within an adjustbox. What I want now is that there occurs a circle around the two right two similar structures. (Both the "the dog"). However, whatever I try with tikz influences the positioning of the columns/adjustbox and I don't want that. Any help would be greatly appreciated! Here is the code that I have so far; **EDIT: MWE**               \documentclass{beamer}     \begin{frame}{U-DOP in Action}          \vspace{-.3 in}          \begin{adjustbox}{max totalsize={.99\textwidth}{.8\textheight},left}     \begin{columns}     \begin{column}{.2\textwidth}     \begin{itemize}         \item[] \synttree[X         [X [Watch] [the]]         [dog]]     \end{itemize}     \end{column}     \begin{column}{.3\textwidth}     \begin{itemize}         \item[] \synttree[X         [Watch]         [X [the] [dog]]]         \item[] \synttree[X         [X [The] [dog]]         [barks]]     \end{itemize}     \end{column}     \begin{column}{.3\textwidth}     \begin{itemize}         \item[] \synttree[X         [The]         [X [dog] [barks]]]         \item[] \synttree[X         [X] [dog]]         \item[] \synttree[X         [watch] [X]]     \end{itemize}     \end{column}     \begin{column}{.2\textwidth}     \begin{itemize}         \item[] \synttree[X         [X] [barks]]         \item[] \synttree[X         [the] [X]]         \item[] \synttree[X         [watch] [the]]     \end{itemize}     \end{column}     \begin{column}{.2\textwidth}     \begin{itemize}         \item[] \synttree[X         [the] [dog]]         \item[] \synttree[X         [the] [dog]]         \item[] \synttree[X         [dog] [barks]]     \end{itemize}     \end{column}     \end{columns}     \end{adjustbox}                    \end{frame}     \end{document}


title: Spaces width between the words

text: What is the width of the spaces between the words (by default) that LaTeX uses for text formatting?


title: Linking a text to a page (by page number)

text: I need to link a text to a page (by page number). I do not want to use labels, but simply to specify the text and the page number. Can I do that with `hyperref`?


title: Externalization to other format, Makefile. Add new rules to the makefile

text: Through using Christian's method of externalization, shown below, one can convert the pdf's to any chosen format right after the externalization at hand.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize[mode=list and make]     \tikzset{         % Defines a custom style which generates BOTH, .pdf and .png export         png export/.style={             external/system call/.add={}%             {; convert -density 300 -transparent white "\image.pdf" "\image.png"}         }     }     \begin{document}     \bgroup     \tikzset{png export} % Will be exported to a png as-well     \begin{tikzpicture}       \draw[red] (0,0) -- (1,1);     \end{tikzpicture}     \egroup     \begin{tikzpicture}       \draw (0,0) -- (1,1);     \end{tikzpicture}     \end{document}      The above will externalize two images. One of them (the first) will also be created as a png. To create the images you also need to call: `make -f \jobname.makefile`. This question should be equivalent on both Linux and Windows as long as you can use `Makefile`s. Using this I will always get my png images out immediately. However there is often times where I have large figures and thus the processing takes way more time because of the png creation (first TeX -> Pdf, then Pdf -> Png, then next picture). I always use the key `external/mode=list and make` to make/re-make the images as needed upon data change etc. This makes it more robust for me. So how do one externalize frames and add the proper information to the Makefile so that one can make the pdf and the png's separately, however the png's need to have a dependency on the pdf? PS. I found a method, but would like others to join in on possible other solutions. I will supply my answer along the others in a couple of days.


title: lrbox with border in beamer

text: Can I have border around a `\lrbox` in `beamer`? ~~I have a`minipage` inside the `lrbox`. I know I can use `\fbox`.~~ **Update** Sorry for the confusion. I need a border around the block of data, it is inside a `lrbox` which is inside a `resizebox`. I need `lrbox` because I cannot use `verbatim` directly inside `resizebox`. Here is my code:               \documentclass{beamer}          \begin{document}          \newsavebox\myint          \begin{lrbox}{\myint}         \begin{minipage}{0.8\textwidth}              \begin{verbatim}     class int(object)      |  int(x[, base]) -> integer      |        |  Convert a string or number to an integer, if possible.  A floating point      |  argument will be truncated towards zero (this does not include a string      |  representation of a floating point number!)  When converting a string, use      |  the optional base.  It is an error to supply a base when converting a      |  non-string.  If base is zero, the proper base is guessed based on the      |  string content.  If the argument is outside the integer range a      |  long object will be returned instead.         \end{verbatim}         \end{minipage}     \end{lrbox}          \begin{frame}[fragile]{Object}         \begin{center}              \resizebox{0.4\textwidth}{0.2\textheight}{\usebox\myint}         \end{center}     \end{frame}          \end{document}


title: TikZ Chromaticity Diagram

text: I'm trying to make a chromaticity diagram in tikZ, does anyone know how to make one? I want this ![enter image description here](http://i.stack.imgur.com/zk8vl.png) My issue is not in forming the spectral locus that I can do, right now I'm only using three points but I'm trying to color the diagram in. Does any one have any pointers or have they done this before? Also, yes I know chromaticity diagrams should never be colored in beacsue our displays can't produce the full diagram, and etc. So color science 101 aside. Matlab code to make the shape of the locus                cie.lambda = [380:5:780];          %load CIE color matching data     cie.cmf2deg =    1.0e+02 * [3.800000000000000   0.000013680000000   0.000000390000000   0.000064500000000;        3.850000000000000   0.000022360000000   0.000000640000000   0.000105500000000;        3.900000000000000   0.000042430000000   0.000001200000000   0.000200500000000;        3.950000000000000   0.000076500000000   0.000002170000000   0.000362100000000;        4.000000000000000   0.000143100000000   0.000003960000000   0.000678500000000;        4.050000000000000   0.000231900000000   0.000006400000000   0.001102000000000;        4.100000000000000   0.000435100000000   0.000012100000000   0.002074000000000;        4.150000000000000   0.000776300000000   0.000021800000000   0.003713000000000;        4.200000000000000   0.001343800000000   0.000040000000000   0.006456000000000;        4.250000000000000   0.002147700000000   0.000073000000000   0.010390500000000;        4.300000000000000   0.002839000000000   0.000116000000000   0.013856000000000;        4.350000000000000   0.003285000000000   0.000168400000000   0.016229600000000;        4.400000000000000   0.003482800000000   0.000230000000000   0.017470600000000;        4.450000000000000   0.003480600000000   0.000298000000000   0.017826000000000;        4.500000000000000   0.003362000000000   0.000380000000000   0.017721100000000;        4.550000000000000   0.003187000000000   0.000480000000000   0.017441000000000;        4.600000000000000   0.002908000000000   0.000600000000000   0.016692000000000;        4.650000000000000   0.002511000000000   0.000739000000000   0.015281000000000;        4.700000000000000   0.001953600000000   0.000909800000000   0.012876400000000;        4.750000000000000   0.001421000000000   0.001126000000000   0.010419000000000;        4.800000000000000   0.000956400000000   0.001390200000000   0.008129500000000;        4.850000000000000   0.000579500000000   0.001693000000000   0.006162000000000;        4.900000000000000   0.000320100000000   0.002080200000000   0.004651800000000;        4.950000000000000   0.000147000000000   0.002586000000000   0.003533000000000;        5.000000000000000   0.000049000000000   0.003230000000000   0.002720000000000;        5.050000000000000   0.000024000000000   0.004073000000000   0.002123000000000;        5.100000000000000   0.000093000000000   0.005030000000000   0.001582000000000;        5.150000000000000   0.000291000000000   0.006082000000000   0.001117000000000;        5.200000000000000   0.000632700000000   0.007100000000000   0.000782500000000;        5.250000000000000   0.001096000000000   0.007932000000000   0.000572500000000;        5.300000000000000   0.001655000000000   0.008620000000000   0.000421600000000;        5.350000000000000   0.002257500000000   0.009148500000000   0.000298400000000;        5.400000000000000   0.002904000000000   0.009540000000000   0.000203000000000;        5.450000000000000   0.003597000000000   0.009803000000000   0.000134000000000;        5.500000000000000   0.004334500000000   0.009949500000000   0.000087500000000;        5.550000000000000   0.005120500000000   0.010000000000000   0.000057500000000;        5.600000000000000   0.005945000000000   0.009950000000000   0.000039000000000;        5.650000000000000   0.006784000000000   0.009786000000000   0.000027500000000;        5.700000000000000   0.007621000000000   0.009520000000000   0.000021000000000;        5.750000000000000   0.008425000000000   0.009154000000000   0.000018000000000;        5.800000000000000   0.009163000000000   0.008700000000000   0.000016500000000;        5.850000000000000   0.009786000000000   0.008163000000000   0.000014000000000;        5.900000000000000   0.010263000000000   0.007570000000000   0.000011000000000;        5.950000000000000   0.010567000000000   0.006949000000000   0.000010000000000;        6.000000000000000   0.010622000000000   0.006310000000000   0.000008000000000;        6.050000000000000   0.010456000000000   0.005668000000000   0.000006000000000;        6.100000000000000   0.010026000000000   0.005030000000000   0.000003400000000;        6.150000000000000   0.009384000000000   0.004412000000000   0.000002400000000;        6.200000000000000   0.008544500000000   0.003810000000000   0.000001900000000;        6.250000000000000   0.007514000000000   0.003210000000000   0.000001000000000;        6.300000000000000   0.006424000000000   0.002650000000000   0.000000500000000;        6.350000000000000   0.005419000000000   0.002170000000000   0.000000300000000;        6.400000000000000   0.004479000000000   0.001750000000000   0.000000200000000;        6.450000000000000   0.003608000000000   0.001382000000000   0.000000100000000;        6.500000000000000   0.002835000000000   0.001070000000000                   0;        6.550000000000000   0.002187000000000   0.000816000000000                   0;        6.600000000000000   0.001649000000000   0.000610000000000                   0;        6.650000000000000   0.001212000000000   0.000445800000000                   0;        6.700000000000000   0.000874000000000   0.000320000000000                   0;        6.750000000000000   0.000636000000000   0.000232000000000                   0;        6.800000000000000   0.000467700000000   0.000170000000000                   0;        6.850000000000000   0.000329000000000   0.000119200000000                   0;        6.900000000000000   0.000227000000000   0.000082100000000                   0;        6.950000000000000   0.000158400000000   0.000057230000000                   0;        7.000000000000000   0.000113590000000   0.000041020000000                   0;        7.050000000000000   0.000081110000000   0.000029290000000                   0;        7.100000000000000   0.000057900000000   0.000020910000000                   0;        7.150000000000000   0.000041090000000   0.000014840000000                   0;        7.200000000000000   0.000028990000000   0.000010470000000                   0;        7.250000000000000   0.000020490000000   0.000007400000000                   0;        7.300000000000000   0.000014400000000   0.000005200000000                   0;        7.350000000000000   0.000010000000000   0.000003610000000                   0;        7.400000000000000   0.000006900000000   0.000002490000000                   0;        7.450000000000000   0.000004760000000   0.000001720000000                   0;        7.500000000000000   0.000003320000000   0.000001200000000                   0;        7.550000000000000   0.000002350000000   0.000000850000000                   0;        7.600000000000000   0.000001660000000   0.000000600000000                   0;        7.650000000000000   0.000001170000000   0.000000420000000                   0;        7.700000000000000   0.000000830000000   0.000000300000000                   0;        7.750000000000000   0.000000590000000   0.000000210000000                   0;        7.800000000000000   0.000000420000000   0.000000150000000                   0;];     cie.illE = ones(length(cie.lambda),1); %equal energy illuminant               %Interpolate data to specifed range     interpMethod = 'linear';     cie.cmf2deg = interp1(cie.cmf2deg(:,1),cie.cmf2deg(:,2:end),cie.lambda(:),interpMethod);                    cie.cmf2deg=cie.cmf2deg';     locus = [cie.cmf2deg(1,:)./sum(cie.cmf2deg);cie.cmf2deg(2,:)./sum(cie.cmf2deg)];     plot(locus(1,[1:81,1]),locus(2,[1:81,1]), 'b-');           v = locus(1,[1:81,1]);     g = locus(2,[1:81,1]);     for ii = 1:81         fprintf('(%f,%f)',v(ii)*10,g(ii)*10)         fprintf('--')         if mod(ii,10) == 0             fprintf('\n')         end     end      If you copy and paste from Matlab you get this               \documentclass[]{article}     \usepackage{tikz}          \usetikzlibrary{fadings}     \usepackage[latin1]{inputenc}          \author{}     \date{}     \title{}          \begin{document}          \begin{tikzpicture}         \draw [<->,ultra thick] (0,10) -- (0,0) -- (10,0);         \draw [help lines] (0,0) grid (10,10);         \draw [thick] (1.741123,0.049637)--(1.740078,0.049805)--(1.738008,0.049154)--(1.735599,0.049232)--(1.733369,0.047967)--(1.730210,0.047751)--(1.725766,0.047993)--(1.720866,0.048325)--(1.714074,0.051022)--(1.703010,0.057885)--     (1.688775,0.069002)--(1.668953,0.085556)--(1.644118,0.108576)--(1.611046,0.137934)--(1.566409,0.177048)--(1.509854,0.227402)--(1.439604,0.297030)--(1.355027,0.398791)--(1.241185,0.578025)--(1.095943,0.868425)--     (0.912935,1.327021)--(0.687059,2.007232)--(0.453907,2.949760)--(0.234599,4.127035)--(0.081680,5.384231)--(0.038585,6.548232)--(0.138702,7.501864)--(0.388518,8.120160)--(0.743024,8.338031)--(1.141607,8.262070)--     (1.547221,8.058635)--(1.928762,7.816291)--(2.296197,7.543291)--(2.657751,7.243239)--(3.016039,6.923077)--(3.373633,6.588483)--(3.731015,6.244509)--(4.087363,5.896069)--(4.440625,5.547139)--(4.787748,5.202023)--     (5.124864,4.865908)--(5.447865,4.544341)--(5.751513,4.242322)--(6.029328,3.964966)--(6.270366,3.724911)--(6.482331,3.513949)--(6.657636,3.340107)--(6.800788,3.197472)--(6.915040,3.083422)--(7.006061,2.993007)--     (7.079178,2.920271)--(7.140316,2.859289)--(7.190329,2.809350)--(7.230316,2.769484)--(7.259923,2.740077)--(7.282717,2.717283)--(7.299690,2.700310)--(7.310894,2.689106)--(7.319933,2.680067)--(7.327189,2.672811)--     (7.334170,2.665830)--(7.340473,2.659527)--(7.343902,2.656098)--(7.345917,2.654083)--(7.346873,2.653127)--(7.346920,2.653080)--(7.346783,2.653217)--(7.346683,2.653317)--(7.346680,2.653320)--(7.346719,2.653281)--     (7.346939,2.653061)--(7.347539,2.652461)--(7.348243,2.651757)--(7.345679,2.654321)--(7.345133,2.654867)--(7.343750,2.656250)--(7.345133,2.654867)--(7.358491,2.641509)--(7.345133,2.654867)--(7.375000,2.625000)--     (7.368421,2.631579)--cycle;     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MQlHT.png) Here is what I get when it try to use code to color it               \documentclass[]{article}     \usepackage{tikz}          \usetikzlibrary{fadings}     \usepackage[latin1]{inputenc}          \author{}     \date{}     \title{}          \begin{document}     \begin{tikzpicture}     \draw [<->,ultra thick] (0,10) -- (0,0) -- (10,0);     \draw [help lines] (0,0) grid (10,10);     \fill [blue] (1.741123,0.049637)--(1.740078,0.049805)--(1.738008,0.049154)--          (1.735599,0.049232)--(1.733369,0.047967)--(1.730210,0.047751)--(1.725766,0.047993)--(1.720866,0.048325)--(1.714074,0.051022)--(1.703010,0.057885)--     (1.688775,0.069002)--(1.668953,0.085556)--(1.644118,0.108576)--(1.611046,0.137934)--(1.566409,0.177048)--(1.509854,0.227402)--(1.439604,0.297030)--(1.355027,0.398791)--(1.241185,0.578025)--(1.095943,0.868425)--     (0.912935,1.327021)--(0.687059,2.007232)--(0.453907,2.949760)--(0.234599,4.127035)--(0.081680,5.384231)--(0.038585,6.548232)--(0.138702,7.501864)--(0.388518,8.120160)--(0.743024,8.338031)--(1.141607,8.262070)--     (1.547221,8.058635)--(1.928762,7.816291)--(2.296197,7.543291)--(2.657751,7.243239)--(3.016039,6.923077)--(3.373633,6.588483)--(3.731015,6.244509)--(4.087363,5.896069)--(4.440625,5.547139)--(4.787748,5.202023)--     (5.124864,4.865908)--(5.447865,4.544341)--(5.751513,4.242322)--(6.029328,3.964966)--(6.270366,3.724911)--(6.482331,3.513949)--(6.657636,3.340107)--(6.800788,3.197472)--(6.915040,3.083422)--(7.006061,2.993007)--     (7.079178,2.920271)--(7.140316,2.859289)--(7.190329,2.809350)--(7.230316,2.769484)--(7.259923,2.740077)--(7.282717,2.717283)--(7.299690,2.700310)--(7.310894,2.689106)--(7.319933,2.680067)--(7.327189,2.672811)--     (7.334170,2.665830)--(7.340473,2.659527)--(7.343902,2.656098)--(7.345917,2.654083)--(7.346873,2.653127)--(7.346920,2.653080)--(7.346783,2.653217)--(7.346683,2.653317)--(7.346680,2.653320)--(7.346719,2.653281)--     (7.346939,2.653061)--(7.347539,2.652461)--(7.348243,2.651757)--(7.345679,2.654321)--(7.345133,2.654867)--(7.343750,2.656250)--(7.345133,2.654867)--(7.358491,2.641509)--(7.345133,2.654867)--(7.375000,2.625000)--     (7.368421,2.631579)--cycle;         \fill [red, path fading =west] (1.741123,0.049637)--(1.740078,0.049805)--(1.738008,0.049154)--(1.735599,0.049232)--(1.733369,0.047967)--(1.730210,0.047751)--(1.725766,0.047993)--(1.720866,0.048325)--(1.714074,0.051022)--(1.703010,0.057885)--     (1.688775,0.069002)--(1.668953,0.085556)--(1.644118,0.108576)--(1.611046,0.137934)--(1.566409,0.177048)--(1.509854,0.227402)--(1.439604,0.297030)--(1.355027,0.398791)--(1.241185,0.578025)--(1.095943,0.868425)--     (0.912935,1.327021)--(0.687059,2.007232)--(0.453907,2.949760)--(0.234599,4.127035)--(0.081680,5.384231)--(0.038585,6.548232)--(0.138702,7.501864)--(0.388518,8.120160)--(0.743024,8.338031)--(1.141607,8.262070)--     (1.547221,8.058635)--(1.928762,7.816291)--(2.296197,7.543291)--(2.657751,7.243239)--(3.016039,6.923077)--(3.373633,6.588483)--(3.731015,6.244509)--(4.087363,5.896069)--(4.440625,5.547139)--(4.787748,5.202023)--     (5.124864,4.865908)--(5.447865,4.544341)--(5.751513,4.242322)--(6.029328,3.964966)--(6.270366,3.724911)--(6.482331,3.513949)--(6.657636,3.340107)--(6.800788,3.197472)--(6.915040,3.083422)--(7.006061,2.993007)--     (7.079178,2.920271)--(7.140316,2.859289)--(7.190329,2.809350)--(7.230316,2.769484)--(7.259923,2.740077)--(7.282717,2.717283)--(7.299690,2.700310)--(7.310894,2.689106)--(7.319933,2.680067)--(7.327189,2.672811)--     (7.334170,2.665830)--(7.340473,2.659527)--(7.343902,2.656098)--(7.345917,2.654083)--(7.346873,2.653127)--(7.346920,2.653080)--(7.346783,2.653217)--(7.346683,2.653317)--(7.346680,2.653320)--(7.346719,2.653281)--     (7.346939,2.653061)--(7.347539,2.652461)--(7.348243,2.651757)--(7.345679,2.654321)--(7.345133,2.654867)--(7.343750,2.656250)--(7.345133,2.654867)--(7.358491,2.641509)--(7.345133,2.654867)--(7.375000,2.625000)--     (7.368421,2.631579)--cycle;         \fill [green,path fading =south] (1.741123,0.049637)--(1.740078,0.049805)--(1.738008,0.049154)--(1.735599,0.049232)--(1.733369,0.047967)--(1.730210,0.047751)--(1.725766,0.047993)--(1.720866,0.048325)--(1.714074,0.051022)--(1.703010,0.057885)--     (1.688775,0.069002)--(1.668953,0.085556)--(1.644118,0.108576)--(1.611046,0.137934)--(1.566409,0.177048)--(1.509854,0.227402)--(1.439604,0.297030)--(1.355027,0.398791)--(1.241185,0.578025)--(1.095943,0.868425)--     (0.912935,1.327021)--(0.687059,2.007232)--(0.453907,2.949760)--(0.234599,4.127035)--(0.081680,5.384231)--(0.038585,6.548232)--(0.138702,7.501864)--(0.388518,8.120160)--(0.743024,8.338031)--(1.141607,8.262070)--     (1.547221,8.058635)--(1.928762,7.816291)--(2.296197,7.543291)--(2.657751,7.243239)--(3.016039,6.923077)--(3.373633,6.588483)--(3.731015,6.244509)--(4.087363,5.896069)--(4.440625,5.547139)--(4.787748,5.202023)--     (5.124864,4.865908)--(5.447865,4.544341)--(5.751513,4.242322)--(6.029328,3.964966)--(6.270366,3.724911)--(6.482331,3.513949)--(6.657636,3.340107)--(6.800788,3.197472)--(6.915040,3.083422)--(7.006061,2.993007)--     (7.079178,2.920271)--(7.140316,2.859289)--(7.190329,2.809350)--(7.230316,2.769484)--(7.259923,2.740077)--(7.282717,2.717283)--(7.299690,2.700310)--(7.310894,2.689106)--(7.319933,2.680067)--(7.327189,2.672811)--     (7.334170,2.665830)--(7.340473,2.659527)--(7.343902,2.656098)--(7.345917,2.654083)--(7.346873,2.653127)--(7.346920,2.653080)--(7.346783,2.653217)--(7.346683,2.653317)--(7.346680,2.653320)--(7.346719,2.653281)--     (7.346939,2.653061)--(7.347539,2.652461)--(7.348243,2.651757)--(7.345679,2.654321)--(7.345133,2.654867)--(7.343750,2.656250)--(7.345133,2.654867)--(7.358491,2.641509)--(7.345133,2.654867)--(7.375000,2.625000)--     (7.368421,2.631579)--cycle;     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Vehdr.png)


title: How to wrap a word in line without hyphen?

text: I m writing one article in which i need to write a paragraph full of medical terms. How can i wrap a text in a line without using line break (or hyphen)? Regards


title: Resizing a CD diagram in math mode

text: I have a problem, I try to resize a diagram, this is what I write               \[     \scalebox{1.4}{       \begin{CD}           C @>\phi>> C'=\phi(C)\\           @V\textnormal{Dual}VV\\           C^{\perp}@>\phi>> C=\phi(C^{\perp})       \end{CD}       }       \]      And it works, except that I get an error, something like missing `$` or extra `}`, can anyone help me?


title: How to modify the package 'newspaper' so that the heading is perfectly centered? And how to change the heading's font?

text: This is the `newspaper` package that I've modified to remove the quote and location at the beginning of the title page and I have modified the side margins so the left side's margin is (roughly) equal to the right side's margin. The problem I'm having right is why the date in the heading isn't centered. It's leaning to the right ever so slightly. Likewise, the middle header on subsequent pages also isn't perfectly centered. It is also leaning to the right ever so slightly. In addition, the circled characters in picture 1 are supposed to be "he" but, for some odd reason, the font Matthew Allen used decided to combine the two letters. The red vertical line is (roughly) the center line. The manual (CTAN). * * * So, overall, how can I center the date in the heading of the title page, center the newspaper title on subsequent pages, and change the font to something similar, but one that doesn't combine letters together? This actually my third piece of LaTeX work (the article in the pictures is my third piece, not modifying the package). So, this is pretty far over my head. ![Picture 1](http://i.stack.imgur.com/7yChP.png) ![Picture 2](http://i.stack.imgur.com/vlw17.png)               %%% Matthew Allen     %%% January 14, 2007     %%%     %%% This package provides a newspaper style heading     %%% for the standard Article class.  The default plain     %%% page style is redefined to accomodate headings      %%% at the top of all subsequent pages.     %%%     %%% a good idea to use with this package is     %%% the multicols package and the picinpar package     %%%     %%%           %*******    Identification   *****     \ProvidesPackage{newspaper}     \NeedsTeXFormat{LaTeX2e}          %*******    Declaration of options *****          % no options at this time          %*******    Execution of options   *****          %******     Package Loading   *****     \RequirePackage{yfonts}  % used for the paper title font          %******     main code *****          %define font for page title     \DeclareFontFamily{LYG}{bigygoth}{}     \DeclareFontShape{LYG}{bigygoth}{m}{n}{<->s*[2.5]ygoth}{}          %%%%%%%%%%% Define Text Dimensions  %%%%%%%          \setlength\topmargin{-48pt}         % article default = -58pt     \setlength\headheight{0pt}          % article default = 12pt     \setlength\headsep{34pt}        % article default = 25pt     \setlength\marginparwidth{-20pt}    % article default = 121pt     \setlength\textwidth{7.0in}     % article default = 418pt     \setlength\textheight{9.5in}        % article default = 296pt     \setlength\oddsidemargin{-17.5pt}          %%%% counters for volume and number %%%%          \newcounter{volume}     \newcommand\currentvolume[1]{\setcounter{volume}{#1}}     \newcounter{issue}     \newcommand\currentissue[1]{\setcounter{issue}{#1}}          %%%% set internal variables %%%%          \def\@papername{Committee Times:}     \def\@headername{Committee Times}   % because of the yfonts you may need both papername and headername     \def\@paperprice{Zero Dollars}          \newcommand\SetPaperName[1]{%         \def\@papername{#1}}     \newcommand\SetHeaderName[1]{%         \def\@headername{#1}}     \newcommand\SetPaperPrice[1]{%         \def\@paperprice{#1}}               %%%%%%%%%%% Redefine \maketitle     %%%%%%%          \renewcommand{\maketitle}{\thispagestyle{empty}     \vspace*{-40pt}     \begin{center}     {\textgoth{\huge\usefont{LYG}{bigygoth}{m}{n} \@papername}}\hfill%       \end{center}     \begin{center}     \vspace*{0.1in}     \rule[0pt]{\textwidth}{0.5pt}\\     {\small VOL.\MakeUppercase{\roman{volume}}\ldots No.\arabic{issue}} \hfill \MakeUppercase{\small\it\@date} \hfill {\small\MakeUppercase{\@paperprice}}\\     \rule[6pt]{\textwidth}{1.2pt}     \end{center}     \pagestyle{plain}     }          %%%%%%%   redefine plain page style  %%%%%%%     \renewcommand{\ps@plain}{%             \renewcommand\@oddfoot{}%                   % empty recto footer             \let\@evenfoot\@oddfoot                     % empty verso footer             \renewcommand\@evenhead                 {\parbox{\textwidth}{\vspace*{4pt}                 {\small VOL.\MakeUppercase{\roman{volume}}\ldots No.\arabic{issue}}\hfill\normalfont\textbf{\@headername}\hfill\textrm{\thepage}\\                 \rule{\textwidth}{0.5pt}                 \vspace*{12pt}}}%             \let\@oddhead\@evenhead}               %%%%%%%%%%%  Headline (with byline) command  %%%%%%%%%          \newcommand\headline[1]{\begin{center} #1\\ %                 \rule[3pt]{0.4\hsize}{0.5pt}\\ \end{center} \par}     \newcommand\byline[2]{\begin{center} #1 \\%                 {\footnotesize\bf By \MakeUppercase{#2}} \\ %                 \rule[3pt]{0.4\hsize}{0.5pt}\\ \end{center} \par}     \newcommand\closearticle{{\begin{center}\rule[6pt]{\hsize}{1pt}\vspace*{-16pt}                 \rule{\hsize}{0.5pt}\end{center}}}                    %%%%%%%%%%%%%%%%%%%% End of Package   %%%%%%%%%%%%%%%      And here's the source code for my document, but with obviously fake text.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{./newspaper}     \usepackage{setspace}     \usepackage{graphicx}     \usepackage{textcomp}     \usepackage{caption}          \renewcommand{\sfdefault}{phv}     \renewcommand{\rmdefault}{ptm}     \renewcommand{\ttdefault}{pcr}          \date{Janurary 1, 1900}     \currentvolume{1900}     \currentissue{1}     \SetPaperName{The Example Times}     \SetHeaderName{The Example Times}     \SetPaperPrice{10\textcent}          \begin{document}     \maketitle{}     \byline{{\it\huge The Example Times}\\[10pt]     {\Large The Example Times}\\[10pt]}{John Doe}          \begin{doublespacing}     {\large Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non tortor sed tellus aliquet aliquam. Phasellus dignissim fringilla est et luctus. Vivamus lacinia elit non eros tincidunt facilisis. Morbi sed eros nec orci ornare ultricies. Suspendisse vitae augue lorem, a ultricies est. Nulla at tellus ac augue congue adipiscing quis sed lacus. Nullam justo felis, tincidunt at consequat et, varius sit amet lorem. Curabitur congue facilisis mauris, sed scelerisque eros blandit a. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consectetur risus sed dui tincidunt sodales at et ipsum. Pellentesque eleifend est quis metus auctor ac rutrum erat tempus. Nulla facilisi. Sed vitae felis non nibh fermentum convallis quis a dolor. Nam volutpat augue eget dolor consectetur rutrum. Ut suscipit, urna vitae pellentesque vulputate, leo tortor aliquet sem, vel tempor tortor nibh sit amet dui. In hac habitasse platea dictumst.          Quisque sed varius mauris. Etiam egestas lobortis nibh in condimentum. Etiam sem eros, fermentum congue porttitor et, porttitor et turpis. Phasellus at neque velit. Quisque consequat malesuada ligula, nec fringilla purus auctor vel. Suspendisse enim ante, tincidunt blandit tincidunt quis, venenatis sit amet purus. Integer id lectus vitae purus volutpat consequat. Pellentesque quis ante sed dui aliquam iaculis vel et elit. In iaculis mi eu arcu aliquet iaculis. Aliquam aliquet nunc in lacus tempor tempus. Integer commodo nisi nec nisi ultrices hendrerit. Donec ut rutrum sapien.          In eget viverra nisl. Sed volutpat placerat viverra. Etiam eleifend metus ut arcu tincidunt posuere at et erat. Etiam venenatis lectus non risus placerat at ullamcorper urna tristique. In consequat, magna id pellentesque vehicula, est odio pulvinar turpis, non luctus felis nibh id turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas sed risus ligula, sed ultricies velit. Fusce eget elit mauris, quis feugiat sapien. Nulla facilisi. Etiam lacinia suscipit scelerisque. Integer eget velit tellus, varius sagittis erat. Duis aliquam malesuada nunc, eu pharetra leo faucibus eu. Donec metus nibh, gravida non lacinia at, lobortis sed erat. Quisque auctor, magna ut lobortis faucibus, dolor sapien luctus dui, at consequat nisl elit quis tortor.          Curabitur sit amet turpis vel risus pulvinar sollicitudin. Phasellus eu dolor quis tortor interdum ultrices. Sed vel nisi libero. Quisque quis arcu lectus, sed vulputate tortor. Aenean dictum ultrices nibh eu commodo. Pellentesque nec sapien at nisl scelerisque accumsan at ut magna. Aliquam eu ligula felis. Phasellus interdum augue sed urna blandit rutrum.          Proin non nisi eget tellus fringilla tincidunt. Vestibulum convallis suscipit lectus sit amet rutrum. Nam a consequat dui. Integer malesuada, nisi vitae vestibulum ullamcorper, odio velit gravida ligula, vel interdum elit lectus sed mi. Fusce felis odio, varius id tristique ut, rhoncus tincidunt velit. Mauris orci risus, accumsan in hendrerit quis, pellentesque non augue. In hac habitasse platea dictumst.          Nullam egestas dui nec nisi laoreet sagittis. Nam laoreet imperdiet ipsum a sodales. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc rhoncus urna et mauris congue eu euismod eros semper. Praesent ut neque ut orci porttitor sollicitudin. Sed hendrerit dignissim magna at imperdiet. Nam nec diam leo, sit amet volutpat felis. Sed ac congue eros. Sed ac vehicula quam. Duis dignissim, enim sed convallis vestibulum, magna arcu rutrum ante, facilisis varius justo justo faucibus velit. Phasellus sem diam, vestibulum vel posuere eu, lobortis ac ipsum. Vestibulum ultrices, eros eu mattis varius, dui leo feugiat nisi, rhoncus consequat justo elit eget enim. Vivamus semper egestas nulla, quis suscipit nisl condimentum ac. Mauris placerat risus eu nisi luctus eget auctor mauris interdum. Ut imperdiet suscipit nisi, nec pellentesque velit adipiscing nec.          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus hendrerit porttitor consectetur. Cras id mi vel purus vestibulum bibendum quis a enim. Nulla vestibulum vehicula justo vitae sodales. Donec nec nunc orci. Vivamus malesuada lorem sed lectus congue scelerisque. Duis ullamcorper neque quis leo pharetra id ultricies est feugiat. Proin blandit sodales erat, nec lobortis enim fermentum sed. Curabitur sit amet arcu ac elit posuere fermentum. Morbi mauris urna, rutrum eu tristique ut, placerat quis arcu.          Nullam quis erat vitae nunc sodales convallis. Aenean ultricies, velit et porttitor hendrerit, ipsum sapien iaculis nibh, sit amet interdum sem purus sit amet diam. Nullam venenatis rhoncus mi, at fringilla turpis ultrices at. Donec felis orci, fermentum id rutrum a, aliquet at est. In dapibus placerat lectus, ac rutrum velit dapibus blandit. Vestibulum luctus dignissim rhoncus. Nunc at orci a arcu rhoncus sodales.          Aliquam mi est, fermentum at blandit a, auctor ut tortor. Quisque pharetra faucibus urna quis ultricies. Maecenas elementum, dui consequat egestas semper, neque nunc pretium enim, sit amet molestie magna nibh ut enim. Aliquam nisi odio, pharetra auctor tempor sit amet, porta sed augue. Donec libero sem, dignissim ut vulputate non, malesuada nec dui. Cras scelerisque sollicitudin aliquet. Etiam in neque quis metus gravida tristique. Proin quis tortor et odio aliquam fringilla.          Etiam vestibulum, mauris ut rutrum ultrices, leo justo hendrerit leo, ac mattis nibh turpis eu est. Sed hendrerit libero id dolor tincidunt id convallis turpis pulvinar. Nunc blandit, orci quis rhoncus aliquam, nulla quam pharetra purus, ut ornare diam lorem non felis. Praesent lacinia, mi sit amet tempus molestie, nisl nisi cursus eros, non pulvinar arcu diam sed nulla. Vestibulum pretium condimentum dui, in luctus nulla molestie ut. Curabitur a neque a eros sodales feugiat vel non lectus. In fringilla leo in sem pulvinar sed bibendum justo posuere. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse euismod urna nec nulla vehicula ultricies. Cras tincidunt metus non augue bibendum a auctor urna fringilla. Vivamus odio elit, pellentesque vitae euismod sed, adipiscing rhoncus lacus. Phasellus pretium sagittis euismod. Proin malesuada tincidunt arcu, in placerat mi dictum quis. Aliquam facilisis dui in diam congue vehicula. Phasellus nibh neque, molestie a semper nec, tempor ac nunc. Aliquam erat volutpat.          Aliquam nunc erat, mattis non eleifend eget, varius id erat. Aliquam erat volutpat. Nam porta eleifend felis eu bibendum. Donec eu eros feugiat quam blandit adipiscing. Etiam libero arcu, suscipit non ullamcorper quis, sodales eget dui. Aenean euismod sem eu leo hendrerit scelerisque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque vel risus ante. Nullam blandit odio sed lectus porta sit amet euismod odio suscipit.          In hac habitasse platea dictumst. Cras sollicitudin imperdiet lectus in tempor. Nam egestas, nulla sit amet porttitor gravida, mi nisi lobortis turpis, eget blandit nisl massa at libero. Fusce auctor mauris eget orci condimentum facilisis. Ut auctor, nunc in ultricies pretium, orci diam eleifend nulla, nec porttitor dolor elit nec ligula. Phasellus a vehicula urna. Integer dui odio, elementum sed ornare et, venenatis quis lectus. Duis lobortis ultricies odio, nec convallis est volutpat ut. Sed iaculis sodales massa, sit amet euismod ipsum lacinia at. Pellentesque molestie ligula sed dolor pharetra et ultrices ligula auctor. Mauris vel justo eget velit dignissim lacinia ac et nisi. In imperdiet velit at purus molestie facilisis congue mi pulvinar. Pellentesque quis eros mauris, sit amet tincidunt enim. Curabitur sit amet erat leo.          Quisque facilisis volutpat nibh at feugiat. Ut purus massa, ultrices sit amet egestas cursus, imperdiet a mauris. Cras et ligula sapien. Morbi tincidunt odio id tellus ullamcorper feugiat. Vestibulum velit nunc, tempor non luctus porttitor, hendrerit vitae lorem. Praesent diam purus, consectetur vitae placerat in, tincidunt vitae mauris. Etiam pellentesque, enim a faucibus bibendum, leo urna dignissim dui, vitae fringilla diam lacus in ligula. Nulla sed lacus at enim feugiat mollis.          Quisque quis felis magna, quis sagittis nulla. Aenean egestas nibh non dolor vestibulum tempor. Proin consequat orci vel risus gravida eu dapibus justo aliquet. Aenean rutrum sodales eros, vitae condimentum massa vulputate ut. In pretium ultricies purus et pharetra. Quisque ornare feugiat accumsan. Curabitur lacinia dictum dolor, ac fermentum nisl rutrum nec. Vivamus feugiat hendrerit elit, ut sollicitudin diam viverra et. Sed ut dui rhoncus nunc pharetra sollicitudin. Curabitur at turpis at purus dapibus fermentum vel eget massa. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque vel mauris at quam placerat luctus congue eget nisi. Proin iaculis tortor vitae dolor vulputate ut commodo velit dictum. Nullam sit amet purus lectus, sed ullamcorper tellus. Mauris non arcu erat, non adipiscing arcu.          Aliquam sodales aliquet tellus rhoncus ultrices. Nullam porttitor, dui eget sagittis tincidunt, magna est viverra urna, at tincidunt lorem metus id elit. Donec ullamcorper fermentum augue id euismod. Phasellus ullamcorper metus vel nulla congue faucibus. Donec suscipit, tellus vel pulvinar convallis, turpis diam aliquet quam, eu imperdiet nibh sem ac nisi. Nullam non tristique sapien. Proin id nunc arcu. Aenean vitae velit nibh. Ut sed tortor justo, eget fringilla odio. Vestibulum dignissim augue quis elit mollis eget dignissim neque congue.          Donec volutpat tincidunt orci consequat malesuada. Morbi auctor ante eu purus egestas sodales. Vestibulum quam nisl, pretium et dignissim sagittis, semper ut lectus. Duis commodo magna sed sapien ultrices ullamcorper. Integer quis quam metus. Sed eu mi dolor, vitae congue mauris. Donec tincidunt viverra tempus.          Nulla sit amet felis eu urna ultricies condimentum. Duis dictum dignissim mi id dignissim. Donec eget leo leo, vel egestas orci. Cras a lectus ac mi fringilla varius. Vivamus ac orci in lorem aliquet vestibulum in id dolor. In nisl velit, faucibus et dictum pretium, iaculis sed nisi. Aenean eu scelerisque sem.          Donec lobortis iaculis mattis. In rhoncus, nunc ac consequat commodo, nisi nibh porta nisl, vitae pellentesque ante ligula ac risus. Phasellus accumsan molestie arcu at placerat. Vivamus vel sem a mauris cursus egestas vel accumsan nisi. In accumsan porttitor magna at fermentum. In hac habitasse platea dictumst. Curabitur sed ligula sollicitudin lectus sollicitudin aliquam sed quis enim. Aliquam vehicula viverra sem non ultricies. Donec ac purus in nibh ornare volutpat eget sed mi. Praesent eleifend varius feugiat. Proin id enim sed diam fringilla volutpat vel dignissim arcu. Vestibulum pulvinar metus eu turpis viverra condimentum porta mauris euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce non egestas dui. Nulla sit amet augue et tortor blandit rutrum.          Donec sit amet malesuada lectus. Nam at posuere nisi. Curabitur at dui eu ipsum semper condimentum eu at leo. Praesent iaculis odio nec mauris luctus ut mattis nulla dignissim. Nam porta dictum euismod. Vivamus laoreet, quam non tincidunt scelerisque, est ipsum dapibus erat, eget imperdiet ipsum nunc ac mi. Proin ipsum orci, facilisis sit amet posuere viverra, ornare sit amet augue. Nunc molestie porttitor arcu. Ut dictum porttitor purus, vitae aliquam justo sodales at. Fusce varius nisl sit amet nunc rutrum tempor. Proin nisi arcu, semper id laoreet non, commodo dictum lorem.          Nullam ac purus dui, eget sagittis est. Praesent aliquet accumsan suscipit. Sed in diam convallis libero fringilla congue eget ac felis. Vestibulum vel leo velit. Aenean id turpis libero. Proin molestie pretium nisl a tristique. Duis mi mauris, egestas quis interdum non, condimentum id libero. Sed scelerisque pellentesque neque, ac imperdiet neque dignissim in. Proin ultricies nunc vel ipsum lobortis porttitor. Sed adipiscing mollis nunc et dapibus. In hac habitasse platea dictumst. Nunc sem libero, tristique ac scelerisque quis, semper a dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ac lorem lorem.or, if you have any sense of morals or ethics.           }          \end{doublespacing}     \closearticle     \end{document}


title: Mysterious Undefined control sequence errors

text: I am using the texlive distribution on Ubuntu 14.04 and use the Texmaker IDE. I implement latex using the quickstart function configured to pdflatex -> bibtex -> pdflatex -> pdflatex -> View pdf I have recently found that some of my documents start throwing up a lot of               "! Undefined control sequence.<argument> ..."       type errors. There is no reason for this to be occurring as far as I can see as I did not change anything significantly and it worked before. I solved the problem simply by copy/pasting the code into a new file with a new name. However I am curious why the errors occurred and how I can prevent this occurring in the future? Any ideas?


title: How to change imakeidx section title without breaking the .ind file creation?

text: I'm using a macro that messed around with the `\section` command, breaking `\printindex` in the process when using `imakeidx`. I'm pretty sure the problem lies about lines 252-253 in `imakeidx.sty`:               \def\imki@indexlevel{%       \@ifundefined{chapter}{\section}{\chapter}*}      For some reason I can get either `\makeindex` or `\printindex` (Correct section title, uncompilable `\jobname.ind`), but not both, to work. Where is it going wrong?               \documentclass{ltxdoc}     \usepackage{etoolbox}     \usepackage{imakeidx}     \usepackage{fancyhdr}     \usepackage[pageanchor]{hyperref}          \newrobustcmd{\PreviousSectionTitle}{}%     \newrobustcmd{\CurrentSectionTitle}{}%     \newcounter{PreviousSectionCounter}%     \setcounter{PreviousSectionCounter}{0}%         \newcounter{NextSectionCounter}%     \setcounter{NextSectionCounter}{0}             \newcounter{CurrentSectionCounter}%     \setcounter{CurrentSectionCounter}{0}         \newcounter{LastSectionValue}     \newcounter{FirstSectionValue}          \fancypagestyle{FootLinks}{     \lfoot{         \ifnumequal%         {\number\value{CurrentSectionCounter}}{\number\value{FirstSectionValue}}{}         {                         {\GeneratePreviousSectionHyperlink{CurrentSectionCounter}{PreviousSectionCounter}{1} }         }%     }%      \rfoot{         \ifnumequal%         {\number\value{CurrentSectionCounter}}{\number\value{FirstSectionValue}}%             {\GenerateNextSectionHyperlink{CurrentSectionCounter}{NextSectionCounter}{LastSectionValue}}%          {\ifnumequal%                         {\number\value{CurrentSectionCounter}}{\number\value{LastSectionValue}} {  }%                         { \GenerateNextSectionHyperlink{CurrentSectionCounter}{NextSectionCounter}{LastSectionValue} }%         }%     }%     }%          \newrobustcmd{\GenerateNextSectionHyperlink}[3]{\ifnumequal{\number\value{#1}}{\number\value{#3}}{}{\hyperlink{CurrentSection::\number\value{#2}}{\nameref*{CurrentSection::\number\value{#2}::Title}~\(\rightarrow\)}}}         \newrobustcmd{\GeneratePreviousSectionHyperlink}[3]{\ifnumequal{\number\value{#1}}{1}{}{\hyperlink{CurrentSection::\number\value{#2}}{\(\leftarrow\)~\nameref*{CurrentSection::\number\value{#2}::Title}}}}          \makeindex%%%%%%%%%%%%%%%%          \begin{document}        \let\LaTeXStandardSection\section%     \renewcommand{\section}[2][]{%     \stepcounter{CurrentSectionCounter}%     \ifnumequal{\number\value{CurrentSectionCounter}}{1}{%     \setcounter{PreviousSectionCounter}{1}%     \expandafter\renewrobustcmd{\CurrentSectionTitle}{%     #2}%     }{%     \makeatletter     \edef\@@oldtitle{\CurrentSectionTitle}     \expandafter\renewrobustcmd{\PreviousSectionTitle}{%     \@@oldtitle     }%     \expandafter\renewrobustcmd{\CurrentSectionTitle}{%     #2%     }%     \setcounter{PreviousSectionCounter}{\number\value{CurrentSectionCounter}}     \addtocounter{PreviousSectionCounter}{-1}     }%     \phantomsection     \hypertarget{CurrentSection::\number\value{CurrentSectionCounter}}{}%     \immediate\write1{%     \string\phantomsection%     \string\newlabel{CurrentSection::\number\value{CurrentSectionCounter}::Title}{{\thesection}{\thepage}{#2}}%     }%     \makeatother     \setcounter{NextSectionCounter}{\number\value{CurrentSectionCounter}}     \ifnumequal{\number\value{CurrentSectionCounter}}{\number\value{LastSectionValue}}{}{%     \addtocounter{NextSectionCounter}{1}     }%     \phantomsection     \LaTeXStandardSection[#2]{#2}%     }%          \pagestyle{FootLinks}     \newpage     \section{dummy1}     \index{text}{teeeeeeeeeeeeeeext}     \newpage     \section{dummy2}     \printindex%%%%%%%%%%%%%%%%%%%%%%     \newpage     \section{dummy4}     \newpage     \section{dummy5}     \newpage     \section{dummy6}     \newpage     \section{dummy7}     \end{document}


title: Can anyone solve my error and make the long multiline equation multiline please?

text: In case it matters, I'm using win edit as editor.               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}     \textwidth=16.5cm  \oddsidemargin=-0.10cm \evensidemargin=-0.10cm  \topmargin=-1.0cm \textheight=24.5cm          \newcommand{\piRsquare}{\pi r^2}                  \title{The small amplitude expansion: The class of theoritical considered}     \author{xyz }            \date{January 26, 2013}                      \begin{document} \baselineskip=18pt     \section{Reconstruction of the article equation(15)}     Given, $$\phi_1= p_1\cos(\tau+\alpha)$$     $$\nabla\phi_1= -p_1\sin(\tau+\alpha) \nabla \alpha+\nabla p_1cos(\tau+\alpha)$$     $$\Delta\phi_1= -p_1 \nabla \alpha \cos(\tau+\alpha) \nabla \alpha-p_1 \sin(\tau+\alpha) \Delta\alpha -\nabla \alpha \sin(\tau+\alpha)\nabla p_1-\nabla p_1 \nabla \alpha \sin(\tau+ \alpha)+\Delta p_1\cos(\tau+\alpha)$$     $$\Delta\phi_1= \cos(\tau+\alpha) [-p_1 \Delta \alpha + \Delta p_1]- \sin(\tau+\alpha) [p_1\Delta \alpha+2\nabla \alpha \nabla p_1]$$      Differentiating $\phi_1$,     $$\phi_1= p_1cos(\tau+\alpha)$$     $$\dot\phi_1= -p_1 sin(\tau+\alpha)$$     $$\ddot\phi_1= -p_1cos(\tau+\alpha)$$     Again,     $$\phi_2 = p_2\cos(\tau + \alpha) + q_2\sin(\tau + \alpha) + \frac{g_2}{6}p_1^2[\cos(2\tau + 2\alpha) - 3] $$     $\omega_1=0$ for the bounding conditions.     $$\dot\phi_2 = -p_2\sin(\tau + \alpha) + q_2\cos(\tau + \alpha) + \frac{g_2}{6}p_1^2[-2 \sin(2\tau + 2\alpha) ] $$     $$\ddot\phi_2 = -p_2\cos(\tau + \alpha)- q_2\sin(\tau + \alpha) - \frac{4g_2}{6}p_1^2[\cos(2\tau + 2\alpha) ] $$     Putting these values in equation,     \begin{align}      \ddot\phi_3+\phi_3+2g_2\phi_1\phi_2+g_3\phi_1^3-\ddot\phi_1-\Delta\phi_1+\omega_1\ddot\phi_2+\omega_2\ddot\phi_1 =0 \\     \ddot\phi_3+\phi_3+2g_2p_1 \cos(\tau+\alpha)[p_2\cos(\tau + \alpha) + q_2\sin(\tau + \alpha) + \frac{g_2}{6}p_1^2[\cos(2\tau + 2\alpha) - 3]] +g_3p^3_1\cos^3(\tau+\alpha)-\cos(\tau+\alpha) [-p_1 \Delta \alpha+\Delta p_1] -\sin(\tau+\alpha) [p_1\Delta \alpha+2\nabla \alpha \nabla p_1] +\omega_2p_1\cos(\tau+\alpha)=0     \end{align}     \begin{align}     \ddot\phi_3+\phi_3+g_2p_1 p_2 [1+\cos2(\tau+\alpha)] + g_2p_1 q_2\sin2(\tau+\alpha)  + \frac{2 g_2^2 p_1^3}{6} \cos(\tau +\alpha)[2\cos^2(\tau+\alpha)-4]      + g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))]+ p_1\cos(\tau+\alpha) -\cos(\tau+\alpha)[\Delta p_1-p_1 \Delta\alpha]  +\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha]+ \omega_2p_1\cos(\tau+\alpha) =0     \end{align}     \begin{align}     \ddot\phi_3+\phi_3+g_2p_1 p_2 + g_2p_1 p_2  \cos2(\tau+\alpha)] + g_2p_1 q_2\sin2(\tau+\alpha) + \frac{2 g_2^2 p_1^3}{3} \cos^3(\tau +\alpha)-\frac{8 g_2^2 p_1^3}{6} \cos(\tau +\alpha)+g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))]+p_1\cos(\tau+\alpha)-\cos(\tau+\alpha)[\Delta p_1-p_1 \Delta \alpha]+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha]+\omega_2p_1\cos(\tau+\alpha)=0     \end{align}     \begin{align}      \ddot\phi_3+\phi_3+g_2p_1 p_2 + g_2p_1 p_2  cos2(\tau+\alpha)] + g_2p_1 q_2sin2(\tau+\alpha) + \frac{2 g_2^2 p_1^3}{3}[\frac{1}{4}(3cos(\tau +\alpha)+cos3(\tau+\alpha))] -\frac{8 g_2^2 p_1^3}{6} \cos(\tau +\alpha)+g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))]  +p_1\cos(\tau+\alpha)-\cos(\tau+\alpha)[\Delta p_1-p_1 \Delta \alpha]+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha]+\omega_2p_1\cos(\tau+\alpha)=0     \end{align}     \begin{align}      \ddot\phi_3+\phi_3+sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] -\cos(\tau+ \alpha)[\Delata p_1 - p_1\Delata\alpha+\frac{5}{6}g_2^2p_1^3- \frac{3}{4}g_3p_1^3-p_1 +\omega_2 p_1] +\frac{ p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha)+g_2 p_1 [p_2+ p_2 cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)] =0     \end{align}     \begin{align}     \ddot\phi_3+\phi_3+sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] -\cos(\tau+ \alpha)[\Delta p_1-p_1\Delta \alpha \\ + \lambda p_1^3-p_1+\omega_2 p_1] +\frac{p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha)+g_2 p_1 [p_2+ p_2 \cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)]=0     \end{align}          \end{document}


title: What package(s) are recommended for making algorithm block diagrams in LaTeX?

text: I am in the process of writing a conference paper for IEEE, and I was wondering what packages might be recommended for making good looking (but simple) block diagrams for algorithms? I am relatively new to LaTeX, so I am not sure. FWIW I am using TexMaker, and compiling to PDFTEX Thanks.


title: Possible to create table inside a table

text: Is it possible to create a table inside a table like this in LaTeX, can someone please lead me in right direction to achieve this? Thanks ![enter image description here](http://i.stack.imgur.com/4Bqyh.png)


title: Single-column framed minipage spanning two or more slides in Beamer

text: I searched and could not find an easy non-labour intensive solution to this one. In making a Beamer presentation, I have some framed minipages with various arbitrary content I am transferring from a document to slides. I have some long minipages I'd like to be split such that they span across two or more single-column slides (preserving the frame box). I, of course could split up the minipages manually to smaller ones or play with fonts in some cases such that they fit into slides, but it's a tedious process. I'd rather automate, like Beamer allows with `allowframebreaks`+`listings` for automatic multi- slide content, but for minipages instead. ## MWE               \documentclass{beamer}       \mode<presentation>     \usepackage{lipsum}     \begin{document}          \begin{frame}[allowframebreaks,fragile]     \frametitle{Need to span the minipage across slides}     \begin{itemize}        \item Sometimes        \item need to        \item span the        \item minipage across        \item multiple slides.     \end{itemize}     \fbox{\begin{minipage}[b]{.95\textwidth}%     \small     \lipsum[1-5]     \normalsize     \end{minipage}}     \end{frame}     \end{document}


title: Including tikzlibrary in .sty file

text: This might be a silly question, but I know that there is `\RequirePackage{}` for writing a `.sty` file. Is there something like this for requiring the inclusion of a `TikZ` library in a `.sty` file? I haven't actually tested it yet, but I'm assuming `\usetikzlibrary{}` works just fine inside the `.sty` file? I was just wondering if something analogous to `\RequirePackage{}` actually exists for this, or if there is a different way to go about requiring the inclusion of a `TikZ` library inside of a `.sty` file.


title: TikZ & PGFPlots: adding a TikZ 3d axis into a pgfplot

text: \documentclass[tikz]{standalone}     \usepackage{tikz-3dplot}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.8}          \begin{document}     \tdplotsetmaincoords{60}{130}     \begin{tikzpicture}[tdplot_main_coords]       \begin{axis}[         samples = 1000,         domain = -pi / 2:4 * pi,         samples y = 0,                                                                no markers,         axis lines = none         ]         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 3, 0, 0);         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 0, 3, 0);         \draw[-latex] (axis cs: 0, 0, 0) -- (axis cs: 0, 0, 5);         \addplot3 ({cos(deg(x))}, {sin(deg(x))}, {.5 * x});       \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/r4ylm.png) How can I have the `tdplot_main_coords` passed into `pgfplot`s so my axis isn't all crazy?


title: How can I do an affine coordinate transformation in pgfplots?

text: It is possible to perform a general affine coordinate transformation in TikZ by combining the `shift`, `x`, and `y` keys (or just the generalized `cm` key to set the coordinate matrix and shift). This allows one to write natural- looking code to draw, for example, a shifted, slanted, skewed parabola:               \tikzset{shift = {(2,3)}, x = {(1,-2)}, y = {(5,1)}}     \draw plot (\x, \x^2);      I don't use TikZ to plot functions, because drawing the axes and handling scaling is a pain; I use `pgfplots`. Unfortunately, _because_ of the way that package implements the solution to the scaling problem, there is no direct connection between its coordinates and those of the surrounding TikZ picture, which means that these same keys do not have the desired effect when passed inside an `axis`. Now, I know that there is such a thing as `axis cs` and `axis direction cs`, and I also know what the section on "TikZ interoperability" says, but neither does what I want. The former works if I'm drawing a _TikZ_ picture, and the latter makes me responsible for the size of the axes. It does not appear that using, say, `shift = {(axis direction cs:2,3)}` actually places the computational origin (as compared to the axis origin, which had _better_ stay at the original `(0,0)`!) at the axis coordinates `(2,3)` (nor does any of the other two obvious alternative coordinate systems). I want the following:   * A way to make a _local change of coordinates_ , inside a `scope`, that shifts plots given via `\addplot` according to an affine transformation.   * `pgfplots` transparency in this change: I want to be able to use its scaled coordinates obliviously. It would be wonderful if there were affine transformations among the options available to `data cs` but it only does polar. I am not enthusiastic about figuring out how to use `\pgfplotsdefinecstransform` just to make it do this simple thing, either. Here is an example that should work with such a solution:               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}\begin{axis}          % What I want to write     \begin{scope}[ % Equivalent of:       % shift = {(0.5,0.5)},       % x = {(1,-1)},       % y = {(2, 1)},       %% Other options, such as:       /pgfplots/every axis plot/.append style = {very thick}     ]      \addplot ({0.5*exp(x)}, {0.75*exp(-x)});     \end{scope}          % What I now have to write     \begin{scope}[       /pgfplots/every axis plot/.append style = {very thick}     ]      \addplot ({0.5 + 0.5*exp(x) + 0.75*2*exp(-x)},                {0.5 + 0.5*-1*exp(x) + 0.75*exp(-x)});     \end{scope}          \end{axis}\end{tikzpicture}          \end{document}      I think you can see why I'd want this. (For the curious, I'm drawing trajectories of some solutions to systems of linear ODEs.)


title: Updating a font in fontspec

text: I want to implement all the LaTeX code mentioned in Showcase TeX Typography for TUG's Calendar. The implementation involves use of special fonts like Phaeton. I have installed it. But I don't get the same output as given. I get only the text rather than the image. Here is the code which I have used (it's the same in the page given as well):               % save this document as example.tex     % compile this document with: xelatex -shell-escape example.tex     \documentclass{article}          % Needed to make sure your page dimensions     % are the same as that of the calendar.     \usepackage[landscape,a4paper,margin=0pt]{geometry}     \parindent=0pt          \usepackage[svgnames]{xcolor}     \usepackage{tikz}          \usepackage{microtype}          \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Phaeton}          \def\swash#1{{\addfontfeatures{RawFeature=+swsh}#1}}     \def\nfrac#1{{\addfontfeatures{RawFeature=+frac}#1}}     \def\cword#1{{\addfontfeatures{RawFeature=+dlig}#1}}     \def\cwrdb#1{{\addfontfeatures{RawFeature={+dlig,+ss01}}#1}}     \def\baner#1{{\addfontfeatures{RawFeature=+ss02}#1}}          \def\orn{\char"E047\char"E048\hspace{-2pt}\raisebox{20.5pt}{\rotatebox{180}{\char"E047\char"E048}}\hspace{-2pt}}     \def\Orn{\orn\orn\orn\orn\orn\orn\orn\orn}     \def\ORn{\Orn\Orn\Orn\Orn\Orn\Orn\Orn\Orn}     \def\ORN{\ORn\ORn\ORn\ORn\ORn\ORn\Orn\Orn}          \definecolor{bgcolour}{gray}{0.9}          \pagestyle{empty}          \begin{document}     \null\vfill     \centering\begin{tikzpicture}         % Clipping         \clip (-0.5\textwidth+1cm,-0.5\textheight) rectangle (0.5\textwidth-1cm,0.5\textheight-2cm) ;         % Background.         \draw (0,0) node {\fontsize{48}{20.5}\selectfont\begin{minipage}{1.5\textwidth}\color{bgcolour}\ORN\ORN\end{minipage}} ;         % Logo.         \draw (0,0) node {\fontsize{120}{120}\selectfont\baner{6=======6}} ;         \draw (0,0) node {\fontsize{48}{48}\selectfont\TeX\ \cword{AND} Friends} ;         \draw (0,1.8) node {PROFESSOR DONALD KNUTH'S WORLD FAMOUS} ;         \draw (0,4.5) node {\fontsize{120}{120}\selectfont\char"E00E} ;         \draw (-4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut THE MOST POWERFUL\strut\ PROGRAM\strut}\medskip\hrule\end{minipage}} ;         \draw (4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut OF ITS KIND AVAILABLE\strut\ TODAY\strut}\medskip\hrule\end{minipage}} ;         \draw (0,-1.5) node {\fontsize{16}{16}\selectfont\swash{Available for all major operating systems.}} ;         \draw (0,-5) node {\begin{minipage}{13cm}\fontsize{16}{20}\selectfont\cword{with} SUPPORT \cword{for} UNICODE \cword{and} OPENTYPE FONTS, \TeX\ \cword{and} ITS DERIVATIVES ARE \cword{the} IDEAL SOLUTION \cword{for} ALL YOUR TWENTY-FIRST CENTURY TYPESETTING NEEDS. \cword{the} IN-BUILT MACRO LANGUAGE ALLOWS YOU TO CUSTOMISE IT TO YOUR NEEDS. \cword{with} AUTOMATIC INDEXING \cword{and} REFERENCING, \cword{and} UNPARALLELED MATHEMATICS SUPPORT, THERE'S NO REASON NOT TO SWITCH TODAY.\end{minipage}} ;         \draw (0,-9) node {\fontsize{120}{120}\selectfont\baner{1====1}} ;         \draw (0,-8.7) node {ESTABLISHED 1978} ;     \end{tikzpicture}\par     \vfill\null     \end{document}      I had to give to whole document as MWE because now , I don't know where the error is.I have compiled through command line and using TexMaker. And this is what I get the output as : ![enter image description here](http://i.stack.imgur.com/2auaj.png)


The followin code gives this error :               ! Argument of \pgfmathrnd@@ has an extra }.     <inserted text>                      \par      l.12    }          ?      ! Emergency stop.     <inserted text>                      \par      l.12    }          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on bob.log.          Done.      What is wrong ?               \documentclass[tikz]{standalone}     \usetikzlibrary{patterns}          \pgfdeclarepatternformonly{Rnd}     {\pgfpointorigin}{\pgfpoint{.5cm}{.5cm}}     {\pgfpoint{1cm}{1cm}}     {         \pgfpathcircle{%             %\pgfpoint{.25cm}{.25cm}}{.4pt}             \pgfpoint{\pgfmathrnd*.25cm}{\pgfmathrnd*.25cm}}{.4pt}         \pgfusepath{fill}     }          \begin{document}     \begin{tikzpicture}          \draw[pattern=Rnd] (0,0) rectangle (5,5) ;     \end{tikzpicture}          \end{document}


title: How to best split long strings?

text: I would like to do a simple `\StrSplit` (from the xstring package) on a string I have, however, the string in question may contain a `\par`, and it appears that `\@xs@StrSpl@t@@`, which I can only imagine is an internal xstring macro, is not a long macro, so it causes an error. Are there any workarounds? Other packages with similar functionality that accept long strings? A way to remove `\par` temporarily and put it back later? EDIT: I only actually need to split off the first character, so if there's a way to do that directly on arbitrary strings (with the semantics of `\noexpand`), that would work too.


title: No BoundingBox error message

text: I want to include an `eps` file in LaTeX. I typed the following in Texmaker               \begin{document}     \begin{figure}[!ht]     \centering     \includegraphics[scale=1]{figure}     \end{figure}          \end{document}      The error I get is               ! LaTeX Error: Cannot determine size of graphic in figure.eps (no BoundingBox).       Please help!


title: Underlined text field in a fillable form

text: Is there a way to make an underlined text field in a fillable form? I am using the `hyperref` package to make a fillable form but I would also like to give the option of printing out the form and filling it by hand. For the later, a line is helpful to serve as guide for the pen. This               \TextField[name=firstname,width=5cm,charsize=11pt]{First Name}      gives an empty box and I cannot find an easy way to underline this box.


title: What is the problem with nested environments using \BODY (environ package)?

text: > **This question led to a new package:**   >  `newenviron` I want to define some environments, which place their content into multiple different other environments. To access the contents I used the `environ` package, which introduces the `\BODY` command. However at some point pdflatex seemed to be stuck in an infinite loop. I reduced it to a minimal example:               \documentclass{article}     \usepackage{environ}          \NewEnviron{assertion}{Assertion: \BODY}     \NewEnviron{outerassertion}{\begin{assertion}\BODY\end{assertion}}          \begin{document}          \begin{assertion}     test     \end{assertion}          \begin{outerassertion}     test2     \end{outerassertion}     \end{document}      Any ideas how to work around this problem? I guess, the problem is with the `\BODY` command since everything works fine as long as I use it in only one of the new environments.


title: timeline and animate package

text: I'm trying to make some pdf with animate package controlling a loop with the timeline. The purpose is to have a loop but reaching the last frame, the color of the dot should change. My main questions are:   1. The animateinline environment does not accept label. What is the animation label that I should use in the Javascript time?   2. Is there any simple way to change mycolor after the last frame and then go to frame 1? My tex file is:               \documentclass{article}     \usepackage{multido,pstricks,xcolor}     \usepackage{animate}          \newwrite\OutFile%     \immediate\openout\OutFile=mytimeline.txt%     \multido{\iMyFrame=0+1}{5}{%     \immediate\write\OutFile{::\iMyFrame x0}}     \immediate\write\OutFile{::5x0:anim.pageNum=1}     \immediate\closeout\OutFile%          \begin{document}     \definecolor{mycolor}{RGB}{100,0,100}     \begin{center}     \begin{animateinline}[poster=first, controls, %     begin={\SpecialCoor\begin{pspicture}(-5,-5)(5,5)},      %     end={\end{pspicture}},%     timeline=mytimeline.txt]{2}%     \psline{->}(0,-1.5)(0,1.5)\psline{->}(-1.5,0)(1.5,0)     \newframe     \multiframe{5}{iAngle=0+75}{%     \psdot[linecolor=mycolor](1;\iAngle)     \if iAngle=375 {\definecolor{mycolor}{RGB}{100,100,100}}\fi }     \end{animateinline}%     \end{center}     \end{document}


title: Too much space at the top of a beamer block when using multilined math environment

text: I would like to place two math lines in a `beamer` block, as two separately centered lines. I know that I could do this using two distinct equation environments, but it would be nicer to use a single environment like `gather`, or `align` (though align is not exactly what I want). When I do this (with `gather`), an ugly space appears at the top of the block, before the first equation. See below. How can I get rid of this space while still using gather or align (perhaps I should be using another environment altogether?)               \begin{block}{Separation of variables}     \begin{equation*}     \eps u'''' - (yu')' = \lambda u,     \end{equation*}     \begin{equation*}     u''(0)=u'''(0)=0 \quad \text{(Free),} \qquad u(1)=u''(1)=0 \quad\text{(Clamped)}     \end{equation*}     \end{block}     \begin{block}{Separation of variables}     \begin{gather*}     \eps u'''' - (yu')' = \lambda u,\\     u''(0)=u'''(0)=0 \quad \text{(Free),} \qquad u(1)=u''(1)=0 \quad\text{(Clamped)}     \end{gather*}     \end{block}      Gives me: ![enter image description here](http://i.stack.imgur.com/33rH7.png) Any ideas?


title: Misaligned fancyhdr footer when using color

text: Strangely, using `{\color{}}` in `\lfoot{}` is causing my footer parts to misalign. This code               \documentclass[11pt,a4paper]{article}       \usepackage{fancyhdr}     \usepackage[pdftex]{color,graphicx}          \pagestyle{fancy}          \lhead{}     \chead{}     \rhead{}          %%%     \lfoot{{\color{blue}Build}}     %%%          \cfoot{\textcolor{blue}{P.\thepage}}     \rfoot{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \title{Yep.}          \begin{document}          \maketitle         \thispagestyle{fancy}              \section{Blarg}     \end{document}      Produces... ![misaligned](http://i.stack.imgur.com/XmERF.png)


title: Pgfplots histogram with input data already counted

text: I have input data that looks like this:               Age Count   Cumulative Count    Percent Cumulative Percent                       24  1   1   1.4084507   1.4084507     25  1   2   1.4084507   2.81690141     30  2   4   2.81690141  5.63380282     31  1   5   1.4084507   7.04225352     32  1   6   1.4084507   8.45070423      The standard bar plot is too dense:               \documentclass{scrartcl}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.10}          \pgfplotstableread[col sep=tab]{../tables/dob-roditelja.dat}{\tableparentage}     \pgfplotsset{%         graph/.style={ymajorgrids,yminorgrids,xtick=data,ybar}%     }          \begin{document}          \begin{figure}[h!tb]     \centering     \begin{tikzpicture}     \begin{axis}[         graph,         ylabel={$n$},         ylabel style={rotate=-90},         bar width=5pt     ]     \addplot table[x=Age,y=Count]{\tableparentage};     \legend{Age}     \end{axis}     \end{tikzpicture}     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/TENaW.png) I therefore considered having a histogram instead with age groups 20-25, 26-30 and so on. Reading from the manual, it seems that the input data is repeated if there are multiple values to be plotted in a histogram. How can I have input values with counts already in the table?


title: How to get a dot instead of colon in table captions?

text: Now I have > Table 1: Title I need > Table 1. Title


title: Add parameter to existing command produces error

text: I have this command in a template given by my prof               \newcommand{\homeworkProblemName}{}%     \newcounter{homeworkProblemCounter}%     \newenvironment{homeworkProblem}[1][Problem \arabic{homeworkProblemCounter} - Homework]%       {\stepcounter{homeworkProblemCounter}%        \renewcommand{\homeworkProblemName}{#1}%        \section{\homeworkProblemName}%        \enterProblemHeader{\homeworkProblemName}}%       {\exitProblemHeader{\homeworkProblemName}}%      I want to add in the third line a second parameter to be able to have something like `Problem 1 - Homework 1` but the number of the homework can change, for instance, I can have `Problem 1 - HW 1` then `Problem 4 - HW 2` then `Problem 2 - HW 3` and so on. I tried with this               \newcommand{\homeworkProblemName}{}%     \newcounter{homeworkProblemCounter}%     \newenvironment{homeworkProblem}[2][Problem \arabic{homeworkProblemCounter} - Homework #2]%       {\stepcounter{homeworkProblemCounter}%        \renewcommand{\homeworkProblemName}{#1}%        \section{\homeworkProblemName}%        \enterProblemHeader{\homeworkProblemName}}%       {\exitProblemHeader{\homeworkProblemName}}%      but I am getting a compilation error               `Illegal parameter number in definition of \homeworkProblem. <to be read again> 2`     `{\exitProblemHeader{\homeworkProblemName}}`      I had no experience on creating commands and all that stuff, I'm just a basic LaTeX user. Can anyone tell me how to make this work? **UPDATE** For what it is useful here is the definition of the exitProblemHeader and enterProblemHeader               \newcommand{\enterProblemHeader}[1]{\nobreak\extramarks{#1}{#1 continued on next page\ldots}\nobreak%                                         \nobreak\extramarks{#1 (continued)}{#1 continued on next page\ldots}\nobreak}%     \newcommand{\exitProblemHeader}[1]{\nobreak\extramarks{#1 (continued)}{#1 continued on next page\ldots}\nobreak%                                        \nobreak\extramarks{#1}{}\nobreak}%


title: Create 3 blocks in a 2-1 layout in beamer

text: Is it possible to create 3 blocks in a single frame in beamer with a distribution as shown in the image below? The blocks must have the same width, and block C should be centered.               -----   -----     | A |   | B |     -----   -----         -----         | C |         -----


title: LyX 2.1 cannot open older Beamer presentations

text: I have recently upgraded my LyX installation form 2.0.7 to 2.1. Everything was fine until I found out that I am no longer able to open my older Beamer presentations made with LyX 2.0.6 or 2.0.7. Whenever I try to open my older Beamer presentations in LyX 2.1 , it shows an error like this: `/tmp/lyx_tmpdir.ThevfvKK5936/Buffer_convertLyXFormatXXXXXX.lyx.YoiTshcj5936` ended unexpectedly, which means that it is probably corrupted. I am having the same problem on both Win 7 SP1 x64 and Ubuntu 14.04 x86-64. Initially I thought my files were corrupt. To make sure, I tried opening all of my older Beamer files. And every single time LyX showed the same error. ![enter image description here](http://i.stack.imgur.com/im4rW.png) Any help would be much appreciated.


title: hyperref fillable forms - breaking the rules

text: The `hyperref` manual states clearly: > You must put your fields inside a `Form` environment (only one per file). However,   1. I can put form fields outside of a `Form` and   2. I can put more than one `Form` in a file and it seems to work just fine (apart from the general problem even within the rules that the font in the fillable fields seems uncontrollable). See MWE. It is not possible for me to get all my fillable bits in one place. What terrible things will befall me if I breach (1) and (2) above?               \documentclass{article}     \usepackage{hyperref}     \begin{document}          %outside a form     \TextField[name=one, width=3cm, borderwidth=0]{type here:}          %Form 1     \begin{Form}     \TextField[name=two, width=3cm, borderwidth=0]{type here:} \\          \TextField[name=three, width=3cm, borderwidth=0]{type here:} \\     \end{Form}          %And another one     \begin{Form}     \TextField[name=four, width=3cm, borderwidth=0]{type here:} \\          \TextField[name=five, width=3cm, borderwidth=0]{type here:} \\     \end{Form}     \end{document}


title: Non-ASCII characters in Biblatex

text: I am using `biblatex` with `backend=biber` and the following `.bib` file:               @article{concellon_synthesis_2006,         title = {Synthesis of Enantiopure ({αS,βS)-} or ({αR,βS)-β-Amino} Alcohols by Complete Regioselective Opening of Aminoepoxides by Organolithium Reagents {LiAlH4} or {LiAlD4}},         volume = {71},         number = {17},         journal = {J. Org. Chem.},         author = {Concellón, José M. and Bernad, Pablo L. and del Solar, Virginia and Suárez, José Ramón and García-Granda, Santiago and Díaz, M. Rosario},         month = aug,         year = {2006},         pages = {6420--6426},     }      I can successfully compile this with `biber`, but then the `pdflatex` command fails due to the `α` and `β` in the `.bbl` file. I am astonished by the fact that there seems to be no elegant solution for this problem even though this appears to be an everyday scenario, in scientific literature at least. What options do I have to fix this problem?


title: Dynamic programming table

text: I would like to create a dynamic programming table. That is that apart from the table cells and elements it should contain horizontal, vertical and diagonal arrows that point from one cell to another and create paths. Can anybody help me?


title: How to use the \pderiv and \D macros of the cool package with subscripts?

text: Is it possible to use the \pderiv or \D macros of the latex cool package when the derivative order and the variable uses a subscript? This fails with a "double subscript" error:               \D[a_1]{f}{x_1}      The output should look like this:               \frac{d^{a_1} f}{d x_1^{a_1}}


title: Why do people chose Latex for mathematical writing?

text: I'm trying to make the transition from Word to Latex for mathematical writing. But the more I learn about it, the less sure I am that I should make this transition. ### Typographical Quality For example people say you should chose Latex for it's high typographical quality of the documents. But take a look at this document I created with Microsoft Word 2010: https://skydrive.live.com/?cid=8fea31c0accf70f0&id=8FEA31C0ACCF70F0%21183# You should view it in pdf reader, otherwise the fonts are not loaded. I can hardly imagine that quality of typography would be much better in Latex. Can someone give me some objective arguments why Latex would be of typographical better quality ? ### LaTeX is extremely customizable. Isn't word extremely customizable as well ? ### With LaTeX, you have the option to control "content" and "presentation" separate. I agree that in programs like word or openoffice it's easier (and pretty much the norm) to get sloppy and just do quick manual formatting with a shortcut instead of using proper style definitions and formatting for all your document elements. But, that's not really a good point to switch to Latex. I learned myself not to get sloppy while using Microsoft Word, and I think Office Word has as much as options as Latex has to render styles in your document the way you want it - with these font shapes and sizes, with such and such margins, footnotes, etc. ### LaTeX allows typesetting math easily. " _Really - writing \alpha is quicker then searching alpha symbol in GUI. Similary writing x^y is quicker then searching power in list of symbols. I guess with AMS packages included LaTeX have much more symbols then anything else._ " Well, Latex allows typesetting math easily. But in Office Word you can use shortcuts for math symbols. For example look at those math shortcuts: http://blogs.msdn.com/b/murrays/archive/2011/11/21/klinke-s-streamlined-math- input-notation.aspx Σ in Word: S? vs Latex: \sum ℝ in Word: R" vs Latex: \mathbb{R} in word: limn vs Latex: \lim_{n \to \infty} You can make math typing as short as you want in Office Word, the same is not true in Latex. ### PDF guarantees same-look on everything. You won't run into problem because the computer you're useing don't have some fonts installed. Word to PDF is as easy as anything. While you don't need to check how it looks in PDF all the time (as in Latex). ### Word can't squeeze a Fourier series (a sum and a set of fractions) into a single baseline of text Just not true.. etc. etc. And so I find more arguments like this on the internet, but I'm not really convinced. Except for this argument: _"Superior cross referencing and bibliography management. This is a must for any lengthy work such as an academic paper or research report. Just three commands, \label, \citep and \autoref cover 99% of the use cases. The night before term projects are due, the groups who used LaTeX are sleeping soundly at home while the groups using Word are burning the midnight oil in the computer lab trying to get their cross references straightened out."_ Can someone give me more of those good arguments in favour of Latex?


title: Is it possible to get h-physrev to display by order of appearance?

text: Or could someone suggest another bibtex style that is close the h-physrev that displays by order of appearance in the bibliography? The unsrt style is not what I'm looking for. Thanks for any ideas!


title: 3D font in LaTeX

text: This is an unusual question regarding rendering of a font with a specific 3D-esque style in LaTeX, XeLaTex, or any other TeX flavor. I was looking at some fonts the other day and I came across one of which I am very fond: ![enter image description here](http://i.stack.imgur.com/4OdEj.jpg) There are many beautiful examples of this font, such as: ![enter image description here](http://i.stack.imgur.com/sz3Gf.jpg) However, each of these examples has a 3D quality to it. The font is both **shaded** and **colored** , which make it look tolerable. In regular, two dimensions it looks like this: ![enter image description here](http://i.stack.imgur.com/MyNwX.jpg) Which is hardly anything to write home about. My question is simple: how can I get LaTeX, XeLaTeX, or any other flavor, to render a font with a 3D effect like the one in the pictures above? Is it possible or would it have to be done in an image editor? Unfortunately, Googling has yielded poor results and I have began to think that it may be hopeless, though documents like this one make me think it may be possible. [EDIT] For further clarification, the 3D effect that is of interest is the shading on the characters of the font. In the first image, this effect can be observed on the letters of the word "Octant", which shades each character on the right side, as though there is a light source to the left. Another example of the effect is the words "Griffin & Quayle" in the second image.


title: 2 arrows at same distance

text: I'm trying to get two arrows to be spaced equally from each other. Currently I'm drawing two separate arrows using `\draw` with `[out=-180,in=-180,distance=3cm]` where I play with the distance until the two arrows more or less line up. Below is a screenshot of what I have but I can't seem easily have the two arrows line up perfectly. Also if I change one arrow I have to change the other arrow as well manually. Any tips would be appreciated ![Image of two arrows not lining up](http://i.stack.imgur.com/AX1XV.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows,fit,calc,positioning}          \begin{document}     \begin{tikzpicture}[thick]     \node [minimum height=1cm] (a) at (0.2,-3.2) {};          \node [minimum height=1cm] (b) at(-1.5,-1) {};          \draw[thick, >=stealth , ->] ($(b.north west)!0.6!(b.south west)$) to [out=-180,in=-180,distance=2.5cm] ($(a.north west)!0.4!(a.south west)$){};     \draw[thick, >=stealth , <-] ($(b.north west)!0.4!(b.south west)$) to [out=-180,in=-180,distance=3cm] ($(a.north west)!0.6!(a.south west)$){};          \end{tikzpicture}     \end{document}