Vertically center inline-table element in a div
vertical align middle in
I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align.   I think this is because the pos key calculates the actual length of the graph while the graphs don't have the same length.  I'm sure I can somehow let LaTeX do the calculations for me so as to align the slopes vertically at an x value of my choice. But how?  PS: The below document requires a working installation of gnuplot to compile.    \documentclass{standalone}   \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{arrows, decorations.markings,intersections}  \makeatletter \tikzset{     nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,      my axis/.style={         postaction={             decoration={                 markings,                 mark=at position 1 with {                     \arrow[ultra thick]{latex}                 }             },             decorate,             nomorepostaction         },         thin,         -,         every path/.append style=my axis     } } \makeatother  \definecolor{headtitle}{RGB}{167,63,63}  \begin{document} \begin{tikzpicture}   \begin{axis}[%       axis line style={my axis},       xlabel = $U_A$,       ylabel = $S$,       xmin = 0, xmax = 3.25,       ymin = 0,       xtick={1,1.5},       xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},       xticklabel style={             inner sep=0pt,             anchor=north east,             rotate=35         },       ytick=\empty,       height=.66\linewidth, width=\linewidth-4.5\tabcolsep,       axis lines*=left,       every axis y label/.style={at=(current axis.above origin),anchor=east},       every axis x label/.style={at=(current axis.right of origin),anchor=west}]%     \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(3*(3-x)+1);       } node[sloped,above,pos=.63333,       minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};      \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1);       } node[sloped,above,pos=.83333,       minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};       \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);       } node[sloped,above,pos=.775,       minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};      \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);      \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);      \path (St.south east) edge[headtitle,very thick] node {} (St.south west);   \end{axis}% \end{tikzpicture}% \end{document} php Replacing multiple spaces with a single space How to increase JAVA Heap Size? Check variable equality against a list of values Harmonic Function with linear growth Best lens for taking pictures of surfers What is the best way to save values (like strings) for later use? I'm fairly new to LaTeX and I'm struggling with something apparently simple, but for which I can't find a fair solution. The problem (simplified) is as follows (please take care terms used may not have the traditional meaning in LaTeX):  I need to references to files (many) throughout a text. As example, the files:  "C:/Work/this_file1.c", "C:/MoreWork/this_file1.c" and "D:/MoreWork/another_file2.h".  So, now I would like to create an "alias" to each directory and each name file so I can reference them. A "pseudocode" could be:  % Definition \alias \c_dir = C:/Work/ \alias \d_dir = D:/MoreWork/ \alias \file1 = this_file1.c \alias \file2 = another_file2.h  % Reference in text \c_dir\file1    % For referencing C:/Work/this_file1.c \d_dir\file1    % For referencing D:/MoreWork/this_file1.c \c_dir\file2    % For referencing C:/Work/another_file2.h   My first approach was using \newcommand, but that caused numerous problems due to naming limitations. (I also tried other methods like pgfkeys, but it always gets stuck somewhere!)  Can you suggest a method? When transiting between two flights, will my luggage be automatically transferred? Listing multiple compound words How do I list multiple things that are compound words?  In my own language I'm used to writing these lists like this:  "I kicked foot-, basket-, and volleyball"  The sentence is supposed to mean that I kicked all types of balls (football, basketball and volleyball). However, it does not seem correct to me. Should I write them as whole words, with or without hyphen, or how? How to install Blender from the official website I installed Blender from official Ubuntu repository but its version is always behind the version available from the official Blender website.  I'm aware that I can launch the program within the downloaded folder, but i want to replace the install version with a new version downloaded from the website?   It must be present in the unity launcher.  I'm also aware of the available PPA's that are available, however I just want to install Blender manually.  Thanks in advance At what times before $1{:}30$ in the afternoon do all three doctors schedule their appointments to begin at the same time? In a certain medical group, Dr. Schwartz schedules appointments to begin $30$ minutes apart, Dr. Ramirez schedules appointments to begin $25$ minutes apart, and Dr. Wu schedules appointments to begin $50$ minutes apart. All three doctors schedule their first appointments to begin at $8{:}00$ in the morning, which are followed by their successive appointments throughout the day without breaks. Other than at $8{:}00$ in the morning, at what times before $1{:}30$ in the afternoon do all three doctors schedule their appointments to begin at the same time?  I'm not sure how to approach this question. They all begin at the same time at $8{:}00$. Also doesn't the overlapping of appointments depend on how long their respective appointments take? The following code uses the etoolbox package to convert a list a,b,c into an internal list (called \mylist) and then typesets that with colons: a:b:c:.  However, when I load the etextools package (by uncommenting the second line), I get no list output.   \documentclass{minimal} \usepackage{etoolbox} %\usepackage{etextools} \begin{document} A list: \def\mylist{} \forcsvlist{\listadd\mylist}{a,b,c} \def\do#1{#1:} \dolistloop{\mylist} \end{document}   I suspect it is is a bug since etextools claims to depend on etoolbox.  Is this a bug or am I doing something wrong?  In either case, how can I use \dolistloop with  etextools (which I want for goodies like \expandnext)?  Notes   \show\mylist produces the same output a|b|c| in both cases, so the problem is with \dolistloop which expands to \forlistloop\do The \forlistloop command becomes substantially more complicated when etextools is used.  might be relevant (but not obviously). I have the following code for a Figure with 4 subfigures:  \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure}[b]     \centering     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm1.pdf}         \subcaption{$Q^{*}$ values for arm 1}         \label{fig:arm1}     \end{subfigure}     ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm2.pdf}         \subcaption{$Q^{*}$ values for arm 2}         \label{fig:arm2}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm3.pdf}         \subcaption{$Q^{*}$ values for arm 3}         \label{fig:arm3}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm4.pdf}         \subcaption{$Q^{*}$ values for arm 4}         \label{fig:arm4}     \end{subfigure}      \caption{$Q^{*}$ values for different arms}     \label{fig:arms} \end{figure}  \end{document}   This results in   But this way, the 4 subfigures are too large to fit on 1 page. I would like to split this over 2 pages, keeping the subcaptions a, b, ... How can I do this? Dodecagon Area Question The distance between two opposite vertices of the dodecagon is 2. Find the area of the dodecagon.  Is there any way to do this without trigonometry?  And could you include a proof also? :O How to switch between tty and xorg session Styling an input type="file" button Trouble downloading packages list due to a "Hash sum mismatch" error First of Tablet info :   Model number : Micromax P275  Android version : 4.0.4  Baseband version : v3.0  Kernal version : 3.0.8+ linda@SKYWORTHSERVER3 #52  Fri Sep 21 14:00:53 CST 2012  Build number : P275_HW.V0.1_V3.0_20120921  I dont know anything about android  now the issue is that the screen keeps randomly jerking and there are random touches that happen which will open apps and close apps randomly. this happens after few minutes since  Tablet turn on. When these things happen i cannot do anything. even if i try to power down by pressing the power key the dialog box disappears because of this random behavior.  i observer this behavior mainly when i travel in bus. so i'm thinking that the vibrations are affecting the accelerometer and thus causing the random movements. When i'm in a stationary place i rarely see this issue, but it has occured.  now i disabled  1)Auto rotate  2)Disabled all options in Developer options except Force hardware rendering.  the system update will happen and i cant turn it off(atleast i dont know).  my main useage in the Tablet are 1) pdf reading 2)videos 3)small c programmin(using CCtools).  please help me with this issue. its is very very frustrating. last thing,i brought this device 28 days ago. also i would like links on reinstalling android. How are classical optics phenomena explained in QED (Snell's law)? How is the following classical optics phenomenon explained in quantum electrodynamics?   Reflection and Refraction   Are they simply due to photons being absorbed and re-emitted? How do we get to Snell's law, for example, in that case?  Split by request: See the other part of this question . What's the last character in a file? I just read the answers to  and everyone said to delete the last character. My question is,  isn't the eof character the last one?