title: I'm using apa6 and BibTeX in Kile; what's wrong with my bib links?

text: **The Question** Why are the links in the Works Cited breaking like that? How can I remedy that? **Main File**               \documentclass[jou,apacite]{apa6}     \usepackage{hyperref}     \title{Web-based IDEs: A Brief Overview of Legal, Social, Ethical, and Security Perspectives}     \shorttitle{Web-based IDEs: A Brief Overview}          \author{Phillip H. Vollman}     \affiliation{George Mason University}     \keywords{WEB-based IDEs, WIDEs, cloud-based IDEs}     \abstract{This is a short investigation into the extant legal, social, ethical, and security issues regarding web-based interactive developent environments.}     \authornote{     This is a paper prepared for Prof. Alidad Jalinous's IT 103 002 course; the course ran during the Spring 2014 semeester at George Mason University.     \begin{center}\noindent Honor Code Statement\end{center}     \noindent~By placing this statement on my webpage, I certify that I have read and understand the GMU Honor Code on \url{http://oai.gmu.edu/the-mason-honor-code/}. I am fully aware of the following sections of the Honor Code: Extent of the Honor Code, Responsibility of the Student and Penalty. In addition, I have received permission from the copyright holder for any copyrighted material that is displayed on my site. This includes quoting extensive amounts of text, any material copied directly from a web page and graphics/pictures that are copyrighted. This project or subject material has not been used in another class by me or any other student. Finally, I certify that this site is not for commercial purposes, which is a violation of the George Mason Responsible Use of Computing (RUC) Policy posted on \url{http://copyright.gmu.edu/?page_id=301 web site}.}     \leftheader{Web-based IDEs: A Brief Overview}     \rightheader{Vollman}               \begin{document}     \maketitle     \section{Introduction}     \subsection{Research Topic}     Web-based interactive development environments, which emerged in 2008 with the promulgation of the Google Webkit-based Aurora SDK, have become much more popular between that time and 2014. Web-based IDEs are worthy of interest as they present new challenges for programmers, project managers, human resources professionals, and consumers.      \subsection{Statement of Purpose}     This paper concerns itself with exploring and making conclusions concerning the legal, social, ethical, and security related issues related to the promulgation of web-based interactive development environments.     \subsection{Defining a Web-based IDE}     Technical writer Margaret Rouse (2012) defines a web-based IDE as ``a web-based$\ldots$ programming environment that has been packaged as an application, typically consisting of a code editor, a compiler, a debugger, and a graphical user interface (GUI) builder'' (``What is a cloud IDE?'').  Web-based IDEs may run as browser plugins or apps (usually meaning they are only PC and tablet accessible), smartphone applications, or responsive web apps that can run on multiple platforms.  Web-based IDEs may not be as well-known or appreciated as their offline counterparts, but they are far from insignificant.       \section{Body}     \subsection{The Significance of Web-based IDEs}     \subsubsection{Positive Significance}  Web-based IDEs generally cannot damage the workstation in the event of an error.  Traditional IDEs, however, can interrupt and stall computers, causing them to crash.  Because web-based IDEs do not run on a PC in the same sense that a traditional IDE runs, they use a fraction of the CPU real estate that traditional IDEs take up.  Web-based IDEs are also much more able to provide instant feedback in the form of logs, builds, and compiles.      \subsubsection{Negative Significance}     Web-based IDEs require an uninterrupted internet connection.  This model favors programmers living in stable, urban (i.e., `first world') environments, and has a potential chilling effect on innovation by programmers in Africa and India who may have computers, but lack a strong or continuous internet connection.       Web-based IDEs, because they cannot fully integrate into the host operating system, may not be able to run with full efficiency; build speed depends on the memory provided by the IDE host, and not the memory on the actual computer where the IDE is being used.     \subsubsection{An Example}     \TeX{}studio, a traditional IDE for the \LaTeX{} markup language, cannot compile its code to a PDF file if the same PDF file is already open, and will halt the compiling process if critical packages or style files are missing.  Write\LaTeX{}, a web-based IDE for the same language, provides an instant preview of changes and has access to the entire \LaTeX{} ecosystem hosted on CTAN (\LaTeX{}'s package repository).  This example applies to other languages, as well.     \subsubsection{Significance, distilled} Ultimately, web-based IDEs exert less pressure on workstations and experience fewer build errors because they often have access to the sum total of a language's packages and plugins.     \subsection{Web-based IDEs and the Law}     \subsubsection{Lack of Legal Discussion} There are a dearth of legal rulings and jurisprudential rumination concerning IDEs, regardless of the type.  Generally speaking, the same issues that apply to Software-as-a-Service and collaborative workspaces apply to web-based IDEs.  Additionally, web-based IDEs and their users may run into issues concerning the fair use of proprietary or limited-rights code and software. There may be legal issues regarding which privacy and data laws code compiled with a web-based IDE falls under.     \subsubsection{Potential for Legal Issues} The potential for legal issues, complaints, and lawsuits will arise as web-based collaborative coding becomes more popular. This rise will only be exacerbated if web-based IDEs lack the functionality to keep verbose logs on which programmer added and edited which lines and snippets of code. Several high profile legal battles have occurred concerning ownership and origination of software; the acrimonious dispute between the Facebook CEO Mark Zuckerberg and the Winklevoss brothers is a prime example of the consequences of an overly informal and unlogged collaborative coding experience.      \subsection{Web-based IDEs and Society}     \subsubsection{Paradigm Shift} IEEE contributor Joe Bungo (2010) pitched web-based IDEs so: ``As a student, imagine being able to$\ldots$fulfill[] your programming assignments on your personal laptops and netbooks from almost anywhere in the world'' (p. 1).  Web-based IDEs, by virtue of their hosted nature, solve the problem of synchronizing code, IDE settings, and language ecosystems between computers.  In a working paper submitted to the 2011 IEEE World Congress on Services, Wu, Liang, Kui, and Wang (2011) noted that web-based IDEs (specifically JavaWIDE) ``give[] users the ability to share code, collaborate, and document all in a central location, so that the users do not need to make copies, email code, or learn a system such as CVS or Subversion'' (p. 51).  Such innovations allow students and programmers to code sans frustration or concern about administrative matters such as updates or versioning.     \subsubsection{Educational Usefulness} A blog post written by Hadi Partovi of the education-advocacy non-profit Code.org (2014) asserted ``foundational knowledge [of coding] will be increasingly important in medicine, law, journalism, business, accounting, [and] politics...Computer science helps students develop creativity, confidence, and problem-solving - which help in all information age careers''  (``The `secret agenda' of Code.org''). Americans parents and educators, increasingly anxious that K-12 students are graduating with a fraction of the STEM knowledge than Chinese and Russian students have, would appreciate the implementation of a pain-free system for coding that emphasizes collaboration will be a benefit to students.  Additionally, because compiling and building failures with web-based IDEs cannot damage the workstation, students will not be discouraged by catastrophic failures (i.e., BSoD) caused by faulty code.     \subsection{The Ethics of Web-based IDEs}     \subsubsection{Global Ramifications} A press release trumpeting a new release of the web-based IDE Cloud9 stated, ``Cloud9 IDE dials up this technology a few notches with capabilities such as real-time collaboration for remote teams, which will begin to deliver on the inherent value-proposition of development in the cloud'' (Cloud9, Inc., 2012). This technology is well-suited for use by offshore programmers and international teams.       Project management methodologies such as Agile and Scrum will need to be adapted, as a collaborative IDE has the potential to change the weekday/weekend paradigm that many project managers use to plan the scheduling of software and product development. The proliferation of web-based IDEs then, will change how workers are evaluated and make it easier for businesses to send programming work offshore.  Some Americans would see this technology, then, as unethical.      \subsection{Security and Web-based IDEs}     \subsubsection{Public Accounts} Among the most distressing security issues with web-based IDEs concerns their general business model.  On sites like Cloud9 and CodeAnywhere, only premium users receive private workspaces and file storage; premium users may receive a more secure level of hosting or better options.  A potential and yet unexplored issue arising from this dichotomy is code theft from programmers developing applications or websites--and lacking the funds to pay for a premium account--by unscrupulous or opportunistic programmers or businesspeople.  Additionally, sites often prohibit free users from accessing their workspaces through HTTPs, and often disallow FTP access, which might be somewhat more secure than accessing the IDE in the browser.     \subsubsection{Issues} Software Engineer Benoit St-Pierre (2010) writes that web-based IDEs have ``no clear backup solution'' and that programmers ``must trust [the web-based IDE] provider's security and privacy controls'' (``What are the advantages / disadvantages of a cloud-based / web-based IDE? [closed]''). He lists a half-dozen other issues; all revolve around the concern that, when a programmer uses a web-based IDE, they do not have the same amount of ownership and control over their code.  Others point out issues of being unable to code during server outages and the lack of native debugging functionality as well as the inability to various package manuals.      \section{Conclusion}     \subsection{Findings} This paper concludes with the assertion that, in spite of their alluring features and the potential they bring for collaboration, there is a consensus among programmers that web-based IDEs are not ready to supplant traditional IDEs, and that this consensus is backed up by this research paper and a wealth of external resources.      \subsection{Next Steps} Web-based IDEs currently do not integrate into the kernels of any operating systems.  Additionally, these IDEs are not as robust or feature-packed as traditional IDEs may be.  In order for web-based IDEs to become the standard among programmers, they must meet and best many of the features that traditional IDEs possess--features that programmers take for granted and will not do without.     \bibliography{sample}     \nocite{*}     \end{document}      **Bib File**               @inproceedings{WuCeclipse2011,         title = {{CEclipse:} An Online IDE for Programing in the Cloud},         isbn = {978-1-4577-0879-4},         shorttitle = {{CEclipse}},         url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6012686},         doi = {10.1109/SERVICES.2011.74},         urldate = {2014-02-24},         publisher = {{IEEE}},         author = {Wu, Ling and Liang, Guangtai and Kui, Shi and Wang, Qianxiang},         month = jul,         year = {2011},         note = {This academic article was submitted to the 2011 {IEEE} World Congress on services, but has only been cited once. The paper itself involves research done on extant {IDEs} and then discusses the IDE ({CEclipse)} that the Peking University-based research team created. This paper's ethos is enhanced by the fact that it was allowed to be featured in the proceeding of the aforementioned Congress, but a dearth of downloads and cite-backs means that the content of the article may not be interesting to other researchers.},         pages = {45--52}     }          @unpublished{Cloud92014,         type = {Press Release},         title = {Cloud9 IDE introduces powerful new capabilities for cloud-based development anytime, anywhere},         url = {https://c9.io/site/blog/2012/06/cloud9-ide-introduces-powerful-new-capabilities-for-cloud-based-development-anytime-anywhere/},         language = {English},         urldate = {2014-02-22},         author = {Cloud9, Inc.},         month = jan,         year = {2014},         note = {This press release from web-based IDE developer Cloud9 IDE is a piece of non-academic writing that summarizes new features in a particular version of their {IDE.} While Cloud9 is an industry leader in regards to web-based {IDEs}, this document has a definite bias, as it is a promotional material. The document, then, should not be treated as empirical or representative of the agendas and features of all web-based {IDEs.}}     }          @article{bungoEmbedded2011,         title = {Embedded Systems Programming in the Cloud: A Novel Approach for Academia},         volume = {30},         issn = {0278-6648},         shorttitle = {Embedded Systems Programming in the Cloud},         url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5681660},         doi = {10.1109/MPOT.2010.938614},         abstract = {Cloud-computing has been a hot topic of late for obvious reasons, and the general notion opens the doors for more specific applications of the idea. Clearly, a multitude of advantages exist in utilizing a cloud-based model for student projects and assignments. The model benefits the university, faculty, and of course, the students. At the moment, mbed appears to be the first and only commercially available embedded programming for real hardware solution that implements the model. Many of the pitfalls associated with general cloud computing apply less or not at all, leaving the question of not if, but when more solutions exercising the model will be available.},         language = {English},         number = {1},         urldate = {2014-02-24},         journal = {{IEEE} Potentials},         author = {Bungo, Joe},         month = jan,         year = {2011},         note = {This peer-reviewed journal article discusses how various cloud-computing technologies, including web-based {IDEs}, can benefit teachers and students.      Joe Bungo is a systems engineer who has worked for {ARM} since 2002. He is not an academic but has done at least one guest lecture. It should be noted, however, that Bungo recommends mbed, a technology available from {ARM}, and that this could be a conflict of interest. (No conflict of interest statement is included in the paper.)},         pages = {17--23}     }          @misc{partoviSecret,         title = {The ``secret agenda'' of Code.org},         url = {http://codeorg.tumblr.com/post/73963049605/the-secret-agenda-of-code-org},         author = {Partovi, Hadi},         note = {Hadi Partovi wrote this blog post (which was also distributed as a press release) to counter claims that his non-profit had a sinister agenda. He rebuffs these claims while reiterating the mission of Code.org.     This blog post is also a marketing material and was chosen because its writer deftly stated an opinion on the minds of many educators, administrators, and students. Partovi's ethos is reinforced by his past high-profile position at Microsoft, as well as his advocacy for start-ups.}     }          @misc{StackBenoit,         type = {Reply},         title = {What are the advantages / disadvantages of a cloud-based / web-based IDE? [closed]},         url = {https://stackoverflow.com/questions/2640993/what-are-the-advantages-disadvantages-of-a-cloud-based-web-based-ide},         language = {English},         urldate = {2014-02-22},         journal = {Stack Overflow},         note = {At first glance, this source, a reply to a web forum post, is unreliable. But because the site from which the source originated, Stack Overflow, is extensively curated, the post has more credibility than might be immediately inferred. On Stack Overflow, users without a certain level of `reputation' are not able to vote on questions and so it may be assumed that the answer was one that programmers agreed with.     The user who answered the question, Benoit St-Pierre, an engineer, has answered, and clarified many questions on Stack Overflow, and he has an established presence outside of the site, as well. For this reason, his explanation of the advantages and disadvantages of web-based IDEs may be considered a credible source.}     }          @misc{RouseCloud,         title = {What is a cloud {IDE?}},         url = http://searchcloudapplications.techtarget.com/definition/cloud-IDE,         language = {English},         urldate = {2014-02-22},         journal = {{WhatIs.com}},         publisher = {{TechTarget}, Inc},         author = {{Margaret Rouse}},         note = {Of all the sources here cited and annotated, Margaret Rouse's definition of a `cloud IDE' is likely the most object and least controversial. Rouse is an established technical writer who uses her skillset to explain technical terms in non-technical language.     A potential issue with the definition lies not in the definition itself but in the semantics of applying the definition of a `cloud {IDE'} to other terms like `web-based IDE,' `web-IDE,' `browser-based IDE,' and `online IDE.'}     }      **Screencap of the Issue** ![The weirdness](http://i.stack.imgur.com/0s9m7.png)


title: Undefined control sequence when including pdfpages package

text: **Problem:** I try to include the following packages in my .tex file:               \usepackage{graphicx}     \usepackage{pdfpages}      **For this I get the following errors:**               thesis.tex (line 186)     Undefined control sequence (\mainmatterSU ...)      **I Google a bit and find this:** https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Undefined_control_sequence Which tells me that it might be a typo, but then I open up the .cls file and check there, which gives me:               % MAINMATTER     \newcommand{\mainmatterSU}{          \begingroup     \cleardoublepage     \edef\x{\endgroup     \noexpand\mainmatter     \setcounter{page}{\the\value{page}}%     }%     \x          \cleardoublepage          \fancypagestyle{plain}     {         \fancyhead{}         \fancyfoot[LE,RO]{{\fontfamily{verdana}\selectfont\thepage}}     }   % re-define plain page          \pagestyle{fancy}     \fancyhf{}     \fancyfoot[LE,RO]{{\fontfamily{verdana}\selectfont\thepage}}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }      So I'm going a bit insane over here because I don't see the miss-spelling or what I could have done wrong by just including a package. Removing those two packages will remove the errors. Any help is appreciated!


title: Beautify whitespace in math environment with aligned with hline

text: I'm kind of surprised I can't find this issue already addressed somewhere, it seems so basic: I want to typeset basic algebra solutions where you write an equation and then under it you write what you do to both sides, and then you underline that as if it's adding two things, and below that you show the result. For example, what I've been trying to write is the following,               \documentclass{article}     \usepackage{amsmath}     \begin{document}         \begin{alignat*}         x & -1 = & 3\\          & +1  & +1\\ \cline{1-3}         &x &= 4         \end{alignat*}     \end{document}      and most of this looks lovely except that the white space between the "+1 +1" line and the horizontal line just looks ugly. I can't use an underline because of all the alignment control. I thought of using \toprule but that doesn't seem to work in a math environment. Other ideas?


title: MakeUppercase not working with .TTF fonts

text: I have a set of Sabon fonts that I would like to use for my dissertation.               \usepackage{fontspec}     \setmainfont[         BoldFont={sabon-bold.ttf},         ItalicFont={sabon-it.ttf},         BoldItalicFont={sabon-boldit.ttf}     ]{sabon-regular.ttf}      Everything seems to be fine but I noticed that my chapter titles are not in uppercase like I want them to be:               \RequirePackage{titlesec}     \newcommand{\PreContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\Large}     {\Large\filleft\textls{\MakeUppercase{\chaptertitlename}} \Huge\thechapter}     {1ex}     {}     [\vspace{1ex}\titlerule]}     \newcommand{\ContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\huge}     {\Large\filleft\MakeUppercase{\chaptertitlename} \Huge\thechapter}     {1ex}     {\titlerule\vspace{1ex}\filright}     [\vspace{1ex}\titlerule]}     \newcommand{\PostContentTitleFormat}{\PreContentTitleFormat}     \PreContentTitleFormat      ![enter image description here](http://i.stack.imgur.com/XDC2e.png) When I remove the fonts, the chapter titles are in uppercase. What could be the cause of this problem? MWE               \documentclass[a4paper]{report}     \usepackage{fontspec}     \setmainfont[         BoldFont={sabon-bold.TTF},         ItalicFont={sabon-it.TTF},         BoldItalicFont={sabon-boldit.TTF}     ]{sabon-regular.TTF}          \RequirePackage{titlesec}     \newcommand{\PreContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\Large}     {\Large\filleft\textls{\MakeUppercase{\chaptertitlename}} \Huge\thechapter}     {1ex}     {}     [\vspace{1ex}\titlerule]}     \newcommand{\ContentTitleFormat}{\titleformat{\chapter}[display]{\scshape\huge}     {\Large\filleft\MakeUppercase{\chaptertitlename} \Huge\thechapter}     {1ex}     {\titlerule\vspace{1ex}\filright}     [\vspace{1ex}\titlerule]}     \newcommand{\PostContentTitleFormat}{\PreContentTitleFormat}     \PreContentTitleFormat          \begin{document}     \ContentTitleFormat          \chapter{Introduction}     Hello     \end{document}      I would like to achieve something like this: ![enter image description here](http://i.stack.imgur.com/GNGRK.png)


title: Multipart graph with linear and circular node patterns

text: I'm trying to draw a graph (PDF output of code below attached) that's a linear process, with a potentially circular element in it. As you may see in the upper picture, the the B,C,D elements aren't in a circle. In the lower picture, they are but the method I used seems a bit kludgy (evidenced by the arc connecting the circle nodes. Two questions:   1. What's a best way to draw the circle with the B, C, D nodes?   2. How do I get that circle "subgraph"(?) to be placed with the A, E, and spectrum nodes? Thanks in advance for your help.               \tikzstyle{stage}=[draw, circle, align=center, text width=2.5cm, minimum height=2em%]     \tikzstyle{connectR}=[->,thick]     \tikzstyle{connectA}=[->,thick]          \begin{tikzpicture}[node distance=5cm, auto]     \node (id) [stage] {A};     \node (acquire) [stage, below right of=id] {B};     \node (assess) [stage, right of=acquire] {C};     \node (assdet) [right of=assess, text width=3.5cm, node distance=4.25cm ] {Some explanation};     \node (persuade) [stage, below left of=assess] {D};     \node (optexp) [stage, below of=persuade]{E};     \node (spect) [below of=optexp, rectangle, draw, fill, left color=white, right color=gray,minimum height=1cm, minimum width=5cm] {Outcome spectrum};          \draw [connectR] (id) -- (acquire);     \draw [connectR] (acquire) -- (assess);     \draw [decorate, decoration={brace,mirror,raise=55pt}, very thick, ] (assdet.north) -- (assdet.south);     \draw[connectR,bend left] (assess.south) -- (persuade.east);     \draw[dashed, bend left] (persuade.west) -> (acquire.south);     \draw[connectR] (persuade) -- (optexp);     \draw [dashed] (optexp.south west) -- ($(spect.north west) +(.5,0)$) -- ($(spect.north east) +(-.5,0)$) -- (optexp.south east) ;          \end{tikzpicture}          \begin{tikzpicture}     \node (one)[stage] at ({145}:4cm) {B};     \node (two) [stage] at ({35}:4cm) {C};     \node (three)[stage] at ({270}:4cm) {D};     \draw [->] (one.north) to [bend left=45] (two.north);     \draw [->] (two.east) to [bend left=45] (three.east);     \draw [->, dashed] (three.west) to [bend left=45] (one.west);     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/yneAk.png) ![enter image description here](http://i.stack.imgur.com/BtAZr.png)


title: relative paths don't work without absolute path

text: I'm trying to automate pdftex to generate docs. I'm in some kind of hell where TeX assumes people want to use absolute paths or the working directory. I have the file main.tex. It imports several files from subdirectories:               \include{one/one}     \include{two/two}      I invoke `pdftex /path/to/main.tex` from another directory and tex consistently tries to import relative to the directory 'pdftex' was invoked from rather than the directory of main.tex. I can't predict what the absolute paths will be on different machines to use those. The 'import' package would only work if I had yet another TeX file in the current working directory that knew what the absolute path to main.tex would be. Is there any way to have main.tex use relative paths without having to include absolute paths in a TeX file? I just want the file to use paths that are relative to where that file is, not relative to the working directory or the phase of the moon. (As a minor blessing, at least none of those included TeX files needs to include other files or graphics, because that'd be its own problem.)


title: Remove row in table (pgfplotstable)

text: I am using `pgfplotstable`, I read a data file and I want to create a table without several rows. To do this, I am trying to use `every row no XX/.style={output empty row}` (where `XX` is the number of the row) but it doesn't work. `output empty row` seems to work only for the header. Do you have any idea to do this?


title: In pgfplots, how to apply enlarge * limits to axis but not to grid?

text: I need to plot a pgfplot where the axis arrows “overshoot” the grid by 10pt. Using `enlarge x limits` I can enlarge the arrows, but then the grid gets enlarged too.               \documentclass[]{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         xmin=0, xmax=1, ymin=0, ymax=1,         axis x line=middle, axis y line=middle,         enlarge x limits={abs=10pt}, enlarge y limits={abs=10pt},         minor tick num=1,         grid=both         ]     \addplot+[smooth] coordinates{ (0,0) (0.65,.8) (1,1)};       \end{axis}       \end{tikzpicture}        \end{document}      produces ![a simple graph](http://i.stack.imgur.com/I6xg6.png) where the grid lines “overshoot” the intended area [0,1]x[0,1]. How can I tell pgfplots to apply `enlarge * limits` to axis but not to grids?


title: siunitx error: "invalid-number" from R

text: I have a document in `.Rnw` which I use to produce a `.tex`document with **kntir**. I have a problem with the formula `\num{\Sexpr{max(degree)}}` which in **R** console produce `12598` but after the running **knitr** in the **.tex** document becomes `\num{\ensuremath{1.2598\times 10^{4}}}`, which create the following error in **LaTex** :               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! siunitx error: "invalid-number"     !      ! Invalid numerical input '\protect $\relax 1.2598\times 10^{4}$'.     !      ! See the siunitx documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.466 ... & \num{\ensuremath{1.2598\times 10^{4}}}      I am bit puzzled since in the document I have bigger numbers which do not create any problem when compiling. These are my **/siunitx** options               %Separate digits with comma (e.g. 1,000,000)     \usepackage[group-separator={,}]{siunitx}     \sisetup{       detect-all,       detect-inline-family=math,       detect-inline-weight=math,       detect-display-math=true}


title: How to make a family of related optional-arg macros reliable

text: I have some working, but unreliable `\def` magic I use to reduce boilerplate regarding mathematical indices. (This is in LaTeX, but I couldn't think of a way to do it using `newcommand`).               \makeatletter     \def\@subarg[#1]{_{\rm #1}}          \def\Lam{{\Lambda}\@ifnextchar[\@subarg{}}     \def\Reg{{\cal R}\@ifnextchar[\@subarg{}}     % .     % .     % many similar definitions     % .     % .          \makeatother      The idea is that when I say`\Lam[frog]`, the `\@subarg@` macro gobbles up optional arg and puts it in roman. If I don't want a roman subscript, I can still do `\Lam` and `\Lam_k` as usual. All this works, but dodgily. I'm sorry I can't characterise the errors very well, but I know there is trouble in section headings.               \subsubsection{Start $\Lam[fee] fi$ fo }     \subsubsection{Start $\Lam[fee] fi$ }     \subsubsection{Start $\Lam[fee]$ }      All generate `! Missing \endcsname inserted.` While both of               \subsubsection{Start $\Lam$ }     \subsubsection{Start $\Lam$}       Generate: `! Argument of \@sect has an extra }.` Does anyone have a clue how to make the macros more robust?


title: Biblatex and Pubmed/Pubmed Central IDs

text: As a biomedical scientist learning more and more about latex I was pleased to read of support for the typesetting of Pubmed IDs (PMID) by biblatex as outlined on page 114 of the biblatex manual. However entries to Pubmed as outlined on page 114 are _not_ links to eprints, but links to primarily an abstract for the paper, as well as links to the full text of the paper primarily via a doi. There is a separate database called Pubmed Central which contains links to free full-text, which requires a separate number called a PMCID. For example, http://www.ncbi.nlm.nih.gov/pubmed/20708976 is a link to a Pubmed abstract. Here the appropriate designation is PMID: 20708976. Associated with this abstract is a link with free full text in Pubmed Central http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2943379/ which truly is an eprint, and where the appropriate designation is PMCID: PMC2943379 How can I instruct biblatex to print either the PMID, or both the PMID and the PMCID for my papers in the same fashion as outline in the biblatex manual, perhaps alongside a DOI and/or a URL ? Could this perhaps be reflected in the next edition of the biblatex manual ? (A way to think of this for those mathematically minded is thinking of Pubmed like MathSciNet, and Pubmed Central like the arxiv. A MR number doesn't mean it is an eprint nor does a PMID --- this is where the biblatex manual confused me).


title: Putting sections and subsections in the page header

text: I am using `LaTeX` to display `landscape` `longtable`s. Due to the nature of the contents, I regularly have `section`s, `subsection`s, `subsubsection`s and I use `paragraph` to proxy `subsubsubsection`s (through `titlesec`). I also use `pdfpageattr` to rotate the page Given the layout of the page and the width of all the `longtable`s in my real- world example (width not reflected in toy example below), I cannot display the headings/subheadings on the same page. What will happen is that the headings/subheadings will show like normal but then there will be a blank page that follows, and the longtable will come on the following page. I want to fix this by placing the `section`/`subsection` in the header. In the example below I would like all 4 lines of `section`s/`subsection`s to be in the `header`. How do I do this? My preference is for the headers to be in the left hand margin of the rotated page (so when I'm viewing the page on the 90 degree tilt, I can read the heading as normal without bending my head). But the correct answer could simply include the sections in the normal header location.               \documentclass{article}          \usepackage{longtable}      \usepackage{lscape}  %Landscap pages     \usepackage{hyperref} %Clickable links     \hypersetup{          colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }          \usepackage{titlesec} %paragraph as subsubsubsection     \setcounter{secnumdepth}{4}     \titleformat{\paragraph}     {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}     \titlespacing*{\paragraph}     {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \setcounter{tocdepth}{5}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{} % clear all header fields     \renewcommand{\headrulewidth}{0pt} % no line in header area     \fancyfoot{} % clear all footer fields     \fancyfoot[LE,RO]{\thepage}           % page number in "outer" position of footer line     \fancyfoot[RE,LO]{\hyperlink{contents}{Click here go back}} % other info in "inner" position of footer line          \begin{document}          \tableofcontents     \newpage          \section{sec}     \subsection{subsec}     \subsubsection{subsubsec}     \paragraph{subsubsubsec}          \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}          \begin{landscape}     \begin{longtable}{r}\caption{test} \tabularnewline     \hline\hline     \multicolumn{1}{c}{}\tabularnewline     \hline     \endfirsthead\caption[]{\em (continued)} \tabularnewline     \hline     \multicolumn{1}{c}{}\tabularnewline     \hline     \endhead     \hline     \endfoot     \label{c}     $1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline$1$\tabularnewline     \hline     \end{longtable}     \end{landscape}               \end{document}


title: Long equations breaking without using breqn

text: How to achieve nice (non-automatic) long equations breaking, like `dmath` environment from `breqn` package does automatically, but using a more common environment, e.g., `multline`, `multlined` (from `mathtools`), or `split`? Compare `dmath` results with the rest. (Note that page size is dictated by the journal requirements.)               \documentclass[10pt,twocolumn]{article}     \usepackage[letterpaper,textwidth=18.5cm,textheight=22.9cm]{geometry}     \usepackage{mathtools}     \usepackage{breqn}          \DeclareMathOperator{\Real}{Re}     \let\oldhat\hat     \renewcommand{\vec}[1]{\mathbf{#1}}     \renewcommand{\hat}[1]{\oldhat{\mathbf{#1}}}     \newcommand{\del}{\boldsymbol{\nabla}}     \newcommand{\taub}{\boldsymbol{\tau}}          \begin{document}          \textbf{dmath:}     \begin{dmath}     \vec{U_{0}} = \left[ H^{-1} \hat{k} \times \del \left( fH^{-1} \right) \right]     \Real \left\{ \, \ointop_{fH^{-1}} \left( \rho^{-1} H^{-1} \taub \right) \cdot d \vec{l}      \div \ointop_{fH^{-1}} H^{-1} \left( H^{-1} R+ i \omega \right)      \left( \del \left( fH^{-1} \right) \cdot \vec{n} \right) \, d \vec{l} \right\}.     \end{dmath}          \textbf{multline:}     \begin{multline}     \vec{U_{0}} = \left[ H^{-1} \hat{k} \times \del \left( fH^{-1} \right) \right]      \Real \left\{ \, \ointop_{fH^{-1}} \left( \rho^{-1} H^{-1} \taub \right) \cdot d \vec{l} \right. \\     \div \left. \ointop_{fH^{-1}} H^{-1} \left( H^{-1} R+ i \omega \right)      \left( \del \left( fH^{-1} \right) \cdot \vec{n} \right) \, d \vec{l} \right\}.     \end{multline}          \textbf{multlined:}     \begin{equation}     \begin{multlined}     \vec{U_{0}} = \left[ H^{-1} \hat{k} \times \del \left( fH^{-1} \right) \right]      \Real \left\{ \, \ointop_{fH^{-1}} \left( \rho^{-1} H^{-1} \taub \right) \cdot d \vec{l} \right. \\     \div \left. \ointop_{fH^{-1}} H^{-1} \left( H^{-1} R+ i \omega \right)      \left( \del \left( fH^{-1} \right) \cdot \vec{n} \right) \, d \vec{l} \right\}.     \end{multlined}     \end{equation}          \textbf{split:}     \begin{equation}     \begin{split}     \vec{U_{0}} &= \left[ H^{-1} \hat{k} \times \del \left( fH^{-1} \right) \right]      \Real \left\{ \, \ointop_{fH^{-1}} \left( \rho^{-1} H^{-1} \taub \right) \cdot d \vec{l} \right. \\     &\phantom{=} \div \left. \ointop_{fH^{-1}} H^{-1} \left( H^{-1} R+ i \omega \right)      \left( \del \left( fH^{-1} \right) \cdot \vec{n} \right) \, d \vec{l} \right\}.     \end{split}     \end{equation}          \end{document}


title: Is there a method to fill the blanks between each Chinese characters? And how to force LaTeX to begin a new line when typsetting Chinese?

text: Here is my source code,I use CJK to typset Chinese,I am an absolute beginner,and I am working hard to study latex and CJK typseting skill.I want to fill the blank with the next line first charactors.I want to display the text even more small than the effect made by \small .Any advice will be appreciated.               \documentclass{beamer}     \usepackage{CJKutf8}     \usetheme{CambridgeUS}     \setbeamertemplate{navigation symbols}{}     \begin{document}     \begin{CJK}{UTF8}{gbsn}     \title{moumou专题}     \author{author}     \institute{moumou@gmail.com}     \date{2013-07-19}          \begin{frame}     \titlepage     \end{frame}               \begin{frame}     \frametitle{Hello Title!}     \end{frame}          \begin{frame}[t]     \small     在平面直角坐标系$xoy$中,点B与点$A(-1,1)$关于原点O对称,P是动点,且直线AP与BP的斜率之积等于$-\dfrac{1}{3}$.\\     (I)求动点P的轨迹方程;\\     (II)设直线AP和BP分别与直线x=3交于点M,N,问:是否存在点P使得$\bigtriangleup{PAB}$与$\bigtriangleup{PMN}$ 的面积相等?若存在,求出点P的坐标;若不存在,说明理由.     \end{frame}     \end{CJK}     \end{document}      A screeshot also attached.I want to modify the red-black colored field. ![the screenshot](http://i.stack.imgur.com/gWDoc.png)


title: biblatex ieee style weird paranthesis after an update

text: I want to get rid of the weird parenthesis around the number in the `\textcite` command. It did not used to be there. I think it all happened after an update. Also if you use hyerref the number and brackets are linked. MWE:               \documentclass{article}     \usepackage[english]{babel}     \usepackage[style=ieee]{biblatex}     \addbibresource{ref.bib}     \begin{filecontents}{ref.bib}     @Article{Yang09,         author = "Hukun Yang and Hongyuan Jiang and Antonio Ramos and Pablo Garc{\'i}a-S{\'a}nchez",         title = "AC electrokinetic pumping on symmetric electrode arrays",         journal = "Microfluidics and Nano{\-}fluidics",         publisher = "Springer Berlin / Heidelberg",         issn = "1613-4982",         keyword = "Physics and Astronomy",         pages = "767--772",         volume = "7",         issue = "6",         url = "http://dx.doi.org/10.1007/s10404-009-0434-5",         year = "2009"     }     \end{filecontents}          \begin{document}     This is referred in \cite{Yang09} or \textcite{Yang09}.     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/euZ2o.png) Based on @Herbert answer, the problem is partially solved however the hyperref problem still exists. Can only the number be in color? MWE:               \documentclass{article}     \usepackage[english]{babel}     \usepackage[style=ieee]{biblatex}     \usepackage[colorlinks=true]{hyperref}          \makeatletter     \newbibmacro*{cite}{%       \printtext[bibhyperref]{%         \printfield{prefixnumber}%         \printfield{labelnumber}%         \ifbool{bbx:subentry}           {\printfield{entrysetcount}}           {}}}     \renewbibmacro*{textcite}{%       \iffieldequals{namehash}{\cbx@lasthash}         {\multicitedelim}         {\cbx@tempa          \ifnameundef{labelname}            {\printfield[citetitle]{labeltitle}}            {\printnames{labelname}}%          \addspace\bibopenbracket}%       \ifnumequal{\value{citecount}}{1}         {\usebibmacro{prenote}}         {}%       \usebibmacro{cite}%       \savefield{namehash}{\cbx@lasthash}%       \gdef\cbx@tempa{\bibclosebracket\multicitedelim}}     \makeatother          \addbibresource{ref.bib}     \begin{filecontents}{ref.bib}     @Article{Yang09,         author = "Hukun Yang and Hongyuan Jiang and Antonio Ramos and Pablo Garc{\'i}a-S{\'a}nchez",         title = "AC electrokinetic pumping on symmetric electrode arrays",         journal = "Microfluidics and Nano{\-}fluidics",         publisher = "Springer Berlin / Heidelberg",         issn = "1613-4982",         keyword = "Physics and Astronomy",         pages = "767--772",         volume = "7",         issue = "6",         url = "http://dx.doi.org/10.1007/s10404-009-0434-5",         year = "2009"     }     \end{filecontents}          \begin{document}     This is referred in \cite{Yang09} or \textcite{Yang09}.     \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/XRf0s.png)


title: Aligning a listing environment within a paragraph

text: I have the following code that displays a listing in a paragraph. However, because there are not so many line of code, I would like to move it to the right and the paragraph be on the left hand side. I'm wondering how I can do this.               \begin{minipage}{0.5\linewidth}       \vspace{-0.2cm}       \begin{lstlisting}[basicstyle=\scriptsize,label= mylabel, caption = mycaption}          LOC1           LOC2          LOC3          LOC4        \end{lstlisting}       \vspace{-0.2cm}     \end{minipage}


title: How do I make a hanging indent for numbered paragraphs?

text: The code I have is:                   1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat \\      But as you can see in this output: ![ss\]\(http://i.imgur.com/g3p62o2.png\)!\[ss](http://i.imgur.com/g3p62o2.png) The part that says "mod" is not aligned with the first word, "Lorem." I would like all subsequent parts of the paragraph like the letter 'm' in "mod" to be directly under the letter 'L' in "Lorem" including any future numbered paragraphs (there will be some other stuff in between the paragraphs). How can I achieve this?


title: String manipulation in ConTeXt

text: The ConTeXt wiki has an article about string manipulation, however, when I copy the code directly into my `tex` file, it compiles this code as text and does not try to compile it. There must be some syntax to place before and after this code, but I cannot find any details about this in the documentation.               \starttext         str = "Luxury Yacht"              rep = {             [1] = { "Luxury", "Throatwobbler"   },             [2] = { "Yacht",  "Mangrove"        },         }              print("My name is spelled “" .. str .. "”, but it's pronounced “" .. lpeg.replacer(rep):match(str) .. "”.")          \stoptext        * How can I use this feature in my document?   * Can I place all of the text from my document inside `print()` to perform some changes to all of the text? E.g., to replace all occurrences of "apple" with "fruit" in the document? I am particularly interested in using the lpeg.replacer(table) feature.


title: Replace cmtt10 \char32 (visible cup space) with something more gentle?

text: I'm typesetting source code, and I want to replace cmtt10's `\char32` with something easier on the eyes. I came up with something that I like, but I'm not pleased with the implementation. Here's how it looks... Top is standard cup space; bottom is my replacement version: ![sample](http://i.stack.imgur.com/8FQFS.png) Is there a simpler or cleaner way to do what I did? (1) I'm having to include the `tipa` package for `\textbottomtiebar`. (2) It just so happens, for some reason that seems bizarre to me, that package `aeguill` modifies this bottom tie bar to make it wider, which happens to be just what I want. But that combination feels kludgey and fragile to me. As to the core of the implementation, it uses `\ooalign`, `\hss`, and `\hphantom` to center a tiny bottom tie within the standard width of a space character:               \documentclass{article}          \usepackage{tipa} % For \textbottomtiebar     \usepackage[lm]{aeguill} % For some reason, widens the bottom tie          \newcommand{\visp}{%  Acronym for "VIsible SPace"       \ooalign{%         \relax\cr%         \hss{\tiny\textbottomtiebar{\ }}\hss\cr%         \hphantom{~}\cr%       }%     }          \begin{document}          \texttt{Hello,{\char32}world!{\char32}{\char32}I{\char32}am{\char32}a{\char32}string.} ~~~ $\backslash$char32     \vskip 1em     \texttt{Hello,{\visp}world!{\visp}{\visp}I{\visp}am{\visp}a{\visp}string.} ~~~ $\backslash$visp          \end{document}      For me, this is a big improvement over `\char32`, and I'd be perfectly happy replacing `\char32` with this, but I doubt it's possible due to the way TeX's innards work. So I gave it the name `\visp` in my style preamble.


title: Assign a document as main document

text: In Texmaker is it possible to assign a tex document as main document such that its structure is always opened in the structure windows? currently when I click on a tex document in the windows, it opened the tex document, at the same time the structure windows display the structure of the newly opened tex document rather than the original one.


title: Best package for drawing dance charts

text: I want to draw dance step chart. Something similar to ![this](http://community.ca.com/blogs/itil/dance_steps.jpg) I was wondering if maybe dedicated package exists or is my only option to use "normal" drawing tools. Maybe something like `Tikz`? Does anyone have any experience with something like this?. What would you recommend?


title: Can I write Quenya using LaTeX?

text: Most of you must be aware of J. R. R.Tolkien, the author of "The Lord of the Rings". The author invented a language for one of the races(=Elves) in the LOTR universe, namely Quenya. Of course this is a language on its own, but I was wondering if there is a way the output (the pdf file generated after compilation) of an English written essay, to be in Quenya characters. Of course I do not mean a translation, just the change of characters.


title: A question about Texmaker settings

text: When having a number of files opened in Texmaker, at the top of editor pane, there is a drop down panel with the names of open documents in it. I prefer to have tabs of open documents at the top of editor pane, similar to Texstudio and Winedt. Is there a way that I can change this setting?


title: Bad line overlap in PSTricks figure

text: Consider the following code (which is almost the same as this):               \documentclass{article}          \usepackage{pst-grad,pstricks-add}     \usepackage{animate}     \usepackage[locale=DE]{siunitx}          \def\radius{21.65}     \def\vinkelA{12 }     \pstFPdiv\faktor{1}{3}     \pstFPmul\faktorB{\radius}{\faktor}     \pstFPadd\faktorC{\faktorB}{0.05}     \pstFPadd\faktorD{\faktorB}{2.95}     \makeatletter       \pst@getsinandcos{\vinkelA}       \pstFPmul\RelRadius\faktor{\radius}       \pstFPmul\PSTRadius{1.02}\RelRadius       \pstFPmul\MaxLW\RelRadius\pst@sin       \pstFPmul\MaxLW{2}{\MaxLW}       \def\PolyLine{%         \psarc(C){\RelRadius}{!90 \vinkelA add}{180}         \psline(B)(A)(D)         \psarc(C){\RelRadius}{0}{!90 \vinkelA sub}       }          \def\light#1{% Sun beams.     \psset{       unit=0.7     }      \begin{pspicture}(-\faktorC,-\faktorC)(\faktorC,\faktorD)        \pst@getsinandcos{#1}          \ifnum #1 = 90 \let\RelLW\MaxLW        \else          \ifnum #1 > 90 \pstFPmul\RelLW{\MaxLW}{\pst@cos}          \else          \pstFPmul\RelLW{\MaxLW}{\pst@sin}          \fi        \fi        \pnode(-\RelRadius,-\RelRadius){A}        \pnode(-\RelRadius,0){B}        \pnode(0,0){C}        \pnode(\RelRadius,-\RelRadius){D}        \pnode(!0 \RelRadius\space \vinkelA cos mul){T1}        % Filling        \pscustom[          linewidth=2pt,          linecolor=red,          fillstyle=gradient,          gradbegin=blue!5,          gradmidpoint=1,          gradend=blue!35        ]{\PolyLine}        \begin{psclip}{% Clipping.          \pscustom[            linestyle=none,            dimen=inner          ]{%          \PolyLine          \psline(\RelRadius,\RelRadius)(!\RelRadius\space dup 3 add)%                 (!\RelRadius\space dup neg exch 3 add)(-\RelRadius,\RelRadius)          }        }        \rput(!0 \RelRadius\space \vinkelA cos mul){%          \pcline[            linecolor=yellow,            linewidth=\RelLW,            nodesep=-\radius          ](0,0)(!#1 dup 90 ne {-1 exch neg Tan neg} {0 -1} ifelse)}        \end{psclip}        \pscustom[          linewidth=2pt,          linecolor=red        ]{\PolyLine}% Better clipping.        \psline[          linestyle=dotted        ]({-\RelRadius,0}|T1)({\RelRadius,0}|T1)        \rput(!\RelRadius\space 90 \vinkelA sub PtoC){%          \pswedge(0,0){1}{!180 #1 sub}{180}          \uput{1}[!180 #1 2 div sub](0,0){\footnotesize \SI{#1}{\degree}}          \psline[            linestyle=dotted          ](0,0)(!3 180 #1 sub PtoC)        }      \end{pspicture}     }          \begin{document}          \begin{animateinline}[poster=first,controls,palindrome]{2}       \multiframe{121}{iA=30+1}{\light{\iA}}     \end{animateinline}          \end{document}      ![output](http://i.stack.imgur.com/8p5is.jpg) I don't like the way red curve 'hits' the yellow area; how do I improve this? (I'm not exactly sure what I want but I'll tell if the answer(s) given is/are what I'm looking for.) P.S. Feel free to add more tags.


title: Width of labels in the bibliography

text: I'm using scientific workplace 5.5 and if write `\begin{thebibliography}{LongestLabel}` the bibliography still seems to use 99 instead of `LongestLabel`. Is there a way of getting aroung this issue?


title: How to suppress footer on individual page?

text: I've got a report document that consists of daily and weekly reports. Each week gets its corresponding shorthanded five days report on one page and a more detailed full week report on the second page. So it's two pages for each week. Each list of five days and each full week report gets a signature line in its footer. So if there are only one paged week reports there will be a signature line on every page but the title page (title page without headers and footers actually works like a charm). Each week is started by a \newpage command and there is a \newpage between the daily and the full week report. So it looks somehow like this:               [titlepage]     [        - day 1 | lorem ipsum       - day 2 | lorem ipsum       - day 3 | lorem ipsum       - day 4 | lorem ipsum       - day 5 | lorem ipsum                 _______________       signature             #pageno       \newpage     ]     [       full week lorem ipsum                 _______________       signature             #pageno       \newpage     ]      Now, on a week report that does not fit on a single page I'd like to have the signature line only on the last page of the detailed week report. That is, I'd like to suppress the signature line on every page that does not end with \newpage, i.e. that is automatically wrapped because of its content being to long. Any advice would be greatly appreciated.


title: Main section heading in footer

text: I would like to have a footer on every page containing the _main_ section (always the name of the current `\section`, not `\subsection`) and the current page, e.g.               My section heading | 42      Bonus level: Pages with a `\section` should only contain the page, not the heading or | This is what I've got so far. Not really what I want but at least a starting point.               \documentclass{scrartcl}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{fancyhdr}          \fancyhf{}     \renewcommand{\sectionmark}[1]{\markright{#1{\bfseries~|~}}}     \renewcommand{\subsectionmark}[1]{\markright{#1{\bfseries~|~}}}     \renewcommand{\subsubsectionmark}[1]{\markright{#1{\bfseries~|~}}}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \fancyfoot[R]{\sffamily{\small\rightmark}{\bfseries\thepage}}          \pagestyle{fancy}          \begin{document}     \Blinddocument     \end{document}


title: Remove page number from just one (float) page?

text: Basically I have some text:               \section{Section 1}          TEXT TEXT TEXT      Then I have an image:               \begin{figure}     \centering     \includegraphics[scale=0.6]{images/rlexample.png}     \caption{---}     \label{rlexample}     \end{figure}      This image takes a whole page so it's printed on a new page.   I would like to don't have page number on this page (where there is the image) I have tried this after `\end{figure}`:               \thispagestyle{empty}      But the page with text got no page number too. How can I have page number on the page with text but not on the page with the image?


title: TeX Live and MiKTeX: underlying basic difference

text: The two standard distributions for (La)TeX, MiKTeX and TeX Live. Just to know the difference between them I searched this site and came across a variety of differences, some of them being   * MiKTeX is Windows based whereas TeX Live is developed for many platforms   * TeX Live is more secure than MiKTeX   * MiKTeX doesn't freeze and updates are always available Now, What I would like to know is in the underlying development of TeX, is there a difference between how TeX Live implements it and MiKTeX implements it. In depth what I would to know is that ,   1. Is there any difference in the algorithmic approach of implementation in TeX Live and MiKTeX   2. Which of the above is efficient in terms of execution and optimization


title: Error with TikZ's Fitting Library when using coordinates

text: I try to use the TikZ's Fitting Library with coordinates but it didn't compile. In the manual of TikZ we got > This option must be given to a node path command. The coordinates or nodes > should be a sequence of Tik Z coordinates or node names, one directly after > the other without commas (like with the plot coordinates path operation). > Examples as (1,0) (2,2) or (a) (1,0) (b), where a and b are nodes. So I try               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{fit}     \begin{document}     \begin{tikzpicture}         \node (foo) at (0,0) {foo};         \node (bar) at (2,0) {bar};         \node[draw, fit=(0,0) (2,0)] {};     \end{tikzpicture}     \end{document}      and got the following error:               ! Undefined control sequence.     \pgfmathsetlength ...\pgfmath@onquick #2\pgfmath@                                                    {\begingroup \pgfmath@sele...     l.9         \node[draw, fit=(0,0) (2,0)]                                          {};      If I use node labels instead of coordinates, as below, I got no error.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{fit}     \begin{document}     \begin{tikzpicture}         \node (foo) at (0,0) {foo};         \node (bar) at (2,0) {bar};         \node[draw, fit=(foo) (bar)] {};     \end{tikzpicture}     \end{document}      I'm using               $ pdflatex --version     pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012)     kpathsea version 6.1.0     ...      with               $ tlmgr info pgf      package:     pgf     ...     installed:   Yes     revision:    22614     cat-version: 2.10     cat-date:    2010-10-27 12:56:09 +0200     cat-license: lppl1.3     collection:  collection-pictures     ...


title: Pgfplots: link different single-points graphs

text: I created the following image: ![Image](http://i.stack.imgur.com/yuO5M.png) whit the following code:               \documentclass{standalone}          \usepackage{pgfplots}         \pgfplotsset{%             compat=newest,%             /pgf/number format/use comma,%             /pgf/number format/1000 sep={\,},%             /pgf/number format/min exponent for 1000 sep=4}          \begin{document}          \begin{tikzpicture}         \begin{axis}[title={}, xlabel={}, ylabel={}, zlabel={},%         legend cell align=left]                  \addplot[red, only marks]                 coordinates {(23.0175,1.64554e-15)};             \addplot[brown, only marks]                 coordinates {(19.544,12.1362)};             \addplot[orange, only marks]                 coordinates {(17.3908, 15.9429)};             \addplot[green, only marks]                 coordinates {(16.3344, 18.2596)};             \addplot[lime, only marks]                 coordinates {(18.0024, 17.6308)};             \addplot[olive, only marks]                 coordinates {(19.9158, 10.8752)};             \addplot[blue, only marks]                 coordinates {(19.798, 7.44025)};             \addplot[cyan, only marks]                 coordinates {(19.4223, 4.57679)};             \addplot[teal, only marks]                 coordinates {( 18.9801, 4.98689e-16)};                  \legend{$\gamma = -\frac{\pi}{2}$, $\gamma = -\frac{\pi}{3}$, $\gamma = -\frac{\pi}{4}$, $\gamma = -\frac{\pi}{6}$, $\gamma = 0$, $\gamma = +\frac{\pi}{6}$, $\gamma = +\frac{\pi}{4}$, $\gamma = +\frac{\pi}{3}$, $\gamma = +\frac{\pi}{2}$}         \end{axis}         \end{tikzpicture}          \end{document}      I want to link all points with a dotted line to show the trend. Is it possible also they represents different graph on only one coordinate? Ps: In addition, it seems that the right axe is cropped...


title: Create a table for an athletic knockout event

text: I have used LaTeX for fairly large documents in the past but not for diagrams. I would like to create a table describing a knockout athletic event, for instance like the one found here in HTML. How would I go about creating such a thing in LaTeX? Perhaps there is already a package for this and I couldn't find it. But if not, which packages would you advise me to study and combine?


title: How to modify entries of the table using long table package

text: I have a very long table (about 6 pages) so I'm trying to use longtable package. However, is there any way how to modify entries of the table without actually starting a new table. Now I have data for two countries (which is about 3 pages) and after that, I want to change names of the countries and continue the table as it is. I manage to insert the data twi, however, I fail to change the entries inside the table. I hope its clear what I want. I would really appreciate any help, its taking me hours already and I still can't figure the right way to do it. I try to insert my code, maybe it is more clear. Lina               \documentclass [a4paper,12pt]{report}      \usepackage{multirow}     \usepackage{lscape}     \usepackage{array}     \usepackage{graphicx}     \usepackage{apacite}             \usepackage{booktabs}     \usepackage{longtable}     \usepackage{caption} \captionsetup[table]{skip=10pt}     \renewcommand{\labelenumii}{\theenumii}     \renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}     \renewcommand*{\arraystretch}{0.8}     \begin{document}     \begin{landscape}     \begin{center}     \begin{longtable}{|l|ccc|ccc|ccc|ccc|ccc|ccc|ccc|ccc|}     \caption{Multinomial Logit Model}  \\     \hline     \multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\      \cline{2-25}       & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25}       & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ \hline     \endfirsthead               \caption{(Continued)} \\          \hline     \multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\      \cline{2-25}       & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25}       & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\           \hline     \endhead     \hline \multicolumn{25}{|r|}{{Continued on next page}} \\ \hline     \endfoot          \hline     \endlastfoot               \textit{Coexceedances = 1} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\     Constant &  & -1.86*** &  &  &  &  &  & -1.90*** &  &  &  &  &  & -2.61*** &  &  &  &  &  & -2.72*** &  &  &  &  \\     Coex. Lagged &  & 0.27*** &  &  &  &  &  & 0.25*** &  &  &  &  &  & 0.43*** &  &  &  &  &  & 0.41*** &  &  &  &  \\     Systemic Risk &  & 0.28*** &  &  &  &  &  & 0.20* &  &  &  &  &  & 0.30*** &  &  &  &  &  & 0.20* &  &  &  &  \\     Yield Curve &  & -0.34 &  &  &  &  &  & -0.35 &  &  &  &  &  & -0.80 &  &  &  &  &  & -0.78 &  &  &  &  \\     Volatility Own &  & 0.26 &  &  &  &  &  & 0.05 &  &  &  &  &  & 1.13*** &  &  &  &  &  & 0.96*** &  &  &  &  \\     Volatility US &  & 0.85 &  &  &  &  &  & 0.88 &  &  &  &  &  & 0.65 &  &  &  &  &  & 0.62 &  &  &  &  \\     Contagion DK &  & - &  &  & - &  &  & - &  &  &  &  &  & - &  &  & - &  &  & 0.21* &  &  &  &  \\     Contagion SE &  & - &  &  & - &  &  & 0.23** &  &  &  &  &  & - &  &  & - &  &  &  &  &  &  &  \\     Contagion NO &  & - &  &  & - &  &  & 0.22 &  &  &  &  &  & - &  &  & - &  &  & 0.44*** &  &  &  &  \\     Contagion FI &  & - &  &  & - &  &  & 0.04 &  &  &  &  &  & - &  &  & - &  &  & 0.40** &  &  &  &  \\          \end{longtable}     \end{center}     \end{landscape}          \end{document}


title: Remove off-page vertices in PDF

text: I have asked a similar question before, but this time my goal is different: I have a PDF containing blueprints on a single page. There object it depicts is drawn a couple of times: from the side, top, front and back, and a couple of cross-sections. Altogether, this PDF is fairly complex, as it contains millions of vertices. But I don't need all that information. I just need the side-view as a vector graphic, and all the rest should be discarded. **How can I crop a PDF and remove those vertices that are outside the page's boundaries?** Using Adobe Acrobat X of `pdfcrop` I can change the page's dimensions but all the unwanted (off-page) drawings remain in the file. Those need to be removed. Using Acrobat's "remove hidden information" function is not an option, since that will rasterize the entire document. I have tried loading the image using Inkscape and Scribus, but the PDF is too detailed and makes those tools crash. I do not have access to any expensive adobe tools. The reason I want to remove that information is because 80% of the PDF's contents are unused and slow down my computer to the point where I can hardly use it with the document opened. I realize this might be off-topic on this site, but this is where the PDF experts hang out, and I'm hoping that somewhere in the (La)TeX technology stack, there is a tool that can do this.


title: How do I have to invoke \expandafter for a macro with multiple arguments?

text: \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-node}     \begin{document}     \begin{pspicture}[showgrid](-5,-5)(5,5)         \pnodes{A}(-2,3)(3,4)(2,-1)(-2,-4)(-4,0)         \def\points{(0,0)}         \foreach \x in {0,1,...,4}{%                 \pscircle*[linecolor=blue](A\x){3pt}%                 \xdef\points{\points+.2(A\x)}%         }         %The first line below causes errors.         %\expandafter\nodexn{\points}{B}         %\pscircle*[linecolor=red](B){3pt}     \end{pspicture}     \end{document}      How do I have to invoke `\expandafter` for a macro with multiple arguments?


title: nomencl formatting issue. How to have the description right aligned?

text: I'm using Nomencl package and is working fine. What I do not know how to do is to have the description part starting from the right margin of the page and the symbol part starting from the left margin. This is what I've got so far:               \documentclass[twoside]{ecsthesis}      % Use the Thesis Style     \graphicspath{{../Figures/}}   % Location of your graphics files     \usepackage[sort &compress]{natbib}  % Use Natbib style for the refs.\part{title}     \usepackage[noprefix]{nomencl}     \usepackage{chemmacros}     \usepackage{mhchem}     \usepackage{wasysym}     \usepackage{hyperref}     \usepackage{cleveref}           \usepackage{upgreek}      \usepackage{epigraph}      \usepackage{tipa}      \usepackage{array}             \setlength\epigraphwidth{8cm}           \setlength\epigraphrule{0pt}          \renewcommand{\nomname}{List of Symbols}         \setlength{\nomlabelwidth}{1\hsize}        \renewcommand{\nomlabel}[1]{#1 \dotfill}      \setlength{\nomitemsep}{-\parsep}         \makenomenclature      \begin{document}           Hello world      \tableofcontents     \printnomenclature     \chapter{Hello}     Hello     \chapter{World}      World         \nomenclature{OECD}{Organisation for Economic Co-operation and Development}     \nomenclature{EIA}{Energy Information Administration}     \nomenclature{GHGs}{Green House Gases}     \nomenclature{BRE}{Building Research Establishment}     \nomenclature{HVAC}{Heating Ventilation Air Conditioning}     \nomenclature[Q]{$ \dot{Q} $}{Heat Transfer Rate}     \nomenclature[k]{$ k $}{Thermal Conductivity }     \nomenclature[A]{$ A $}{Area of Heat Exchange}                 \end{document}      I would like to have something more similar to the TOC(with dot in the middle). Thanks, M.


title: tikzpicture: "rounded corners" and "west arc=none"

text: here's my MWE:               \documentclass[a5paper]{book}      \usepackage{tikz}     \usetikzlibrary{positioning,shapes.misc,calc}          \begin{document}                \begin{tikzpicture}[overlay,remember picture]           \node[                     fill=gray,                     inner sep=0pt,                     rounded rectangle,                     rounded rectangle west arc=none,                     rounded corners=15pt,                     text width=20mm,             text height=20mm,                     align=center,                     anchor=north east] at                         ($ (current page.north east) + (-14mm,-20mm) $){};           \end{tikzpicture}          \end{document}          \end{document}      I'd like to make this shape look like the one at the bottom. How can I manage this? ![enter image description here](http://i.stack.imgur.com/0coGF.png)


title: 'Unknown option' for my own package

text: I create a package: one common file that includes others. In common package file (`russian_post.sty`) I define options:               \DeclareOption{times}{\@seriffalse}     \DeclareOption{landscape}{\@lscapetrue}     \DeclareOption{portrait}{\@lscapefalse}     \DeclareOption{smalltab}{\PassOptionsToPackage{smalltab}{form_110}}     \DeclareOption{tinytab}{\PassOptionsToPackage{tinytab}{form_110}}     \DeclareOption*{\PackageWarning{russian_post}{Unknown option `\CurrentOption'}}     \ProcessOptions\relax      after that I include packages, the interesting is               \RequirePackage{form_110}      In file `form_110.sty` I define them again:               \DeclareOption{smalltab}{\@smallt@btrue}     \DeclareOption{tinytab}{\@tinyt@btrue}     \ProcessOptions\relax      And in my `file.tex` I try to use my package with this options:               \usepackage[times,tinytab]{russian_post}      This cause latex errors:               ! LaTeX Error: Unknown option `times' for package `russian_post'.     ! LaTeX Error: Unknown option `tinytab' for package `russian_post'.      in spite of that I've already defined default action for unknown options (just show warning). The weird things come later: after ignoring these errors I get a right pdf- file. If I move all `\RequirePackage` **before** options declaration block, latex works without errors but options don't pass to package. I know, that I can use global variables from `russian_post.sty` in other packages, but what if I would like to use that package alone? How can this be so? And how can I omit such errors? **UPD:*** Thanks to @Werner. I add minimal example:               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{russian_post.sty}     \DeclareOption{smalltab}{\PassOptionsToPackage{smalltab}{form_110}}     \DeclareOption{tinytab}{\PassOptionsToPackage{tinytab}{form_110}}     \DeclareOption*{\PackageWarning{russian_post}{Unknown option `\CurrentOption'}}     \ProcessOptions\relax          \RequirePackage{form_110}     \end{filecontents*}          \begin{filecontents*}{form_110.sty}     \newif\if@smallt@b\newif\if@tinyt@b     \@smallt@bfalse\@tinyt@bfalse     \DeclareOption{smalltab}{\@smallt@btrue}     \DeclareOption{tinytab}{\@tinyt@btrue}     \ProcessOptions\relax          \RequirePackage{russian_post}          \def\testsmall{\if@smallt@b TRUE\else FALSE\fi}     \def\testtiny{\if@tinyt@b TRUE\else FALSE\fi}     \end{filecontents*}          \usepackage[smalltab]{russian_post}          \begin{document}     small: \testsmall          tiny: \testtiny     \end{document}      It seems that the problem is in multiple inclusion of `russian_post.sty`. But latex should prevent such things when you're using `\RequirePackage` or `\usepackage`. I don't understand anything!!! **UPD2:** it's more and more weird! If I move this options to `\documentclass`, all works fine! What is it?


title: Skipping or changing one grid line

text: I'm trying to plot normalized data in a bar chart. To better show that the data is normalized, I want the horizontal grid line at `1` to look differently, eg. dashed instead of dotted. I guess this can be done by **(1)** changing the style of a single grid line (which I have no idea how to do) or by **(2)** manually adding the line at `1` (which I managed to do) and skipping the grid line so that the lines are not drawn over each other (which I, again, do not know how to do). This is my MWE for the second case:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \usetikzlibrary{backgrounds}          \pgfplotsset{compat=1.8}          \begin{document}          \begin{tikzpicture}          \pgfplotstableread{     Model       runtime normalized     (1)     0.17    0.11     (2)     1.60    1.00     (3)     3.17    1.98     (4)     1.72    1.08     (5)     4.01    2.51     }\data          \begin{axis}[         ybar,         ymin=0,         xtick=data,         xticklabels from table={\data}{Model},         grid style={dotted,gray},         ymajorgrids=true,         nodes near coords,     ]          \addplot [draw=black,fill=gray!15] table [y=normalized,x expr=\coordindex] {\data};     \begin{scope}[on background layer]     \draw [dashed] ({rel axis cs:0,0}|-{axis cs:0,1}) -- ({rel axis cs:1,0}|-{axis cs:0,1});     \end{scope}          \end{axis}     \end{tikzpicture}          \end{document}      This results in the following: ![enter image description here](http://i.stack.imgur.com/Am4KU.png) Here, the grid line for the value `1` is still drawn, and its dots appear between the dashes of my manually added line, which looks ugly to me.


title: Configuring Org-mode to open PDFs with evince

text: sorry for asking this kind of question here... but didn't know who else could help me with this. I'm starting to use `org-mode` to export text to LaTeX. My problem is that it opens the generated PDF with `ebook-viewer` (it is a EPUB, CHM reader) instead of using evince. _Question_ Does anyone know how to change this behaviour and configure `evince`to be the default viewer?


title: Creating crow's foot style E-R diagrams, rather than Chen-style ones

text: I need to draw some Entity-Relationship diagrams for my computing coursework, which so far I have written in LaTeX. I _could_ draw them manually using `tikz`, but that sounds somewhat unpleasant, so I found the `er` library that `tikz` has. This works really well, and I'd like to use it, but it produces Chen-style diagrams by default. ![enter image description here](http://i.stack.imgur.com/sLFoq.png) Does anyone know if/how I can produce crow's feet style diagrams with it? ![enter image description here](http://i.stack.imgur.com/lxIYc.gif)


title: How can I recreate this layout in LaTeX, preferably using TikZ?

text: I was trying to make it on my own, but my skills aren't enough to solve it. ![enter image description here](http://i.stack.imgur.com/sgEQM.png)


title: References alignment problem in IEEtrans

text: I just wanted to ask if anyone has an idea on how to fix an alignment problem I am getting when using the IEEE template. In my references, the first 10 entries are aligned and rest are misaligned. I can't seem to find a solution for this. For example: [1] entry 1 [2] entry 2 [3] entry 3 ## [4] entry 4 ## - ## [10] (extraspace) entry 10 ## -


title: Bibtex .bst file modification to include alphabetical ordering

text: Is it possible to modify the JHEP bibliography style in a simple way such that it displays bibliographical entries in alphabetical order, instead of basing on first appearence in the main text? (Addendum) Is it possible to add in the same way a function that prints a long horizontal line ----- instead of the name of the author(s) if these are repeated, as is done e.g. by the amsplain.bst style?


title: Installation of TexStudio and MikTex in Ubuntu 12.04 LTE

text: I was using `Microsoft Windows 7` and I had installation of `TeXStudio`and `Latex` flavour `MikTex`. Both were installed according to the instruction in this Ĺink. I developed a document there and now I am on `Ubuntu 12.04LTE`and I installed `TeXStudio` with but could not find `MikTex`for `Ubuntu`. So I installed `TexLive`. when I try to compile my previous developed document, it gives error. It is missing many `.sty`files. I tried to add manually sty files but actually it seems hactic add all the files. I have very long document and it was working fine in windows.


title: Working with leaflets

text: i am making a menu, and i've stumble on a formatting issue. The way it works now is that > "Name (empty space) price" I would like it to be > "Name.......Price" still taking up the same width as now. Anyone have a solution?               \documentclass[a4paper]{leaflet}     \usepackage[top=1.5in, bottom=1.5in, left=1.4in, right=1.4in]{geometry}          \usepackage{fancybox}     \usepackage{tabu}     \usepackage{booktabs}% for better rules in the table          \begin{document}     \ovalbox{     \begin{tabu} to \textwidth {Xr}     Pasta Bolognaise & 69,- \\     Paste Carbonara & 69,-     \end{tabu}     }     \end{document}


title: setting the automatically enumerated text in the middle of the row

text: I've enumerated my text in rows but it's not in the middle of the row and I don't know how to achieve that. ![example](http://i.stack.imgur.com/O5IUL.jpg) My MWE:               \documentclass{article}     \usepackage{array,tabularx,multirow,geometry}     \geometry{paper=a4paper,left=30mm,right=25mm,top=30mm}     \newcounter{rowcount}     \setcounter{rowcount}{0}     \let\oldtabularx\tabularx     \renewcommand{\tabularx}{\setcounter{rowcount}{-1}\oldtabularx}     \begin{document}          \begin{tabularx}{\textwidth}{|@{\space\stepcounter{rowcount}\ifnum\value{rowcount}=0\else\therowcount.\thinspace\fi}X|X|}     \hline     \textbf{Typologie} & \textbf{Subgruppe} \\     \hline     \hline      Lorem ipsum dolor sit amet & consectetuer adipiscing elit. Etiam lobortis facilisis sem.       \\     \hline     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. & Etiam lobortis facilisis sem. \\     \hline          \end{tabularx}          \end{document}      I've tried it with `\multirows` and `\renewcommand\tabularxcolumn[1]{m{#1}}` but that just created other problems of layout.


title: How can I improve this table (using tabularx)?

text: I'm trying to make a table look pretty; more specifically, I want the 1st and 3rd columns to be 6-6.5 cm wide, and I want the second column to be only 1-1.5 cm wide. I also want minimal white space in the top and bottom cells. Could you help me? What's the easiest way to do that? I'm a total `tabularx` newbie... ![enter image description here](http://i.stack.imgur.com/WaGex.jpg) Here is what I put together with `tabular`... (less complicated tham with `tabularx`)               \documentclass[12pt,a4paper]{article}     \usepackage{mwe}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{setspace}     \begin{document}          \resizebox{14cm}{!}{       \setstretch{1}     \noindent     \begin{tabular}{|p{6cm}|p{3cm}|p{7cm}|}\hline           % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...           Vecindario & Evaluaciones de $f$ & Perspectiva General \\           \hline           Añadiendo al anterior, el intercambio de tareas de la primera y última posición (6 vecinos)& 6 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Generando una permutación aleatoria en cada iteración e intercambiando las tareas en las posiciones que ocupan 1-2,3-4,5-6 (3 vecinos)  & 3 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Generando una permutación aleatoria en cada iteración e intercambiando las tareas en las posiciones que ocupan 1-2,2-3,3-4,4-5,5-6,6-1 (6 vecinos)& 6 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Intercambiando la tarea de la 1ª posición con todas las demás; la de la 2ª con todas las siguientes; la de la 3ª con todas las siguientes posiciones;....;y la de la penúltima posición con la tarea de la última posición& 15 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline     \end{tabular}\\     }     \setstretch{1.5}          {\small ''Iteraciones máximas''=20}     \end{document}       And this is what I did using `tabularx`:               \documentclass[12pt,a4paper]{article}     \usepackage{mwe}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{setspace}     \begin{document}          \setstretch{1}     \noindent     \begin{tabularx}{\textwidth}{>{\hsize=\hsize}X>{\hsize=0.25\hsize}X>{\hsize=\hsize}X}           \hline           % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...           Vecindario & Evaluaciones de $f$ & Perspectiva General \\           \hline           Añadiendo al anterior, el intercambio de tareas de la primera y última posición (6 vecinos)& 6 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Generando una permutación aleatoria en cada iteración e intercambiando las tareas en las posiciones que ocupan 1-2,3-4,5-6 (3 vecinos)  & 3 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Generando una permutación aleatoria en cada iteración e intercambiando las tareas en las posiciones que ocupan 1-2,2-3,3-4,4-5,5-6,6-1 (6 vecinos)& 6 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline           Intercambiando la tarea de la 1ª posición con todas las demás; la de la 2ª con todas las siguientes; la de la 3ª con todas las siguientes posiciones;....;y la de la penúltima posición con la tarea de la última posición& 15 & \includegraphics[width=70mm]{opvec2.eps} \\           \hline          \end{tabularx}\\     \setstretch{1.5}          {\small ''Iteraciones máximas''=20}     \end{document}


title: Cannot deactivate protrusion locally

text: I do some comparision of typesetting tools and encountered the following issue in XeLaTeX (TeXLive 2013 version). I use two same text boxes but with different protrusion settings (transparent text, one placed above the other). While the second box behaves as expected, the first one, using the same commands, doesn't - the protrusion seems to be applied even it is disabled... Is there any fault from my side? I am rather newbie in XeLaTeX...               \documentclass[11pt]{article}     \usepackage{fontspec,microtype,pgf,lipsum}     \usepackage[absolute,overlay,showboxes]{textpos}     \setlength{\TPHorizModule}{1mm}     \setlength{\TPVertModule}{1mm}     \setlength{\parindent}{0pt}          \setromanfont {Palatino Linotype}          \newcommand{\tufte}{We thrive in information thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats.}          \begin{document}          {\pgfsetfillopacity{0.6}     \begin{textblock}{133}(10,10)     \microtypesetup{protrusion=false}     {\color{red}\tufte}     \microtypesetup{protrusion=true}     \end{textblock}          \begin{textblock}{133}(10,10)     \tufte     \end{textblock}          \begin{textblock}{133}(10,80)     \microtypesetup{protrusion=false}     {\color{red}\lipsum[1]}     \microtypesetup{protrusion=true}     \end{textblock}          \begin{textblock}{133}(10,80)     \lipsum[1]     \end{textblock}     }          \end{document}


title: Conditional Linebreak for back references

text: In my bibliography I use back references. Now, I would like them to appear flush right in the last line of my reference. This can be done easily with an `\hfill`. However, if the back reference becomes to long, it spills into the next line. I prevent this by putting an `\mbox`around the back references. But now, when the whole back reference is put into a new line it is either no longer flush right, or the content of the previous line is streched to fill the whole line. What I would like to obtain is a flush right back reference, either in the last line of the normal reference if there is enough space, otherwise in the following line. In the latter case, I would like there to be an actual line break, so that the last line of the reference is not needlessly stretched. Any ideas how I can achieve this? EDIT: Here is a small example to show what I try to prevent:               \documentclass{article}     \usepackage{backref}          \renewcommand*{\backrefalt}[4]{%       \hspace*{\fill}%       \mbox{[some slightly longer text]}%       \begingroup % keep changes to \parfillskip local         \parfillskip=0pt %         \par       \endgroup     }          \begin{document}     \cite{foo}     \begin{thebibliography}{9}     \bibitem{foo} short bibliography entry to fill almost one entire line          \end{thebibliography}     \end{document}      Wen you compile the file, you can see that the actual bibliography line is stretched over the whole page. In this case (the backreference being in a new line), I would like the bibliography entry to not stretch to final line, as in the following example. Though, this example has the problem, that it always uses a new line for the back reference.               \documentclass{article}     \usepackage{backref}          \renewcommand*{\backrefalt}[4]{%       \\\hspace*{\fill}\mbox{[some slightly longer text]}%     }          \begin{document}     \cite{foo}     \begin{thebibliography}{9}     \bibitem{foo} short bibliography entry to fill almost one entire line          \end{thebibliography}     \end{document}      EDIT 2: Further example showing a small bug in the solution kindly provided by Heiko Oberdiek. In the first reference there is a line break before the back reference whereas in the second reference of the same length there is none, which is desired output:               \documentclass{article}     \usepackage{backref}     \usepackage{lipsum}          \renewcommand*{\backrefalt}[4]{%       \hspace{0.1em plus 1fill}\penalty0 %       \hspace*{\fill}%       [no cite]%       \begingroup         \parfillskip=0pt %         \par       \endgroup     }          \begin{document}     \cite{bt-ilo-97,ccj-udg-90}     \begin{thebibliography}{9}     \bibitem[BT97]{bt-ilo-97}     Dimitris Bertsimas and John~N. Tsitsiklis.     \newblock {\em {Introduction to Linear Optimization}}.     \newblock Athena Scientific, first edition, 1997.          \bibitem[CCJ90]{ccj-udg-90}     Brent~N. Clark, Charles~J. Colbourn, and David~S. Johnson.     \newblock {Unit disk graphs}.     \newblock {\em Discrete Mathematics}, 86(1--3):165--177.          \end{thebibliography}     \end{document}


title: Remove vertical space around align

text: I need to display math in my report, but is it possible to remove the vertical space around align*? A little example is the following (where I just want the `align*` to have the same vertical space as a `\\\`               \documentclass[10pt,danish,a4paper,oneside,fleqn]{report}          \usepackage[english]{babel}     \usepackage{amsmath}          \begin{document}          ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss     \begin{align*}       A{\cap}B\ & =\ {\left\{{b,d,e}\right\}}{\;}{\cap}{\;}{\left\{{a,b,f,g}\right\}}   \\       \nonumber\ & =\ {\left\{{b}\right\}}     \end{align*}     ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \\     ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss          \end{document}


title: How to use a math environment without the vertical extra space?

text: > **Possible Duplicate:**   >  Remove vertical space around align I would like to center two text lines with equations. Normally, one can do that with the `align*` environment. But I do not want the extra vertical space at the top and the bottom of the formulas (see example below). An alternative could be to simply center the formulas with `\centerline`. But then, the two equation symbols will not be placed one below the other. Here is an example:               \documentclass[a4paper]{article}      \usepackage{amsmath}          \begin{document}      text before % Extra space after this line     \begin{align*}       1 &= 1 \\       x &= \text{here is a long formula}     \end{align*}     text after % Extra space before this line          text before \\     \centerline{$1 = 1$} \\ % equation symbols not below each other     \centerline{$x = \text{here is a long formula}$} \\     text after     \end{document}      Is it possible to use `align*` without the extra vertical space ? If not, what could be another solution ?


title: Need help with table references

text: I'm currently using the `aastex` package and I'm having a problem with the `\deluxetable` environment. Here's what I want to do: I would like LaTeX to automatically convert my `\citet{blah}` entries into numerical citations and to then automatically populate `\tablerefs` with the author-year form of the citation. I would also like the counting of these citations to be independent of the rest of the paper, such that each table starts from "1". I'm currently handling this all "manually" using Excel. ### LaTeX + Excel method:   1. Sort table columns by citation   2. Copy list of author citations and assign each a number, being careful to assign the same number to repeated citations   3. After removing redundancies, use alphabetized list of citations with newly assigned number in the `\tablerefs`   4. Replace original citation column from table with numerical citations from step 2. Clearly, this becomes a pain very quickly when there are a) many tables, b) the tables change frequently. Any help would be appreciated. PS: I am still something of a TeX noob, so my apologies if I've bungled some of the vernacular.


title: Problem in including a youtube video using media9

text: I am trying to include a youtube video in my document. However, the video is not playable in the created PDF in Acrobat in Windows 7. Interestingly, the example in the `media9` manual is played with no problem and I am using the same settings for another youtube video. The following is a MWE, where the first media is not playable (which is the one I want to include in my document) and the second one is the one which I found in the manual. Could someone shed light on this?               \documentclass[11pt,letterpaper]{article}          \usepackage{graphicx}     \usepackage{media9}          \begin{document}          The following youtube video is the one I want to include in the document.     \begin{figure}         \centering         \includemedia[         width=0.6\linewidth,height=0.3375\linewidth,         activate=pageopen,         flashvars={             modestbranding=1 % no YT logo in control bar             &autohide=1 % controlbar autohide             &showinfo=0 % no title and other info before start             &rel=0 % no related videos after end         }             ]{}{http://youtu.be/wKFRGVzrWgQ}     \end{figure}          The following youtube video is adapted from media9 package manual.     \begin{figure}         \centering         \includemedia[         width=0.6\linewidth,height=0.3375\linewidth,         activate=pageopen,         flashvars={             modestbranding=1 % no YT logo in control bar             &autohide=1 % controlbar autohide             &showinfo=0 % no title and other info before start             &rel=0 % no related videos after end             }             ]{}{http://www.youtube.com/v/w3f-WyDqOUw?rel=0}     \end{figure}     \end{document}


title: How to extend fancyref for listings?

text: I use a listings environment to format source code such as a JSON file.               \begin{lstlisting}[label={lst:json-example},caption=A JSON example]     {       "title" : "JSON specification",       "author" : "Douglas Crockford",       "mimeType" : "application/json",       "published" : "July 2006",       "reference" : "http://tools.ietf.org/html/rfc4627"     }     \end{lstlisting}      To reference the listing from within the text I would like to use fancyref as I use it does a good job for figures, tables, sections and so on. However, I noticed that it does not take care of listings.   From the documentation I managed to figure out how to define a basic extension as you can see in the MWE at the bottom of this question. As you probably know `fancyref` adds some magic to floating enviroments such as figures and tables and for chapter, sections and so on. When a reference is located on another page, the refering text changes automatically.               chapter 1 on the following page     Chapter 1 on the previous page     ﬁgure 1 on the facing page     Figure 1 on the page before      How can I enhance the above extension to automatically provide those magic references? * * * Here is a MWE to test the behavior.               \documentclass{scrreprt}          \usepackage{fancyref}     \usepackage{listings}          % ---------------------------------------------------------------     % Listing extension for fancyref using the prefix "lst".     % ---------------------------------------------------------------     \newcommand*{\fancyreflstlabelprefix}{lst}          % Main format     \frefformat{main}{\fancyreflstlabelprefix}{%     \MakeUppercase{\freflstname}\fancyrefdefaultspacing#1#2%     }%     \Frefformat{main}{\fancyreflstlabelprefix}{%     \MakeUppercase{\Freflstname}\fancyrefdefaultspacing#1#2%     }%     \Frefformat{main}{\fancyreflstlabelprefix}{Listing~#1}     \frefformat{main}{\fancyreflstlabelprefix}{listing~#1}          % Vario format     \frefformat{vario}{\fancyreflstlabelprefix}{%     \MakeUppercase{\freflstname}\fancyrefdefaultspacing#1#2%     }%     \Frefformat{vario}{\fancyreflstlabelprefix}{%     \MakeUppercase{\Freflstname}\fancyrefdefaultspacing#1#2%     }%     \Frefformat{vario}{\fancyreflstlabelprefix}{Listing~#1 on page #2}     \frefformat{vario}{\fancyreflstlabelprefix}{listing~#1 on page #2}          \begin{document}          I want to refer to a \fref{lst:example-1} and to a \fref{lst:example-2}.          \begin{lstlisting}[label={lst:example-1},caption=A first example]     {       "name" : "Listing 1"     }     \end{lstlisting}          \pagebreak          \begin{lstlisting}[label={lst:example-2},caption=A second example]     {       "name" : "Listing 2"     }     \end{lstlisting}               \end{document}


title: flalign* still maintaining indent - caused by \text{}?

text: The goal is to align all of the text that spans more than one line with the equal sign. It appears that if I use               \usepackage{amsmath}      in my preamble and then use               align*       it will align with the equal sign, but has a left indent I don't want (I want my text flush-left). I have found               flalign*       (again using               \usepackage{amsmath}      in the preamble), but it's not working as the examples I have found work - the text is not flush left. I wonder if it has something to do with \text? Here is the example I found that WORKS: ![enter image description here](http://i.stack.imgur.com/TDcei.png)               \documentclass{article}     \usepackage{showframe}     \usepackage{amsmath}     \begin{document}     \begin{flalign*}       \cos\theta_1 \cos\theta_2-\sin\theta_1\sin\theta_2 &= \cos(\theta_1 +\theta_2) &\\       \sin\theta_1 \cos\theta_2 + \cos\theta_1 \sin\theta_2 &= \sin(\theta_1+\theta_2) &     \end{flalign*}     \end{document}      Now, what I really want to be flush-left that ISN'T WORKING: ![enter image description here](http://i.stack.imgur.com/EAhes.png)               \documentclass{article}     \usepackage{showframe}     \usepackage{amsmath}     \begin{document}     \begin{flalign*}       C_C = &\text{ those indices from the set of $k$ where $V$ and $W$ are both observed (i.e.} \\          &\text{ ``completers")}     \end{flalign*}     \end{document}      Again, I can't post an image of my results. I would like the `C_C` to be completely flush left. Does it have something to do with `\text` in my expression, which wasn't used in the example I found that worked?


title: Page break before caption in lstlisting

text: I have the following settings for a lstlisting:                   \lstset{       language=XML,       numbers=left,               numberstyle=\tiny\color{gray},       stepnumber=1,                          numbersep=5pt,                  % how far the line-numbers are from the code       backgroundcolor=\color{white},      % choose the background color. You must       showspaces=false,               % show spaces adding       showstringspaces=false,         % underline spaces       showtabs=false,                 % show tabs within strings       frame=single,                   % adds a frame       rulecolor=\color{black},        % if not set, the frame-color       tabsize=2,                      % sets default tabsize to 2 spaces       captionpos=b,                   % sets the caption-position to bottom       breaklines=true,                % sets automatic line breaking       breakatwhitespace=false,        % sets if automatic breaks should only happen       title=\lstname,                   % show the filename of files                                       % also try caption instead of title       keywordstyle=\color{blue},          % keyword style       commentstyle=\color{dkgreen},       % comment style stringstyle=\color{mauve},       breakautoindent=true,       framextopmargin=6pt,       framexbottommargin=6pt,       belowcaptionskip=10pt,       abovecaptionskip=1.2em,       aboveskip=15pt,     }      The problem occurs when I add a listing in the end of a page. Sometimes it happens that the caption of the listing shows up on the next page - without any code: ![new page without code but caption](http://i.stack.imgur.com/k7BtF.jpg) I do want to have page-breaks in my listings but I don't want to have breaks before the caption.


title: How to flush right but align left?

text: I am writing an introduction, and I need to put my name at the end of it at the right side of the page, but it should be aligned left:               Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem     I psum has been the industry's standard dummy text ever since the 1500s, when an      unknown printer took a galley of type and scrambled it to make a type specime n     book. It has survived not only five centuries, but also the leap into electronic     typesetting, remaining essentially unchanged. It was popularised in the 1960s w     ith the release of Letraset.                                                                            Andriy D.                                                                       Toronto, 2009      What is the best way to achieve this? Any tips appreciated!


title: Align items on the left

text: Please, how can I align items on the left (reduce horizontal spacing) ?               \begin{itemize}          \item[\textbullet]  first     \item[\textbullet]  second     \item[\textbullet] third          \end{itemize}


title: Reference to page-range: can LaTeX convert "3-4" to p. 4f or "3-5" to p. 3ff ?

text: The `varioref` package can also cite page ranges by defining a reference to 2 different labels with `\vpagerefrange`. I did not find information about an option which allows to typeset   * "5-6" as "5f"   * and every range spanning more than 2 pages to "5ff" Is there a package or an option which allows to do that automatically?