Hi,
I am using IEEETrans.cls to format my paper. Now I need to add the name of the conference at the right hand corner of each page. Please advise me how to do that. Mail me at [email protected]. It is really urgent.
I'm trying to save some text inside an environment for later use. The smallest test case I could come up with is this. The saved text in the sbox isn't available after the environment is closed. How can I work around that? Thanks.
\documentclass{article}
\begin{document}
\newsavebox{\somebox}
\begin{itemize}
\item hello1
\item hello1 \sbox{\somebox}{Some text}
\end{itemize}
This should show something, but does not: "\usebox{\somebox}"
\end{document}
Hi, How can I insert multiple figures each of them has a caption and label, without using minipage.
I wrote this code, but just there is one caption :(
\begin{figure}[htp]
\centering
\label{figur}\caption{equation...}
\begin{tabular}{cc}
% Requires \usepackage{graphicx}
\includegraphics[width=60mm]{explicit3185.eps}&
\includegraphics[width=60mm]{explicit3183.eps}\\
\includegraphics[width=60mm]{explicit1501.eps}&
\includegraphics[width=60mm]{explicit23185.eps}\\
\includegraphics[width=60mm]{explicit23183.eps}&
\includegraphics[width=60mm]{explicit21501.eps}\\
\end{tabular}
\end{figure}
Hi,
Is there a way to set environment variables from within a (bash) shell script?
I want to set some environment variables on some servers using a small script rather than typing. Some forum posts believe it is impossible.
Any Ideas?
I am after a solution which will enable me to enter all my hardware/software elements (sort of like resource management), create a set of 'test environments' and assign hardware and software to that test environment for a given period. The idea is so that everyone can see and update what they need in any given environment to meet their project needs.
Does anyone know of any systems out there which can achieve this? Vendor recommendations are welcome, but please call out your interest in it.
I am using Red Hat Linux Enterprise 5. I am always using export command to set environment variable. I am wondering any other ways of setting environment variables and pros/cons of all alternative ways. Any answers or recommended readings?
Thanks in advance!
I've recently started using Windows (having used Ubuntu up until now) and I find myself unable to properly set environment variables. Whenever I set them they don't seem to work. I've been going to Start-Edit Environment Variables for your Account and editing the PATH value in the upper half of the GUI. Here's what I've got so far.
;C:\Chocolatey\bin;C:\tools\mysql\current\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\MySQL\MySQL Server 5.6\bin\;C:\Python33\Scripts;
These are each the parent directories of the executables I'd like to be able to run by name from CMD, but mysql, git, and pip aren't being recognized. Am I doing something wrong syntactically or at a general understanding level? I'd like to be able to run these commands without having to specify the full path to the executables every time.
EDIT: The full PATH extracted from CMD
PATH=C:\Python33\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.4\; ;C:\Chocolatey\bin;C:\tools\mysql\current\bin
I'm being forced to use Windows by my work environment, I don't enjoy the state of affairs.
I am working to rebuild my company's dev/test/QA environment. We have 10-15 programmers that are involved in a number of projects. They currently all develop locally on their PCs and use the dev environment for testing. We currently do not have a QA environment, so deployments are frequently a pain because bugs are usually found after something has gone live. Here's what I envision:
Doing away with everyone's local admin privileges and making everyone develop on a dev server
Create a QA environment that is identical to our production systems. This will allow them to test deployments.
Create a new test environment that is more locked down than the dev server so that proper testing can be done.
What are your thoughts? What is the best way to set up an environment like this? We develop ASP .NET applications using MS Visual Studio 2008 (if that helps).
I'm running a perl script through SSH, in the perl script I query environment variables using
$ENV{MY_VAR_NAME} and it works fine when run locally. But through SSH, all environment variables become unset.
I also tried to run
system("source ~/.bash_profile");
at the beginning of my script to no avail.
Any tips?
EDIT:
Rephrasing my question.
I have machine A and B.
I ran my perl on machine B, trying to get the environment variables on B and it worked.
Then I ssh from A to B running the same script, i.e., using this code
ssh user@B perl myscript.pl
This time the environment variables on B are all blank.
Any tips?
UPDATE:
I found that running the above script, ~/.bashrc on Machine B was invoked, but after setting environment variables in ~/.bashrc, run the above command again and still I don't see any environment variables.
Also, if my perl script contains only
echo $ENV{PATH}
Then I get
/usr/bin:/bin:/usr/sbin:/sbin
I am looking for a way of generating PNG images of equations from LATEX source code embedded in templates. For example, given:
[% FILTER latex_display ]
\begin{eqnarray*}
\max && U(x,y) \\
\mathrm{s.t.} && p_x x + p_y y \leq I \\
&& x \geq 0, y \geq 0
\end{eqnarray*}
[% END %]
I would like to get the output:
<div class="latex display"><img src="equation.png" width="x" height="y"></div>
which should ultimately display as:
I am using ttree to generate documents offline. I know about Template::Plugin::Latex but that is geared towards producing actual documents out of LATEX templates.
Any suggestions?
I have a PHP script that compiles LaTeX documents with the use of:
exec('cd /path/to/doc && /usr/bin/latexmk -pdf filename.tex');
This is working for some of my LaTeX documents but my latest document doesn't compile and a look at the log reveals:
!pdfTeX error: pdflatex (file ecrm1000): Font ecrm1000 at 600 not found
==> Fatal error occurred, no output PDF file produced!
Which I have found is the result of LaTeX not being able to see the required font packages. When I run the same compile command under my username the document compiles as it should. So my question is, how can I get PHP (executing as www-data) to get access to the necessary LaTeX packages?
I have tried installing the required package under the www-data account using:
sudo -u www-data sudo apt-get install texlive-fonts-recommended
but it askes for www-data's password, which I don't believe was set by me and isn't anything I've thrown at it.
I'm running Ubuntu 12.04 if it's any help.
For a university project I want to test a C++11 program on a 32-core machine. Unfortunately the machine has Ubuntu 12.04 with GCC 4.6 installed (we need GCC 4.7 because of some C++11 threading features).
In such an environment I would normally run a chroot with a custom linux (say a debootstrap with Ubuntu 12.10). Since we don't get root access on the machine we can't use chroot.
So far I have prepared a run-time environment using debootstrap for our code, I compiled it in the debootstrap environemnt. Then copied it onto the server (using rsync).
In order to run our C++ code I set the LD_LIBRARY_PATH to
export LD_LIBRARY_PATH=~/debootstrap/usr/lib/:~/debootstrap/lib64/:~/debootstrap/usr/lib/x86_64-linux-gnu/:~/debootstrap/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
and so far our code seems to run. I'm however stuck with our python code. It doesn't seem to be sufficient to set the paths manually.
export PYTHONPATH=~/debootstrap/usr/lib/python2.7/dist-packages:~/debootstrap/usr/lib/python2.7:~/debootstrap/usr/lib/python2.7/plat-linux2:~/debootstrap/usr/lib/python2.7/lib-tk:~/debootstrap/usr/lib/python2.7/lib-dynload:~/debootstrap/usr/local/lib/python2.7/dist-packages:~/debootstrap/usr/lib/pymodules/python2.7:~/debootstrap/usr/lib/python2.7/dist-packages/PIL:~/debootstrap/usr/lib/python2.7/dist-packages/gtk-2.0:~/debootstrap/usr/lib/python2.7
Executing our script results in
ImportError: No module named _path
Is there an easier way to accomplish a "fake"-chroot than just overriding and creating environment variables?
Note I need python since we created a custom C++-Python module in order to run our tests. Maybe I should create two questions from this.
I've run into an issue where an intel compiler generated program that I'm running with taskset has been putting its temporary files into the working directory instead of /tmp (defined by environment variable TMPDIR). If run by itself, it works correctly. If run with taskset (e.g.
taskset -c 0 <program>
Then it seems to completely ignore the TMPDIR environment variable. I then verified this by writing a quick bash script as follows:
contents of test.sh:
#!/bin/bash
echo $TMPDIR
When run by itself:
$ export TMPDIR=/tmp
$ test.sh
/tmp
When run through taskset:
$ export TMPDIR=/tmp
$ taskset -c 1 test.sh
""
Another test. If I export the TMPDIR variable inside of my script and then use taskset to spawn a new process, it doesn't know about that variable:
#!/bin/bash
export TMPDIR=/tmp
taskset -c 1 sh -c export
When run, the list of exported variables does not include TMPDIR. It works correctly with any other exported environment variable. If i diff the output of:
export
and
taskset -c 1 bash -c export
Then I see that there are 4 changes. The taskset spawned export doesn't have LD_LIBRARY_PATH, NLSPATH (intel compiler variable), SHLVL is 3 instead of 1, and TMPDIR is missing.
Can anyone tell me why?
Installed kubuntu on thursday
Installed LaTeX on my kubuntu machine, using full
Compiled an old document and it worked fine
Downloaded a CV template from http://www.latextemplates.com/template/two-column-one-page-cv
Compiled it, got error
Fatal fontspec error: "cannot-use-pdftex"
The fontspec package requires either XeTeX or LuaTeX to function.
You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
instead of plain "latex" or "pdflatex".
See the fontspec documentation for further information.
For immediate help type H .
Installed XeLaTex using this guide http://ledgersmb.org/faq/xelatex i.e.
7 Installed texlive-xetex that includes xelatex
apt-get install texlive-xetex
apt-get install liblatex-{driver,encode,table}-perl
apt-get install libtemplate-plugin-latex-per
8) Compiled CV template again, did not work.
Related: No Xelatex in texlive 2012
Excuse me if my question is not clear enough, I'm new to linux.
Having some trouble with with ant reading environment variables in Ubuntu 9.1.
Specifically, the build tasks my company uses has a token like ${env.CATALINA_HOME] in the main build.xml. I set CATALINA_HOME to the correct value in /etc/environment, ~/.pam_environment and (just to be safe) my .bashrc. I can see the correct value when I run printenv from bash, or when I eval (getenv "CATALINA_HOME") in emacs. Ant refuses to build to the correct directory though; instead I get a folder named ${env.CATALINA_HOME} in the same directory as my build.xml.
Any idea what's happening there, and/or how to fix it?
I've got a set of RewriteCond rules that test for various mobile devices and then set environment variables like "env=device:.iphone" or "env=device:.smartphone" if the useragent matches an iPhone or Android device.
I'm trying to now redirect the user to custom-styled 404/500 server error pages for each device, by way of the error pages.
Ideally I'd like to be able to test for a variable being there, and then write in a custom ErrorDocument string. But an apache doesn't seem to work in this case.
Any ideas how I can construct if/else tests in an apache conf file for environment vars?
I have a very long document containing lots of svg images created using the extension TexMaths. This extension uses the latex installation to create svg image of the inputted equation (or set of equations). The latex code for each equation (or set of equations) is embedded in the image as part of its Description. Such a Description can be accessed by right clicking the svg image and choosing the option Description.
I want to replace all the svg images using a suitable macro, by the embedded descriptions.
e.g. from
The Einstein's famous equation, [svg embedded equation : E = mc 2], tells us that mass can be converted to energy and vice-versa.
To
The Einstein's famous equation, E = mc^2, tells us that mass can be converted to energy and vice-versa.
This will allow me to convert by hand the odt file containing numerous TexMaths equations to LaTeX.
I am trying to start a service that requires a env. variable to be set to certain path. I set this variable in "/etc/profile.d/". However when I start this service using the service command, it doesn't work.
man service:
service runs a System V init script in as predictable environment as possible,
removing most environment variables and with current working directory set to /.
So it seems that service is removing my variables. How should I set the variables up to keep them from being removed. Or is that something i should not do.
I could start the service manually using the init-scripts, or even hardcode the path into the script, but I'd like to know how to use it with the service command.
Apache's module mod_env offers a handy way of setting environment variables in configuration files, like:
<VirtualHost *:80>
ServerName xyz.com
DocumentRoot /var/www/rails_app/public
PassengerAppRoot /var/www/rails_app
SetEnv MY_VARIABLE contents
</VirtualHost>
http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv
However, in nginx I couldn't find anything that serves the same purpose. What's the alternative here? I thought of setting environment variables in .profile files (I am using Ubuntu 10.04), but that wouldn't have the same "per vHost" isolation I have with Apache, right?
What are the alternatives here?