| 
					
				 | 
			
			
				@@ -3696,9 +3696,13 @@ Return output file name." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   ;; in working directory and then moved to publishing directory. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   (org-publish-attachment 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    plist 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   (org-latex-compile 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    (org-publish-org-to 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     'latex filename ".tex" plist (file-name-directory filename))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ;; Default directory could be anywhere when this function is 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ;; called.  We ensure it is set to source file directory during 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ;; compilation so as to not break links to external documents. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   (let ((default-directory (file-name-directory filename))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     (org-latex-compile 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      (org-publish-org-to 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       'latex filename ".tex" plist (file-name-directory filename)))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    pub-dir)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |